MrDeFi
Ethereum2026-04-083 min read

What Are ERC-20 Tokens? The Ethereum Token Standard Explained

What are ERC-20 tokens? The Ethereum standard interface behind stablecoins, governance tokens, and most fungible assets.

ERC-20 is a technical standard that defines a common set of functions and events every fungible token contract on Ethereum should implement, so that wallets, exchanges, and other smart contracts can interact with any ERC-20 token in the same predictable way, regardless of who created it. It's the standard behind the vast majority of tokens you see traded, held, or used across DeFi today, including most stablecoins and governance tokens.

Why a Standard Was Necessary

Before ERC-20, anyone could write a smart contract representing a token, but there was no guarantee that wallets or exchanges would know how to interact with it. Each custom token might name its "balance" function or "transfer" function differently, forcing every wallet and exchange to write bespoke integration code for every single token. ERC-20 solved this by defining a required interface: implement these specific functions with these specific names and behaviors, and your token automatically becomes compatible with the entire ecosystem of existing wallets and applications.

The Core Functions

An ERC-20 compliant contract implements a small set of standard functions, including:

  • totalSupply() — returns the total number of tokens in existence.
  • balanceOf(address) — returns how many tokens a given address holds.
  • transfer(to, amount) — moves tokens from the caller's own balance to another address.
  • approve(spender, amount) — authorizes another address (often a smart contract) to spend up to a specified amount on the caller's behalf.
  • transferFrom(from, to, amount) — lets an approved spender move tokens from someone else's balance, up to the approved amount.
  • allowance(owner, spender) — checks how much an approved spender is still authorized to transfer.

Alongside these, the standard defines two events, Transfer and Approval, that contracts emit so that off-chain applications (like block explorers and wallets) can track token movements without needing to constantly poll balances directly.

Why approve/transferFrom Matters So Much

The two-step approve-then-transferFrom pattern is what makes DeFi composability possible. It lets you authorize a smart contract — say, a decentralized exchange or a lending protocol — to move a specific, limited amount of your tokens on your behalf, without ever handing over your private key or unlimited control of your wallet. This same mechanism, however, is also the source of a common attack pattern: approving unlimited or unnecessary spending allowances to unaudited or malicious contracts. Reviewing and periodically revoking token approvals is a standard part of good wallet security practice.

ERC-20 in the Broader Token Standard Landscape

ERC-20 is specifically designed for fungible tokens — assets where each unit is identical and interchangeable, like currency. It's not suited to unique, one-of-a-kind assets, which is where the ERC-721 standard for NFTs comes in instead. Our comparison of ERC-20 vs. ERC-721 vs. ERC-1155 covers when each standard is the right fit.

ERC-20 at a Glance

Function Purpose
totalSupply() Total tokens in existence
balanceOf(address) Balance of a specific address
transfer(to, amount) Direct transfer from caller
approve(spender, amount) Authorize a third party to spend on your behalf
transferFrom(from, to, amount) Approved third party moves tokens
allowance(owner, spender) Check remaining approved amount

Limitations of ERC-20

The standard has known rough edges. For example, a plain transfer call to a contract address that isn't designed to handle incoming tokens can sometimes result in tokens becoming permanently stuck, since the base standard doesn't include a built-in mechanism to confirm the receiving contract knows what to do with the tokens. Various extensions and alternative standards have been proposed over the years to address this and other issues, but ERC-20 itself has remained the dominant standard due to its simplicity and near-universal support.

Practical Implications for Users

If you hold any token that isn't ETH itself on Ethereum — a stablecoin like USDC, a governance token, a wrapped asset — you're almost certainly interacting with an ERC-20 contract. Understanding the approve/transferFrom pattern in particular helps explain why DeFi apps ask you to "approve" a token before you can swap, lend, or stake it, and why reviewing those approvals periodically is a meaningful security habit.

Bottom Line

ERC-20 is the standard interface that made fungible tokens on Ethereum interoperable by default, defining common functions like transfer, approve, and balanceOf that any wallet or application can rely on. It underlies the overwhelming majority of tokens in DeFi today, and understanding its approval mechanism is genuinely useful for anyone managing token security. Browse token and protocol data on MrDeFi's DeFi page to see ERC-20 tokens in action across the ecosystem.

Related articles

This article is for educational purposes only and is not financial advice. DeFi involves significant risk, including total loss of funds. Always do your own research.