by Diego Marmsoler and Achim D. Brucker
Smart contracts are programs, usually automating 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 made USD 280mil worth of Ether inaccessible. Ether is the cryptocurrency of the Ethereum blockchain that uses Solidity for expressing smart contracts.
In this paper, we address this problem by presenting 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 Solidity programs 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 memory optimization.
Keywords: Solidity, Denotational Semantics, Isabelle/HOL, Gas Optimization
Categories: ,
Documents: (full text as PDF file)
Please cite this article as follows:
Diego Marmsoler and Achim D. Brucker.
A Denotational Semantics of Solidity in Isabelle/HOL.
In Software Engineering and Formal Methods (SEFM). Lecture Notes in Computer Science, Springer-Verlag, 2021.
Keywords: Solidity, Denotational Semantics, Isabelle/HOL, Gas Optimization
(full text as PDF file) (BibTeX) (Endnote) (RIS) (Word) (
abstract | = | {Smart contracts are programs, usually automating 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 made USD 280mil worth of Ether inaccessible. Ether is the cryptocurrency of the Ethereum blockchain that uses Solidity for expressing smart contracts.\\\\In this paper, we address this problem by presenting 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 Solidity programs 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 memory optimization.}, | |
address | = | {Heidelberg}, | |
author | = | {Diego Marmsoler and Achim D. Brucker}, | |
booktitle | = | {Software Engineering and Formal Methods (SEFM)}, | |
editor | = | {Radu Calinescu and Corina Pasareanu}, | |
isbn | = | {3-540-25109-X}, | |
keywords | = | {Solidity, Denotational Semantics, Isabelle/HOL, Gas Optimization}, | |
language | = | {USenglish}, | |
= | {https://www.brucker.ch/bibliography/download/2021/marmsoler.ea-solidity-semantics-2021.pdf}, | ||
publisher | = | {Springer-Verlag}, | |
series | = | {Lecture Notes in Computer Science}, | |
title | = | {A Denotational Semantics of {Solidity} in {Isabelle/HOL}}, | |
url | = | {https://www.brucker.ch/bibliography/abstract/marmsoler.ea-solidity-semantics-2021}, | |
year | = | {2021}, |