Understanding the ERC-20 Token Standard
A technical overview of the ERC-20 standard — the specification that defines how fungible tokens work on Ethereum.
What Is ERC-20?
ERC-20 stands for "Ethereum Request for Comment 20" — a technical standard proposed in November 2015 by Fabian Vogelsteller. It defines a common set of rules that all fungible tokens on Ethereum must follow.
"Fungible" means each token is identical and interchangeable — 1 USDT is always worth the same as any other 1 USDT, just like a $10 bill is interchangeable with any other $10 bill.
Before ERC-20, each token contract had different function names and behaviors, making integration a nightmare. The standard created a universal interface that enabled the entire DeFi ecosystem.
Required Functions
Every ERC-20 token must implement these six functions:
`totalSupply()` — Returns the total number of tokens in existence.
`balanceOf(address)` — Returns how many tokens a specific address holds.
`transfer(to, amount)` — Moves tokens from the caller's account to another address.
`approve(spender, amount)` — Authorizes another address (like a DeFi protocol) to spend up to a certain amount of your tokens.
`allowance(owner, spender)` — Returns how many tokens the spender is still allowed to withdraw from the owner.
`transferFrom(from, to, amount)` — Used by approved spenders to transfer tokens on behalf of the owner. Essential for DeFi composability.
And two events: - `Transfer(from, to, value)` — Emitted on every transfer. - `Approval(owner, spender, value)` — Emitted when an approval is set.
Optional Extensions
Beyond the core standard, several extensions add functionality:
- ERC-20 Metadata —
name(),symbol(), anddecimals()(most tokens use 18 decimals). - ERC-20 Burnable — Adds a
burn()function to permanently remove tokens from circulation. - ERC-20 Pausable — Allows the owner to pause all transfers in emergencies.
- ERC-20 Permit (EIP-2612) — Enables gasless approvals via off-chain signatures.
- ERC-20 Capped — Enforces a maximum total supply.
- ERC-20 Votes — Adds governance delegation and voting snapshots.
Practice in a risk-free environment
Apply the concepts using virtual funds and live market data. NexChange is an educational simulation, not a real-money exchange.
Continue learning
Related guides
How to Create Your Own Cryptocurrency Token
A practical guide to creating and deploying your own token on Ethereum using the ERC-20 standard, from writing the smart contract to deployment.
Smart Contracts 101
Learn what smart contracts are, how they work, and why they are the foundation of decentralized applications.
How Blockchain Technology Works
A deep dive into the technology that powers cryptocurrencies — blocks, chains, consensus mechanisms, and decentralized networks.