Smart Contract Interactions in Coq

11/12/2019
by   Jakob Botsch Nielsen, et al.
0

We present a model/executable specification of smart contract execution in Coq. Our formalization allows for inter-contract communication and generalizes existing work by allowing modelling of both depth-first execution blockchains (like Ethereum) and breadth-first execution blockchains (like Tezos). We represent smart contracts programs in Coq's functional language Gallina, enabling easier reasoning about functional correctness of concrete contracts than other approaches. In particular we develop a Congress contract in this style. This contract – a simplified version of the infamous DAO – is interesting because of its very dynamic communication pattern with other contracts. We give a high-level partial specification of the Congress's behavior, related to reentrancy, and prove that the Congress satisfies it for all possible smart contract execution orders.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/14/2020

Towards Cross-Blockchain Smart Contracts

In recent years, manifold blockchain protocols have been proposed by res...
research
07/14/2022

Multi: a Formal Playground for Multi-Smart Contract Interaction

Blockchains are maintained by a network of participants that run algorit...
research
07/24/2019

ConCert: A Smart Contract Certification Framework in Coq

We present a new way of embedding functional languages into the Coq proo...
research
09/14/2017

Combining Static and Dynamic Contract Checking for Curry

Static type systems are usually not sufficient to express all requiremen...
research
11/08/2018

YODA: Enabling computationally intensive contracts on blockchains with Byzantine and Selfish nodes

One major shortcoming of popular permissionless blockchains such as Bitc...
research
05/13/2022

Design-by-Contract for Flexible Multiparty Session Protocols – Extended Version

Choreographic models support a correctness-by-construction principle in ...
research
03/02/2023

Developing a Compiler for EROP – A Language for the Specification of Smart Contracts, An Experience Report

A smart contract is a translation of a standard paper-based contract tha...

Please sign up or login with your details

Forgot password? Click here to reset