CS Paper Radar

Defending the Peg: Real-Time Dynamic Protection and Anomaly Detection in DeFi Stablecoins

Hengxing Zeng, Shipeng Ye, Xiaoqi Li

cs.CR ·submitted 2026-08-26 10:21 UTC · v1

Abstract

With the rapid evolution of the Decentralized Finance (DeFi) ecosystem, stablecoins have emerged as a critical infrastructure bridging the cryptocurrency market with traditional financial paradigms. However, stablecoin systems rely heavily on smart contracts to execute automated operations. The immutable nature of these systems post-deployment means that the exploitation of security vulnerabilities can lead to irreversible, massive economic losses and potentially trigger systemic financial risks. Current research on stablecoin smart contract security faces challenges such as a lack of domain-specific targeting and the obsolescence of static defense models. To address this, this paper systematically analyzes common attack vectors in stablecoin environments and proposes a practical, real-time dynamic defense architecture. By analyzing 12 real-world security incidents, we elucidate the underlying mechanisms of high-risk patterns such as reentrancy attacks, oracle manipulation, and composite flash loan attacks. Concurrently, we construct a real-time anomaly detection model utilizing multi-dimensional on-chain temporal features and the Bi-LSTM algorithm. Experimental results demonstrate that this model achieves a classification accuracy of 96.61\%, with an average recall rate of 97.70\% for malicious attack samples, and a single inference latency ranging from 1.5 to 2.8 milliseconds.

Comment
22 pages, 5 figures

Closest papers

Nearest neighbours by meaning across the whole index.

DeFiFusion: Combining Transaction Events with Smart Contracts to Detect Price Manipulation Attacks

cs.CR cs.AIcs.SE ·2026-09-10 ·Rui Cao, Shaojing Fan, Liming Fang, Yuchan Liu, Yingying Jiao +1 more
similarity 0.72
Abstract · 12 pages, 10 figures

Decentralized Finance (DeFi) has emerged as a rapidly growing blockchain-based financial service, where market transaction dynamics and underlying smart contract logic are intricately intertwined. This autonomous interplay, while eliminating centralized intermediaries, significantly expands the vulnerability surface of DeFi protocols to Price Manipulation Attacks (PMAs), which have already inflicted catastrophic financial losses. Despite their gravity, existing detection paradigms suffer from fundamental limitations. Transaction-centric methods lack awareness of contract execution semantics, making them prone to false positives under legitimate market volatility, while static contract analyses ignore real transaction behaviors and frequently report vulnerabilities that are infeasible to exploit in practice. We present DeFiFusion, a dual-modal PMA detection framework that closes this gap by jointly modeling transaction events and smart contract semantics within a unified pipeline. Our core insight is that PMA maliciousness emerges only from the interaction between transaction behaviors and the contract logic they exploit; neither signal suffices in isolation. Accordingly, we derive price-manipulation-aware event encoding for extracting fine-grained temporal and economic features tailored to manipulation patterns. We further introduce LLM-based contract semantic extraction to supply the execution-logic context that prior behavioral methods lack. To fuse these modalities, we propose a Dual-Modal Projection-Fusion Transformer with T5-style relative positional encoding, capturing the cyclic multi-stage execution structures that distinguish PMAs from benign market activity. Extensive experiments demonstrate that DeFiFusion consistently achieves state-of-the-art detection performance, effectively recalling 222 of the 225 PMA cases while maintaining a precision of 96.10%.

0.28

SmartMemory: Detecting On-chain-off-chain Communication Inconsistency for Smart Contract via Memory-based Agent

cs.SE cs.CR ·2026-09-28 ·Zeqin Liao, Yuhong Nan, Henglong Liang, Zixu Gao, Lianyu Hu +5 more
dataset similarity 0.72
Abstract · Nil

Smart contracts underpin decentralized finance, where growing demand for on-chain/off-chain communication(OFC) has driven diverse applications such as cross-chain bridges, real-world asset tokenization, and fiat-backed stablecoins. TheOFC-related security incidents in these applications are increasingly frequent, but prior studies address separate vulnerability categories within OFC applications rather than providing a unified view, causing vulnerabilities outside known patterns to be missed.In this paper, we identify OFC inconsistency (OFCI) as a root cause of OFC vulnerabilities, which arises from business-logic flaw and ultimately breaks the equivalence between the on-chain and off-chain asset representations to induce inconsistency.Automatically detecting OFCIs faces two challenges including (1)locating heterogeneous business logic, and (2) transferring existing vulnerability knowledge to identify unseen OFCI instances. To this end, we propose SmartMemory, the first framework to leverage a memory-based agent for OFCI detection. To address heterogeneity, SmartMemory maps diverse implementations ofOFC contracts into a canonical business-semantic representation to locate the business logic for OFCI inspection. For knowledge reuse, SmartMemory integrates a memory-based agent to distill vulnerability knowledge from features into patterns and detection rules, enabling knowledge transfer across cases to identify unseenOFCIs. Lastly, SmartMemory performs taint analysis to verify the reachability, type, and impact of each candidate OFCI. We construct the first real-world OFCI dataset comprising 48 DApps with 81 OFCIs for evaluation, on which SmartMemory achieves80.68% precision and 87.65% recall. In addition, through an analysis of 325 real-world OFC applications, SmartMemory detects 36 previously unknown OFCIs, all of which have been confirmed and fixed by corresponding parties.

0.13

Price is Only the Symptom: Understanding and Analyzing Economic-State Manipulation Vulnerabilities in DeFi

cs.CR ·2026-10-31 ·Hao Wu, Haijun Wang, Xiapu Luo, Ming Fan, Ting Liu
similarity 0.71
Abstract

Economic-state manipulation has emerged as a significant security threat to decentralized finance (DeFi), causing substantial financial losses. Existing studies predominantly characterize these attacks as price manipulation, focusing on observable price distortions while overlooking underlying violations of economic-state integrity. We conduct a comprehensive empirical study of Economic-State Manipulation (ESM) vulnerabilities in DeFi. We first curate a diverse dataset comprising 276 real-world attacks and 91 Code4rena audit findings. Based on these cases, we develop a cause-oriented taxonomy comprising four primary categories and eleven subcategories. Our analysis reveals that ESM vulnerabilities extend beyond conventional price manipulation, frequently involving violations of protocol-internal accounting, AMM state consistency, and execution-time constraints. We further investigate the evaluation datasets of six existing studies and find that, although they cover 6-10 vulnerability subcategories, their distributions remain dominated by limited manipulation mechanisms. Furthermore, we systematically evaluate seven representative detection approaches on our dataset. Our results reveal limited coverage, with the best-performing approach identifying only 50.4% of real-world attacks. Through an analysis of false negatives and false positives, we identify fundamental limitations arising from reliance on predefined attack patterns, insufficient reasoning about economic-state semantics, and incomplete exploitability validation. These findings provide empirical insights for developing more generalizable ESM vulnerability detection techniques.

0.18

Smart Contract Invariants Protect Against Cybercriminals

cs.CR cs.SE ·2026-08-13 ·Sofia Bobadilla, Humaira Afrin, Angela Novelli, Martin Monperrus
benchmark similarity 0.66
Abstract

Blockchains are among the most adversarial environments in computing. Billions are stolen by cybercriminals who exploit vulnerabilities. This is an open problem and no concept or technique has proven to really make a difference. In this paper, we claim that the classical notion of program invariant is perhaps the most powerful solution to the problem. We devise anoriginal experimental protocol to 1) study how invariants would have protected against past real-world attacks and 2) whether state-of-the-art automated tools can find them. The experimental toolchain is sophisticated. It is based on INVARIANTEVAL, a benchmark of 28 real Ethereum exploits, each paired with a human-authored invariant that blocks the attack. We validate every invariant with PONDEREPLAY, a replay framework that re-executes transactions in order to prove the correctness and soundness of smart contract invariants. We demonstrate that smart contract invariants block all the cybercriminal attacks in INVARIANTEVAL, fully validated by replaying 108,637 historical transactions. Our large-scale experiments clearly demonstrate that smart contract invariants protect against cybercriminals.

0.04

Understanding Verification Vulnerabilities in Cross-chain Bridges: An Empirical Study

cs.CR cs.SE ·2026-10-09 ·Yuying Wang, Yi Guo, Jiachi Chen, Hanwen Zhang, Yi Sun
dataset similarity 0.65
Abstract · 22 pages, 12 figures, 10 tables

With the rapid development of blockchain technology, numerous heterogeneous blockchains have emerged, each featuring distinct architectures, consensus mechanisms, and application ecosystems. Cross-chain bridges have consequently become a critical infrastructure component, typically relying on smart contracts to facilitate message passing and asset transfers across heterogeneous blockchains. Unlike single-chain contracts, bridge contracts introduce additional verification logic to validate external-chain data, such as state proofs, message sender identities, and signatures. However, correctly implementing such logic is challenging. We refer to vulnerabilities that violate the security guarantees of cross-chain verification as Cross-chain Verification Vulnerabilities (CVVs). To characterize CVVs, we conduct the first systematic empirical study of this vulnerability class. By analyzing 588 security audit reports from 36 real-world cross-chain bridge projects, we derive 11 CVV patterns and organize them into 5 high-level categories according to the affected verification properties. Following this taxonomy, we construct a CVV dataset containing 830 vulnerability instances across 786 contract files. The dataset establishes mappings among audit reports, audited source-code versions, affected source files, and CVV-pattern labels. We then assess existing detection approaches. Current tools provide limited documented coverage of CVV patterns, while only two of four evaluated LLMs outperform an all-pattern constant baseline of 29.3% Macro-F1; the best reaches 51.2%. Together, the limited tool coverage and inconsistent LLM gains motivate detection methods tailored to cross-chain verification semantics.

0.15

A Lifecycle-Oriented Detection and Defense Framework for Price Manipulation Attacks in DeFi

cs.CR ·2026-08-16 ·Xingyu Xiong, Chang Liu, Xiaoqi Li
code/data similarity 0.64
Abstract · 21 pages, 5 figures

Aiming at frequent oracle price manipulation attacks in Decentralized Finance (DeFi), this paper investigates attack patterns, vulnerability types, risk assessment, automated detection, and defense strategies. Based on Oracle lifecycle theory, a three-layer attack tree covering the physical, protocol, and application layers is constructed to analyze the attack chain and identify the data election stage as a key intrusion point. Four major contract-level vulnerabilities are summarized: insufficient validation of price data flow, oracle call risks, uncontrolled cross-contract calls, and defects in AMM price reading logic. Fuzzy-AHP and Value-at-Risk (VaR) models are combined to quantify risk factors and construct a risk matrix covering technology, market, governance, and contract risks. An automated detection tool based on an extended Slither framework is developed using taint tracking and pattern matching. Finally, a multi-layer defense strategy is proposed, integrating trusted execution environments at the data source layer, TWAP smoothing and adaptive circuit breakers at the smart contract layer, and optimized kernel network configurations at the operating system layer. Experiments show that the proposed approach reduces attack-induced price deviation from 55.56% to below 5%. The detection tool achieves 94.38% accuracy and 92.31% recall, outperforming existing open-source tools.

0.26

On Identifying Sound Conditions for Frontrunning Resistance

cs.CR ·2026-09-10 ·Sebastian Holler, Anna Piscitelli, Jannik Albrecht, Stephan Dübler, Ghassan Karame +1 more
top venue similarity 0.64
Abstract · Accepted for CCS 2026

Blockchains enable decentralized applications through smart contracts---interactive programs executed through consensus. However, the inherently asynchronous nature of blockchain transaction ordering introduces a class of vulnerabilities known as frontrunning attacks, which have caused millions of dollars in losses in major blockchains, such as Ethereum. Frontrunning attacks arise because users interact with smart contracts through transactions, which are added to the blockchain by designated nodes called miners. Miners can exploit their ability to reorder, delay, or insert transactions to gain an advantage over honest users, effectively frontrunning them. Yet, to date, the field lacks a rigorous definition of what it even means for a contract to resist such attacks. Worse, we show that existing dynamic detection approaches are fundamentally inadequate: in a large-scale study comprising 287 smart contract audits, 55% of the 393 reported vulnerabilities identified by leading smart contract auditors fall outside the scope of state-of-the-art detection criteria. To address this gap, we propose the first formal definition of frontrunning vulnerability for smart contracts. Our definition captures a key insight: resistance to frontrunning is not an intrinsic property of a contract alone, but depends critically on how honest users interact with it. Grounded in this observation, we develop a sound algorithm for synthesizing secure interaction conditions, alongside a prototype implementation that we apply to audited real-world contracts---revealing previously undiscovered vulnerabilities in two Ethereum contracts.

0.43

Attack Patterns in Cross-chain Bridges: A Trust-based Empirical Analysis

cs.CR ·2026-11-01 ·Ishraq Samiha, Yasir Rahman, Rahma Mukta
code/data similarity 0.63
Abstract · 18 pages, 15 figures. The associated dataset is available at https://doi.org/10.5281/zenodo.23271026

The rapid growth of multiple blockchain ecosystems has made cross-chain bridges essential for transferring assets and information across independent blockchains. Their multi-component architectures, cross-chain trust assumptions, and concentration of valuable assets expose them to diverse security threats. This paper presents an empirical study of cross-chain bridge attacks based on 48 evidence-supported real-world incidents from January 2022 to August 2026. We propose a behaviour-based attack pattern architecture comprising six trust-violation attack patterns, each defined by the primary trust assumption violated by the attacker: Proof Forgery,Logic Exploitation, Event Injection, Economic-State Manipulation, Credential Seizure, and Infrastructure Hijacking. The architecture further maps these patterns to five functional domains of cross-chain bridges: Deposit, Relay, Verification, Execution, and Governance and Operations, separating how a trust assumption is violated from where the compromised trust boundary lies. The 48 incidents correspond to $2.676 billion in gross bridge-specific losses, with the ten largest incidents accounting for 92.4% of total losses. Measured on the primary loss basis, Proof Forgery and Credential Seizure make up 86.2% of all losses, and the Verification and Governance and Operations domains hold 93.9%. A handful of very large incidents drives this concentration, yet it still holds when we switch to other loss bases or reclassify the boundary cases. By tying what attackers do to the bridge functions and security assumptions they target, the architecture gives threat modelling for cross-chain bridges an empirical footing.

0.36