fbpx

12. What is an ERC20 token and how is it created?

The ERC-20 token is nothing more than a smart contract that has a predefined data structure. This structure is intended to facilitate the implementation of various functionalities on the Ethereum blockchain, making creative work easier for programmers. It got loud about ERC20 tokens in 2017, when more ICO projects appeared, now we have almost 600 thousand created tokens, and everyday more are coming. What are they used for and what role do they have in the world of cryptocurrencies? 

ERC TOKENS – 20 – WHAT ARE THEY?

The acronym ERC stands for Ethereum Requests for Comments or Request for Comments for Ethereum, while the number 20 comes from EIP, where it is described. These tokens are created on the Ethereum blockchain, a protocol that consists of a set of individual guidelines. This standard was proposed in November 2015 by Fabian Vogelsteller, an Ethereum developer. Complicated? Well, we can explain 🙂 

In clearer terms, ERC20 are tokens that were created on and use the Ethereum network. Importantly – they are not stored in accounts. They are located in its contracts. The contract defines the name, symbol, and divisibility of the tokens. It also maintains a list of them, which maps users’ balances to their Ethereum addresses. 

What if we want to move the tokens to another location? Then you send a transaction to the contract, asking it to allocate the balance elsewhere. ERC-20 tokens are flexible, which makes them very attractive. The lack of restrictions means that both parties to the contract can implement additional features into it. They can also change and set its parameters according to their needs. 

ERC20 is the standard that was most successful during the ICO bubble in 2017, as almost all cryptocurrency fundraising was done on this standard. Since then, two standards have been used when issuing new tokens: ERC20 and ERC721, the standard used for NFT (non-fungable tokens).

MAIN FEATURES OF ERC-20 TOKENS

As we have already mentioned, ERC-20 tokens are primarily characterized by their extensive adaptability. To achieve this, the ERC-20 token uses a certain basic structure that allows it to exploit its full potential. In this sense, these features are:

  1. They have a name or identifier and an associated symbol. Using these two values, tokens can be identified and distinguished from each other within the Ethereum blockchain.
  2. It can manage the basic economic aspects of its issuance. Data, such as the decimal precision system and total issuance, is a fundamental part of the token in its data structure.
  3. It manages an interface to control and view the balances of its owners’ addresses. This allows the token to report the total balance of funds held at a specific address.
  4. It can handle the transfer system natively. This is because the token has functions to handle fund transfers.
  5. Additionally, the token can autonomously handle partial withdrawals of funds from a single address. For example, if Juan is given permission to withdraw 1000 ETH from Maria’s account, Juan can withdraw 250 ETH on the first withdrawal. In subsequent withdrawals, Juan can complete the withdrawal of the rest of the funds, but will only be allowed to raise up to 1000 ETH. A feature that gets the name “Approved” and depends on another one called ” Reservation”.

ERC 20 – TOKEN CREATION

Even if you are not a programmer and do not know advanced techniques, you can create such a token yourself. You need a Smart Contract and the six necessary functions: totalSupply, balanceOf, transfer, transferFrom, approve and allowance. If you want your token to be a bit more advanced, also develop a function called name, symbol, and decimal. Let’s start. To receive your ERC-20 token, send a minimum amount of ETH to Smart Contract. Smart Contract will return them to you. This works on a barter basis. Remember that the data you enter in Smart Contract is irreversible. Watch out for making a mistake. It cannot be removed at this stage. Now let us explain the necessary functions: 

  • Total Supply – returns the total supply of tokens that the contract contains. 
  • Balance Of – takes the address. This function returns the balance of the token resource, up to the address given in the function. 
  • Transfer – allows you to transfer tokens from one user to another. This is where you specify the address you want to make the “transfer” to and the amount of the transfer. 
  • transferFrom – an alternative to transfer, but allows more programmability. Especially in decentralized applications. Also used to transfer tokens. 
  • Approve – this function limits the number of tokens, taken by the smart contract, from your balance. It is necessary because without it smart contract will not work properly. In the worst case, it will end up in the wrong hands.
  • Allowance – you can use this function with approve. With allowance, you permit the contract to manage your tokens.  
  • Name, symbol, decimal – these will make your token a little nicer. 

Using the functions mentioned above, you will get a ready-made ERC 20 token. You can now check its total supply, balance, transfer funds or even let other DAPPS manage it.

ERC20 TOKENS – FEES

It is necessary to use gas (GAS) to pay transaction fees, so it is necessary to pay in Ether native Ethereum tokens to transfer ERC20 tokens from one wallet to another or send funds to a smart contract. This cost depends on the dollar price of Ethereum during the transfer and supply and demand on the Ethereum network.

A transaction in Ether – the base currency of the Ethereum network – always costs 21,000 GAS.

The more transactions you execute, the higher the shipping fees will be. However, sometimes it is the case that we have a choice when it comes to fees. If you choose the cheapest option, it comes with an increased waiting time for funds to be sent. Unfortunately, transactions are queued up based on fees. If your fee is small, it will fall to the end of the queue. 

Another option you may encounter is that the block with your transaction is closed. This will result in the transfer not reaching its destination. You will then have to wait for the commission level at which you ordered the transfer to fall. 

However, to make your life easier, it is best to send the appropriate amount, which will increase the commission value. Then, in the next block, your transfer will go to the first place. Remember – the higher your fee is, the better the chance that your transaction will reach the recipient in a very short time. 

ADVANTAGES AND DISADVANTAGES 

Their biggest advantage is interchangeability. Each unit is exchangeable for another. If your token will be some kind of currency, this is ideal. Flexibility – another plus. ERC 20 is highly configurable. They can be adapted to many applications. They can be a game currency, a digital collector’s item, or a representation of artwork and property rights. And the final plus – popularity. They are used in virtually every project. Tokenization platforms, which have been gaining a lot of popularity recently, also use this standard. 

So, it is not so beautiful all the time, let’s now move on to their disadvantages. The first one that comes to mind is scalability, which is very low. If you overload the network, the usability of the token will also be low. The ease of launching such a token is also a drawback. It exposes users to many frauds with it. As we have already mentioned, creating such a token is not time-consuming. As a result, anyone can create it – not always with good intentions. 

STORAGE

ERC 20 tokens can be stored in virtually any cryptocurrency wallet. Importantly, when using them, remember to write down the key phase. This consists of between 12 and 24 words. This is the password for access, in case your funds are lost. 

CAN YOU MINE ERC-20 TOKENS?

The short answer is no. Once the contract is launched, the developers have their plan to distribute the tokens. This is usually done through an ICO or IEO. 

SUMMARY

The purpose and need for ERC-20 tokens is to design a standard, create interoperability and compatibility between tokens, and support improvements in the Ethereum ecosystem. This is because ERC-20 tokens make the work of creating new tokens much easier. Because the infrastructure was designed for this. It was also accompanied by tools for this purpose, such as the Solidity programming language, and the EVM virtual machine.

Use the acquired knowledge in practice on Kanga Exchange

Sign up for the newsletter!

Receive the latest cryptocurrency news in your email every week.