Fungible and non-fungible tokens with snapshots in Java
Open Access
- 6 October 2022
- journal article
- research article
- Published by Springer Nature in Cluster Computing
- Vol. 26 (5) , 2701-2718
Abstract
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’s 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.Keywords
Funding Information
- Università degli Studi di Verona
This publication has 17 references indexed in Scilit:
- Privacy challenges of IoT-based blockchain: a systematic reviewCluster Computing, 2021
- Blockchain technology in supply chain management: an empirical study of the factors affecting user adoption/acceptanceCluster Computing, 2020
- A survey on boosting IoT security and privacy through blockchainCluster Computing, 2020
- Enforcing Determinism of Java Smart Contracts2020
- Tokenization and Blockchain Tokens Classification: a morphological framework2020
- Is Solidity Solid Enough?2020
- A Java Framework for Smart Contracts2020
- PlasticCoin: an ERC20 Implementation on Hyperledger Fabric for Circular Economy and Plastic Reuse2019
- A formal verification tool for Ethereum VM bytecode2018
- The Julia Static Analyzer for Java2016