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

09/20/2021
by   Murdoch Gabbay, et al.
0

Once you have invented digital money, you may need a ledger to track who owns what – and an interface to that ledger so that users of your money can transact. On the Tezos blockchain this implies: a smart contract (distributed program), storing in its state a ledger to map owner addresses to token quantities, and standardised entrypoints to transact on accounts. A bank does a similar job – it maps account numbers to account quantities and permits users to transact – but in return the bank demands trust, it incurs expense to maintain a centralised server and staff, it uses a proprietary interface ... and it may speculate using your money and/or display rent-seeking behaviour. A blockchain ledger is by design decentralised, inexpensive, open, and it won't just bet your tokens on risky derivatives (unless you ask). The FA1.2 standard is an open standard for ledger-keeping smart contracts on the Tezos blockchain. Several FA1.2 implementations already exist. Or do they? Is the standard sensible and complete? Are the implementations correct? And what are they implementations of? The FA1.2 standard is written in English, a specification language favoured by wet human brains but notorious for its incompleteness and ambiguity when rendered into dry and unforgiving code. In this paper we report on a formalisation of the FA1.2 standard as a Coq specification, and on a formal verification of three FA1.2-compliant smart contracts with respect to that specification. Errors were found and ambiguities were resolved; but also, there now exists a mathematically precise and battle-tested specification of the FA1.2 ledger standard. We will describe FA1.2 itself, outline the structure of the Coq theories – which in itself captures some non-trivial and novel design decisions of the development – and review the detailed verification of the implementations.

READ FULL TEXT

page 6

page 7

research
06/07/2019

Smart Contract Design Meets State Machine Synthesis: Case Studies

Modern blockchain systems support creation of smart contracts -- statefu...
research
05/29/2020

WhylSon: Proving your Michelson Smart Contracts in Why3

This paper introduces WhylSon, a deductive verification tool for smart c...
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
08/06/2020

A Survey of Smart Contract Formal Specification and Verification

A smart contract is a computer program which allows users to define and ...
research
11/14/2018

On the specification and verification of atomic swap smart contracts

Blockchain systems and smart contracts provide ways to securely implemen...
research
05/20/2020

Formal Specification and Verification of Solidity Contracts with Events

Events in the Solidity language provide a means of communication between...
research
05/17/2021

Summing Up Smart Transitions

Some of the most significant high-level properties of currencies are the...

Please sign up or login with your details

Forgot password? Click here to reset