ERC20 token standard: what is it and where it is applied. Skip to content

What is the ERC20 token standard?

Table of content

Anyone with an interest in cryptocurrencies has probably heard of ERC20 tokens. In this article, we will explain what ERC20 is, where such tokens are used and why they are so widespread.

What is ERC20

ERC20 is the standard for the Ethereum blockchain tokens. ERC stands for Ethereum Request for Comments. The number 20 denotes the serial number of the standard, with which you can distinguish it from others. There are other token standards, such as ERC721. Often the abbreviation ERC20 is not called the standard itself, but the tokens created in accordance with it.

The token standard was created by Ethereum’s founder Vitalik Buterin in 2015. He developed ERC20 standard to address the compatibility issues of tokens with cryptocurrency services. The lack of compatibility led to the following problems:

  • the need to write new code for a new token type;
  • in order for the cryptocurrency service to have the technical ability to work with the token, it was necessary to coordinate the technical details with the service support. This process took a long time.

Functions of the ERC20 standard

The ERC20 source code is written in Solidity, the same programming language as Ethereum. The standard consists of functions that are used at the time of writing the token code. 6 of these functions are mandatory:

  • totalSupply — the maximum number of tokens that a smart contract can issue;
  • balanceOf — the current balance of tokens and the assignment of this amount to the wallet address;
  • transfer — transfer of tokens from the primary address to the first token buyers;
  • transferFrom — the address from which tokens are transferred;
  • approve — approval of the funds transfer and their availability’s verification in the smart contract;
  • allowance — checking the account balance, which ensures that the user is sending the number of tokens that he has.

The ERC20 standard also includes 3 functions that are only recommended for execution:

  • name — token name;
  • decimal — number of digits after the decimal point, up to 18;
  • symbol — symbol for exchanges and other cryptocurrency platforms.

Together, these 9 functions form a set of rules according to which all ERC20 tokens work.

ERC20 tokens

ERC20 was the first token standard, which is why it has become popular in the cryptocurrency industry. The standard was actively used during the ICO hype in 2017-2018. It allows you to easily prescribe the order for transferring tokens to investors and the principle according to which some of the tokens will be assigned to primary addresses, as a rule, owned by the ICO initiators. For example, ERC20 tokens were used during the ICO of The DAO project, during which the initiators called in more than $100 million in investments.

In 2020, ERC20 tokens are actively used in decentralized applications — DApps. The peculiarity of DApps is that they don’t have a centralized development team that can change the app. After launching an app, any changes can be made only by voting among the community members. All app processes are automated through protocols that support a token standard by default. ERC20 is the most common standard therefore it is usually used in DApps. For example, these tokens are used in MakerDAO, Uniswap, Synthetix and many other apps running on the Ethereum blockchain.

The ERC20 standard is also used by normal centralized companies. For example, USDT stablecoins issued by Tether and BNB tokens of the Binance exchange are based on this standard.

Most of the wallets supporting the Ethereum cryptocurrency also support ERC20 tokens. For example, MetaMask and MyEtherWallet software wallets, Trezor and Ledger hardware wallets can work with this standard.

Disadvantages of the ERC20 standard

ERC20 is the first standard created for Ethereum blockchain tokens, so the creators couldn’t foresee all possible problems:

  • BatchOverFlow vulnerability. It was discovered in 2018. Due to a code error, hackers could cause an overflow of tokens in a smart contract and create large quantities of new tokens. Ethereum developers fixed this vulnerability shortly after it was discovered.
  • Automatic contract execution. This happened when ERC20 tokens interacted with smart contracts that don’t support the standard. The transaction could not be executed, and the user’s funds were frozen and irretrievably lost. The problem was discovered by a developer nicknamed Dexaran in 2018.
  • Simplicity of creation. The ERC20 token deployment process doesn’t require a lot of time or deep programming knowledge. This simplicity was used by scammers who conducted the ICO not for the development of the project, but for making money on investors.

Summary

ERC20 is the standard for the Ethereum blockchain tokens. It contains 9 functions that form a set of rules according to which the token operates. ERC20 solved the problem of token compatibility with other cryptocurrency services.

ERC20 tokens were actively used during the ICO hype, and now they are actively used in decentralized applications. These tokens are supported by almost all wallets that work with the Ethereum cryptocurrency.

The ERC20 standard has its own problems such as the BatchOverFlow vulnerability and automatic contract execution. The simplicity of creating tokens according to this standard has led to the fact that they are often created by scammers.

Related Articles