On the Synchronization Power of Token Smart Contracts

Modern blockchains support a variety of distributed applications beyond cryptocurrencies, including smart contracts, which let users execute arbitrary code in a distributed and decentralized fashion. Regardless of their intended application, blockchain platforms implicitly assume consensus for the correct execution of a smart contract, thus requiring that all transactions are totally ordered. It was only recently recognized that consensus is not necessary to prevent double-spending in a cryptocurrency (Guerraoui et al., PODC’19), contrary to common belief. This result suggests that current implementations may be sacrificing efficiency and scalability because they synchronize transactions much more tightly than actually needed. In this work, we study the synchronization requirements of Ethereum’s ERC20 token contract, one of the most widely adopted smart contacts. Namely, we model a smart-contract token as a concurrent object and analyze its consensus number as a measure of synchronization power. We show that the richer set of methods supported by ERC20 tokens, compared to standard cryptocurrencies, results in strictly stronger synchronization requirements. More surprisingly, the synchronization power of ERC20 tokens depends on the object’s state and can thus be modified by method invocations. To prove this result, we develop a dedicated framework to express how the object’s state affects the needed synchronization level. Our findings indicate that ERC20 tokens, as well as other token standards, are more powerful and versatile than plain cryptocurrencies, and are subject to dynamic requirements. Developing specific synchronization protocols that exploit these dynamic requirements will pave the way towards more robust and scalable blockchain platforms.

[1]  Stefan Dziembowski,et al.  Perun: Virtual Payment Hubs over Cryptocurrencies , 2019, 2019 IEEE Symposium on Security and Privacy (SP).

[2]  Satoshi Nakamoto Bitcoin : A Peer-to-Peer Electronic Cash System , 2009 .

[3]  Rachid Guerraoui,et al.  Introduction to Reliable and Secure Distributed Programming (2. ed.) , 2011 .

[4]  Mariana Raykova,et al.  RapidChain: Scaling Blockchain via Full Sharding , 2018, CCS.

[5]  Ethan Buchman,et al.  The latest gossip on BFT consensus , 2018, ArXiv.

[6]  Friedhelm Victor,et al.  Measuring Ethereum-Based ERC20 Token Networks , 2019, Financial Cryptography.

[7]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[8]  Petr Kuznetsov,et al.  Online Payments by Merely Broadcasting Messages , 2020, 2020 50th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN).

[9]  Silvio Micali,et al.  Algorand: Scaling Byzantine Agreements for Cryptocurrencies , 2017, IACR Cryptol. ePrint Arch..

[10]  Philipp Jovanovic,et al.  OmniLedger: A Secure, Scale-Out, Decentralized Ledger via Sharding , 2018, 2018 IEEE Symposium on Security and Privacy (SP).

[11]  Aggelos Kiayias,et al.  The Bitcoin Backbone Protocol: Analysis and Applications , 2015, EUROCRYPT.

[12]  Ittai Abraham,et al.  HotStuff: BFT Consensus with Linearity and Responsiveness , 2019, PODC.

[13]  Alessandro Sorniotti,et al.  On limitations of using cloud storage for data replication , 2012, IEEE/IFIP International Conference on Dependable Systems and Networks Workshops (DSN 2012).

[14]  Michel Raynal,et al.  Concurrent Programming: Algorithms, Principles, and Foundations , 2012, Springer Berlin Heidelberg.

[15]  Pieter Wuille,et al.  Enabling Blockchain Innovations with Pegged Sidechains , 2014 .

[16]  Fred B. Schneider,et al.  Implementing fault-tolerant services using the state machine approach: a tutorial , 1990, CSUR.

[17]  Zibin Zheng,et al.  Solutions to Scalability of Blockchain: A Survey , 2020, IEEE Access.

[18]  Elaine Shi,et al.  On Scaling Decentralized Blockchains - (A Position Paper) , 2016, Financial Cryptography Workshops.

[19]  Rachid Guerraoui,et al.  The consensus number of a cryptocurrency , 2019, Distributed Computing.

[20]  Aviv Zohar,et al.  PHANTOM: A Scalable BlockDAG Protocol , 2018, IACR Cryptol. ePrint Arch..

[21]  Nancy A. Lynch,et al.  Impossibility of distributed consensus with one faulty process , 1983, PODS '83.