DEV Community

Hezekiah
Hezekiah

Posted on

ELI5: Token Standards on Ethereum

Introduction

On the Ethereum blockchain, a crucial component known as the ERC token standard lies as a key feature for building products/dapps within the ecosystem. ERC stands for "Ethereum Request for Comments", and this feature is a standard that provides a set of basic guidelines and specifications for creating and implementing smart contracts, tokens, and other blockchain-based applications on Ethereum.

Types of ERC Token Standards

  • ERC-20: This is the most common token standard on Ethereum. It defines a standard interface for fungible tokens, which means that each token is identical to another token of the same type. ERC-20 tokens are like digital coins, like Bitcoin or Solana, but do not have a seperate blockchain. They are built on the Ethereum blockchain and can be used to represent a variety of things, such as virtual currencies, utility tokens, and security tokens. For example, an ERC-20 token could be used to represent a unit of currency in a video game. Each token would be worth the same amount, and players could use them to buy items or services in the game.

To be ERC20-compliant, a token must follow certain logic programmed into its code. These logic includes:

  1. TotalSupply – provides information about the total token supply

  2. BalanceOf – indicates the account balance of the token owner

  3. Transfer – executes transfers of tokens to specified addresses

  4. TransferFrom – allows transfers from a specified address

  5. Approve – allows spender to withdraw tokens

  6. Allowance – returns tokens from a spender to the owner

  • ERC-721: This is a token standard for non-fungible tokens (NFTs). NFTs are tokens that are unique and have their own individual properties. This means that no two NFTs are exactly alike. NFTs can be used to represent a variety of assets, such as digital artworks, collectibles, and in-game items.
    For example, an ERC-721 token could be used to represent a unique digital artwork. This artwork would be one of a kind, and no other token would be exactly the same.

  • ERC-777: This is an improvement over ERC-20 that adds some new features. One of these features is the ability to approve multiple tokens to be spent by a third party. This can be useful for things like subscription services, where the user wants to give a third party permission to charge their account automatically (recurring payments).

  • ERC-1155: This token standard offers a more flexible alternative to ERC-20 and ERC-721. It allows for the creation of both fungible and non-fungible tokens. This makes it a good choice for projects that need to create a variety of different types of tokens.
    For example, an ERC-1155 token could be used to represent a digital game asset that can be both bought and sold. The same token could also be used to represent a unique in-game item.

  • ERC1400: This is a proposed standard for issuing and managing security tokens on the Ethereum blockchain. These tokens represent assets subject to securities regulation, providing transparency and compliance within the blockchain ecosystem.
    Future ERC standards such as ERC1400 will contribute to the security, scalability, and utility of the Ethereum blockchain, fostering regulatory compliance and mass adoption across various industries, including subscriptions, intellectual property, tokenized real estate, gaming, NFTs, and DeFi.

In addition to these standards above, there are a number of other token standards that are being developed for Ethereum currently. These standards are designed to address specific needs or use cases. For example, the ERC-4626 token standard is designed for tokenized vaults, which are a type of DeFi product that allows users to deposit their tokens and earn interest.
The choice of which token standard to use depends on the specific needs of the project. For example, if the project is creating a virtual currency, then ERC-20 is the most appropriate standard. If the project is creating a collectible NFT, then ERC-721 is the most appropriate standard. And if the project needs to create a more flexible type of token, then ERC-1155 is the most appropriate standard.

Top comments (0)