Verification of recursive Bitcoin contracts

11/28/2020
by   Massimo Bartoletti, et al.
0

Smart contracts - computer protocols that regulate the exchange of crypto-assets in trustless environments - have become popular with the spread of blockchain technologies. A landmark security property of smart contracts is liquidity: in a non-liquid contract, it may happen that some assets remain frozen, i.e. not redeemable by anyone. The relevance of this issue is witnessed by recent liquidity attacks to Ethereum, which have frozen hundreds of USD millions. We address the problem of verifying liquidity on BitML, a DSL for smart contracts with a secure compiler to Bitcoin, featuring primitives for currency transfers, contract renegotiation and consensual recursion. Our main result is a verification technique for liquidity. We first transform the infinite-state semantics of BitML into a finite-state one, which focusses on the behaviour of a chosen set of contracts, abstracting from the moves of the context. With respect to the chosen contracts, this abstraction is sound, i.e. if the abstracted contract is liquid, then also the concrete one is such. We then verify liquidity by model-checking the finite-state abstraction. We implement a toolchain that automatically verifies liquidity of BitML contracts and compiles them to Bitcoin, and we assess it through a benchmark of representative contracts.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/18/2019

Developing secure Bitcoin contracts with BitML

We present a toolchain for developing and verifying smart contracts that...
research
07/19/2021

Compositional Verification of Smart Contracts Through Communication Abstraction (Extended)

Solidity smart contracts are programs that manage up to 2^160 users on a...
research
02/29/2020

Renegotiation and recursion in Bitcoin contracts

BitML is a process calculus to express smart contracts that can be run o...
research
07/15/2020

Bitcoin Trace-Net: Formal Contract Verification at Signing Time

Smart contracting protocols promise to regulate the transfer of cryptocu...
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...
research
05/11/2023

Specification and Verification of Side-channel Security for Open-source Processors via Leakage Contracts

Leakage contracts have recently been proposed as a new security abstract...
research
07/20/2018

Specification Mining for Smart Contracts with Automatic Abstraction Tuning

Smart contracts are programs that manage digital assets according to a c...

Please sign up or login with your details

Forgot password? Click here to reset