Re-engineering ERC-20 Smart Contracts with Efficient Snapshots for the Java Virtual Machine

Marco Crosara, L. Olivieri, F. Spoto, Fabio Tagliaferro
{"title":"Re-engineering ERC-20 Smart Contracts with Efficient Snapshots for the Java Virtual Machine","authors":"Marco Crosara, L. Olivieri, F. Spoto, Fabio Tagliaferro","doi":"10.1109/BCCA53669.2021.9657047","DOIUrl":null,"url":null,"abstract":"Blockchain replicates the execution of transactions in a decentralized network of machines, supporting trust since each machine, by itself, cannot violate the rules for the transactions. Many applications of blockchains are related to the exchange of tokens, ie. valuable units that can be native, such as bitcoin and ether, or implemented in software, through smart contracts. Standards ensure token interoperability among decentralized applications of a certain platform, but they are general enough to be used in other contexts as well. A trend in blockchain is to implement such standards from a platform to another one, easing the design challenges with trusted and widely-used specifications. Exploiting the target language semantic can result in technological advantages with more efficient contracts. This paper presents a re-engineering of OpenZeppelin’s implementation of the ERC-20 standard for fungible tokens on Takamaka, a subset of Java for programming smart contracts in the Hotmoka blockchain. It starts with a literal translation from Solidity to Takamaka, but then describes a novel implementation for making snapshots of tokens, based on tree maps, that is possible in Java, but not in Solidity, and shows that it is much more efficient than the literal translation in Java from Solidity, within the Java Virtual Machine.","PeriodicalId":202582,"journal":{"name":"2021 Third International Conference on Blockchain Computing and Applications (BCCA)","volume":"254 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-11-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 Third International Conference on Blockchain Computing and Applications (BCCA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/BCCA53669.2021.9657047","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Blockchain replicates the execution of transactions in a decentralized network of machines, supporting trust since each machine, by itself, cannot violate the rules for the transactions. Many applications of blockchains are related to the exchange of tokens, ie. valuable units that can be native, such as bitcoin and ether, or implemented in software, through smart contracts. Standards ensure token interoperability among decentralized applications of a certain platform, but they are general enough to be used in other contexts as well. A trend in blockchain is to implement such standards from a platform to another one, easing the design challenges with trusted and widely-used specifications. Exploiting the target language semantic can result in technological advantages with more efficient contracts. This paper presents a re-engineering of OpenZeppelin’s implementation of the ERC-20 standard for fungible tokens on Takamaka, a subset of Java for programming smart contracts in the Hotmoka blockchain. It starts with a literal translation from Solidity to Takamaka, but then describes a novel implementation for making snapshots of tokens, based on tree maps, that is possible in Java, but not in Solidity, and shows that it is much more efficient than the literal translation in Java from Solidity, within the Java Virtual Machine.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
为Java虚拟机重新设计ERC-20智能合约和高效快照
区块链在分散的机器网络中复制交易的执行,支持信任,因为每台机器本身都不能违反交易规则。区块链的许多应用都与代币交换有关,即。有价值的单位,可以是本地的,比如比特币和以太币,或者通过智能合约在软件中实现。标准确保了某个平台的分散应用程序之间的令牌互操作性,但它们也足够通用,可以在其他上下文中使用。区块链的一个趋势是将这样的标准从一个平台实现到另一个平台,通过可信和广泛使用的规范来缓解设计挑战。利用目标语言语义可以通过更有效的契约带来技术优势。本文介绍了OpenZeppelin在Takamaka上实现可替代令牌的ERC-20标准的重新设计,Takamaka是用于在Hotmoka区块链中编程智能合约的Java子集。它首先从Solidity到Takamaka的字面翻译开始,然后描述了一种基于树映射的令牌快照的新实现,这在Java中是可能的,但在Solidity中不是,并表明它比在Java虚拟机中从Solidity到Java的字面翻译要高效得多。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
[BCCA 2021 Title page] The journey of Blockchain inclusion in Vehicular Networks: A Taxonomy Towards An Enhanced Reputation System for IOTA’s Coordicide Blockchain Based Lateral Transshipment Mobile Blockchain-Empowered Federated Learning: Current Situation And Further Prospect
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1