[Paper Review] VeriSmart: A Highly Precise Safety Verifier for Ethereum Smart Contracts
VeriSmart is a highly precise, fully automated verifier for Ethereum smart contracts that detects arithmetic safety bugs—such as integer over/underflows and division-by-zero—with near-zero false positives. It achieves this by automatically discovering and leveraging transaction invariants through a novel CEGIS-style algorithm, outperforming existing tools in both precision and recall on real-world contracts.
We present VeriSmart, a highly precise verifier for ensuring arithmetic safety of Ethereum smart contracts. Writing safe smart contracts without unintended behavior is critically important because smart contracts are immutable and even a single flaw can cause huge financial damage. In particular, ensuring that arithmetic operations are safe is one of the most important and common security concerns of Ethereum smart contracts nowadays. In response, several safety analyzers have been proposed over the past few years, but state-of-the-art is still unsatisfactory; no existing tools achieve high precision and recall at the same time, inherently limited to producing annoying false alarms or missing critical bugs. By contrast, VeriSmart aims for an uncompromising analyzer that performs exhaustive verification without compromising precision or scalability, thereby greatly reducing the burden of manually checking undiscovered or incorrectly-reported issues. To achieve this goal, we present a new domain-specific algorithm for verifying smart contracts, which is able to automatically discover and leverage transaction invariants that are essential for precisely analyzing smart contracts. Evaluation with real-world smart contracts shows that VeriSmart can detect all arithmetic bugs with a negligible number of false alarms, far outperforming existing analyzers.
Motivation & Objective
- To address the critical need for precise and exhaustive verification of Ethereum smart contracts, especially for arithmetic safety, due to their immutability and high financial risk.
- To overcome the limitations of existing tools that suffer from high false positive or false negative rates in detecting arithmetic vulnerabilities.
- To develop an automated, scalable, and precise verification approach that does not rely on manual annotations or incomplete analysis.
- To enable fully automated, exhaustive, and precise verification of smart contracts by discovering domain-specific invariants during analysis.
- To demonstrate that automatic invariant discovery significantly improves verification precision and recall in real-world smart contract analysis.
Proposed method
- The core method is a CEGIS-style (Counter-Example Guided Inductive Synthesis) algorithm that iteratively generates and validates candidate transaction invariants during verification.
- The algorithm discovers transaction invariants—properties that hold across arbitrary interleavings of transactions—by analyzing control and data flow in smart contracts.
- It uses symbolic execution and SMT solving to validate candidate invariants and refine them through counterexample feedback.
- The approach is tailored to Ethereum smart contracts and focuses on arithmetic safety, including over/underflows and division-by-zero.
- The verification process is exhaustive and sound, ensuring no vulnerabilities are missed, while precision is maintained by leveraging discovered invariants.
- The method is generalizable beyond arithmetic safety and can be applied to other safety properties in smart contracts.
Experimental results
Research questions
- RQ1Can a fully automated verification tool achieve both high precision and high recall in detecting arithmetic safety bugs in Ethereum smart contracts?
- RQ2How effective is automatic discovery of transaction invariants in improving the precision of smart contract verification?
- RQ3Can a CEGIS-style algorithm be effectively adapted to the domain of smart contracts to reduce false positives while maintaining exhaustiveness?
- RQ4How does the performance of VeriSmart compare to existing state-of-the-art tools in terms of vulnerability detection and false positive rates?
- RQ5To what extent do transaction invariants—unlike general abstract domains—capture the semantic constraints necessary for precise arithmetic safety verification?
Key findings
- VeriSmart detected all 487 known arithmetic vulnerabilities (e.g., over/underflows) in 60 real-world smart contracts with a false positive rate of only 0.41%.
- In comparison, existing bug-finding tools like Osiris, Oyente, Mythril, and MantiCore missed over 29.3% of known vulnerabilities and reported higher false positive rates (>5.4%).
- VeriSmart outperformed state-of-the-art verifiers Zeus and SMTChecker by significantly reducing false positives, thanks to its ability to automatically discover and use transaction invariants.
- The tool achieved near-perfect recall (100%) and near-zero false positives, demonstrating the effectiveness of its invariant discovery mechanism.
- The CEGIS-style algorithm successfully inferred meaningful, domain-specific invariants that are not captured by traditional abstract domains like intervals or octagons.
- The evaluation confirms that automatic invariant discovery is essential for achieving both precision and exhaustiveness in smart contract verification.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.