Guide to ERC-20 tokens
ERC-20 is a technical standard defining the rules for tokens on the Ethereum blockchain. It applies to token creation, transfers, approval of transactions, and total supply. The Ethereum request for comment 20 standard has been used since 2017, and the assets are traded on all popular cryptocurrency exchanges. Here is our take on the meaning, benefits, and drawbacks of ERC-20.
Why did ERC-20 appear?
Unlike Bitcoin, Ethereum is more than a blockchain technology — it is a platform with support for decentralized applications. ERC-20 is one of the three fundamental elements of this crypto ecosystem, along with Ether (ETH) and gas. The trio powers the blockchain, incentivizes miners, and enables token creation.
Birth of native token standard for Ethereum network
In 2015, developer Fabin Vogelstellar proposed Ethereum request for comment as a means to allow smart contracts to interact, a solution to a fundamental problem stemming from their popularity. He shared it in a twentieth comment on the project’s GitHub page — hence the name. Two years later, ERC-20 was officially implemented as Ethereum Improvement Proposal 20 (EIP-20).
Thanks to the standard, developers can mint their own crypto tokens on the network. For a business, using tokens for new products is much easier than creating its own blockchain with new coins.
As you can see from the diagram, ERC-20 is not the only standard for Ethereum tokens. All of these standards comply with Ethereum Request for Comments (ERC), a document with a unified set of rules. Over time, some ERC-20 tokens have migrated to their own blockchains — here are a few examples:
- Binance Coin
- Tron
- EOS
- VeChain
Properties of ERC-20 tokens
These digital assets have three fundamental characteristics: fungibility, transferability, and fixed total supply. Not every ERC-20 token is a cryptocurrency (unlike ETH) — some of them only represent assets and rights that exist beyond the blockchain.
In this context, token can be defined as a blockchain representation compliant with the standards of the Ethereum community.
All ERC-20 tokens are fungible
Fungibility implies equal value between assets, so each token is effectively identical to any other token from the same group. This is similar to fiat money: one US dollar is indistinguishable from any other US dollar in terms of value, so they are interchangeable.
Non-fungible tokens, which often represent digital artwork, are not interchangeable. An NFT does not have a peer — its identifying code is unique. This is why some NFTs sell for millions of dollars, just like real-life property or works of art.
Token sets
ERC-20 tokens are always created in groups, and there are thousands of sets in existence. Most of them have little value, but a few are worth billions.
There is no standard number of tokens, either — for example, a common set may include one million or ten million assets. However, fixed supply means that developers may not mint more tokens than initially specified.
Transferability
Like other digital assets, ERC-20 tokens can be sent from one wallet address to another.
Unique identifiers
Each group is given a unique ticker symbol like UNI for Uniswap.
Ease of creation and implementation
The barrier to entry is low. To launch a new token, creators only need to deploy a simple smart contract on Ethereum.
ETH-based interaction
Interacting with the tokens is not free — users have to spend ETH to cover the transaction fees. If you want to transfer any amount of ERC-20 tokens across the network, this will require attaching a small amount of Ether.
Use cases for ERC-20 tokens
Different tokens serve different purposes. They may be used to pay for functions (utility tokens), buy goods and services, represent ownership, and more. Aside from trading on centralized and decentralized exchanges, tokens built on the Ethereum blockchain may:
Represent financial assets
Suppose a smart contract mints 100 XYZ tokens for every contributor that sends 1 ETH. If it can only accept 1,000 ETH in total, it will eventually generate and distribute 100,000 tokens. As a way to raise money, this method is similar to an IPO (initial public offering). Note that regulators may regard such tokens as securities depending on the jurisdiction.
Represent loyalty rewards and reputation points
Suppose you own a travel booking service and need to implement a loyalty scheme. You could issue tokens as reward points, so customers can use them to pay for bookings or trade with other people. These tokens could also give holders extra benefits like VIP services.
Represent voting rights
For instance, the COMP governance token corresponds 1–1 with voting power in Compound protocol governance.
Represent physical objects
Tether (USDT) is an ERC-20 token representing US dollars. Holders can move it around, trade and use it for yield via smart contracts quite easily. Other possible use cases for ERC-20 include gold and real estate. This application requires a permanent connection between the physical objects and the digital tokens.
Basic Attention Token is a unit of account on a digital platform connecting advertisers, publishers, and users. This sets it apart from digital currencies, securities, and commodities. Aside from being a utility token on Ethereum, BAT also has an SPL version that works on Solana.
Disadvantages of ERC-20 tokens
Despite their versatility and convenience, ERC-20 tokens are not ideal for everyone. The drawbacks stem from the flaws of the Ethereum network:
Low throughput
Ethereum is notorious for congestion issues, and they also amplify the transaction costs. One of the reasons is the popularity of Dapps, as they utilize the Ethereum network resources. Until the Merge (Ethereum’s transition to Proof-of-Stake), the average speed will be limited to around 15 TPS.
ETH
Using ERC-20 tokens requires spending Ether to cover the transaction fees. This may result in substantial costs and crypto dust.
Problem with Tether
USDT is one of the most popular tokens and cryptocurrencies. As of July 28, 2022, it has the third-biggest market cap of just under $66 billion.
Yet the 'real' dollars it represents exist beyond the Ethereum ecosystem — in the bank accounts of Tether Limited. This makes conventional auditing methods indispensable to verify the underlying amount of reserves.
Theoretically, every holder of USDT has a claim on the corresponding amount of US dollars. Generally, the token has stuck to its 1:1 peg. However, Tether has admitted that its tokens are not 100% backed by actual dollar.
Moreover, the need to rely on third-party services may erode some of the confidence. It is not impossible for Tether to lose its peg. USDT has already failed to remain at 1:1 a few times.
For example, it caused market chaos in October 2018, when it fell to 85 cents on some exchanges. In February 2020, USDT traded at $4.99 per USD on Binance.US. You can find more examples here.
What the ERC-20 standard contains
ERC-20 includes a set of code functions and events that must be implemented for a token you create. It governs actions taken by smart contracts. These rules define the supply, storing and returning balances, execution of transfer and withdrawal requests, and approval. The bare minimum (the core of the interface) includes:
- totalSupply: The total amount of tokens that will be ever minted
- balanceOf: The amount of tokens owned by the account
- transfer: Moving a particular amount of tokens from the caller’s account to recipient
- transferFrom: Moving a particular amount of tokens from sender to recipient via the allowance mechanism
- approve: Permission for a spender to withdraw a particular amount of tokens from a particular caller’s account
- allowance: The remaining number of tokens that a spender can spend on behalf of the caller
- Transfer (event): An event triggered by a successful transfer
- Approval (event): A log of an approved event
This Ethereum network standard ensures interoperability, so ERC-20 tokens are compatible across applications like DEXes and wallets. Any code for a specific contract may use identical definitions. Thus, it is in sync with all other token contracts, be it a wallet, a Dapp, or a liquidity pool.
Popular fungible tokens created on Ethereum
Over half a million ERC-20 tokens have been issued so far. Aside from Tether (USDT), the most popular ones include:
- USD Coin (USDC), a USD-backed stablecoin launched by Circle
- Shiba Inu (SHIB), a meme coin widely regarded as an alternative to Dogecoin (DOGE)
- Binance USD (BUSD), a USD-backed stablecoin developed by Binance and Paxos
- BNB (BNB), a cryptocurrency issued by the Binance Exchange
- DAI Stablecoin (DAI), USD-backed stablecoin maintained and regulated by MakerDAO
- Wrapped Bitcoin (WBTC) — a 1:1 Bitcoin-backed token that can be used in DeFi apps
Future of ERC-20 for smart contracts
Thanks to smart contracts, ERC-20 tokens have gained a lot of traction in the crypto community. Despite the rise of so-called Ethereum killers, the network is still the second most popular ecosystem behind Bitcoin.
The token standard facilitates development — creators know how their crypto will function within the Ethereum blockchain system. ERC-20 eliminates the need to redo existing projects and ensures their compatibility with the new ones.
What’s more, ERC-20 tokens are versatile — they can be used as a digital currency, to provide loyalty rewards, give voting rights, or even represent physical objects like gold. As long as the blockchain maintains its status, the biggest conceivable threat could only come from within — if new Ethereum standards for other tokens overshadow ERC-20.