skip to main content
10.1145/3167084acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Towards verifying ethereum smart contract bytecode in Isabelle/HOL

Published:08 January 2018Publication History

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.

References

  1. 2017. Securify. http://securify.ch .Google ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. Jean-Christophe Filliâtre and Andrei Paskevich. 2013. Why3 – where programs meet provers. In European Symposium on Programming. Springer, 125–128. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ethereum foundation. 2017. Solidity documentation. https://solidity. readthedocs.io/en/develop/ .Google ScholarGoogle Scholar
  6. Ethereum foundation. 2017. Subroutines and Static Jumps for the EVM. https://github.com/ethereum/EIPs/issues/615 .Google ScholarGoogle Scholar
  7. 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 ScholarGoogle Scholar
  8. 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 ScholarGoogle Scholar
  9. 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 ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. Xavier Leroy et al. 2012. The CompCert verified compiler. Documentation and userâĂŹs manual. INRIA Paris-Rocquencourt (2012).Google ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Magnus Oskar Myreen. 2009. Formal verification of machine-code programs . Ph.D. Dissertation. University of Cambridge, UK.Google ScholarGoogle Scholar
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. Christian Reitwiessner. 2016. Formal Verification of Smart Contracts. https://chriseth.github.io/notes/talks/formal_ic3_bootcamp .Google ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle Scholar
  21. Gavin Wood. 2014. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper 151 (2014).Google ScholarGoogle Scholar
  22. Jianjun Zhao. 1999. Analyzing Control Flow in Java Bytecode. In Proc. 16th Conference of Japan Society for Software Science and Technology . 313–316.Google ScholarGoogle Scholar

Index Terms

  1. Towards verifying ethereum smart contract bytecode in Isabelle/HOL

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            CPP 2018: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs
            January 2018
            306 pages
            ISBN:9781450355865
            DOI:10.1145/3176245

            Copyright © 2018 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 8 January 2018

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate18of26submissions,69%

            Upcoming Conference

            POPL '25

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader