Posted on by Achim D. Brucker, licensed under CC BY-ND 4.0.

Secure Smart Contracts with Isabelle/Solidity

Smart contracts are programs stored on the blockchain, often developed in a high-level programming language, the most popular of which is Solidity. Smart contracts are used to automate financial transactions and thus bugs can lead to large financial losses.

For example, in 2016, a vulnerability in an Ethereum smart contract was exploited, resulting in a loss of approximately $60M. More recently, hackers exploited a vulnerability in the DeFi-platform Poly Network to steal $600M. Overall, it is estimated that since 2019, more than $5B have been stolen due to vulnerabilities in smart contracts. The high impact of vulnerabilities in smart contracts, together with the fact that once deployed to the blockchain, they cannot be updated or removed easily, makes it important to “get them right” before they are deployed. To address this problem, we developed Isabelle/Solidity, a shallow embedding of Solidity in Isabelle/HOL.

Isabelle/Solidity consists of a novel formalization of the Solidity storage model, a shallow embedding of Solidity expressions and statements, an implementation of Isabelle commands to support a user in specifying Solidity smart contracts, and a verification condition generator to support a user in the verification.

In our paper at the Software Engineering and Formal Methods (SEFM 2024) conference [1], we describe Isabelle/Solidity in more detail and also show how we ensure its compliance to the official Solidity tooling.

References §

[1]
D. Marmsoler, A. Ahmed, and A. D. Brucker, “Secure smart contracts with Isabelle/Solidity,” in Software engineering and formal methods (SEFM), A. Madeira and A. Knapp, Eds. Heidelberg: Springer-Verlag, 2024. doi: 10.1007/978-3-031-77382-2_10. Author copy: http://logicalhacking.com/publications/marmsoler.ea-secure-smart-contracts-2024/

Welcome to the blog of the Software Assurance & Security Research Team at the University of Exeter. We blog regularly news, tips & tricks, as well as fun facts about software assurance, reliability, security, testing, verification, hacking, and logic.

You can also follow us on Twitter: @logicalhacking.

Categories

Archive

Tags

FormalMethods Isabelle/HOL ML/AI ProgramVerification SoftwareEngineering academia ai android apidesign appsec bitcoin blockchain bpmn browser browserextensions browsersecurity bug certification chrome composition confidentiality cordova dast devops devsecops dom dsbd efsm epsrc event events extensions fixeffort floss formaldocument formalmethods formalverification funding hol-ocl hol-testgen humanfactor hybridapps iast industry internetofthings iot isabelle/hol isabelledof isabellehol isadof latex logic maintance malicous mbst mobile mobile apps modelinference modeling monads monitoring msc neuralnetwork ocl ontology opensource owasp patches pedadogy pet phd phdlife phishing policy programminglanguages protocols protocolverfication publishing reliability research safelinks safety sap sast sdlc secdevops secureprogramming security securityengineering securitytesting semantics servicecomposition skills smartcontract smartcontracts smartthings smpc softwareeinginering softwaresecurity softwaresupplychain solidity staff&positions statemachine studentproject tcb teaching test&proof test@proof testing tips&tricks tools transport tuos uk uoe upgrade usability verification vulnerabilities vulnerableapplication webinar websecurity

Search


blog whole site