Cointime

Download App
iOS & Android

Understanding NFT Token Standards on Ethereum: ERC-721 vs ERC-1155

Validated Media

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:

  1. Unique digital artwork
  2. Tweets and social media posts
  3. In-game collectibles
  4. Gaming characters
  5. 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.

Difference between ERC-721 and ERC-1155

NFT
Comments

All Comments

Recommended for you

  • The main culprit of China's 43 billion yuan illegal money laundering case was arrested in the UK, involved in the UK's largest Bitcoin money laundering case

    Local time in the UK, Qian Zhimin appeared in Westminster Magistrates' Court for the first time under the identity of Yadi Zhang. She was accused of obtaining, using or possessing cryptocurrency as criminal property from October 1, 2017 to this Tuesday in London and other parts of the UK. Currently, Qian Zhimin is charged with two counts of illegally holding cryptocurrency. Qian Zhimin is the main suspect in the Blue Sky Gerui illegal public deposit-taking case investigated by the Chinese police in 2017, involving a fund of 43 billion yuan and 126,000 Chinese investors. After the case was exposed, Qian Zhimin fled abroad with a fake passport and held a large amount of bitcoin overseas. According to the above Financial Times report, Qian Zhimin denied the charges of the Royal Prosecution Service in the UK, stating that she would not plead guilty or apply for bail.

  • Nigeria’s Central Bank Denies Call to Freeze Crypto Exchange Users’ Bank Accounts

    In response to the news that "the Central Bank of Nigeria has issued a ban on cryptocurrency trading and requested financial institutions to freeze the accounts of users related to Bybit, KuCoin, OKX, and Binance exchanges," the Central Bank of Nigeria (CBN) stated in a document that the CBN has not officially issued such a notice, and the public should check the official website for the latest information to ensure the reliability of the news. According to a screenshot reported by Cointelegraph yesterday, the Central Bank of Nigeria has requested all banks and financial institutions to identify individuals or entities trading with cryptocurrency exchanges and set these accounts to "Post-No-Debit" (PND) status within six months. This means that account holders will not be able to withdraw funds or make payments from these accounts. According to the screenshot, the Central Bank of Nigeria has listed cryptocurrency exchanges that have not obtained operating licenses in Nigeria, including Bybit, KuCoin, OKX, and Binance. The Central Bank of Nigeria will crack down on the illegal purchase and sale of stablecoin USDT on these platforms, especially those using peer-to-peer (P2P) transactions. In addition, the Central Bank of Nigeria pointed out that financial institutions are prohibited from engaging in cryptocurrency transactions or providing payment services to cryptocurrency exchanges.

  • Universal verification layer Aligned Layer completes $20 million Series A financing

    Ethereum's universal verification layer Aligned Layer has completed a $20 million Series A financing round, led by Hack VC, with participation from dao5, L2IV, Nomad Capital, and others. The Aligned Layer mainnet is scheduled to launch in the second quarter of 2024. As the EigenLayer AVS, Aligned Layer provides Ethereum with a new infrastructure for obtaining economically viable zero-knowledge proof verification for all proof systems.

  • The total open interest of Bitcoin contracts on the entire network reached 31.41 billion US dollars

    According to Coinglass data, the total open position of Bitcoin futures contracts on the entire network is 487,500 BTC (approximately 31.41 billion US dollars).Among them, the open position of CME Bitcoin contracts is 143,600 BTC (approximately 9.23 billion US dollars), ranking first;The open position of Binance Bitcoin contracts is 109,400 BTC (approximately 7.07 billion US dollars), ranking second.

  • Bitcoin mining difficulty increased by 1.99% to 88.1T yesterday, a record high

    According to BTC.com data reported by Jinse Finance, the mining difficulty of Bitcoin has increased by 1.99% to 88.1T at block height 840,672 (22:51:52 on April 24), reaching a new historical high. Currently, the average network computing power is 642.78EH/s.

  • US Stablecoin Bill Could Be Ready Soon, Says Top Democrat on House Financial Services Committee

    The top Democrat on the U.S. House Financial Services Committee, Maxine Waters, has stated that a stablecoin bill may be ready soon, indicating progress towards a new stablecoin law in the U.S. before the elections. Waters has previously criticized a version of the stablecoin bill, but emphasized the importance of protecting investors and ensuring that stablecoins are backed by assets. Congressional movement on stablecoin legislation has recently picked up pace, with input from the U.S. Federal Reserve, Treasury Department, and White House in crafting the bill. The stablecoin bill could potentially be tied to a must-pass Federal Aviation Administration reauthorization due next month, and may also be paired with a marijuana banking bill.

  • Crypto mining company Argo mined 1,760 bitcoins last year and earned $50.6 million

    Crypto mining company Argo Blockchain has released its 2023 financial year performance report, which includes:

  • Crypto VC market hits 12-month high in March, with total investment exceeding $1 billion

    According to data from Cointelegraph, the cryptocurrency venture capital market continued to recover in March and April 2024. In March, 161 individual transactions were completed, setting a record in the past 12 months, with a total investment of more than $1 billion, an increase of 52% from the previous month. Although April has not yet ended, as of now, 90 transactions have been completed, attracting more than $820 million in investment.

  • Ethereum Layer 2 TVL has reached $39 billion

    L2BEAT data shows that Ethereum Layer2 TVL has reached $39 billion, with a 7-day increase of 6.66%.

  • Caixin: Mainland investors are currently not allowed to participate in the trading of Hong Kong virtual asset spot ETFs

    According to Caixin, the first batch of six virtual asset spot ETFs issued by Boshi International, Huaxia Fund (Hong Kong), and Jiashi International has been officially approved by the Hong Kong Securities Regulatory Commission. The goal is to be listed on April 30, 2024. It should be noted that mainland Chinese investors are currently not able to participate in the trading of these ETFs, despite the fact that they are first issued by Hong Kong companies under the umbrella of Chinese public funds.According to the product list on the Hong Kong Securities Regulatory Commission website, these six virtual asset spot ETFs were officially approved on April 23, 2024. The products are as follows: Jiashi Bitcoin Spot ETF (03439.HK), Jiashi Ethereum Spot ETF (03179.HK), Huaxia Bitcoin ETF (03042.HK), Huaxia Ethereum ETF (03046.HK), Boshi HashKey Bitcoin ETF (03008.HK), and Boshi HashKey Ethereum ETF (03009.HK).