ABSTRACT
Blockchain technology has increasing attention in research and across many industries. The Ethereum blockchain offers smart contracts, which are small programs defined, executed, and recorded as transactions in the blockchain transaction history. These smart contracts run on the Ethereum Virtual Machine (EVM) and can be used to encode agreements, transfer assets, and enforce integrity conditions in relationships between parties. Smart contracts can carry financial value, and are increasingly used for safety-, security-, or mission-critical purposes. Errors in smart contracts have led and will lead to loss or harm. Formal verification can provide the highest level of confidence about the correct behaviour of smart contracts. In this paper we extend an existing EVM formalisation in Isabelle/HOL by a sound program logic at the level of bytecode. We structure bytecode sequences into blocks of straight-line code and create a program logic to reason about these. This abstraction is a step towards control of the cost and complexity of formal verification of EVM smart contracts.
- 2017. Securify. http://securify.ch .Google Scholar
- Joel Beeren, Matthew Fernandez, Xin Gao, Gerwin Klein, Rafal Kolanski, Japheth Lim, Corey Lewis, Daniel Matichuk, and Thomas Sewell. 2016. Finite Machine Word Library. Archive of Formal Proofs (June 2016). http://isa-afp.org/entries/Word_Lib.html, Formal proof development.Google Scholar
- Karthikeyan Bhargavan, Antoine Delignat-Lavaud, Cédric Fournet, Anitha Gollamudi, Georges Gonthier, Nadim Kobeissi, Natalia Kulatova, Aseem Rastogi, Thomas Sibut-Pinote, Nikhil Swamy, and Santiago Zanella-Béguelin. 2016. Formal Verification of Smart Contracts: Short Paper. In Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security (PLAS ’16) . ACM, New York, NY, USA, 91–96. Google ScholarDigital Library
- Jean-Christophe Filliâtre and Andrei Paskevich. 2013. Why3 – where programs meet provers. In European Symposium on Programming. Springer, 125–128. Google ScholarDigital Library
- Ethereum foundation. 2017. Solidity documentation. https://solidity. readthedocs.io/en/develop/ .Google Scholar
- Ethereum foundation. 2017. Subroutines and Static Jumps for the EVM. https://github.com/ethereum/EIPs/issues/615 .Google Scholar
- Everett Hildenbrandt, Manasvi Saxena, Xiaoran Zhu, Nishant Rodrigues, Philip Daian, Dwight Guth, and Grigore Rosu. 2017. KEVM: A Complete Semantics of the Ethereum Virtual Machine . Technical Report.Google Scholar
- Yoichi Hirai. 2017. Defining the Ethereum Virtual Machine for Interactive Theorem Provers. In WTSC’17, 1st Workshop on Trusted Smart Contracts, International Conference on Financial Cryprography and Data Security .Google Scholar
- Gerwin Klein, Rafal Kolanski, and Andrew Boyton. 2012. Mechanised Separation Algebra. In International Conference on Interactive Theorem Proving, Lennart Beringer and Amy Felty (Ed.). Springer, Princeton, USA, 332–337.Google Scholar
- Gerwin Klein and Tobias Nipkow. 2006. A machine-checked model for a Java-like language, virtual machine, and compiler. ACM Transactions on Programming Languages and Systems (TOPLAS) 28, 4 (2006), 619– 695. Google ScholarDigital Library
- Xavier Leroy et al. 2012. The CompCert verified compiler. Documentation and userâĂŹs manual. INRIA Paris-Rocquencourt (2012).Google Scholar
- Loi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena, and Aquinas Hobor. 2016. Making Smart Contracts Smarter. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (CCS ’16) . ACM, New York, NY, USA, 254–269. Google ScholarDigital Library
- Daniel Matichuk, Toby Murray, and Makarius Wenzel. 2016. Eisbach: A Proof Method Language for Isabelle. Journal of Automated Reasoning 56, 3 (March 2016), 261–282. Google ScholarDigital Library
- Dominic P. Mulligan, Scott Owens, Kathryn E. Gray, Tom Ridge, and Peter Sewell. 2014. Lem: reusable engineering of real-world semantics. In Proceedings of the 19th ACM SIGPLAN international conference on Functional programming, Gothenburg, Sweden, September 1-3, 2014, Johan Jeuring and Manuel M. T. Chakravarty (Eds.). ACM, 175–188. Google ScholarDigital Library
- Magnus Oskar Myreen. 2009. Formal verification of machine-code programs . Ph.D. Dissertation. University of Cambridge, UK.Google Scholar
- Tobias Nipkow, Lawrence Paulson, and Markus Wenzel. 2002. Isabelle/HOL — A Proof Assistant for Higher-Order Logic . Lecture Notes in Computer Science, Vol. 2283. Springer. Google ScholarDigital Library
- Scott Owens, Michael Norrish, Ramana Kumar, Magnus O. Myreen, and Yong Kiam Tan. 2017. Verifying Efficient Function Calls in CakeML. Proceedings of the ACM on Programming Languages 1, ICFP, Article 18 (Aug. 2017), 27 pages. Google ScholarDigital Library
- Christian Reitwiessner. 2016. Formal Verification of Smart Contracts. https://chriseth.github.io/notes/talks/formal_ic3_bootcamp .Google Scholar
- John C Reynolds. 2002. Separation logic: A logic for shared mutable data structures. In Logic in Computer Science, 2002. Proceedings. 17th Annual IEEE Symposium on . IEEE, 55–74. Google ScholarDigital Library
- Matt Suiche. 2017. Porosity: A Decompiler For Blockchain-Based Smart Contracts Bytecode. https://github.com/comaeio/porosity/blob/ master/defcon2017/dc25-msuichePorosity-Decompiling-Ethereum-Smart-Contracts-wp.pdf .Google Scholar
- Gavin Wood. 2014. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper 151 (2014).Google Scholar
- Jianjun Zhao. 1999. Analyzing Control Flow in Java Bytecode. In Proc. 16th Conference of Japan Society for Software Science and Technology . 313–316.Google Scholar
Index Terms
- Towards verifying ethereum smart contract bytecode in Isabelle/HOL
Recommendations
Towards analyzing the complexity landscape of solidity based ethereum smart contracts
WETSEB '18: Proceedings of the 1st International Workshop on Emerging Trends in Software Engineering for BlockchainThe blockchain based decentralized cryptocurrency platforms are one of the hottest topics in tech at the moment. Though most of the interest is generated by cryptocurrency related activities, it is becoming apparent that a much wider spectrum of ...
A formal verification tool for Ethereum VM bytecode
ESEC/FSE 2018: Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software EngineeringIn this paper, we present a formal verification tool for the Ethereum Virtual Machine (EVM) bytecode. To precisely reason about all possible behaviors of the EVM bytecode, we adopted KEVM, a complete formal semantics of the EVM, and instantiated the K-...
Smart Contract and Blockchain Based Contract Management System
ECBS 2021: 7th Conference on the Engineering of Computer Based SystemsThis paper presents theoretical and practical research on the possibilities of applying smart contracts in the field of law and a contract management system which allows users to conclude contracts based on blockchain technology. The transition from ...
Comments