Formal Verification of Smart Contracts: Short Paper - Bhargavan, Karthikeyan; Delignat-Lavaud, Antoine; Fournet, Cédric; Gollamudi, Anitha; Gonthier, Georges; Kobeissi, Nadim; Kulatova, Natalia; Rastogi, Aseem; Sibut-Pinote, Thomas; Swamy, Nikhil; Zanella-Béguelin, Santiago (PLAS '16 Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security, 2016)
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.