{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,13]],"date-time":"2026-01-13T06:00:54Z","timestamp":1768284054047,"version":"3.49.0"},"reference-count":42,"publisher":"Springer Science and Business Media LLC","issue":"5","license":[{"start":{"date-parts":[[2022,10,6]],"date-time":"2022-10-06T00:00:00Z","timestamp":1665014400000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2022,10,6]],"date-time":"2022-10-06T00:00:00Z","timestamp":1665014400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"DOI":"10.13039\/501100007052","name":"Universit\u00e0 degli Studi di Verona","doi-asserted-by":"crossref","id":[{"id":"10.13039\/501100007052","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["Cluster Comput"],"published-print":{"date-parts":[[2023,10]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Many blockchain applications exchange tokens, such as bitcoin and ether, or implement them through smart contracts. A trend in blockchain is to apply standards for token interoperability, unchanged, from platform to platform, easing the design challenges with trusted and widely-used specifications. However, the exploitation of the target language semantics can result in technological advantages and more efficient contracts. This paper presents a re-engineering of OpenZeppelin\u2019s implementation of the ERC-20 and ERC-721 standards in Takamaka, a Java framework for programming smart contracts. It describes a sound solution to the issue about the types allowed for the token holders and a novel implementation for making snapshots of tokens, based on tree maps, that is possible in Java, but not in Solidity, more efficient than the literal translation in Java from Solidity, within the Java virtual machine. Moreover, it applies to ERC-721 as well, where a snapshot mechanism was previously missing. The same snapshot mechanism can also be applied beyond the smart contracts for tokens.<\/jats:p>","DOI":"10.1007\/s10586-022-03756-3","type":"journal-article","created":{"date-parts":[[2022,10,6]],"date-time":"2022-10-06T09:03:07Z","timestamp":1665046987000},"page":"2701-2718","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":5,"title":["Fungible and non-fungible tokens with snapshots in Java"],"prefix":"10.1007","volume":"26","author":[{"given":"Marco","family":"Crosara","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8074-8980","authenticated-orcid":false,"given":"Luca","family":"Olivieri","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2973-0384","authenticated-orcid":false,"given":"Fausto","family":"Spoto","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5904-8768","authenticated-orcid":false,"given":"Fabio","family":"Tagliaferro","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"297","published-online":{"date-parts":[[2022,10,6]]},"reference":[{"issue":"1","key":"3756_CR1","doi-asserted-by":"publisher","first-page":"83","DOI":"10.1007\/s10586-020-03200-4","volume":"24","author":"M Alazab","year":"2021","unstructured":"Alazab, M., Alhyari, S., Awajan, S.W., Abdallah, A.B.: Blockchain technology in supply chain management: an empirical study of the factors affecting user adoption\/acceptance. Clust. Comput. 24(1), 83\u2013101 (2021)","journal-title":"Clust. Comput."},{"issue":"1","key":"3756_CR2","doi-asserted-by":"publisher","first-page":"37","DOI":"10.1007\/s10586-020-03137-8","volume":"24","author":"O Alfandi","year":"2021","unstructured":"Alfandi, O., Khanji, S.I.R., Ahmad, L., Khattak, A.M.: A survey on boosting IoT security and privacy through Blockchain. Clust. Comput. 24(1), 37\u201355 (2021)","journal-title":"Clust. Comput."},{"key":"3756_CR3","volume-title":"Mastering Bitcoin: Programming the Open Blockchain","author":"AM Antonopoulos","year":"2017","unstructured":"Antonopoulos, A.M.: Mastering Bitcoin: Programming the Open Blockchain, 2nd edn. O\u2019Reilly, Sebastopol (2017)","edition":"2"},{"key":"3756_CR4","volume-title":"Mastering Ethereum: Building Smart Contracts and DApps","author":"AM Antonopoulos","year":"2018","unstructured":"Antonopoulos, A.M., Wood, G.: Mastering Ethereum: Building Smart Contracts and DApps. O\u2019Reilly, Sebastopol (2018)"},{"key":"3756_CR5","doi-asserted-by":"crossref","unstructured":"Benini, A., Gambini, M., Migliorini, S., Spoto, F.: Power and pitfalls of generic smart contracts. In: Third International Conference on Blockchain Computing and Applications (BCCA\u201921), Tartu, Estonia, November 2021, pp. 179\u2013186. IEEE (Extended version to appear in Cluster Computing)","DOI":"10.1109\/BCCA53669.2021.9657048"},{"key":"3756_CR6","unstructured":"Buterin, V.: Ethereum Whitepaper (2013). https:\/\/ethereum.org\/en\/whitepaper. Accessed October 2022"},{"key":"3756_CR7","unstructured":"Carbonnelle, P.: PYPL. https:\/\/pypl.github.io\/PYPL.html. Accessed July 2022"},{"key":"3756_CR8","unstructured":"ConsenSys: Consensys Tokens. ConsenSys. https:\/\/github.com\/ConsenSys\/Tokens. Accessed July 2022"},{"key":"3756_CR9","doi-asserted-by":"crossref","unstructured":"Crafa, S., Di Pirro, M., Zucca, E.: Is Solidity solid enough? In: Bracciali, A., Clark, J., Pintore, F., R\u00f8nne, P.B., Sala, M. (eds.) 3rd Workshop on Trusted Smart Contracts (WTSC\u201919). Lecture Notes in Computer Science, St. Kitts and Nevis, 2019, vol. 11599, pp. 138\u2013153. Springer (2019)","DOI":"10.1007\/978-3-030-43725-1_11"},{"key":"3756_CR10","doi-asserted-by":"crossref","unstructured":"Crosara, M., Olivieri, L., Spoto, F., Tagliaferro, F.: Re-engineering ERC-20 smart contracts with efficient snapshots for the Java virtual machine. In: Third International Conference on Blockchain Computing and Applications (BCCA\u201921), Tartu, Estonia, November 2021, pp. 187\u2013194. IEEE (2021)","DOI":"10.1109\/BCCA53669.2021.9657047"},{"issue":"3","key":"3756_CR11","doi-asserted-by":"publisher","first-page":"1899","DOI":"10.1007\/s10586-022-03536-z","volume":"25","author":"D Das","year":"2022","unstructured":"Das, D., Banerjee, S., Chatterjee, P., Biswas, M., Biswas, U., Alnumay, W.S.: Design and development of an intelligent transportation management system using Blockchain and smart contracts. Clust. Comput. 25(3), 1899\u20131913 (2022)","journal-title":"Clust. Comput."},{"key":"3756_CR12","unstructured":"Dexaran: ERC223 Token Standard (2021). https:\/\/github.com\/Dexaran\/ERC223-token-standard. Accessed October 2022"},{"key":"3756_CR13","unstructured":"Entrinken, W., Shirley, D., Evans, J., Sachs, N.: EIP-721: ERC-721 Token Standard, Ethereum Improvement Proposals, No. 721 (2018). https:\/\/eips.ethereum.org\/EIPS\/eip-721. Accessed October 2022"},{"key":"3756_CR14","doi-asserted-by":"crossref","unstructured":"Freni, P., Ferro, E., Moncada, R.: Tokenization and Blockchain tokens classification: a morphological framework. In: IEEE Symposium on Computers and Communications (ISCC), Rennes, France, July 2020, pp. 1\u20136. IEEE (2020)","DOI":"10.1109\/ISCC50000.2020.9219709"},{"issue":"1","key":"3756_CR15","doi-asserted-by":"publisher","first-page":"383","DOI":"10.1007\/s10586-021-03412-2","volume":"25","author":"J Gong","year":"2022","unstructured":"Gong, J., Navimipour, N.J.: An in-depth and systematic literature review on the Blockchain-based approaches for cloud computing. Clust. Comput. 25(1), 383\u2013400 (2022)","journal-title":"Clust. Comput."},{"key":"3756_CR16","unstructured":"Hotmoka\u2014Blockchain and IoT with Smart Contracts in Java (2021). https:\/\/www.hotmoka.io. Accessed October 2022"},{"key":"3756_CR17","unstructured":"HyperLedger: ERC-20 Token Scenario. https:\/\/github.com\/hyperledger\/fabric-samples\/tree\/main\/token-erc-20#erc-20-token-scenario. Accessed July 2022"},{"key":"3756_CR18","unstructured":"HyperLedger: ERC-721 Token Scenario. https:\/\/github.com\/hyperledger\/fabric-samples\/tree\/main\/token-erc-721#erc-721-token-scenario. Accessed July 2022"},{"key":"3756_CR19","unstructured":"InterWasm DAO: An ERC20 Token Contract. InterWasm DAO. https:\/\/github.com\/InterWasm\/cw-contracts\/tree\/e7b81397bd48a33711557c270abe53e1266baf04\/erc20. Accessed July 2022"},{"issue":"3","key":"3756_CR20","doi-asserted-by":"publisher","first-page":"1839","DOI":"10.1007\/s10586-021-03435-9","volume":"25","author":"MU Javed","year":"2022","unstructured":"Javed, M.U., Javaid, N., Malik, M.W., Akbar, M., Samuel, O., Yahaya, A.S., Ben-Othman, J.: Blockchain based secure, efficient and coordinated energy trading and data sharing between electric vehicles. Clust. Comput. 25(3), 1839\u20131867 (2022)","journal-title":"Clust. Comput."},{"key":"3756_CR21","unstructured":"Kistner, K.J.: iToken Duplication Incident Report (September 2020). https:\/\/bzx.network\/blog\/incident. Accessed July 2022"},{"key":"3756_CR22","doi-asserted-by":"crossref","unstructured":"Koscina, M., Lombard-Platet, M., Cluchet, P.: PlasticCoin: An ERC20 Implementation on HyperLedger fabric for circular economy and plastic reuse. In: IEEE\/WIC\/ACM International Conference on Web Intelligence\u2014Companion Volume, 2019, pp. 223\u2013230. ACM (2019)","DOI":"10.1145\/3358695.3361107"},{"issue":"3","key":"3756_CR23","doi-asserted-by":"publisher","first-page":"2203","DOI":"10.1007\/s10586-021-03260-0","volume":"25","author":"W Liang","year":"2022","unstructured":"Liang, W., Ji, N.: Privacy challenges of IoT-based Blockchain: a systematic review. Clust. Comput. 25(3), 2203\u20132221 (2022)","journal-title":"Clust. Comput."},{"key":"3756_CR24","unstructured":"Nakamoto, S.: Bitcoin: A Peer-to-Peer Electronic Cash System (2008). https:\/\/bitcoin.org\/bitcoin.pdf. Accessed October 2022"},{"key":"3756_CR25","unstructured":"Oliveira, L., Zavolokina, L., Bauer, I., Schwabe, G.: To Token or not to token: tools for understanding Blockchain tokens. In: Proceedings of the International Conference on Information Systems\u2014Bridging the Internet of People, Data, and Things, ICIS 2018, San Francisco, CA, USA, December 2018. Association for Information Systems (2018)"},{"key":"3756_CR26","unstructured":"OpenZeppelin: ERC-20 Docs. https:\/\/docs.openzeppelin.com\/contracts\/4.x\/api\/token\/erc20. Accessed July 2022"},{"key":"3756_CR27","unstructured":"OpenZeppelin: ERC-721 Docs. https:\/\/docs.openzeppelin.com\/contracts\/4.x\/api\/token\/erc721. Accessed July 2022"},{"key":"3756_CR28","doi-asserted-by":"crossref","unstructured":"Park, D., Zhang, Y., Saxena, M., Daian, P., Ro\u015fu, G.: A formal verification tool for Ethereum VM bytecode. In: 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ESEC\/FSE 2018, 2018, New York, NY, USA, pp. 912\u2013915 (2018)","DOI":"10.1145\/3236024.3264591"},{"key":"3756_CR29","volume-title":"Self-sovereign Identity: Decentralized Digital Identity and Verifiable Credentials","author":"A Preukschat","year":"2021","unstructured":"Preukschat, A., Reed, D.: Self-sovereign Identity: Decentralized Digital Identity and Verifiable Credentials. Manning, New York (2021)"},{"key":"3756_CR30","unstructured":"Reitwie\u00dfner, C., Johnson, N., Vogelsteller, F., Baylina, J., Feldmeier, K., Entriken, W.: EIP-165: ERC-165 Standard Interface Detection: Ethereum Improvement Proposals, No. 165 (2018). https:\/\/eips.ethereum.org\/EIPS\/eip-165. Accessed October 2022"},{"key":"3756_CR31","volume-title":"Algorithms","author":"R Sedgewick","year":"2014","unstructured":"Sedgewick, R., Wayne, K.: Algorithms, 4th edn. Addison-Wesley Professional, Boston (2014)","edition":"4"},{"issue":"3","key":"3756_CR32","doi-asserted-by":"publisher","first-page":"1927","DOI":"10.1007\/s10586-021-03492-0","volume":"25","author":"K Shah","year":"2022","unstructured":"Shah, K., Chadotra, S., Tanwar, S., Gupta, R., Kumar, N.: Blockchain for IoV in 6G environment: review solutions and challenges. Clust. Comput. 25(3), 1927\u20131955 (2022)","journal-title":"Clust. Comput."},{"key":"3756_CR33","doi-asserted-by":"crossref","unstructured":"Spoto, F.: The Julia static analyzer for Java. In: Proceedings of the 23rd International Symposium on Static Analysis (SAS 2016), Lecture Notes in Computer Science, Edinburgh, UK, September 2016, vol. 9837, pp. 39\u201357. Springer (2016)","DOI":"10.1007\/978-3-662-53413-7_3"},{"key":"3756_CR34","unstructured":"Spoto, F.: Hotmoka GitHub Repository. GitHub, Inc. (2018\u20132022)"},{"key":"3756_CR35","doi-asserted-by":"crossref","unstructured":"Spoto, F.: A Java framework for smart contracts. In: 3rd Workshop on Trusted Smart Contracts (WTSC\u201919), Lecture Notes in Computer Science, St. Kitts and Nevis, February 2019, vol. 11599, pp. 122\u2013137. Springer (2019)","DOI":"10.1007\/978-3-030-43725-1_10"},{"key":"3756_CR36","doi-asserted-by":"crossref","unstructured":"Spoto, F.: Enforcing determinism of Java smart contracts. In: 4th Workshop on Trusted Smart Contracts (WTSC\u201920), Lecture Notes in Computer Science, Kota Kinabalu, Malaysia, February 2020, vol. 12063, pp. 568\u2013583. Springer (2020)","DOI":"10.1007\/978-3-030-54455-3_40"},{"key":"3756_CR37","unstructured":"Tapscott, D.: Token Taxonomy: The Need for Open-Source Standards Around Digital Assets (2020). https:\/\/www.blockchainresearchinstitute.org\/project\/token-taxonomy-the-need-for-open-source-standards-around-digital-assets. Accessed October 2022"},{"key":"3756_CR38","unstructured":"TIOBE: Tiobe index. https:\/\/www.tiobe.com\/tiobe-index\/. Accessed July 2022"},{"key":"3756_CR39","unstructured":"Vogelsteller, F., Buterin, V.: EIP-20: ERC-20 Token Standard, Ethereum Improvement Proposals, No. 20 (2017). https:\/\/eips.ethereum.org\/EIPS\/eip-20. Accessed October 2022"},{"key":"3756_CR40","unstructured":"Vyper Documentation. https:\/\/vyper.readthedocs.io. Accessed July 2022"},{"key":"3756_CR41","unstructured":"Vyper ERC20 Implementation. https:\/\/github.com\/vyperlang\/vyper\/blob\/master\/examples\/tokens\/ERC20.vy. Accessed July 2022"},{"issue":"4","key":"3756_CR42","doi-asserted-by":"publisher","first-page":"2841","DOI":"10.1007\/s10586-021-03301-8","volume":"24","author":"J Zarrin","year":"2021","unstructured":"Zarrin, J., Wen, P.H., Saheer, L.B., Zarrin, B.: Blockchain for decentralization of Internet: prospects, trends, and challenges. Clust. Comput. 24(4), 2841\u20132866 (2021)","journal-title":"Clust. Comput."}],"container-title":["Cluster Computing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s10586-022-03756-3.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1007\/s10586-022-03756-3\/fulltext.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s10586-022-03756-3.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2023,8,26]],"date-time":"2023-08-26T20:23:24Z","timestamp":1693081404000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/s10586-022-03756-3"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,10,6]]},"references-count":42,"journal-issue":{"issue":"5","published-print":{"date-parts":[[2023,10]]}},"alternative-id":["3756"],"URL":"https:\/\/doi.org\/10.1007\/s10586-022-03756-3","relation":{},"ISSN":["1386-7857","1573-7543"],"issn-type":[{"value":"1386-7857","type":"print"},{"value":"1573-7543","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,10,6]]},"assertion":[{"value":"21 March 2022","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"13 September 2022","order":2,"name":"revised","label":"Revised","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"18 September 2022","order":3,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"6 October 2022","order":4,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"order":1,"name":"Ethics","group":{"name":"EthicsHeading","label":"Decalarations"}},{"value":"The authors have not disclosed any competing interests.","order":2,"name":"Ethics","group":{"name":"EthicsHeading","label":"Conflict of interest"}}]}}