Prior to the advent of Ethereum, every new coin required its own blockchain.
This put a lot of pressure on developers, who required time and money to build a network that could support their coin or fork an existing blockchain.
The introduction of Ethereum altered that, as it was the first project to operate as a development platform. This opened up a slew of new opportunities for blockchain technology and digital currencies alike.
Ethereum evolved into a platform for the creation of decentralized apps (dApps), smart contracts, and new coins. Soon after, a variety of token formats evolved, with ERC20 being the most popular and dominating.
ERC20 is an acronym that stands for Ethereum Request for Comment (ERC), with the 20 denoting a proposal identification on the blockchain. The proposal ID number specifies the collection of rules that must be followed in order for tokens with that ID to be generated, shared, or transferred, with the ERC20 list being the most extensively used set of protocols.
ERC20 was proposed in November 2015 by Ethereum developer
Fabian Vogelsteller
The standard specifies a set of criteria that must be fulfilled in order for a token to function effectively inside the Ethereum ecosystem. As a result, ERC20 should not be regarded as a piece of code or software. It is more accurately defined as a technical guideline or specification.
In other words, the ERC20 provides developers with a set of standards to follow, allowing for flawless operation inside the wider Ethereum ecosystem. ERC20 tokens are supported by a large number of decentralized apps and services, making it simpler for community members and companies to accept and utilize them on a wide range of applications (such as cryptocurrency wallets, decentralized exchanges, games, and so forth).
ERC20 is one of the most significant Ethereum tokens
What does ERC20 do?
ERC20 defines the functionality and protocols for coins created within its framework.
By describing how they must function, new tokens may be produced very quickly. In comparison to developing them on your own blockchain, it instills consumer confidence in the security of that token. According to Etherscan, around 470,000 token contracts exist under the ERC20 framework at the time this post is being written, owing to their relative simplicity of deployment.
ERC20 Standard Rules
If a smart contract want to use the ERC20 token, it must adhere to certain criteria called ERC standards. In other circumstances, if you do not follow the guidelines, it will not be appropriate to call it an ERC 20 token. There are now nine rules, six of which are necessary and three of which are optional.
The Mandatory Standards
- totalSupply: specifies the total quantity of ERC20 tokens you intend to produce. To begin creating the token, you must first establish the entire supply of this token. You cannot, under any circumstances, create your own token on the fly since this will have a major impact on the value of these tokens.
- allowance: The most significant function is the allowance function. In reality, when the contract wishes to carry out a transaction, it has to check the balance of the Ethereum smart contract to determine if the user has the required minimum amount. Using the allowance function, the contract can carry through or cancel the transaction.
- transfer: The owner can use this function to transmit tokens to another address after determining whether the user has enough tokens to transfer. Furthermore, this behaves similarly to a conventional crypto transaction on other blockchain systems.
- transferFrom: This function is mostly used to automate specific transactions.
For example, maybe you have to pay someone the same amount every month, or maybe you have to pay rent and expenses. As a result, you may utilize transferFrom to schedule these payments for a certain day and time.
- balanceOf: This function’s sole purpose is to return the total quantity of tokens held by any address. In reality, it serves as user information, so if you produced some tokens and sent them to other addresses, you can use this to see how many tokens you have left.
- approve: The approve function aids in the elimination of token counterfeiting. Once the contract owner has checked the amount, he or she can approve the contract in order to receive the money. This approve function will also check to see whether the number is right in relation to the total quantity of tokens. As a result, counterfeiting tokens is impossible. If this function discovers any discriminates among the numbers, it will reject both the payment and the smart contract.
The Optional Standards
- Token name: It is critical that the token be connected with a name or identity. Yet, you are not need to name them; however, associating identification with any token is beneficial when utilizing it within a community.
- Decimal (Max: 18): It is actually pretty significant since it ensures the lowest possible value for your token. If the divisibility is zero, the lowest value is one; if it is two, the lowest value is 0.01. You can go up to 18 decimal places in this case.
- Symbol: It is mostly used to create brand value via the use of catchy symbols, however you may not necessarily require a symbol for your coin.
ERC20 Advantages
The ERC20 standard has several advantages. It enables developers to create dApps on the Ethereum network. It also aids in the streamlining of the entire standardized procedure. Let us go over the advantages one by one to gain a clearer picture.
- There is a standard protocol to maintain and follow.
- Token implementation becomes easy for blockchain developers.
- ERC20 tokens offer high liquidity.
- Smart contracts ensure that transactions are risk-free.
ERC20 Disadvantages
- Transfer function bug: Contract accounts and externally owned accounts are the two types of accounts in Ethereum. When attempting to engage with another externally owned account, just utilize the transfer function to transmit tokens.
However, when its contract account is used, the transfer feature does not operate well, and you are likely to lose money. But how exactly? When you use this blockchain technology to transmit money to a contract, the receiver is not alerted. As a result, they will not recognize it, and the token will be trapped within the contract, unable to be used. This is why you must utilize the approval + transferFrom functions. However, using these two might result in double-spending.
- Low Entry Point: These standards, on the other hand, may be used by anybody to create tokens. There are no restrictions on who may and cannot attend. As a result, many people are producing unnecessary tokens that are flooding the market and, in many cases, creating fraudulent tokens to raise money.
The Takeaway
ERC20 is one of the most effective blockchain protocols. It is in charge of hundreds of tokens on the Ethereum network. It is also developer-friendly.
An ERC20 token may be created and released on the blockchain by anybody. ERC20 may also be used to create utility tokens for a dApp.
1 Response
[…] to other blockchains as well. In fact, most of its supply is held on the Ethereum blockchain as an ERC-20 […]