What Is an ERC-20 Token?
What is an ERC-20 token? Learn how the Ethereum token standard works, its core functions, how approvals and decimals work, and how to avoid fake ERC-20 tokens.
An ERC-20 token is a fungible token built on Ethereum that follows a common technical standard, a set of functions such as transfer, balanceOf and approve, so that any wallet, exchange or app that supports the standard can work with it automatically. Stablecoins like USDC, governance tokens and many utility tokens are ERC-20 tokens.
Before ERC-20, each token had its own interface and every wallet needed custom code to support it. The standard made tokens interchangeable building blocks, which is one reason Ethereum became the main platform for token issuance. Understanding how ERC-20 works also explains common pitfalls, from token approvals to fake tokens with copied names.
Where ERC-20 Came From
ERC stands for "Ethereum Request for Comments." The token standard was proposed in 2015 by Fabian Vogelsteller, with Vitalik Buterin, and later formalized as EIP-20 (Ethereum Improvement Proposal 20). It became the default way to issue tokens on Ethereum and was used by most token sales during the 2017 ICO boom.
How an ERC-20 Token Works
An ERC-20 token is a smart contract that keeps a ledger: a mapping of addresses to balances. When you "hold" tokens, nothing is stored in your wallet app. The contract records that your address owns a certain amount, and your wallet reads that record.
The standard specifies these core functions:
| Function | What it does |
|---|---|
| totalSupply | Returns the total number of tokens in existence |
| balanceOf | Returns the balance of a given address |
| transfer | Moves tokens from your address to another |
| approve | Lets another address (usually a contract) spend up to a set amount of your tokens |
| allowance | Shows how much a spender is still allowed to spend |
| transferFrom | Lets an approved spender move tokens on your behalf |
It also defines two events, Transfer and Approval, which wallets and block explorers use to show activity. Optional fields include name, symbol and decimals.
Decimals: Why Amounts Look Strange
Smart contracts don't handle fractions directly. Instead, a token defines a number of decimals. Many ERC-20 tokens use 18 decimals, so one token is recorded as 1 followed by 18 zeros in the smallest units. Some, such as USDC, use 6 decimals.
Wallets convert these raw numbers into readable amounts. If you ever see an enormous number on a block explorer, it is usually a raw value that hasn't been divided by the decimals.
Approvals: The Feature You Need to Understand
Decentralized apps can't take tokens from your wallet without permission. When you use a DEX or lending protocol, you first call approve, granting the app's contract an allowance. The app then uses transferFrom to move tokens when you trade or deposit.
This design is powerful, but it's also the root of many thefts. If you approve a malicious contract, especially with an unlimited allowance, it can drain that token later. Learn more in our guides to wallet drainers and how to revoke token approvals.
What ERC-20 Tokens Are Used For
- Stablecoins: dollar-pegged tokens such as USDC and USDT on Ethereum.
- Governance tokens: voting rights in DAOs and DeFi protocols.
- Utility tokens: payment or access within a network, such as Chainlink's LINK for oracle services.
- Wrapped assets: tokens representing other assets, such as WETH and WBTC.
- Liquidity provider tokens: receipts representing a share of a liquidity pool.
- Tokenized real-world assets: shares in funds or claims on off-chain assets.
ERC-20 vs Other Standards
| Standard | Type | Example use |
|---|---|---|
| ERC-20 | Fungible tokens | Stablecoins, governance tokens |
| ERC-721 | Non-fungible tokens (each unique) | NFT collectibles |
| ERC-1155 | Multi-token (fungible and non-fungible) | Game items |
| BEP-20 | ERC-20-style tokens on BNB Chain | Tokens on BNB Chain |
See our explainer on BEP-20 for how a similar standard works on another network.
How to Add an ERC-20 Token to Your Wallet
Wallets don't automatically display every token you receive, partly to hide spam. To see a token, you may need to add it manually:
- 1Find the token's official contract address from the project's website or a trusted data source.
- 2In your wallet, choose "import token" or "add custom token" and paste the address.
- 3The wallet reads the name, symbol and decimals from the contract. Check they match what you expect.
Never add tokens that appear unexpectedly in your wallet and then try to sell or "claim" them. Unknown tokens are often bait for phishing sites. Our guide on how to add a custom token to your wallet safely covers this step by step.
Risks and Limitations
- Fake tokens: anyone can deploy a token called "USDC" or "Ethereum." Only the contract address tells you which is real. Use how to verify a token's official contract address before buying.
- Hidden contract functions: a token can follow ERC-20 and still include functions to mint more tokens, block transfers, or charge taxes. Following the standard doesn't make a token safe.
- Stuck tokens: tokens sent to a contract that can't handle them can be lost forever.
- Gas requirements: you need ETH to move tokens on Ethereum, which surprises many beginners.
- Approval risk: old unlimited approvals can be exploited if an app is compromised.
Bottom line
An ERC-20 token is a smart contract that follows a shared rulebook for balances, transfers and approvals, making tokens interchangeable across the Ethereum ecosystem. That standardization is why tokens are easy to create and use, and also why fakes are easy to create. Always identify tokens by contract address, keep ETH for gas, and treat every approval as a permission worth reviewing.
常见问题
Is ETH an ERC-20 token?
No. ETH is Ethereum's native coin, built into the protocol and used to pay gas fees. ERC-20 tokens are created by smart contracts deployed on Ethereum. Because ETH doesn't follow the ERC-20 standard, apps that need it often use WETH, a wrapped version of ETH that does.
Do I need ETH to send ERC-20 tokens?
Yes, on Ethereum mainnet. Every transaction, including sending an ERC-20 token, requires gas paid in ETH. On other EVM networks you pay gas in that network's native coin. Without it, your tokens can't be moved even though they are in your wallet.
Can ERC-20 tokens be sent to any Ethereum address?
Technically yes, any ERC-20 token can be sent to any Ethereum address. But if you send tokens to a contract that isn't designed to handle them, including the token's own contract, they may be stuck permanently. Always double-check the recipient address.
Are ERC-20 tokens only on Ethereum?
The standard was created for Ethereum, but other EVM-compatible networks use the same interface, sometimes under a different name, such as BEP-20 on BNB Chain. A token with the same name on different networks is a different contract with a different address.
