Buy eBook

ERC-20

ERC-20 is a set of rules for fungible tokens (meaning they are the same as other tokens) that live on the Ethereum blockchain.

Published

What is ERC-20?

ERC-20 is a set of rules for fungible tokens that live on the Ethereum blockchain. Fungible means that it is exactly the same as other tokens, the same way that a dollar bill is the same value as another dollar bill.

The Long Definition

ERC-20 is Ethereum Request for Comment 20 in full. It is the commonly accepted technical standard for the creation of fungible tokens on the Ethereum blockchain. Fungible, in this case, refers to non-unique tokens. So, two tokens of the same kind are mutually interchangeable with one other. They’re also divisible into smaller units.

What is ERC-20

Atoken is a digital asset built on top of a blockchain. It can be a representation of an asset, cryptocurrency, ownership, or right.

There is a wide variety of tokens in the Ethereum ecosystem. Most of these adhere to the ERC-20 standard. Some popular examples are Tether (USDT), Shiba Inu (SHIB), MAKER (MKR), DAI, and USD Coin (USDC).

However, ERC-20 tokens aren’t only found on Ethereum. Other blockchains, like the Binance Smart Chain and Cardano, are also compatible with ERC-20 tokens.

History of ERC-20

Ethereum was launched in 2015. With smart contract capabilities, it allowed anyone to make their own token and led to the ultimate creation of many others like it. However, there was a problem.

Ethereum aimed to create an ecosystem where different tokens can be used and exchanged freely across multiple platforms. Unfortunately, everybody was creating their own tokens however they could. This meant there was no way that all the different tokens could be usable across the entire ecosystem.

The solution to this problem came from Fabian Vogelstellar, an Ethereum developer. In 2015, he submitted a proposal as an Ethereum Request for Comment (ERC). Within it, he outlined a way to standardize tokens.

His proposal was the 20th comment. Thus, it was designated as the Ethereum Request for Comment 20 (ERC-20), a name that has stuck to date. The developer community would eventually approve ERC-20.

This was done in 2017 through a process known as Ethereum Improvement Proposal (EIP). In this case, it was EIP-20. Since then, ERC-20 has been the standard for all smart contract tokens on Ethereum.

How Does it Work?

ERC-20 defines a common set of rules for tokens on Ethereum. These include:

  • The total supply of tokens
  • how tokens can be transferred
  • how many tokens can be withdrawn from an account
  • How transactions are approved

These rules are defined as code functions and events. The primary functions are allowance(), approve(), balanceOf(), totalSupply(), transfer(), and transferFrom(). Implementing these allows a token to perform anywhere within the Ethereum ecosystem. It can also be used interchangeably with other similar tokens.

Ethereum tokens

Why is it Important?

ERC-20 provides a standard for all developers to work with. It gives the developer a good idea of how their token is expected to function within the Ethereum ecosystem.

This makes the job of developers much easier. For instance, since all projects follow the same set of rules, developers don’t have to update their projects every time a new token comes out. As for new projects, they don’t have to worry about compatibility with older ones.

ERC-20 also allows tokens to be interchangeable within Ethereum. Therefore, applications don’t exist as their own unique ecosystems. Rather, Ethereum exists as one large ecosystem that consists of different projects with tokens that can be used in any place within the ecosystem. This makes for a better user experience.

Other Token Standards

There are other token standards within Ethereum. These are:

ERC-721

ERC-721 is the standard for creating non-fungible tokens (NFTs). A non-fungible token is one that cannot be divided or directly swapped for another ERC-721 token. It exists as its own unique digital asset.

ERC-1155

ERC-1155 aims to be the next-generation token standard. It defines rules to create different types of tokens, both fungible and non-fungible.

ERC-777

ERC-777 is a standard for fungible tokens just like ERC-20. However, it’s more focused on the trading side of things. It uses complex functions to specify the type of tokens compatible with ether (ETH).

The token standard is fully compatible with decentralized exchanges (DEXs) on Ethereum.

ERC-4626

ERC-4646 is a standard for tokenized vaults. It defines rules for vaults that generate interest in the form of ERC-20 tokens. A vault is a smart contract that stores and manages digital assets.


Want to join the Dypto journey? Follow our socials!