We present improvements we made to our tool coq-of-solidity to formally verify Solidity smart contracts for any advanced properties, relying on the proof assistant ๐ Coq. The idea is to be able to prove the full absence of bugs โจ in very complex contracts, like L1 verifiers for zero-knowledge L2s ๐ต๏ธ, or contracts with very large amounts of money ๐ฐ (in the billions).
In this blog post, we present how we developed an effect inference mechanism to translate optimized Yul code combining variable mutations and control flow with loops and nested premature returns (break
, continue
, and leave
) to a clean ๐งผ purely functional representation in the proof system Coq.