A Denotational Semantics of Solidity in Isabelle/HOL

Diego Marmsoler und Achim D. Brucker

Cover for marmsoler.ea:solidity-semantics:2021.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.

Schlüsselwörter: Solidity, Denotational Semantics, Isabelle/HOL, Gas Optimization
Kategorien: ,
Dokumente: (Artikel als PDF Datei)

QR Code for marmsoler.ea:solidity-semantics:2021.Bitte zitieren sie diesen Artikel wie folgt:
Diego Marmsoler und 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.
Schlüsselwörter: Solidity, Denotational Semantics, Isabelle/HOL, Gas Optimization
(Artikel als PDF Datei) (BibTeX) (Endnote) (RIS) (Word) (Share article on LinkedIn. Share article on CiteULike.)

BibTeX
@InCollection{ marmsoler.ea:solidity-semantics:2021,
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},
pdf = {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},
}