Lune

FSE2024顶会

Demystifying Invariant Effectiveness for Securing Smart Contracts

Zhiyang Chen, Ye Liu, Sidi Mohamed Beillahi, Yi Li, Fan Long

摘要

Smart contract transactions associated with security attacks often exhibit distinct behavioral patterns compared with historical benign transactions before the attacking events. While many runtime monitoring and guarding mechanisms have been proposed to validate invariants and stop anomalous transactions on the fly, the empirical effectiveness of the invariants used remains largely unexplored. In this paper, we studied 23 prevalent invariants of 8 categories, which are either deployed in high-profile protocols or endorsed by leading auditing firms and security experts. Using these well-established invariants as templates, we developed a tool Trace2Inv which dynamically generates new invariants customized for a given contract based on its historical transaction data. We evaluated Trace2Inv on 42 smart contracts that fell victim to 27 distinct exploits on the Ethereum blockchain. Our findings reveal that the most effective invariant guard alone can successfully block 18 of the 27 identified exploits with minimal gas overhead. Our analysis also shows that most of the invariants remain effective even when the experienced attackers attempt to bypass them. Additionally, we studied the possibility of combining multiple invariant guards, resulting in blocking up to 23 of the 27 benchmark exploits and achieving false positive rates as low as 0.28%. Trace2Inv significantly outperforms state-of-the-art works on smart contract invariant mining and transaction attack detection in accuracy. Trace2Inv also surprisingly found two previously unreported exploit transactions.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Automated Attack Synthesis for Constant Product Market Makers 引用了 SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses
  • Precise Static Identification of Ethereum Storage Variables 引用了 Ethainter: a smart contract security analyzer for composite vulnerabilities
  • Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks 引用了 Making Smart Contracts Smarter
  • Ethainter: a smart contract security analyzer for composite vulnerabilities 引用了 Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
  • Ethainter: a smart contract security analyzer for composite vulnerabilities 引用了 Making Smart Contracts Smarter
  • HOUSTON: Real-Time Anomaly Detection of Attacks against Ethereum DeFi Protocols 引用了 Ethainter: a smart contract security analyzer for composite vulnerabilities
  • HOUSTON: Real-Time Anomaly Detection of Attacks against Ethereum DeFi Protocols 引用了 Making Smart Contracts Smarter
  • sFuzz: an efficient adaptive fuzzer for solidity smart contracts 引用了 Making Smart Contracts Smarter
  • SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses 引用了 Making Smart Contracts Smarter
  • SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper7

  1. Detecting Various DeFi Price Manipulations with LLM ReasoningJuantao Zhong, Daoyuan Wu, Ye Liu, Maoyi Xie 等ASE 2025 · 3 次引用
  2. Precise Static Identification of Ethereum Storage VariablesSifis Lagouvardos, Yannis Bollanos, Michael Debono, Neville Grech 等ICSE 2026 · 2 次引用
  3. HOUSTON: Real-Time Anomaly Detection of Attacks against Ethereum DeFi ProtocolsDongyu Meng, Fabio Gritti, Robert McLaughlin, Nicola Ruaro 等NDSS 2026 · 2 次引用
  4. Automated Attack Synthesis for Constant Product Market MakersSujin Han, Jinseo Kim, Sung-Ju Lee, Insu YunISSTA 2025
  5. Democratizing the Cryptocurrency Ecosystem by Just-In-Time Transformation of Mining ProgramsWei Liu, Zhenhua Li, Feng Qian, Feiyu Jin 等ASE 2025

它引用的 Paper16

  1. Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 2,306 次引用
  2. Sereum: Protecting Existing Smart Contracts Against Re-Entrancy AttacksMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviNDSS 2019 · 298 次引用
  3. sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin 等ICSE 2020 · 260 次引用
  4. SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow AnalysesJaeseung Choi, Doyeon Kim, Soomin Kim, Gustavo Grieco 等ASE 2021 · 164 次引用
  5. Ethainter: a smart contract security analyzer for composite vulnerabilitiesLexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz 等PLDI 2020 · 163 次引用

相关 Paper

  1. VERISMART: A Highly Precise Safety Verifier for Ethereum Smart ContractsSunbeom So, Myungho Lee, Jisu Park, Heejo Lee 等S&P 2020 · 133 次引用
  2. eTainter: detecting gas-related vulnerabilities in smart contractsAsem Ghaleb, Julia Rubin, Karthik PattabiramanISSTA 2022 · 57 次引用
  3. Automated Inference on Financial Security of Ethereum Smart ContractsWansen Wang, Wenchao Huang, Zhaoyi Meng, Yan Xiong 等USENIX Security 2023
  4. Enforcing Control Flow Integrity on DeFi Smart ContractsZhiyang Chen, Sidi Mohamed Beillahi, Pasha Barahimi, Cyrus Minwalla 等ICSE 2026
  5. Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker ContractsShuo Yang, Jiachi Chen, Mingyuan Huang, Zibin Zheng 等ICSE 2024 · 24 次引用
黄昏的海面,两侧是细线勾勒的悬崖