Author:
Rudrapatna K. Shyamasundar
Affiliation:
Department of Computer Science and Engineering, Indian Institute of Technology Bombay, Powai, Mumbai 400076, India
Keyword(s):
Distributed Programs, ERC20 Tokens, Smart Contract, Linearization, Consensus, Interference Free.
Abstract:
ERC20 is a standard for the creation of a specific type of tokens called ERC20 tokens, one of the most widely adopted tokens on Ethereum. ERC20 tokens are transferred through dedicated transactions among Ethereum addresses, and managed by smart contracts. Nondeterministic behaviour has been observed on the smart contracts that manage ERC20 tokens resulting in owners losing significant amounts while using it. In this paper, we first discuss issues of nondeterministic behaviour in the ERC20 smart contract, and the standard general remedies that have been proposed in the literature to avoid nondeterministic behaviour in ERC20. Then, through the notion of linearizability, it is shown that as ERC20 permits unbounded concurrency, the linearizability of the ERC20 smart contract is undecidable - thus, demonstrating the subtle complexity of ERC20 and the strong synchronization requirements of ERC20. Finally, treating ERC20 smart contract as a set of asynchronous interacting processes executin
g on a blockchain, we describe an approach that is common in classical programming language specification, and show how a set of constraints on the traces of ERC20 executions based on interference freedom property for concurrent execution on the blockchain overcomes the nondeterministic behaviour; we shall further sketch how such an execution can be implemented in Solidity. Furthermore, we discuss how the two approaches of linerarization and interference freedom mutually benefit each other and assist in arriving at constraints that leads to wait-free implementation of smart contracts.
(More)