Isabelle/Solidity: A deep Embedding of Solidity in Isabelle/HOL

Diego Marmsoler 🌐 and Achim D. Brucker 🌐

July 18, 2022

This is a development version of this entry. It might change over time and is not stable. Please refer to release versions for citations.


Smart contracts are automatically executed programs, usually representing legal agreements such as financial transactions. Thus, bugs in smart contracts can lead to large financial losses. For example, an incorrectly initialized contract was the root cause of the Parity Wallet bug that saw $280M worth of Ether destroyed. Ether is the cryptocurrency of the Ethereum blockchain that uses Solidity for expressing smart contracts. We address this problem by formalizing an executable denotational semantics for Solidity in the interactive theorem prover Isabelle/HOL. This formal semantics builds the foundation of an interactive program verification environment for Solidity programs and allows for inspecting them by (symbolic) execution. We combine the latter with grammar based fuzzing to ensure that our formal semantics complies to the Solidity implementation on the Ethereum Blockchain. Finally, we demonstrate the formal verification of Solidity programs by two examples: constant folding and a simple verified token.


BSD License


August 2, 2023
Changing expressions do not have side effects anymore. Adding support for instantiation of contracts. Adding weakest precondition calculus for the verification of statements. (revision fb4d111b2dde)


Session Solidity

Depends on