fbpx

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

ERC-20 tokens play a crucial role in the world of cryptocurrencies, serving as a standardized format for creating and managing tokens on the Ethereum blockchain. They gained widespread recognition in 2017, during the ICO (Initial Coin Offering) boom. Since then, nearly 600,000 different ERC-20 tokens have been created, with more emerging every day.

But what exactly are ERC-20 tokens, and why are they so important in the cryptocurrency space?

What Are ERC-20 Tokens?

The acronym ERC stands for Ethereum Request for Comments, and the number 20 refers to the Ethereum Improvement Proposal (EIP-20) document that defines this standard. It was first proposed in November 2015 by Fabian Vogelsteller, one of Ethereum’s core developers.

Simply put, ERC-20 tokens are a type of cryptocurrency that operates within the Ethereum network. Unlike Bitcoin, these tokens are not stored in individual user accounts but within smart contracts.

Each ERC-20 token has a name, symbol, and a defined decimal precision, all controlled by a smart contract. The contract is responsible for:

  • Assigning tokens to specific Ethereum addresses.
  • Tracking user balances.
  • Managing transfers and transactions between users.

During the ICO boom of 2017, ERC-20 tokens became the standard for most new cryptocurrency projects. Since then, two primary token standards have dominated the Ethereum ecosystem:

  • ERC-20 – used for fungible tokens, meaning each unit is identical and interchangeable with another.
  • ERC-721 – used for NFTs (non-fungible tokens), where each token is unique and represents a distinct asset, such as digital art or collectibles.

Key Features of ERC-20 Tokens

ERC-20 tokens have specific properties that define how they function. Here are the most important ones:

  • Name and Symbol – each token has a unique name and ticker symbol (e.g., USDT for Tether or LINK for Chainlink).
  • Supply Management – the total number of tokens in circulation is determined by the smart contract.
  • Balance Tracking – the contract records how many tokens are assigned to each user’s address.
  • Transfer Mechanism – ERC-20 tokens can be easily sent between users.
  • Partial Withdrawals – users can withdraw tokens in smaller amounts rather than transferring the entire balance at once.

How to Create an ERC-20 Token?

Creating an ERC-20 token does not require advanced programming skills. It involves writing a smart contract that includes six essential functions:

  1. totalSupply – defines the total number of tokens in circulation.
  2. balanceOf – returns the balance of a given wallet address.
  3. transfer – allows users to send tokens to others.
  4. transferFrom – enables smart contracts to manage token transfers on behalf of a user.
  5. approve – sets a maximum number of tokens that can be withdrawn from an account.
  6. allowance – checks how many tokens can be transferred within an allowed limit.

Additional attributes like name, symbol, and decimal places can be added to make the token more user-friendly.

To create an ERC-20 token, you simply send a small amount of ETH to the smart contract, which then returns the corresponding number of tokens. However, it’s important to remember that data recorded in a smart contract cannot be modified, so all parameters should be carefully planned before deployment.

ERC-20 Token Transaction Fees

Sending ERC-20 tokens requires gas fees, which are paid in ETH. Every transaction—whether transferring tokens between wallets or interacting with a smart contract—must be paid for in Ethereum’s native currency, ETH.

Transaction costs depend on:

  1. The current gas price in Ethereum (measured in Gwei).
  2. Network congestion – higher demand results in higher fees.

A standard Ethereum transaction consumes 21,000 gas units, but transactions involving ERC-20 tokens require more. If the gas fee is too low, the transaction may be delayed or stuck in a queue.

To ensure faster processing, users can increase the gas fee, making their transaction more attractive to network validators.

Advantages and Disadvantages of ERC-20 Tokens

Advantages:

  • Fungibility – each ERC-20 token is identical, making them ideal for digital currency and trading.
  • Flexibility – ERC-20 tokens can be adapted for various uses, from gaming currencies to investment assets.
  • Wide Adoption – the ERC-20 standard is supported by almost every crypto project and wallet.

Disadvantages:

  • Scalability Issues – Ethereum’s network congestion can lead to high transaction fees.
  • Ease of Creation Can Lead to Scams – anyone can create an ERC-20 token, which has led to many fraudulent projects.

How to Store ERC-20 Tokens?

ERC-20 tokens can be stored in any Ethereum-compatible wallet, including:

  • Software Wallets: MetaMask, Trust Wallet, Coinbase Wallet.
  • Hardware Wallets: Ledger, Trezor (for enhanced security).

To prevent losing funds, users should securely store their seed phrase, as losing it makes it impossible to recover tokens.

Can ERC-20 Tokens Be Mined?

No. Unlike Bitcoin, ERC-20 tokens are not mined. Instead, they are distributed through:

  • ICOs (Initial Coin Offerings)
  • Token sales and airdrops
  • Staking mechanisms (for certain projects)

Developers set the total supply of tokens at the time of creation.

Summary

ERC-20 tokens have significantly simplified the development of the Ethereum ecosystem, providing compatibility and a unified standard for cryptocurrency projects. They have become the foundation of DeFi, NFTs, and many other innovations.

Thanks to their flexibility, developers can create new cryptocurrencies without building an entirely new blockchain, lowering the barrier to entry into the world of crypto.

Use the acquired knowledge in practice on Kanga Exchange

Sign up for the newsletter!

Receive the latest cryptocurrency news in your email every week.