Smart Contract Design Meets State Machine Synthesis: Case Studies

06/07/2019
by   Dmitrii Suvorov, et al.
0

Modern blockchain systems support creation of smart contracts -- stateful programs hosted and executed on a blockchain. Smart contracts hold and transfer significant amounts of digital currency which makes them an attractive target for security attacks. It has been shown that many contracts deployed to public ledgers contain security vulnerabilities. Moreover, the design of blockchain systems does not allow the code of the smart contract to be changed after it has been deployed to the system. Therefore, it is important to guarantee the correctness of smart contracts prior to their deployment. Formal verification is widely used to check smart contracts for correctness with respect to given specification. In this work we consider program synthesis techniques in which the specification is used to generate correct-by-construction programs. We focus on one of the special cases of program synthesis where programs are modeled with finite state machines (FSMs). We show how FSM synthesis can be applied to the problem of automatic smart contract generation. Several case studies of smart contracts are outlined: crowdfunding platform, blinded auction and a license contract. For each case study we specify the corresponding smart contract with a set of formulas in linear temporal logic (LTL) and use this specification together with test scenarios to synthesize a FSM model for that contract. These models are later used to generate executable Solidity code which can be directly used in a blockchain system.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/15/2022

Smart Contract Synthesis Modulo Hyperproperties

Smart contracts are small but highly security-critical programs that imp...
research
09/20/2021

Money grows on (proof-)trees: the formal FA1.2 ledger standard

Once you have invented digital money, you may need a ledger to track who...
research
05/12/2022

Reactive Synthesis of Smart Contract Control Flows

Smart contracts are small but highly error-prone programs that implement...
research
12/03/2018

Debugging Smart Contract's Business Logic Using Symbolic Model-Checking

Smart contracts are a special type of programs running inside a blockcha...
research
08/30/2021

HELMHOLTZ: A Verifier for Tezos Smart Contracts Based on Refinement Types

A smart contract is a program executed on a blockchain, based on which m...
research
07/27/2022

Declarative Smart Contracts

This paper presents DeCon, a declarative programming language for implem...
research
03/06/2022

Verification of Bitcoin Script in Agda using Weakest Preconditions for Access Control

This paper contributes to the verification of programs written in Bitcoi...

Please sign up or login with your details

Forgot password? Click here to reset