The Ethereum Request For Comment ERC are defined technical protocols from an EIP (Ethereum Improvement Proposal) request to the Ethereum development community. Once the EIP has been approved, it becomes an ERC, and can be implemented on the blockchain. The ERC-20 token was a specification that allowed projects to use the Ethereum blockchain as a source for funding. It became very significant when ICOs (Initial Coin Offering) became popular between 2015 and 2017. That was until financial and trading compliance issues affected the continuation of ICOs due to lack of regulatory clarity. Certain projects will be under scrutiny to participating in ICO if they have not passed the statutes of limitation for the issuance of an unregistered “security”. This falls under the SEC (Securities and Exchange Commission) for most jurisdictions and have since discouraged new projects from issuing an ICO.
Since many projects are already using this as a standard on the Ethereum blockchain, the number of ERC-20 token contracts has grown. By mid-2017, there were around 5,500 ERC-20 smart contracts on the Ethereum network. It grew past 40,000 in 2018 and are further increasing. ERC-20 is not just a technical specification for creating tokens, but it also provides a guideline for how to interact with other wallets, smart contracts and digital marketplaces within the Ethereum ecosystem.
The ERC-20 became a standard on the Ethereum platform not only for funding, but for the issuance of tokens. Several cryptocurrency projects started out as ICO with tokens (e.g. EOS, Tron, OmiseGo). These projects used the Ethereum blockchain to fund their own coins as issued tokens which can later be exchanged for the native cryptocurrency asset once the main network is running. The ERC-20 tokens were temporarily locked into smart contracts that hold a certain amount of Ether. Once the projects were able to build their blockchain, the ERC-20 tokens from the smart contract could be exchanged for the native asset for that blockchain.
As a standard, ERC-20 provides uniformity of technical and protocol standard. This allows developers to follow a procedure, much like how developers create API for their application to communicate with other applications. This reduces complexity of understanding each type of token implementation. A tremendous benefit it brings to the Ethereum blockchain is enhanced liquidity, since Ether or ETH is required to purchase the tokens. That can affect the price of ETH in terms of market cap.
The structure of an ERC-20 token contains 6 functions, 2 events, and 3 token information functions. These functions are invoked and can be be called within a smart contract. From the ERC-20 specification, the following are the 6 functions:
1. totalSupply(): Total supply of Token.
2. balanceOf(address _owner): The balance in the _owner address.
3. Transfer(address _to, uint256 _value): Sends a token of _value to address_to, triggering the Transfer event.
4. transferFrom(address _from, address _to, uint256 _value): Sends a pass from the address_from _value to address_to, triggering the Transfer event.
5. Approve (address _spender, uint256 _value): Approve _spender to extract a certain amount of money.
6. Allowance(address _owner, address _spender): Returns the amount that _spender extracted from _owner.
Decentralized Apps or DApps also support ERC-20. These apps run on top of the Ethereum blockchain. The DApp can be used to query information or even to execute a smart contract. Developers can use the functions when dealing with digital tokens created on the Ethereum blockchain.
The following are the 2 events that are triggered by the functions:
1. Transfer(address indexed _from, address indexed _to, uint256 _value): Triggered when the token is transferred.
2. Approval(address indexed _owner, addressindexed _spender, uint256 _value): Triggered when the approve method is successfully called.
The token also needs to be set with any of these 3 types of token information:
1. Name: Name of the issued Token.
2. Symbol: The name of the Token issued. For example, EtherCent token or ECT on https://rinkeby.etherscan.io/token/0x8caca3dbb57ecb058a82209effde5bf647459771
3. Decimals: Set how many digits this token can reach after the small digits. Generally, the set value is 18, which means that it can reach 18 digits after the decimal point.
The following is an example ERC-20 token created on the Rinkeby test network.
Since Ether (ETH) was released prior to the ERC-20 standard, it does not actually comply with the specification. As a result, this led to the creation of Wrapped Ether (WETH). This is an ERC-20 token that represents Ether at a 1:1 ratio (1 WETH = 1 ETH) which can be exchanged for other ERC-20 tokens.
Since the popularity of ICOs have waned in 2020, ERC-20 tokens are not as common. They are still in use mainly by projects that have not yet released their own native tokens or by new projects that are testing token development (usually on a test network). By keeping their ERC-20 tokens locked with ETH, they are providing a sort of promise to their holders that they can convert it for more value in the future. The converted tokens can then be used within those blockchain projects as a medium of exchange or store of value.