[Paper Review] Formalising and verifying smart contracts with Solidifier: a bounded model checker for Solidity
This paper presents Solidifier, a bounded model checker for Solidity that formalizes a core subset of the language using the Solid language and translates it into Boogie for verification via Corral. It enables precise detection of semantic property violations—such as memory aliasing and storage layout issues—by systematically exploring execution paths up to a given depth, outperforming existing tools in both precision and semantic fidelity while maintaining competitive performance.
The exploitation of smart-contract vulnerabilities can have catastrophic consequences such as the loss of millions of pounds worth of crypto assets. Formal verification can be a useful tool in identifying vulnerabilities and proving that they have been fixed. In this paper, we present a formalisation of Solidity and the Ethereum blockchain using the Solid language and its blockchain; a Solid program is obtained by explicating/desugaring a Solidity program. We make some abstractions that over-approximate the way in which Solidity/Ethereum behave. Based on this formalisation, we create Solidifier: a bounded model checker for Solidity. It translates Solid into Boogie, an intermediate verification language, that is later verified using Corral, a bounded model checker for Boogie. Unlike much of the work in this area, we do not try to find specific behavioural/code patterns that might lead to vulnerabilities. Instead, we provide a tool to find errors/bad states, i.e. program states that do not conform with the intent of the developer. Such a bad state, be it a vulnerability or not, might be reached through the execution of specific known code patterns or through behaviours that have not been anticipated.
Motivation & Objective
- To address the critical need for reliable verification of smart contracts to prevent catastrophic financial losses due to code vulnerabilities.
- To provide a formal semantic foundation for a representative subset of Solidity, abstracting away low-level complexities while preserving key behaviors.
- To develop a tool that detects semantic property violations rather than relying on pattern-based vulnerability detection.
- To improve the accuracy of formal verification by faithfully modeling Solidity's unorthodox memory model and storage layout.
- To evaluate Solidifier against existing tools in terms of precision, speed, and semantic fidelity.
Proposed method
- Formalizing a core subset of Solidity using the Solid language, which desugars and simplifies Solidity constructs for clearer semantics.
- Translating Solid programs into Boogie, an intermediate verification language, to enable formal reasoning.
- Using Corral, a bounded model checker for Boogie, to symbolically explore all execution paths up to a user-defined depth.
- Encoding Solidity’s memory model and storage layout with special care to capture aliasing and deterministic layout behaviors.
- Defining user-specified semantic properties (e.g., invariants, safety conditions) to check for violations during model checking.
- Configuring Corral with tailored settings to balance exploration depth and performance while minimizing false positives.
Experimental results
Research questions
- RQ1Can a formalization of Solidity’s semantics in a simplified language (Solid) enable more precise verification than low-level EVM-based approaches?
- RQ2How does the precision of Solidifier compare to existing tools like Mythril, VeriSol, and solc-verify in detecting semantic property violations?
- RQ3To what extent does Solidifier faithfully capture Solidity’s memory model and storage layout semantics?
- RQ4Does bounded model checking with a small bound suffice to detect common smart contract bugs in practice?
- RQ5Can user-defined semantic properties uncover vulnerabilities beyond known code patterns?
Key findings
- Solidifier outperforms solc-verify in precision, reporting fewer false positives due to a more accurate Boogie encoding of Solidity semantics.
- Solidifier achieves comparable performance to other Boogie-based tools like VeriSol while demonstrating superior semantic fidelity, especially in capturing aliasing and storage layout behaviors.
- The tool successfully detected violations in the Aliasing and StorageDeterministicLayout benchmarks with only a few function calls, suggesting bounded model checking with small bounds is effective for common bugs.
- Evaluation shows that Solidifier's approach—formalizing high-level semantics and verifying user-defined properties—yields more reliable results than pattern-based symbolic execution or over-approximate verification.
- The results indicate that Solidifier more faithfully models Solidity’s memory model than other tools, as evidenced by correct detection of subtle aliasing and layout-related issues.
- Solidifier’s verification speed is competitive with other tools, suggesting that high-precision verification need not come at the cost of performance.
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.