According to Wikipedia, ERC-20 is a technical standard employed for smart contracts on the Ethereum blockchain and it’s used for token implementation purposes. ERC stands for Ethereum Request for Comment, and 20 is the number that was assigned to this particular request.
ERC-20 tokens follow a clear set of standards allowing them to be shared, transferred, or exchanged for other types of tokens. In order to understand what are ERC-20 tokens, how they work, and what are their advantages and disadvantages, this article will familiarize the reader with concepts such as Ethereum platform, dApp, ETH, and smart contracts, among others.
Things you need to know beforehand
You surely head about Ethereum, a distributed and open-source blockchain network. The platform is renowned for its cryptocurrency, the ETH tokens, but mostly for its ability to host and run smart contracts.
DApp is the abbreviation for decentralized application, and it means that its backend code runs on a decentralized peer-to-peer network. Ethereum is designed to encourage the development of DApps, most of which require an additional currency. They are built on the existing Ethereum blockchain and make use of its underlying tech. Depending on the specific purpose of a said dApp, it can create ERC-20 tokens to function as a currency.
To create these ERC-20 tokens, smart contracts are needed. Smart contracts are written in a high-level programming language called Solidity using an IFTTT (If-This-Then-That) algorithm and are used to facilitate the transaction of tokens, and record balances of tokens in a said account.
After a smart contract creates a token, this is where ERC-20 truly comes into play. A token can be transferred, traded, or spent. ERC-20 acts an universally-accepted “language” and allows all tokens on the Ethereum blockchain to be traded one with other.
Solidity and the ERC-20 “interface.”
To fully understand how the ERC-20 standard really works, one must first understand a few things about the way Solidity works and how this standard is implemented within the Ethereum ecosystem. Contracts are basically a collection of code and data that have a determined “address” within the Ethereum blockchain. Since the blockchain supports contract inheritance, a contract can very well be an instance of another contract. These types of contracts are called abstract contracts, also known as interface contracts.
There are six main method-related functions associated with these abstract contracts and interface contracts: Allowance, Approve, BalanceOf, TotalSupply, Transfer, TransferFrom. All of these complex functions are found in the large majority of ERC-20 tokens (with very few exceptions).
One of the best things about the ERC-20 standard is the fact that Ethereum developers have a very clear idea of what to expect from these core functions, meaning that they inevitably streamline the whole development process on the Ethereum blockchain.
The advantages and disadvantages of ERC-20 tokens
For starters, the ERC-20 standard makes the creation of new tokens extremely easy. That is its main goal. ERC-20 tokens are part of the reason why Ethereum is currently the most popular platform for ICOs and has seen its fair share of incredible projects built on top of it. As specified before, they make it easier for developers to code.
As one can expect, ERC-20 is not without its limitations. For starters, ERC-20 has fallen short in situations where the ERC-20 tokens have been unintentionally destroyed when used as payment for a smart contract (and not using Ether). The team behind Ethereum and various involved community members are currently working on a new standard to replace the “imperfect” ERC-20 which will be called ERC-223.
Conclusion
The ERC-20 standard along with its specific tokens are a very important reason why Ethereum is the leading platform today. Until the token is replaced by the ERC-223, which should counter most of their flaws, the standard remains a very big part of the whole Ethereum ecosystem.
Since it was developed, the ERC-20 standard has accelerated the growth across the entire ICO space by standardizing functions. Hence, it has helped numerous projects get off the ground and easily develop their own tokens. The protocol is also responsible for bridging the technological gap between wallets providers, exchanges, and various ICO projects.