ERC-20 Tokens…What’s the fuss about?

Ifeoma Sandra
3 min readMar 11, 2022

With the fast rise in cryptocurrency, the crypto-sphere can feel a little overwhelming with a lot of emerging concepts sometimes. Blockchain, tokens, crypto exchange, Ethereum, protocols amidst many other big buzzing words. The interest in Ethereum technology is sweeping through the world and with Ethereum as the second-largest public blockchain network both by market capitalisation and daily trading volume, the development keeps growing steadily and retaining its fame in the blockchain system.

Ethereum is based on the use of tokens, which can be bought, sold or traded. There are several tokens but one of the most significant tokens used solely on the Ethereum platform is called the ERC-20 token.

ERC-20 Token…What is it?

The ERC-20 is an acronym that stands for Ethereum Request Comment, and the 20 is the proposal identifier number. ERC-20 is a technical standard used for all smart contracts on the Ethereum network for token implementation. For the ERC-20 tokens to be shared, exchanged for other tokens and transferred to a crypto wallet, they must follow a list of rules or simply a set of functions known as the ERC-20 standards.

However, some of these rules are mandatory while others are optional. So, if you come across an Ethereum smart contract, chances are it’s ERC-20 compliant.

The Optional Rules…

The ERC-20 specifies a set of three optional rules and they are:

  • Token name — Ideally, when creating your own ERC-20 token, it is important to have a name or an identity to associate with that token. Nevertheless, it’s not necessary for you to name them.
  • Symbol — The symbol is mostly used for creating a brand value.
  • Decimal (Maximum: 18) — The decimal is used to evaluate the lowest value for your token. For instance, if the divisibility is 0, then it will mean 1; if it’s 2, then the lowest value will be 0.01 and it can go up to 18 decimal places.

The Mandatory Rules…

The mandatory rules/functions include the following:

  • totalSupply — The totalSupply function identifies the total number of tokens created by the contract. The smart contract will cease creating new tokens when the limit is reached.
  • approve — The approve function allows a smart contract owner to withdraw tokens from his account and to transfer them to other accounts considering the total supply.
  • balanceOf — The balanceOf function returns the number of tokens a given address has in its account.
  • transferFrom — The transferFrom function is a type of transfer method that allows the transfer of tokens between users.
  • transfer — The transfer function allows a certain amount of tokens to be transferred from the total supply to a user account.
  • allowance — The allowance function is similar to the approve function except that it checks the balance of the user’s account and will cancel the transaction if there are insufficient tokens.

Conclusion

In this article, we have learned about the ERC-20 tokens, the optional and mandatory standards of the Ethereum tokens. Subsequently, we are going to learn about how to create and deploy an ERC-20 token👌👍

--

--

Ifeoma Sandra

Ifeoma is passionate about technology and its many applications with experience in backend web development (NodeJs/NestJs).