ERC-20 (Ethereum Request for Comments 20) is the technical standard that defines how fungible tokens on the Ethereum blockchain must behave. Proposed by Fabian Vogelsteller in November 2015 and finalized as a formal standard in 2017, ERC-20 establishes a common interface — a set of mandatory and optional functions — that any token contract must implement to be compatible with wallets, exchanges, and other smart contracts. Nearly every DeFi token, ICO token, stablecoin (USDT, USDC), and governance token is an ERC-20 token.
Why a Standard Was Needed
Before ERC-20, Ethereum developers wrote custom token contracts with different function names, interfaces, and behaviors. This fragmentation meant:
- Wallets had to write custom code for every token
- Exchanges couldn’t list tokens without individual integration work
- Smart contracts couldn’t interact with arbitrary tokens
- Token transfers between contracts were unreliable
ERC-20 solved this by defining a universal interface: any contract that implements ERC-20 can be used by any ERC-20-compatible wallet, DEX, or smart contract without custom integration.
The ERC-20 Interface
An ERC-20 token must implement these 6 functions and 2 events:
Required Functions:
“`
totalSupply() → Returns total token supply
balanceOf(address) → Returns token balance of an address
transfer(to, amount) → Transfer tokens from caller to recipient
approve(spender, amount) → Allow spender to spend up to amount
transferFrom(from, to, amount) → Transfer on behalf of another (after approval)
allowance(owner, spender) → Returns remaining approved amount
“`
Required Events:
“`
Transfer(from, to, value) → Emitted on every transfer
Approval(owner, spender, value) → Emitted on every approval
“`
Optional:
“`
name() → e.g., “USD Coin”
symbol() → e.g., “USDC”
decimals() → Number of decimal places (typically 18)
“`
The Approval / TransferFrom Pattern
One of ERC-20’s key mechanisms is the approval workflow — required for smart contract interactions:
- User calls
approve(DEX_address, amount)— allows DEX to spend up to X tokens - DEX calls
transferFrom(user, DEX, amount)during a swap
This is why DeFi wallets always ask “Approve token spending” before you can trade — that’s ERC-20’s approval step.
Security note: Unlimited approvals (approve max amount) are convenient but dangerous — if the approved contract is later hacked, it can drain your tokens. Check and revoke unnecessary approvals at revoke.cash or Etherscan’s token approval checker.
Scale and Adoption
- Over 500,000 ERC-20 tokens have been deployed on Ethereum mainnet
- Every major stablecoin is ERC-20: USDT, USDC, DAI, BUSD
- Every major DeFi governance token is ERC-20: UNI, AAVE, COMP, CRV, MKR
- The standard spread to all EVM-compatible chains: BNB Chain, Polygon, Arbitrum, Base, Avalanche all use ERC-20 (or BEP-20, a near-identical standard on BNB Chain)
ERC-20 vs Other Standards
| Standard | Type | Use Case |
|---|---|---|
| ERC-20 | Fungible token | Currencies, governance, stablecoins |
| ERC-721 | Non-fungible token | NFTs, unique collectibles |
| ERC-1155 | Multi-token | Gaming items (both fungible and NFT in one contract) |
| ERC-4626 | Tokenized vault | Yield-bearing vault shares (DeFi) |
Known Limitations
ERC-20 has several known flaws that have caused hundreds of millions in token losses:
- No built-in transfer safety: Tokens sent directly to a contract address (not via
transferFrom) are often permanently stuck — the contract has no way to retrieve them - ERC-23 / ERC-677 proposals attempted to fix this but were never widely adopted
- Unlimited approval risk (see above)
Related Terms
Sources
- Vogelsteller, F. & Buterin, V. (2015). “ERC-20 Token Standard.” Ethereum Improvement Proposals, GitHub, November 19, 2015.
- Chen, T. et al. (2019). “TokenScope: Automatically Detecting Inconsistent Behaviors of Cryptocurrency Tokens in Ethereum.” Proceedings of the 2019 ACM CCS.
- He, N. et al. (2020). “Smart Contract Vulnerabilities: Vulnerable Does Not Mean Exploited.” USENIX Security 2020.
- Frowis, M. & Böhme, R. (2017). “In Code We Trust? Measuring the Control Flow Immutability of All Smart Contracts Deployed on Ethereum.” ESORICS Workshop 2017.
- Ethereum Foundation (2022). “ERC-20 Token Standard.” ethereum.org/developers documentation.