SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis
Zeqin Liao, Sicheng Hao, Yuhong Nan, Zibin Zheng
Abstract
Smart contracts written in Solidity are widely used in different blockchain platforms such as Ethereum, TRON and BNB Chain. One of the unique designs in Solidity smart contracts is its statereverting mechanism for error handling and access control. Unfortunately, a number of recent security incidents showed that adversaries also utilize this mechanism to manipulate critical states of smart contracts, and hence, bring security consequences such as illegal profit-gain and Deny-of-Service (DoS). In this paper, we call such vulnerabilities as the State-reverting Vulnerability (SRV). Automatically identifying SRVs poses unique challenges, as it requires an in-depth analysis and understanding of the state-dependency relations in smart contracts. This paper presents SmartState, a new framework for detecting state-reverting vulnerability in Solidity smart contracts via finegrained state-dependency analysis. SmartState integrates a set of novel mechanisms to ensure its effectiveness. Particularly, Smart-State extracts state dependencies from both contract bytecode and historical transactions. Both of them are critical for inferring dependencies related to SRVs. Further, SmartState models the generic patterns of SRVs (i.e., profit-gain and DoS) as SRV indicators, and hence effectively identify SRVs based on the constructed statedependency graph. To evaluate SmartState, we manually annotated a ground-truth dataset which contains 91 SRVs in the real world. Evaluation results showed that SmartState achieves a precision of 87.23% and a recall of 89.13%. In addition, SmartState successfully identifies 406 new SRVs from 47,351 real-world smart contracts. 11 of these SRVs are from popular smart contracts with high transaction amounts (i.e., top 2000). In total, our reported SRVs affect a total amount of digital assets worth 428,600 USD.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks cites ZEUS: Analyzing Safety of Smart Contracts
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks cites Making Smart Contracts Smarter
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks cites Securify: Practical Security Analysis of Smart Contracts
- SmartAxe: Detecting Cross-Chain Vulnerabilities in Bridge Smart Contracts via Fine-Grained Static Analysis cites ZEUS: Analyzing Safety of Smart Contracts
- SmartAxe: Detecting Cross-Chain Vulnerabilities in Bridge Smart Contracts via Fine-Grained Static Analysis cites Making Smart Contracts Smarter
- SmartAxe: Detecting Cross-Chain Vulnerabilities in Bridge Smart Contracts via Fine-Grained Static Analysis cites Securify: Practical Security Analysis of Smart Contracts
- ZEUS: Analyzing Safety of Smart Contracts cites Making Smart Contracts Smarter
- Consolidating Smart Contracts with Behavioral Contracts cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts cites ZEUS: Analyzing Safety of Smart Contracts
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts cites Making Smart Contracts Smarter
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts cites Securify: Practical Security Analysis of Smart Contracts
- SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
- SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites ZEUS: Analyzing Safety of Smart Contracts
- SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites Making Smart Contracts Smarter
- SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites Consolidating Smart Contracts with Behavioral Contracts
- SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites Securify: Practical Security Analysis of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts cites ZEUS: Analyzing Safety of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts cites Making Smart Contracts Smarter
Cited by top-tier papers3
- SmartAxe: Detecting Cross-Chain Vulnerabilities in Bridge Smart Contracts via Fine-Grained Static AnalysisZeqin Liao, Yuhong Nan, Henglong Liang, Sicheng Hao et al.FSE 2024 · 18 citations
- Consolidating Smart Contracts with Behavioral ContractsGuannan Wei, Danning Xie, Wuqi Zhang, Yongwei Yuan et al.PLDI 2024 · 6 citations
- SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language ModelsShihao Xia, Mengting He, Shuai Shao, Tingting Yu et al.OOPSLA 2026
Builds on18
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais et al.CCS 2018 · 1,108 citations
- ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 citations
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contractsThomas Durieux, João F. Ferreira, Rui Abreu, Pedro CruzICSE 2020 · 373 citations
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy AttacksMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviNDSS 2019 · 298 citations
Related papers
- Detecting Smart Contract State-Inconsistency Bugs via Flow Divergence and Multiplex Symbolic ExecutionYinxi Liu, Wei Meng, Yinqian ZhangFSE 2025 · 1 citation
- PrettySmart: Detecting Permission Re-delegation Vulnerability for Token Behaviors in Smart ContractsZhijie Zhong, Zibin Zheng, Hong-Ning Dai, Qing Xue et al.ICSE 2024 · 12 citations
- SCVHunter: Smart Contract Vulnerability Detection Based on Heterogeneous Graph Attention NetworkFeng Luo, Ruijie Luo, Ting Chen, Ao Qiao et al.ICSE 2024 · 38 citations
- Smartreco: Detecting Read-Only Reentrancy via Fine-Grained Cross-DApp AnalysisJingwen Zhang, Zibin Zheng, Yuhong Nan, Mingxi Ye et al.ICSE 2025 · 4 citations
- AdvSCanner: Generating Adversarial Smart Contracts to Exploit Reentrancy Vulnerabilities Using LLM and Static AnalysisYin Wu, Xiaofei Xie, Chenyang Peng, Dijun Liu et al.ASE 2024 · 9 citations
