Due to increasing public awareness around them, NFTs have entered the mainstream consciousness in a big way. Reportedly, trading in NFTs hit $17.6 billion in 2021, reflecting a 21,000% surge from 2020′s total of $82 million. The emergence of NFTs has also created a new medium for artists and creators to showcase their creations or collections.
NFTs are written with a software code called the smart contract. The smart contract governs actions such as verifying ownership and managing transferability of the NFTs. Smart Contracts give NFTs creators more control over their work. For example, creators can program the smart contract deploying NFTs, in such a way, that whenever an NFT is resold the creators get a royalty payment. Smart contracts can also be written to automatically allocate a portion of the amount paid for any subsequent sale of the NFT back to the original owner, thus, giving the owner the ability to realize the benefits of the secondary marketplace.
When someone mints an NFT, they are writing the underlying smart contracts code. Like any other smart contract, NFT smart contracts are written as code into the blockchain. Even though other blockchains such as Cosmos, Polkadot, and Binance Smart Chain have also launched NFT marketplaces, Ethereum continues to remain dominant. Most NFT tokens are built on ERC-721 and ERC-1155 token standards.
What are token standards on Ethereum?
ERC is an acronym for Ethereum Request for Comments. ERC can be compared to technical documents, that define the methods, behaviors, innovation, and research that developers/users have to abide by in order to utilize the Ethereum ecosystem. Ethereum’s smart contract programmers write ERC-related documents that set out rules that every Ethereum-based token must adhere to. ERC token standards explain certain rules that apply to all the token standards built on the Ethereum blockchain. In order to meet the changing requirements of the users, introduce new features, and fix shortcomings of the existing standards, the Ethereum governance community keeps upgrading ERC token standards. Once a new ERC standard is proposed, the Ethereum governance community duly reviews the proposals, solicits feedback, and then implements the new standard. For example, in 2015, the ERC-20, which defines the functionality of fungible tokens like DAI was introduced. In 2017, seeing potential use cases for its smart contract feature, the Ethereum governance community approved Ethereum Improvement Proposal and introduced the ERC-721 standard that enables the creation of NFTs. Moreover, ERC token standards ensure that tokens created on Ethereum meet specific user requirements and that they can be used within other Ethereum ecosystems such as decentralized applications (dApps).
What is ERC-721?
The ERC-721 non-fungible token standard is written in Solidity language on the Ethereum blockchain and it allows developers to tokenize ownership of any arbitrary data. Solidity is a programming language designed for developing smart contracts that run on Ethereum
ERC-721 tokens are the standards for non-fungible tokens (NFTs). ERC-721 token standard deploys one smart contract for each NFT. ERC-721 is used to create custom tokens. These tokens can’t be exchanged for anything of equal value since they are one-of-a-kind. Users can create a personal avatar in a game that is unique and cannot be replicated. Probably the most well-known example of ERC-721 tokens is CryptoKitties, wherein, players own, breed, and trade digital cats, and ERC-721 tokens are used to represent each cat.
ERC-721 token standard allows users to transfer NFTs between different accounts, allowing NFTs to be traded for other currencies. ERC-721 enables the users to find out the total supply of a set of NFTs on a given network. ERC-721 can represent the following NFTs:
- Unique digital artwork
- Tweets and social media posts
- In-game collectibles
- Gaming characters
- Any cartoon characters and millions of other NFTs
Characteristics of ERC-721 tokens
- Each ERC-721 token has a name. The name field is used to indicate the name of the token to external applications or contracts. ERC-721 tokens also have a function known as a symbol, which provides outside programs such as dApp with the token’s shorthand name or symbol.
- ERC-721 tokens have a balanceOf function, which is used to find the number of tokens that a given address owns
- Each ERC-721 token has a defined field called the Owner. It defines the ownership of the token and how it can be transferred.
- Ownership functions define how the contract will handle token ownership and how ownership can be transferred. The most notable of these functions are takeOwnership and transfer, which acts like withdraw and send functions, respectively, and are essential for letting users transfer tokens between each other.
- tokenOfOwnerbyIndex is an optional function, it maintains a record of the IDs of each token owned by a user
- The most cited downside of ERC-721 is the high gas fees, meaning that a creator must spend a considerable amount to mint an NFT in Ethereum.
What is ERC-1155?
ERC-1155 allows batch transfers of multiple tokens at once, and at a much faster speed than an ERC-721. This means that under the ERC-1155 standard, a single deployed smart contract includes varied combinations of non-fungible, fungible, and semi fungible tokens. Since ERC-1155 can batch multiple NFTs into one single smart contract it significantly reduces the transaction and the storage cost. Semi fungible tokens are fungible tokens, but once redeemed, they convert into NFTs. For example, a ticket to a movie before the event may be considered a fungible asset since any ticket will give you entry into the theatre. However, once the show is over, the ticket is now irreplaceable memorabilia; an NFT of sorts.
The ERC-1155 standard can be used in the Sandbox. The Sandbox is a virtual environment on the Ethereum blockchain. To create an enclosed economy in the Sandbox metaverse, users rely on four user-specific tokens. ASSET tokens, based on the ERC-1155 standard, represent in-game items such as pieces of equipment for avatars including armors, weapons, wearables, and tools. These ASSET tokens can be bought and sold using SAND, the native token of the sandbox.
This standard outlines a smart contract interface that can represent any number of fungible and non-fungible token types in a single transaction. Rather than creating a single NFT and tying it to a standard, creators can harness entire NFT collections, making the process much more seamless and faster. For example, creators can mint all the buildings in a game using one NFT only. For instance, a dApp developer who uses ERC-1155 can allow its users to register both fungible and non-fungible tokens by using the same contract and same address. In the same game, a developer can add fungible tokens and NFTs, wherein, fungible tokens can be used as payment currencies and NFTs can be used as collectibles or exchangeable items.
Each ERC-1155 token contains a pattern that verifies whether a transaction is valid or not. If the transaction is invalid or incomplete, this function returns the token to the issuer. While the ERC-721 keeps track of transfers and approvals, ERC-1155 logs everything from the moment a token is minted until it’s burned. Further, ERC-1155 tokens cannot be accidentally locked in a contract that doesn’t support ERC-1155. If the recipient doesn’t support ERC-1155, the tokens will be reverted back safely to the user.
Characteristics of ERC-1155 tokens
- Two of the main features of the ERC-1155 token standards are batch transfers and balance. Using the safeBatchTransferFrom function users can transfer multiple assets in a single transaction, and through balanceOfBatch function, multiple assets can be queried in a single call.
- The distinctive feature of ERC1155 is that it uses a single smart contract to represent multiple tokens at once. This is why its balance0f function differs from ERC721. The ERC721 balanceOf function refers to how many different tokens an account has, not how many of each. On the other hand, ERC-1155 accounts have a distinct balance for each token ID
- A new function called ERC1155PresentMinterPauser gives token holders the ability to pause or burn their tokens.
All Comments