Academia.eduAcademia.edu

Outline

Formal Verification of Smart Contracts

2016, Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security

https://doi.org/10.1145/2993600.2993611

Abstract

Ethereum is a framework for cryptocurrencies which uses blockchain technology to provide an open global computing platform, called the Ethereum Virtual Machine (EVM). EVM executes bytecode on a simple stack machine. Programmers do not usually write EVM code; instead, they can program in a JavaScript-like language, called Solidity, that compiles to bytecode. Since the main purpose of EVM is to execute smart contracts that manage and transfer digital assets (called Ether), security is of paramount importance. However, writing secure smart contracts can be extremely difficult: due to the openness of Ethereum, both programs and pseudonymous users can call into the public methods of other programs, leading to potentially dangerous compositions of trusted and untrusted code. This risk was recently illustrated by an attack on TheDAO contract that exploited subtle details of the EVM semantics to transfer roughly $50M worth of Ether into the control of an attacker. In this paper, we outline a framework to analyze and verify both the runtime safety and the functional correctness of Ethereum contracts by translation to F , a functional programming language aimed at program verification.

References (10)

  1. G. Barthe, C. Fournet, B. Grégoire, P.-Y. Strub, N. Swamy, and S. Zanella-Béguelin. Probabilistic relational verification for cryptographic implementations. In 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '14, pages 193-205. ACM, 2014.
  2. V. Buterin. Critical update re: Dao vulnerability. https://blog.ethereum.org/2016/06/17/ critical-update-re-dao-vulnerability, 2016.
  3. Ethereum. Solidity documentation -Release 0.2.0. http://solidity.readthedocs.io/, 2016.
  4. Ethereum. Solidity-browser. https://ethereum.github.io/browser-solidity, 2016.
  5. J.-C. Filliâtre and A. Paskevich. Why3 -where programs meet provers. In 22nd European Symposium on Programming, ESOP '13, volume 7792 of Lecture Notes in Computer Science, pages 125-128. Springer, 2013.
  6. L. Luu, D.-H. Chu, H. Olickel, P. Saxena, and A. Hobor. Making smart contracts smarter. Cryptology ePrint Archive, Report 2016/633, 2016. http://eprint.iacr.org/2016/633.
  7. S. Nakamoto. Bitcoin: A peer-to-peer electronic cash system. http://bitcoin.org/bitcoin.pdf.
  8. N. Swamy, C. Fournet, A. Rastogi, K. Bhargavan, J. Chen, P. Strub, and G. M. Bierman. Gradual typing embedded securely in javascript. In POPL '14, pages 425-438. ACM, 2014.
  9. N. Swamy, C. Hriţcu, C. Keller, A. Rastogi, A. Delignat-Lavaud, S. Forest, K. Bhargavan, C. Fournet, P.-Y. Strub, M. Kohlweiss, J.-K. Zinzindohoué, and S. Zanella-Béguelin. Dependent types and multi-monadic effects in F*. In 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '16, pages 256-270. ACM, 2016.
  10. G. Wood. Ethereum: A secure decentralised generalised transaction ledger. http://gavwood.com/paper.pdf.