ERC Token Standards

ERC is an acronym that stands for Ethereum Request for Comments. ERCs are application level standards for Ethereum and can include token standards, name registries, library/package formats, and more. Before becoming a standard, an ERC must be revised, commented and accepted by the community through an EIP (Ethereum Improvement Proposal).

In this list, let’s look at the Ethereum ERC standards that you should know about:

ERC-20

ERC-20 is a token standard first proposed by Vitalik Buterin in June 2015. It is a simple interface that allows for the creation of tokens on Ethereum that can be re-used by other applications, from wallets to decentralized exchanges. It is also the most commonly used standard for Ethereum-based tokens and was the token of choice for many initial coin offerings (ICOs) between 2016-2018.

The ERC-20 standard contains 6 key functions that must be implemented to meet the standard. The functions are outlined below:

  • totalSupply() – Used to get the token supply of a specific ERC-20 token.
  • balanceOf() – Keeps track of the token balance in each Ethereum wallet.
  • transfer() – Upon token creation, this function can send all the tokens to one wallet or distribute them to ICO investors.
  • transferFrom() – Enables token holders to exchange tokens with one another after the initial distribution occurs.
  • approve() – Used to “approve” other accounts to withdraw a certain amount of tokens from the account calling the function.
  • allowance() – After approve() is used, allowance() is used to see the amount of tokens the approved account is allowed to withdraw from the original account.

ERC20 remains the most widely adopted standard in the Ethereum ecosystem.

ERC-721

ERC20 tokens are fungible, meaning that a balance of tokens in account A and tokens in account B are virtually identical (every token is the same as every other token.) In contrast, Non-fungible tokens (NFT) are all unique, which is often used as a way to model scarce digital assets such as cryptocollectibles. Think of ERC20 as the token type for things that are currency (paper bills) and ERC721 as the token type for collectibles (Pokemon cards, beanie babies.)

The most well-known example of an ERC721 token is Cryptokitties. CryptoKitties are unique collectible digital artworks of cats. You can not only own a unique collection of CryptoKitties, but you can also breed the cats to create new CryptoKitties.

ERC-223

ERC223 tokens are backwards compatible with ERC20 tokens. It means that ERC223 supports every ERC20 functionality and contracts or services working with ERC20 tokens will work with ERC223 tokens correctly. They are meant to bring some improvements on the ERC-20 standard:

Eliminates the problem of lost tokens which happens during the transfer of ERC20 tokens to a contract (when people mistakenly use the instructions for sending tokens to a wallet). ERC223 allows users to send their tokens to either wallet or contract with the same function transfer, thereby eliminating the potential for confusion and lost tokens.

Allows developers to handle incoming token transactions, and reject non-supported tokens (not possible with ERC20)

Energy savings. The transfer of ERC223 tokens to a contract is a one step process rather than 2 step process (for ERC20), and this means 2 times less gas and no extra blockchain bloating.

ERC-777

ERC-777 is a new token contract standard that fixes some security issues with ERC-20 and provides the ability to extend functionality for contract creators as well as token holders and recipients without requiring changes to the token contract itself. As with any progression, ERC-777 takes ideas from multiple sources including ERC-20, ERC-223 and others, resulting in a next-generation standard that provides great features for both developers and users.