ERC-20: How Ethereum’s Fungible Token Standard Works

ERC-20 is the Ethereum interface standard for fungible tokens. It defines common functions and events for balances, transfers, supply and delegated spending, allowing compatible wallets and applications to interact with many token contracts through one basic interface.

Compatibility does not mean every token is safe, economically identical or accepted everywhere. Issuers can add fees, blocklists, minting, pauses or upgrade controls, while some older contracts behave differently from modern expectations. This separates the required standard from optional metadata and implementation choices.

Key Takeaways

  • ERC-20 standardizes an interface for fungible token accounting; it does not create the asset’s value or legal rights.
  • name, symbol and decimals are optional metadata methods in the original specification.
  • Allowances let a spender move tokens with transferFrom, creating approval and race-condition risks.
  • Wallet and application support depends on the chain, contract behavior and integration, not the ERC-20 label alone.

What Is ERC-20?

ERC-20 is a standards-track Ethereum proposal created in 2015. “Fungible” means units in one token contract are intended to be interchangeable: one base unit is accounted for like another base unit of the same contract.

The standard defines an application programming interface. A conforming contract tracks balances and exposes agreed methods and events. It can represent a utility token, governance token, stablecoin, wrapped asset or another ledger-based claim.

The token contract address and chain are part of the asset’s identity. A name or ticker is not unique. Anyone can deploy a lookalike token using the same visible metadata.

ERC-20 tokens are implemented by smart contracts, while ETH is the native asset of Ethereum rather than an ERC-20 token.

What Are the Required ERC-20 Functions?

totalSupply

totalSupply() returns the amount of token units tracked as existing by the contract. Minting and burning rules are not themselves standardized as public functions, so implementations decide how supply can change.

balanceOf

balanceOf(account) returns the recorded balance for an address. It does not identify the person controlling that address or prove that the token can be redeemed for an off-chain asset.

transfer

transfer(to, value) moves units from the caller to another address and returns a success value. The specification warns callers to handle false; they must not assume every unsuccessful call will revert.

approve and allowance

approve(spender, value) sets how much a spender may use from the owner’s balance. allowance(owner, spender) reports the remaining authorization.

The original specification notes a known approval-change issue and recommends that user interfaces set an allowance to zero before changing a non-zero value to another non-zero value. The token contract itself must not force this behavior for compatibility.

transferFrom

An approved spender calls transferFrom(from, to, value) to move tokens within the allowance. Decentralized exchanges and lending protocols often use this pattern after the owner grants approval.

What Events and Metadata Does ERC-20 Define?

The standard defines Transfer and Approval events. Applications use them to index movements and permission changes. A mint is commonly logged as a transfer from the zero address, and a burn as a transfer to it, when the implementation follows that convention.

The original standard marks name, symbol and decimals as optional. decimals affects display only. If a contract reports 18 decimals, a displayed token is normally represented by 10^18 base units; the contract still performs integer accounting.

Metadata does not establish authenticity. Verify the contract through an official source and review UEEx’s wallet-security guidance before adding or approving a token.

How Does an ERC-20 Transfer Work?

Direct Transfer

The holder calls transfer, the contract checks its rules, updates balances and emits a Transfer event. Network gas is paid in the chain’s native currency unless separate account-abstraction infrastructure sponsors it.

Delegated Transfer

The holder first grants an allowance. The spender later calls transferFrom, and the contract updates the balance and remaining allowance according to its implementation.

Some tokens support EIP-2612 permits, which let an owner sign an allowance message for submission by another party. Permit support is optional and has its own nonce, domain and signature requirements.

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

How Does ERC-20 Compare With Other Ethereum Standards?

StandardAccounting modelTypical useKey distinction
ERC-20Fungible balancesCurrency, governance and utility tokensUnits within one contract are interchangeable
ERC-721One owner per token IDUnique collectibles and rightsEach token is individually identified
ERC-1155Balances for multiple token IDsGames and mixed asset systemsOne contract can manage fungible and non-fungible IDs
ERC-4626Shares in a tokenized vaultYield-bearing vault interfacesExtends ERC-20 accounting with asset/share methods

Read UEEx’s ERC-721 overview for the practical difference between fungible balances and individually tracked tokens.

What Are the Benefits of ERC-20?

Common Interface

Wallets, explorers and applications can integrate the same core methods across conforming tokens. This reduces custom integration work, although unusual return values and added token logic still require testing.

Composability

ERC-20 tokens can be used across DeFi applications when those applications list or support them. The standard permits interaction; it does not force acceptance.

Transparent Ledger Rules

Users can inspect contract code, transactions, balances and events on a public network. Proxy contracts and privileged roles may complicate that analysis.

What Are the Risks and Limitations of ERC-20 Tokens?

Approval Risk

An unlimited allowance can let a compromised spender drain the approved token balance. Confirm the spender, limit the amount where practical and revoke unused permissions.

Non-Standard Behavior

Some widely used tokens predate common library conventions or add transfer fees, rebasing, freezes and blocklists. Integrations should use defensive libraries and test actual behavior rather than relying on the symbol.

Contract and Administrator Risk

Minting roles, upgrade keys, pause controls or coding defects can affect supply and transfers. “ERC-20 compatible” is not an audit or a decentralization guarantee.

Recipient-Contract Risk

The ERC-20 transfer interface does not require a receiving contract callback. Tokens sent directly to a contract that cannot recover or account for them may become stuck. Follow the recipient application’s deposit method.

Economic and Legal Risk

The standard does not guarantee reserves, redemption, profit rights, regulatory status or market liquidity. Analyze the issuer and token terms separately.

How Do You Verify an ERC-20 Token?

  1. Confirm the network and contract address through the issuer’s official channel.
  2. Check whether source code is verified and whether the contract is a proxy.
  3. Identify owners, administrators, minters, pausers and blacklist roles.
  4. Review supply rules, transfer restrictions, fees and upgrade authority.
  5. Inspect decimals before entering a human-readable amount.
  6. Confirm the spender and allowance before approving an application.
  7. Use the application’s documented deposit flow for contract recipients.
  8. Test an unfamiliar token or integration with a small amount.

Conclusion

ERC-20 gives Ethereum applications a shared interface for fungible balances, transfers and allowances; it does not guarantee token quality or value. Verify the chain and contract, limit approvals, inspect privileged roles and test nonstandard behavior.

Related Terms

  • Allowance – The amount a token owner has authorized a spender to move on their behalf.
  • transferFrom – The ERC-20 function an approved spender calls to move tokens within its allowance.
  • ERC-721 – The Ethereum standard for non-fungible, individually identified tokens.
  • EIP-2612 Permit – An optional extension letting a token owner approve a spender via a signed message instead of a separate transaction.
  • Wrapped Token – An ERC-20 representation of an asset that originates on another chain or in another form, such as WETH.
  • Smart Contract – Self-executing code deployed on a blockchain that enforces a token’s rules.

Sources

Frequently Asked Questions

Is every Ethereum token an ERC-20 token? No. Ethereum supports other token standards and custom contracts. ETH itself is the network’s native asset.

Are name, symbol and decimals mandatory? No. The original ERC-20 specification treats those methods as optional, although most modern interfaces expect them.

Why do I need to approve a DEX? The DEX’s router needs permission to call transferFrom for the input token. Verify the exact spender and amount.

Can ERC-20 tokens be lost in a contract? Yes. A transfer can succeed even when the recipient contract has no method to use or return the tokens. Recovery depends on that contract’s code and administrators.

Check your own numbers

The Free UEEx Calculator returns liquidation price, margin usage and fees for any position size

UEEx Weekly Digest

Market analysis and security alerts, read by 10,000 traders