What Is ERC-20?
ERC-20 is a technical standard for creating fungible tokens on the Ethereum blockchain. It defines a common set of rules that all compliant tokens must follow, including how transfers work, how balances are tracked, and how approvals are granted. This standardization allows any ERC-20 token to work seamlessly with wallets, exchanges, and DeFi protocols.
Table of Contents
What Is ERC-20?
ERC-20 stands for Ethereum Request for Comments 20, a proposal introduced in 2015 that became the dominant token standard on Ethereum. Before ERC-20, each token contract could implement its own interface, making it difficult for wallets and exchanges to support new tokens. ERC-20 solved this by establishing a universal interface that all fungible tokens can share.
How the ERC-20 Standard Works
An ERC-20 token is a smart contract deployed on Ethereum that maintains a mapping of addresses to balances. The standard defines mandatory functions and events that the contract must implement. When you transfer tokens, the contract updates its internal ledger. Because every ERC-20 token exposes the same interface, any application that supports one ERC-20 token automatically supports all of them.
Key ERC-20 Functions
The standard requires six functions: totalSupply (returns total tokens in existence), balanceOf (returns an address's balance), transfer (moves tokens to another address), approve (grants a spender permission to use tokens), transferFrom (allows approved spenders to move tokens), and allowance (checks remaining approved amount). Two events, Transfer and Approval, must be emitted for tracking.
Use Cases
ERC-20 tokens power a vast range of applications. Stablecoins like USDC and USDT are ERC-20 tokens. Governance tokens for DAOs, utility tokens for platforms, wrapped versions of other assets, and liquidity pool tokens in DeFi all use this standard. The uniformity of ERC-20 is what made the explosion of DeFi composability possible.
Limitations and Evolution
ERC-20 has known limitations. The approve-then-transferFrom pattern can lead to race conditions. Tokens sent directly to contracts that do not expect them can be permanently lost. Later standards like ERC-223 and ERC-777 attempted to address these issues, though ERC-20 remains dominant due to its massive ecosystem support and simplicity.
Frequently Asked Questions
Are all Ethereum tokens ERC-20?
No. ERC-20 is only for fungible tokens (where each unit is identical). NFTs use ERC-721 or ERC-1155. Some tokens use custom standards. However, the vast majority of fungible tokens on Ethereum follow ERC-20 because of its wide support across the ecosystem.
Can I create my own ERC-20 token?
Yes. Anyone can deploy an ERC-20 token by writing a smart contract that implements the required functions. The barrier to entry is low, which is why thousands of ERC-20 tokens exist. However, creating a token with real value requires building utility and community trust.