Summing Up Smart Transitions

05/17/2021
by   Neta Elad, et al.
0

Some of the most significant high-level properties of currencies are the sums of certain account balances. Properties of such sums can ensure the integrity of currencies and transactions. For example, the sum of balances should not be changed by a transfer operation. Currencies manipulated by code present a verification challenge to mathematically prove their integrity by reasoning about computer programs that operate over them, e.g., in Solidity. The ability to reason about sums is essential: even the simplest ERC-20 token standard of the Ethereum community provides a way to access the total supply of balances. Unfortunately, reasoning about code written against this interface is non-trivial: the number of addresses is unbounded, and establishing global invariants like the preservation of the sum of the balances by operations like transfer requires higher-order reasoning. In particular, automated reasoners do not provide ways to specify summations of arbitrary length. In this paper, we present a generalization of first-order logic which can express the unbounded sum of balances. We prove the decidablity of one of our extensions and the undecidability of a slightly richer one. We introduce first-order encodings to automate reasoning over software transitions with summations. We demonstrate the applicability of our results by using SMT solvers and first-order provers for validating the correctness of common transitions in smart contracts.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/09/2019

solc-verify: A Modular Verifier for Solidity Smart Contracts

We present solc-verify, a source-level verification tool for Ethereum sm...
research
02/23/2018

A Semantic Framework for the Security Analysis of Ethereum smart contracts

Smart contracts are programs running on cryptocurrency (e.g., Ethereum) ...
research
04/20/2021

Modular Verification of Collaborating Smart Contracts

Smart contracts are programs that execute inside blockchains such as Eth...
research
03/01/2023

Formal and Executable Semantics of the Ethereum Virtual Machine in Dafny

The Ethereum protocol implements a replicated state machine. The network...
research
01/09/2020

SMT-Friendly Formalization of the Solidity Memory Model

Solidity is the dominant programming language for Ethereum smart contrac...
research
09/20/2021

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

Once you have invented digital money, you may need a ledger to track who...
research
10/18/2022

Compositional Reasoning for Side-effectful Iterators and Iterator Adapters

Iteration is a programming operation that traditionally refers to visiti...

Please sign up or login with your details

Forgot password? Click here to reset