Modelling Bitcoin in Agda

04/17/2018
by   Anton Setzer, et al.
0

We present two models of the block chain of Bitcoin in the interactive theorem prover Agda. The first one is based on a simple model of bank accounts, while having transactions with multiple inputs and outputs. The second model models transactions, which refer directly to unspent transaction outputs, rather than user accounts. The resulting blockchain gives rise to a transaction tree. That model is formalised using an extended form of induction-recursion, one of the unique features of Agda. The set of transaction trees and transactions is defined inductively, while simultaneously recursively defining the list of unspent transaction outputs. Both structures model standard transactions, coinbase transactions, transaction fees, the exact message to be signed by those spending money in a transaction, block rewards, blocks, and the blockchain, and the second structure models as well maturation time for coinbase transactions and Merkle trees. Hashing and cryptographic operations and their correctness are dealt with abstractly by postulating corresponding operations. An indication is given how the correctness of this model could be specified and proven in Agda.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/12/2021

Tomen: Application of Bitcoin Transaction Based on Tor

Bitcoin has emerged in 2008, and after decades of development, it has be...
research
03/02/2020

BitcoinF: Achieving Fairness for Bitcoin in Transaction-Fee-Only Model

A blockchain, such as Bitcoin, is an append-only, secure, transparent, d...
research
10/04/2019

Fairness and Efficiency in DAG-based Cryptocurrencies

Bitcoin is a decentralised digital currency that serves as an alternativ...
research
10/04/2020

Mixing Strategies in Cryptocurrencies and An Alternative Implementation

Since the initial launch of Bitcoin by Satoshi Nakamoto in 2009, decentr...
research
09/25/2020

Investigation of 3-D Secure's Model for Fraud Detection

Background. 3-D Secure 2.0 (3DS 2.0) is an identity federation protocol ...
research
09/21/2018

Predicting the confirmation time of Bitcoin transactions

We study the probabilistic distribution of the confirmation time of Bitc...

Please sign up or login with your details

Forgot password? Click here to reset