ERC-20 (Token Standard)

The interface standard for fungible Ethereum tokens, which is why wallets and DEXs can support thousands at once.

Basically

ERC-20 is a shared set of rules for interchangeable tokens on Ethereum. It lets wallets and finance apps work with many different tokens in the same way.

Key Takeaways

  • ERC-20 is the dominant token standard on Ethereum. It defines six functions and two events that every compliant fungible token must implement, so any token can work with any compatible wallet, DEX or lending protocol without custom integration.
  • Major stablecoins and DeFi tokens use ERC-20. USDC, USDT, UNI, LINK, DAI and over two million other token contracts on Ethereum follow this standard.
  • ERC-20 has known limitations: the approve/transferFrom race condition, permanent token loss when tokens are sent to incompatible contracts, and no callback mechanism. Newer standards such as ERC-721, ERC-1155 and ERC-4626 address specific gaps.

What Is ERC-20?

ERC-20 (Ethereum Request for Comments 20) is a technical standard for creating fungible tokens on the Ethereum blockchain. Fabian Vogelsteller and Vitalik Buterin proposed it in November 2015 as EIP-20, and it reached "Final" status in 2017. The number 20 comes from its position as issue #20 on the Ethereum Improvement Proposals GitHub repository.

Before ERC-20, every token contract defined its own interface, so wallets and exchanges needed custom code to support each new token. ERC-20 solved this by establishing a common API: any smart contract implementing the standard's six required functions automatically works with every ERC-20-compatible wallet, DEX and lending protocol. Composability became the foundation of DeFi.

How It Works

An ERC-20 token is a smart contract deployed on Ethereum that maintains a mapping of addresses to balances. The standard defines a minimal interface that all compliant tokens must expose, ensuring any external contract or application can interact with the token predictably.

The Six Required Functions

Every ERC-20 contract must implement these six functions. Together, they form the required token interface.

The standard also defines three optional functions: name(), symbol() and decimals(). In practice, nearly all tokens implement these since wallets and block explorers rely on them for display.

Events

Two events must be emitted so off-chain applications can track token activity. The events give those applications a consistent activity record.

Token creation should emit a Transfer event with the _from address set to 0x0. These events are indexed on-chain, allowing block explorers and analytics tools to track all token movements without polling contract state.

The Approve/TransferFrom Pattern

Direct transfers use transfer(). Interactions with third-party contracts, including DEXs, lending protocols and vaults, require a two-step process instead.

The pattern is fundamental to how DeFi works. When you "approve USDC" on a DEX, you're calling the USDC contract's approve() function to let the DEX contract spend your tokens.

Major ERC-20 Tokens

Over two million ERC-20 token contracts exist on Ethereum, though only a few thousand have meaningful market activity. The largest by market capitalisation include:

Stablecoins dominate ERC-20 token rankings. For a deeper look at how stablecoins operate on different chains, see the research article on the Ethereum stablecoin market.

Why It Matters

ERC-20's standardisation created a network effect that bootstrapped the entire DeFi ecosystem. Because every compliant token shares the same interface, developers can build protocols that work with any token automatically.

People often call this composability "money legos": each protocol is a building block that snaps together with others. Without ERC-20, every integration would require bespoke development, and DeFi's rapid growth would not have been possible.

The model also influenced token standards on other chains. BNB Chain's BEP-20 uses an identical Solidity interface, so the same contract code deploys to both chains, and TRON's TRC-20 follows the same function signatures. Meanwhile, platforms like Spark take a different approach to token support, building on Bitcoin's UTXO model rather than account-based smart contracts.

Stablecoins

The largest use case for ERC-20 tokens is stablecoins. USDT and USDC alone account for over $250 billion in combined market capitalisation. Their ERC-20 implementations allow them to plug into every DeFi protocol on Ethereum, enabling lending, automated market making and stablecoin payment rails that compete with traditional finance.

DeFi Protocol Tokens

Governance tokens like UNI (Uniswap) and AAVE give holders voting rights over protocol parameters. Liquid staking tokens like stETH represent staked ETH while remaining tradeable and composable across DeFi.

Tokenised Assets

ERC-20 serves as the foundation for real-world asset tokenisation: treasury bills, equities, commodities and other financial instruments wrapped as fungible tokens. The standard interface means these tokenised assets can immediately trade on existing DEXs and integrate with lending markets.

Fundraising and Distribution

The 2017 ICO boom was built almost entirely on ERC-20. Projects could launch a token with a simple smart contract deployment, and investors could trade it on any supporting exchange. Regulatory scrutiny has since changed the market, but ERC-20 remains the default for token launches and airdrops.

Approve Race Condition

The approve() function overwrites the previous allowance rather than adjusting it atomically. That behaviour creates a front-running vulnerability.

The result is that Bob extracts 1,500 tokens instead of Alice's intended 500. The standard mitigation is the "approve to zero" pattern: set the allowance to 0 before setting a new value, which USDT enforces at the contract level. ERC-2612 (Permit) sidesteps the issue entirely with off-chain signatures.

Token Loss from Incompatible Contracts

ERC-20's transfer() function provides no notification to the receiving address. When tokens are sent to a contract that lacks token-handling logic, they become permanently stuck with no recovery mechanism. Documented losses exceed tens of millions of dollars across contracts like the BNB, SHIB and HEX token addresses, and ERC-20 has no equivalent to ERC-721's safeTransferFrom() with a receiver callback.

No Callback Mechanism

ERC-20 lacks hooks that notify contracts of incoming tokens. Contracts therefore cannot execute custom logic when they receive tokens or reject unwanted deposits. Every interaction with a third-party contract requires the two-step approve/transferFrom pattern, which costs two transactions and double the gas fees.

Missing Return Value Bug

The specification requires transfer(), transferFrom() and approve() to return a boolean, but at least 130 deployed tokens, including USDT and BNB, return void instead. Contracts that check return values will revert when interacting with these tokens. OpenZeppelin's SafeERC20 library addresses this by accepting either empty returns or decoded true.

Standards That Build on ERC-20

ERC-20's limitations inspired several successor standards. Each one targets specific gaps in ERC-20.

ERC-777 attempted to add hooks and operator authorisation while remaining backward-compatible with ERC-20. Reentrancy vulnerabilities led to exploits, including the dForce/Lendf.Me attack in 2020, and the standard is now widely considered deprecated. For a broader look at how smart contract security is evaluated, see the glossary entry on smart contract audits.

ERC-20 Across Chains

The ERC-20 interface has become a de facto standard beyond Ethereum. Any EVM-compatible chain, including BNB Chain, Polygon, Arbitrum and Avalanche, runs the same Solidity contracts with the same function signatures. BNB Chain calls its variant BEP-20, but the interface is identical: the same contract code deploys without modification.

Non-EVM chains use different token models entirely. Solana's SPL tokens are written in Rust, and Bitcoin-based systems like Taproot Assets and Runes operate on the UTXO model. Moving tokens between chains requires bridges, which introduce their own trust assumptions and security considerations.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms