Demystifying Invariant Effectiveness for Securing Smart Contracts
Zhiyang Chen, Ye Liu, Sidi Mohamed Beillahi, Yi Li, Fan Long

TL;DR
This paper evaluates the empirical effectiveness of invariants in securing smart contracts, introduces Trace2Inv for dynamic invariant generation, and demonstrates its high success rate in blocking exploits on Ethereum.
Contribution
It presents Trace2Inv, a novel tool that dynamically generates customized invariants for smart contracts, improving attack detection and prevention effectiveness.
Findings
Most invariants can block over half of known exploits.
Combining multiple invariants blocks up to 85% of exploits.
Trace2Inv outperforms existing invariant mining methods.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security · Insurance and Financial Risk Management
