Smart contract interactions in coq

Jakob Botsch Nielsen, Bas Spitters*

*Corresponding author for this work

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

7 Citations (Scopus)

Abstract

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.

Original languageEnglish
Title of host publicationFormal Methods- FM 2019 International Workshops - Revised Selected Papers
EditorsEmil Sekerinski, Nelma Moreira, José N. Oliveira, Daniel Ratiu, Riccardo Guidotti, Marie Farrell, Matt Luckcuck, Diego Marmsoler, José Campos, Troy Astarte, Laure Gonnord, Antonio Cerone, Luis Couto, Brijesh Dongol, Martin Kutrib, Pedro Monteiro, David Delmas
Number of pages12
Place of publicationCham
PublisherSpringer
Publication dateJan 2020
Pages380-391
ISBN (Print)9783030549930
ISBN (Electronic)978-3-030-54994-7
DOIs
Publication statusPublished - Jan 2020
Event3rd World Congress on Formal Methods, FM 2019 - Porto, Portugal
Duration: 7 Oct 201911 Oct 2019

Conference

Conference3rd World Congress on Formal Methods, FM 2019
Country/TerritoryPortugal
CityPorto
Period07/10/201911/10/2019
SeriesLecture Notes in Computer Science
Volume12232
ISSN0302-9743

Keywords

  • Blockchain
  • Coq
  • Formal verification
  • Smart contracts

Fingerprint

Dive into the research topics of 'Smart contract interactions in coq'. Together they form a unique fingerprint.

Cite this