Ethereum

What Is an ERC20 Token? All Things You Need to Know About ERC20

Tokens are financial fuel for most crypto startups, especially ERC20 tokens.

As of today, there are more than 200,000 ERC20 tokens created and most of them used by crypto startups.

So What is ERC20 Token?

Simply ERC20 is a guide of rules and regulations to create a Token on Ethereum blockchain.

ERC20 token means if a Token build upon Ethereum blockchain using ERC20 guidance that is called as an ERC20 Token.

In ‘ERC20’, ERC stands for Ethereum Request For Comments and 20 is the number that was assigned to this request.

There are also other standards available to create a token on Ethereum blockchain such as ERC223, ERC721, ERC621, ERC827.

But ERC20 is one of the famous and largely used guidance for creating a Token.

That’s lead us to the next question, why ERC20 is famous and acceptable?

Why ERC20?

Before jumping into why exactly ERC20 guidance most used in creating a Token, let’s look at the history of ERC20 to better understanding of the concept.

In 2009 Bitcoin became first decentralized cryptocurrency using Blockchain technology for recording Bitcoin transactions.

On that time many developers know that Blockchain technology can be useful in many ways rather than being only a record book for cryptocurrency.

But there is a huge restriction put on in the Bitcoin Blockchain to explore more benefits of Blockchain.

That’s why in 2015 Ethereum came as one of the open source blockchain-based distributed computing platform and operating system.

In simpler terms, Ethereum is planning to become a decentralized super-computer where anyone, anywhere can rent out some computational power and create their own decentralized applications which can run on top of the Ethereum platform.

Those applications called as DAPP, to make a DAPP Ethereum uses Smart Contracts.

Smart Contracts are the contracts which contain rules and regulations to make a DAPP.

Those rules and regulations called ERC guidelines and the first version of ERC guidelines called ERC20.

ERC20 guidelines are very simple guidelines to create Smart Contracts.

That’s why still 99% of Ethereum tokens are ERC20 based.

Also, after launching, Ethereum became famous because they let developers use their Blockchain to explore more benefits from it by creating a verity of Tokens.

Now it is clear why ERC20 is the most used guideline.

But I’m stating again and again that ERC20 is a guideline which contains rules that means you don’t get a full understanding of ERC20 without knowing its actual rules.

What are the ERC20 Rules(Standards)?

Basically, there are 9 rules in ERC20.

In those 9 rules, 3 are Optional and 6 are Mandatory rules.

Now, let’s understand those 3 Optional Rules.

Optional Rule.

As a name shows, these rules are not that important to create a token, but these rules help to give an identity to tokens.

#1 name.

This rule represents the token name in a smart contract, let’s understand with a simple example, if you want to create an ERC20 token then, you can give a unique name to it.

Now name your Token as “Map Token”.

#2 symbol.

You can give a unique symbol for your token in a smart contract.

Let’s Give a symbol for Map Token as “MAP”.

#3 decimal.

If you give decimal as 8 then it means to divide MAP amount by 100000000 to get its user representation.

Note: The most common number of decimals to consider is 18.

Mandatory Rule.

Mandatory rules are very important rules to launch any ERC20 token because these rules define a token structure.

#1 totalSupply.

You are just given an identity to your token as “MAP” now you have to define maximum MAP token supply to spend in a smart contract.

Let’s assume you created a 1 million MAP tokens.

#2 balanceOf.

Ok, now you have created MAP token and defined maximum supply of token but to launch MAP token firstly you have to spend some MAP tokens.

To spend MAP token you must have 1 million MAP tokens in your wallet for that you have enter your wallet address in the smart contract.

#3 approve.

To do initial spending of MAP token you have to give the approval to collect the tokens in the smart contract.

If Mr, A is want to buy 1,000 MAP tokens from you, to send those 1,000 MAP tokens, firstly, the smart contract have to approve to send 1,000 MAP tokens to Mr, A.

#4 transfer.

Now you can transfer those 1,000 MAP tokens to Mr, A after given approval to transfer.

#5 transferFrom.

This rule helps MAP token holders to spend their tokens automatically.

The best example is, MAP token holders can set an automatic payment system to pay their monthly rent, bills, etc.

#6 allowance.

To spend any MAP token your smart contract have to check the minimum balance available or not to spend that many tokens.

After following these 9 rules, you have successfully created MAP tokens ERC20 smart contract.

Now you can launch MAP token by spending some Ether on Ethereum blockchain.

Note: Ether is a fundamental token for operating Ethereum, it acts as the “fuel” or “gas” that powers the Ethereum network.

You can check out how real-world smart contract looks like by visiting this page.

Although ERC20 is not a perfect guide to create smart contact, it have its own advantages and disadvantages.

Now, look at some advantages and disadvantages of ERC20.

Advantages and Disadvantages of ERC20.

Firstly look at some advantages of ERC20.

Advantages of ERC20.

Easy Creation of Tokens.

ERC20 standard makes Token creation very easy.

Before introducing Ethereum ERC20, it is a headache to create a token with its own functions from scratch.

Now with ERC20, creating a token is easy, token developers just have to follow simple guidelines.

Easy to Implement.

Just imagine creating a 10,000 individual Tokens with own functions and releasing on exchanges and wallets.

For exchanges and wallets, it is hard to write 10,000 different custom codes to support each token.

But with ERC20, exchanges and wallet providers only have to implement this code once after that they can list all ERC20 base tokens also they can add new token quickly.

Ok, these are some advantages of ERC20.

Now, look at some disadvantages.

Disadvantages of ERC20.

Easy to create the worst Token.

ERC20 has made it too easy for people to create their own tokens. As a result of this, the market is flooded with needless and, even worse, scammy ICOs and tokens.

Transfer bug.

If someone wants to send an ERC20 Token to a wallet address that holds a smart contract, then those tokens can be a loss.

Let’s take MAP Token example for better understanding, if Mr, A wants to return 1,000 MAP token to your wallet address that you have already given in creating a MAP token smart contract then, those 1,000 MAP tokens can be lost.

These are all some advantages and disadvantages of ERC20.

Conclusion.

ERC20 became the initial way to explore more benefits of blockchain and cryptocurrencies.

That’s why it deserves all the respect for the profound impact it has had on the crypto-space despite all the disadvantages.

What you say about ERC20 do let me know in comments.

If you find this post informative, kindly share with your family and friends.

Do Share This Useful Info With Your Family and Friends.