FM Conference 2026 Conference Paper
Towards Formally Verified Smart Contracts Compilation
- Elvira Albert
- Samir Genaim
- Enrique Martin-Martin
Abstract Many compilation stages of smart contracts on the Ethereum blockchain have been transitioned to the intermediate language. Tasks such as smart contract optimization and bytecode generation are—or will soon be—performed directly at the level in the compilers for the higher-level languages such as Solidity. In this paper, we develop a formal semantics of programs in Rocq, suitable for verification, which allows formal reasoning at the level of code or generation tools processing programs. Our semantics is expressive enough to be the basis for formal verification tools, and simple enough to make the development of such tools feasible. In order to prove its adequacy for verification, we develop in Rocq a checker (and associated soundness proofs), based on our semantics, able to verify the results of the liveness analysis stage of the official Solidity compiler, which opens the door towards formally verified Ethereum’s smart contracts compilation. Experiments on more than 1, 500 smart contracts show that we are able to automatically verify ’s liveness analysis results in negligible time.