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

  • BTC Surpasses $63,000

    Market data shows that BTC has surpassed $63,000, currently priced at $63,006.88, with a 24-hour decline of 1.52%. The market is highly volatile, so please ensure proper risk management.

  • Zuckerberg Directs Meta to Develop Prediction Market Application

    On June 24, The New York Times reported that Zuckerberg has instructed Meta to develop a prediction market application. The internal name for the application is 'Arena', which is similar to Polymarket or Kalshi.

  • U.S. Senate Passes Resolution Aiming to Limit Trump's War Powers Against Iran

    On June 24, the U.S. Senate passed a resolution regarding war powers related to Iran, with 50 votes in favor and 48 against, following a similar approval by the House of Representatives. This marks the first time such a resolution has been approved by both chambers of Congress. The resolution calls for the president to end military actions against Iran without a declaration of war or authorization of force from Congress. However, since this resolution is a joint resolution of Congress, it is not legally binding and does not require the president's signature, thus serving mainly a symbolic purpose.

  • AI Smart Terminals Experience Full Explosion

    On June 23, according to CCTV Finance, at the fourth Chain Expo, the original "Digital Technology Chain" was upgraded to the "Smart Technology Chain." This change in wording reflects that artificial intelligence is becoming the main character in the industrial chain. A newly established AI zone at the event gathered leading AI companies from both domestic and international markets, showcasing the entire chain from data and computing power to applications. Various AI products were on display, including AI glasses, smart cars with digital chassis, and humanoid robots that can play soccer. CCTV Finance reporters observed that the integration of artificial intelligence into the physical world is transitioning from mobile phones and computers to various new smart terminals. This year, the application of AI agents has also experienced a full explosion. Qian Kun, Senior Vice President of Qualcomm, stated that the empowerment of AI agents is leading to a significant upgrade cycle for existing terminal devices. China's industrial chain is very complete, and through continuous collaboration with Chinese partners, their products can quickly reach the market and gain global acceptance. Liu Xiangwen, Vice President of Alibaba Cloud Intelligence Group, noted that AI has evolved from mere chatting to becoming a productive force. The development of all stacks, whether GPU cloud or CPU, is progressing rapidly, and there is still greater potential ahead.

  • U.S. Stock Indices Experience Short-Term Rally

    On June 23, the Dow Jones Industrial Average rose by 0.07%; the S&P 500 index narrowed its decline to 0.77%, having previously fallen over 1.5%; the Nasdaq Composite index also reduced its drop to 1.17%, after having been down more than 2.3% at one point.

  • Vitalik: Ethereum Foundation Budget Cut by 40%, Shifting to Long-term Fund Model

    On June 23, Vitalik Buterin revealed that the Ethereum Foundation (EF) will reduce its budget by approximately 40% this year. According to its previously announced financial management plan, EF is transitioning from a model where it spends about 15% of its remaining funds annually to a model where it will spend about 5% annually after 2030, moving towards a long-term donation-oriented organization. To this end, EF will adjust its multi-client model, relying more on AI-assisted formal verification. The PSE privacy and scalability exploration team will shift from 'exploration' to a focus on building around zero-knowledge proofs. The scale and losses of Devcon events will be reduced, and large projects beyond Ethereum itself will also decrease. EF's institutional work will focus on smaller-scale, replicable CROPS-friendly deployment cases.

  • Huo Qigang: In the AI Era, Our Own Judgment is Key

    On June 23, according to CCTV Finance, Huo Qigang stated that over the past year, the topic of AI has been overwhelming, shifting from 'not using AI' to 'having to use AI,' making him acutely aware that 'not participating will lead to elimination.' As a father, Huo Qigang candidly expressed the dilemma of whether parents should 'control' or 'assist' when their children use AI. He mentioned that he has already begun to assist with AI in his work, but emphasized that using AI does not mean bypassing the thinking process; one must rely on their own experience, thought, and logical judgment, and cannot simply replicate AI outputs.

  • NVIDIA's Market Value Falls Below $500 Billion

    On June 23, NVIDIA (NVDA.O) saw its market value drop below $500 billion, with a latest decline of 2.6%.

  • U.S. Manufacturing Activity Surges Beyond Expectations, But Factory Employment Falls to Six-Year Low

    Driven by companies placing orders in advance to prevent shortages and price increases, U.S. manufacturing activity expanded again in June. However, factory employment fell to a six-year low, primarily due to rising operational costs influenced by conflicts in the Middle East. The preliminary S&P Global Manufacturing PMI for June rose to 55.7 from 55.1 in May, marking the highest level since May 2022, while economists surveyed by Reuters had previously expected the index to drop to 54.8. The increase in the manufacturing PMI, combined with a rise in the services PMI from 50.7 in May to 51.3, contributed to a composite PMI output index increase from 51.5 last month to 52.2. The rebound in the services PMI is partially attributed to the World Cup events jointly hosted by the U.S., Canada, and Mexico.

  • Microsoft Completes Data Center Construction in Wisconsin

    Microsoft (MSFT.O) announced the completion of its first data center construction in Mount Pleasant, Wisconsin, USA.