7 min read
In the world of cryptocurrencies there are key concepts that we must know. One of them is the ERC-20 token. ERC-20 tokens are smart contracts (smart contracts) that have a pre-established structure to fulfill certain functions.
ERC-20 stands for Ethereum Request for Comments. The ERC-20 structure was created with the aim of facilitating the implementation of various functionalities in the Ethereum blockchain. This structure facilitates the work of developers when creating a token.
Because the Ethereum blockchain is a whole integrated system, developers created new mechanisms to facilitate certain tasks, including the creation of new coins. If you want to learn how ERC-20 tokens work and what they are used for, in this article we tell you all about it.
History of ERC-20 Tokens
ERC-20 tokens have their origin in 2015, specifically on November 19. This creation was proposed by developers Fabian Vogelsteller and Vitalik Buterin. ERC-20 tokens became part of the Ethereum network’s EIPs under the name EIP-20. When we talk about EIP we mean Ethereum upgrade protests.
ERC-20s had the 20 added at the end to represent the EIP number where the project is described. These smart contracts describe a standard on functions and events that can be implemented in Ethereum. From its proposal to the present day, a huge number of ERC-20 tokens have been created.
When the Ethereum developers started working on this proposal they were looking to create a multi-capability system. This entire system would be under a standard interface reusable for other applications. ERC-20 was created to be an API that would guarantee developer users advantages such as uniformity in programming, a reduction in programming complexity, and support for multiple programming languages and improvements in portability.
Other advantages that the developers sought to create were greater security and a decrease in the risk of breaking contracts by not having impediments or incompatibilities. Since this scheme was published, numerous coins have been created, many of them with a respectable place in the market capitalization chart. Some of these cryptocurrencies are Uniswap, Tether, ChainLink, TRON, among others. Below we will look at how ERC-20 tokens work and what makes them so important.
How do ERC-20 tokens work?
As we mentioned earlier, ERC-20 tokens are a kind of smart contract that runs on the Ethereum blockchain. The operation of these tokens is within a programmatic framework established by the Ethereum development team. This framework allows for different uses without disrupting the Ethereum blockchain.
ERC-20 standards dictate protocols to be followed for creating, distributing and exchanging tokens. Any user can develop their own cryptocurrency under this standard although this requires some basic knowledge and project development time.
ERC-20 tokens are able to bring parallel sub-accounting to the Ethereum blockchain by having their own monetary unit. It should be noted that this whole process is carried out without mixing Ether balances in the same directions with other ERC-20 tokens. In addition, transparency, traceability and security are guaranteed in the Ethereum network.
The great flexibility of ERC-20 tokens has made them one of the most widely used standards in the crypto world. The main use of ERC-20 tokens is to standardize the interface for creating and issuing new tokens on the network. This objective is achieved by complying with certain parameters and rules that allow its acceptance. Among these rules would include the fact that to move or alter an ERC-20 token it is necessary to have Ether. This condition helps the economy of the network.
ERC-20 tokens create interoperability and compatibility between other tokens fostering improvements in the ecosystem. This is due to the ease that these tokens offer for the development of new cryptocurrencies. In fact, the ERC-20 token infrastructure was created for this purpose.
On the other hand we should know that ERC-20 tokens have a structure accompanied by tools such as the Solidity programming language or other powerful tools such as the Ethereum Virtual Machine (EVM).
To create an ERC-20 token the developer must implement six completely mandatory functions in the smart contract. These functions are:
- TotalSupply: It is used to identify the total number of ERC-20 tokens created.
- BalanceOf: The balanceOf function returns the number of tokens that a given address has in a user’s account.
- Transfer: Allows a certain number of tokens to be transferred from the total supply to a user account.
- TransferFrom: This function allows a user to transfer tokens to another user.
- Approve: This function verifies a transaction against the total supply of tokens making it impossible to counterfeit a token.
- Allowance: This function is useful to limit the number of tokens that a smart contract can withdraw from a balance. Without this function we risk having our funds stolen through misuse.
The ERC-20 token also has some characteristics that make it unique, for example, it is mandatory for it to be an ERC-20 token that it has a name, a symbol that identifies it and a number of decimals that represent the number of times a token can be divided (it can have up to 18 decimals).
Advantages and disadvantages of ERC-20 tokens
Like everything else, ERC-20 tokens are programming with their own advantages and disadvantages. The following are the most important ones.
Advantages of ERC-20 tokens
- Facilitates the creation of tokens. Previously developers used other terminologies to create tokens.
- Exchanges between tokens
- Universal standard. Thanks to this standard, new tokens can be placed in an Exchange or transferred to wallets automatically.
Disadvantages of ERC-20 tokens
*An ERC-20 token may be unintentionally destroyed if used as payment for a smart contract instead of using Ether.
- Scalability. They are not very scalable because if we launch an ERC-20 token into the network when it is congested its usability could be affected.
- Fraud. Anyone can create an ERC-20 token so they can be used for good or bad by any user.