Every field has its own set of standards to run things smoothly. For example, the Pizza industry has some unspoken standards about pizza. And every pizza maker follows those rules to maintain their customers' experience and keep the pizza industry synergistic.
Similarly, the digital coin and tokens built on different blockchains also needed standards for easy interoperability, creation, and deployment. This requirement led to the generation of various token standards, and the most popular one is the ERC-20 token standard.
Understanding it means half the battle won while understanding complex crypto projects.
Okay, enough of dilly-dallying. Let’s put on our thinking caps and know what an ERC-20 is and is not.
To avoid running ahead of the complexities related to this topic, let’s begin by looking at some basics about ERC-20 tokens.
- ERC-20 tokens exist on the Ethereum platform, rely on the Ethereum blockchain, and benefit from it.
- The Ethereum platform comprises the Ethereum blockchain and an Ethereum Virtual Machine (EVM). While Ethereum blockchain stores the track of ETH transactions, EVM runs smart contracts for various functions and processes.
- ETH or Ether is the native currency of the Ethereum network. Apart from ETH, the Ethereum network can also support other tokens if they follow ERC-20 standards.
Now, let’s know what exactly ERC-20 is.
What is an ERC-20 Token?
ERC-20 stands for Ethereum Request for Comment 20.
It refers to a technical standard that comprises a set of rules defining how a token transfer will occur, how the network will approve its transactions, what will be the token supply of the token, and so on. This standard came into existence to make it easier for developers to create and deploy new tokens on Ethereum. It gives a set of interfaces and functions to follow while creating the Smart contract for the new token. Such a framework further helps keep the different tokens compatible with one another and tradeable on Ethereum-based DEX (Decentralized Exchanges) and DeFi products.
Utilizing ERC-20 token standards requires ETH (the native currency of Ethereum). For example, if you want to send 20 XYZ tokens to someone and XYZ is an ERC-20 token, you must attach a specific amount of ETH to perform that transaction. This ETH will be the network fee for utilizing Ethereum blockchain.
Let’s consider an elaborated example to understand the working of ERC-20 standards on the smart contracts that handle everything for different tokens.
Imagine you want to create an ERC-20 token called "ABC Token" using the Ethereum blockchain. To do this, you will create a smart contract. The smart contract will define how the ABC tokens can be created, distributed, and transferred among users.
Here's a simplified version of how the smart contract works:
- Token Creation: The smart contract can set a fixed supply of ABC tokens, say 10,000 tokens, and keeps track of this total supply.
- Token Release: The smart contract has a condition that whenever someone sends 1 ETH to the contract address, it will release 100 ABC tokens to that person. These newly released ABC tokens will add to the existing supply of ABC tokens.
- Token Distribution: You can define the distribution details within the smart contract. For instance, you can specify who will receive the deployed ABC tokens and how many tokens each recipient will get.
- Transfer of ABC Tokens: Once the ABC tokens are released and distributed, users can transfer these tokens to each other. The smart contract includes functions that allow users to send and receive ABC tokens to and from their Ethereum wallets.
In summary, the ERC-20 token smart contract facilitates the creation, distribution, and transfer of ABC tokens within the Ethereum blockchain. The released ABC token will follow all the qualities that an ERC-20 token has.
Many ERC-20 tokens exist, including Stablecoins, DEX native tokens, loyalty tokens, and tokens backed by a physical commodity like Gold or real estate.
Now, let’s know what paved the need for ERC-20 and how it came into existence.
What Was the Need for ERC-20 Tokens?
With the advent of Ethereum, the first altcoin network, it became possible to develop new cryptocurrencies. Thousands of new tokens like stablecoins, DeFi coins, Metaverse coins, and meme coins started coming into existence. It created the need to establish interoperability between different tokens so that platforms can communicate with different ranges of tokens without creating custom codes for them.
ERC-20 standards solve this problem by being the de facto standard for the crypto industry. It defines a set of certain guidelines and functions that any token created on Ethereum must follow. ERC-20 involves six basic mandatory functions that the smart contract of tokens should implement and three optional ones that we will understand in the next section.
Following the same guidelines by thousands of tokens streamlined the integration of different tokens with contracts, wallets, and marketplaces. Since ERC-20 was the first specification offering Ethereum token standardization that gained popularity and wide acceptance, it quickly became the gold standard for the token industry. Today, over 4,50,000 ERC-20 tokens exist. Some most popular ones are Tether (USDT), Shiba Inu (SHIB), Chainlink (LINK), Polygon (MATIC), Uniswap (UNI), The Sandbox (SAND), Aave (AAVE), and many more.
Origin of ERC-20 Tokens
Fabian Vogelsteller, an Ethereum developer, proposed the concept of ERC-20 standards in 2015 to meet the need for a standard in the Ethereum blockchain for Smart contracts. He submitted the proposal on the project’s GitHub page. This proposal was an Ethereum Request for Comment (ERC). Since his comment was the 20th on the project, it got named ERC-20.
After all the remaining research work by Ethereum developers, the ERC-20 proposal finally came into force in 2017 as the Ethereum Improvement Proposal (EIP-20). However, it already gained popularity as ERC-20 and hence has been known like that since then.
One important thing to note here is that while ERC-20 is the most widely used token standard, it is not the only one. Many token standards like ERC-1155 and ERC-721 exist with unique use cases and needs.
How Does ERC-20 Token Standard Work?
The ERC-20 token standard comprises 9 functions. Six of these functions are mandatory functions, and three are optional functions. Developers creating an ERC-20 compatible token must include these functions in their Smart contracts.
The six mandatory functions are:
- totalSupply- This function defines the total supply of a token. When the total supply reaches the limit filled in this function, the smart contract refuses to issue new tokens.
- balanceof- This function is responsible to maintain the token holdings of a given token address.
- transfer- This function takes a certain amount of token from the token supply and gives it to a user
- transferFrom- This function takes care of token transfer between any two users associated with a project.
- approve- This function allows one address to allow another address to spend tokens on their behalf.
- Allowance- This function takes care of the number of tokens an approved token address can spend on behalf of another address.
Then comes the three optional functions that ERC-20 developers can include in their code:
- name- This function defines the name of the token.
- symbol- This function returns the token symbol (token ticker).
- decimal- This function defines the number of decimal places to which the token can be divided (for instance, a token with five decimal places can be divided into 10^10 units).
Apart from these mandatory and optional functions, developers can add additional functions to their ERC-20 tokens, like time-restrictive token transfers and bonus tokenomics for early token adopters.
Wrapping Up
The ERC-20 token standard has revolutionized the world of cryptocurrencies, providing a framework for creating and deploying tokens on the Ethereum blockchain. It ensures interoperability and ease of integration for thousands of tokens, facilitating communication between platforms, wallets, and marketplaces. The popularity and wide acceptance of ERC-20 tokens make them a cornerstone of the crypto industry. While other token standards like ERC-1155 and ERC-721 exist, ERC-20 remains the most widely used. Understanding ERC-20 is crucial for any crypto enthusiast seeking to navigate the complex world of digital assets and decentralized finance (DeFi).
Curious Corner (FAQs)
How many ERC-20 tokens are there?
Since the establishment of ERC-20 token standards, new ERC-20 tokens keep flooding the crypto market. According to various sources, the Ethereum network has issued over 4,50,000 ERC-20 token contracts. This number keeps rising every day with the issuing of new tokens, and hence the exact number is difficult to determine. Notably, despite lakhs of new ERC-20 tokens, only a few managed to make their name in the crypto industry. Some of them are - Polygon (MATIC), Chainlink (LINK), Uniswap (UNI), The Sandbox (SAND), and many more.
What is the difference between ERC-20 and ETH?
ETH or Ether is the native cryptocurrency of the Ethereum network, while ERC-20 is the token standard to create Ethereum-compatible fungible tokens. There is one kind of ETH token but many kinds of ERC-20 tokens.
Are ERC-20 tokens a good investment?
Investing in ERC-20 tokens can be a potential opportunity but comes with risks. Some tokens represent promising projects with real-world utility, while others may be speculative or risky. Conduct thorough research, and consider the project's fundamentals, team, and market demand before making investment decisions.