Understanding Ethereum tokens : ERC1155, ERC20, and ERC721

Posted By : Ajay

Aug 27, 2021

What is ERC?

 

ERC stands for "Ethereum Request for Comment".

 

It is a standard for creating and publishing smart contracts on the Ethereum blockchain. People can invest in smart properties or tokenized assets created with smart contracts.

 

ERC is just a standard that other developers agree to follow while creating smart contracts. Developers follow the same standard because it makes writing smart contract codes easier, more predictable, and reusable.

 

So ERC20 is a standard for creating fungible tokens over the Ethereum blockchain, ERC721 is the standard for creating non-fungible tokens over the Ethereum blockchain, and, ERC1155 is the standard for creating fungibility-agnostic and gas-efficient contracts.


 

What is ERC 721 token?

 

In January 2018, William Entriken, Dieter Shirley, Jacob Evans, and Nastassia Sachs proposed ERC721 (Ethereum Request for Comments 721). It is a Non-Fungible token standard that implements an API for tokens in smart contracts.

 

ERC 721 is a distant cousin of the ERC20 token in the Ethereum ecosystem. ERC721 is the token standard on Ethereum for NON-FUNGIBLE Tokens (NFTs).

 

Fungible means mutually interchangeable, it is the ability of a good or asset to be interchanged with other individual goods or assets of the same type for example money(INR, USD, etc) is a prime example of a fungible commodity whereas Movie tickets are a good example of non-consumable tokens.

 

A movie ticket is not a ticket for any movie at any time. This is a very specific movie and at a very specific time. So let us take an example in blockchain terms. Bitcoin is fungible because any Bitcoin can replace another Bitcoin. On the other hand, every NFT is unique. One NFT cannot replace another.

 

It can be used to tokenize anything unique. This can mean anything from a person’s birth certificate to a moment in history, art, or even rare items in video games.

 

You may also like to read | A Quick Guide to Ethereum ERC Token Standards

 

What is the ERC 1155 token?

 

In earlier days ERC20 and ERC721 tokens needed to implement a new smart contract for each new "category" token but after now ERC1155 can be described as a standard token that can operate like an ERC20 or ERC721 token, or a token stored at the same address at the same time. The best way to describe ERC1155 is to compare it to a vending machine and you can get any type of biscuit, chips, etc from one interface.

 

The idea aims to create a smart contract interface that can represent and control any number of fungible and non-fungible token types.

 

Also, Explore | Smart Contract Standards for Large-Scale Blockchain Adoption

 

Why Prefer ERC1155 over ERC721 and ERC20

 

To understand the advantages of ERC1155 we need to understand the limitations of ERC721 and ERC20.

 

ERC-20 token lacks a way to react to its transfer events. As a result, when users accidentally send tokens to the wrong address, ERC20 tokens will always be trapped in the contract.

 

ERC-721 tokens also have their own limitations, For example, if you have a set of 10 NFTs that you want to transfer to someone else, the transfer will require you to perform 10 different transactions.

 

Advantages of ERC1155:

 

Batch transfer

 

The ERC1155 standard allows a large number of native transfers of tokens contained in smart contracts. In this way, for example, if we have a series of NFT tokens or fungible tokens (or both), we can transfer multiple of these tokens in the same operation, so that a single operation makes this transfer effective.

 

Secure token transfer

 

ERC-1155 token provides a feature for secure token transfer. The standard smart contract contains a function that verifies whether the transaction has been completed, and if it is not completed, it reverts to return control of the token to the issuer.

 

Also, Check | ERC-20 Token Standard | A Compact Guide to Development

 

Use Case: Games

 

Fungible tokens do not have a unique identity and can be replaced by other identical tokens, just like tokens act as currency. In contrast, non-fungible tokens have unique identities and are irreplaceable. The ERC1155 token standard supports the creation of fungible, semi-fungible, and non-fungible tokens in a single token standard.

 

Games usually have both types of items fungible and non-fungible.

 

Let's understand this with an example. In a game, there may be replaceable items like "basic armor" (one that others can fit), semi-replaceable limited edition clothing (because they can be worn by a few users), and unique irreplaceable weapons. This is where the ERC1155 token standard comes in, as a developer doesn’t need to deploy separate contracts for fungible and non-fungible tokens.

 

ERC1155 token will be perfect for this use case because ERC1155 provides Batch transfer, Secure token transfer, and provide a single contract for fungible and non-fungible tokens.

 

If you need more information related to ERC token standard development, consider connecting with our Ethereum development experts.

 

References

ERC20: https://docs.openzeppelin.com/contracts/3.x/erc20

ERC721: https://docs.openzeppelin.com/contracts/3.x/erc721

ERC1155: https://docs.openzeppelin.com/contracts/3.x/erc1155

 

Leave a

Comment

Name is required

Invalid Name

Comment is required

Recaptcha is required.

blog-detail

April 5, 2024 at 05:08 am

Your comment is awaiting moderation.

By using this site, you allow our use of cookies. For more information on the cookies we use and how to delete or block them, please read our cookie notice.

Chat with Us
Contact Us

Oodles | Blockchain Development Company

Name is required

Please enter a valid Name

Please enter a valid Phone Number

Please remove URL from text