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.
翻译:现代链条支持除加密外的各种分布式应用程序, 包括智能合同( 智能合同) -- -- 让用户在分布式和分散式方式下执行任意代码。 不管其预期应用方式如何, 链条平台暗含地假定共识, 正确执行智能合同, 从而要求所有交易都得到完全订单。 只是最近才认识到共识对于防止在加密货币( Guerraoui et al., PoDC' 19) 中双向运行是没有必要的, 与共同的信念相反。 这个结果显示, 当前的实施可能牺牲了效率和可缩放性, 因为他们比实际需要的更加紧密。 更令人惊讶的是, Eceem 的 ERC 20 质标的同步性平台要求, 是最广泛采用的智能联系人之一。 也就是说, 我们将智能合同标作为同时标的模型, 分析它的共识数, 与标准的误差值相比, 更接近同步性要求。 更令人惊讶的是, ERC 20 的同步性能取决于对象的同步性要求, 具体性要求, 是如何改变我们的直态标准 。