ERC-20 Tokens Explained: How Ethereum’s Fungible Tokens Work

This guide offers ERC-20 tokens explained from the inside: what the standard requires, how balances and approvals actually work, and what that means for anyone holding one. It overlaps with broader articles on Ethereum token standards, but here the focus stays on this single, most widely used standard.

Stablecoins, governance tokens, wrapped assets and many reward tokens are ERC-20 tokens. Understanding the mechanics helps you read wallet prompts, interpret block explorer pages and spot the design choices that separate a well-built token from a risky one.

A Ledger Living Inside a Contract

An ERC-20 token does not move around the network the way ETH does. Instead, a single smart contract keeps a table that maps each address to a balance. When you “send” tokens, you are asking that contract to subtract a number from your row and add it to someone else’s row.

This design has a practical consequence. Your wallet does not hold tokens in a physical sense; it holds the private key that controls your address, and the token contract records what that address owns. If the contract had a bug or an owner power to change balances, your holdings would be affected regardless of your wallet.

The standard was proposed in 2015 and finalized later as a shared interface. Its success came from simplicity. A short list of required functions and two events were enough for wallets and exchanges to support any compliant token without custom work.

Because the contract lives on Ethereum, every token transaction is an Ethereum transaction. You pay the gas fee in ETH, not in the token. A wallet holding only tokens and no ETH cannot move them on mainnet, which is a common surprise for new users who receive tokens from an exchange.

The Functions Every ERC-20 Must Offer

The standard specifies a small set of functions. Some read information and cost nothing to call; others change balances and require a signed transaction. Together they let any application treat every compliant token the same way.

  • Total supply returns how many units currently exist.
  • Balance of returns the amount held by a given address.
  • Transfer moves tokens from the caller to another address.
  • Approve gives a second address, called a spender, permission to move up to a set amount of the caller’s tokens.
  • Allowance shows how much a spender is still allowed to move.
  • Transfer from lets an approved spender move tokens within its allowance.
See also  Ethereum Fork History: From Frontier to the Pectra Upgrade

Two events accompany these functions. A Transfer event is emitted whenever tokens change hands, including when new tokens are created, and an Approval event records each new permission. Explorers, wallets and tax tools build their histories from these logs rather than by scanning raw contract storage.

Decimals, Units and Displayed Balances

Contracts work only with whole numbers, so ERC-20 includes an optional decimals value that tells interfaces where to place the decimal point. Most tokens use 18 decimals, mirroring ETH, where 1 ETH equals 10^18 wei. Some stablecoins use 6 decimals, which changes how raw amounts translate into displayed balances.

Consider a hypothetical token with 6 decimals. A raw balance of 2,500,000 in the contract would display as 2.5 tokens. The same raw number in an 18-decimal token would display as 0.0000000000025 tokens. Misreading decimals is one reason manual transfers through developer tools can go badly wrong.

Decimals are purely a display convention. They do not change value or supply in any economic sense, and they cannot be relied on to detect fraud. A counterfeit token can copy the name, symbol and decimals of a well-known token exactly, so the contract address is the only trustworthy identifier.

When adding a token manually to a wallet, the wallet usually reads the decimals directly from the contract. If you enter values by hand and they differ from the contract’s settings, your balance will display incorrectly even though the on-chain amount is unchanged. Using the official address from the issuer avoids this confusion.

How Approvals Power Swaps and DeFi

Approvals are the feature that lets ERC-20 tokens interact with other contracts, and they are also the most common source of user losses.

The Two-Step Pattern

A contract cannot pull tokens from your address unless you have approved it. To trade on a decentralized exchange, you first send an approval naming the exchange contract and an amount. The second transaction performs the trade, during which the exchange uses transfer from to take your tokens. Each step costs gas.

Unlimited Allowances

Many applications request an unlimited allowance so users do not have to approve again for every trade. That convenience means the spender can move your entire balance of that token at any time while the approval stands. If the spending contract is later exploited, or was malicious from the start, approved balances are exposed.

See also  Ethereum Ecosystem Overview: Who Builds, Uses and Funds It

Signature-Based Permits

An extension known as permit, defined in ERC-2612, lets you grant an allowance by signing an off-chain message instead of sending a transaction. It saves gas and time, but a permit signature carries the same power as an approval. Signing one on a fake website can hand a scammer access to your tokens.

Minting, Burning and Supply Controls

The ERC-20 interface does not say how tokens are created or destroyed. Those rules are added by each project. Some tokens mint their entire supply once at deployment and include no way to create more. Others include a mint function that a specific role, contract or governance process can call.

Burning removes tokens permanently, usually by sending them to an address nobody controls or by reducing the holder’s balance and the total supply together. Projects use burns for reasons such as fee mechanisms or redemption. A burn feature, like any supply rule, is only as trustworthy as the code and people controlling it.

Supply control matters to investors because unlimited minting power can dilute holders without warning. Reading the verified source on a block explorer, or an audit summary, shows whether a mint function exists and who can call it. Timelocks, multisignature control and published issuance schedules make such powers more transparent.

Some tokens also adjust balances automatically, a design known as rebasing, or charge a fee on every transfer. These features are allowed by the loose interface but can break assumptions in other applications. Reading the project’s documentation before depositing such tokens elsewhere can prevent unexpected behavior.

Common Categories of ERC-20 Tokens

The same interface supports very different economic designs. Governance tokens give holders voting rights over a protocol’s parameters or treasury. Wrapped tokens represent another asset; wrapped ether, known as WETH, packages ETH into ERC-20 form so it can be used by contracts expecting the standard. Liquid staking tokens represent staked ETH plus accumulated rewards held by a protocol.

A quick way to compare categories is to ask what each one depends on:

  • Fiat-backed stablecoins depend on the issuer’s reserves, audits and legal structure.
  • Crypto-collateralized stablecoins depend on collateral ratios, price oracles and liquidation contracts.
  • Governance tokens depend on how much real control holders have and how voting power is distributed.
  • Wrapped and liquid staking tokens depend on the contract or protocol holding the underlying asset.

Receipt tokens are issued when you deposit into a lending market or vault and can be redeemed for the underlying asset later. Holding them means you are exposed both to the receipt contract and to the strategy behind it. The token in your wallet is a claim, not the asset itself.

See also  The Ethereum Mining Process: How It Worked and What Ended It

Because these categories share one format, a wallet will display a speculative token with no backing in exactly the same way as a regulated stablecoin. The interface treats them equally. The work of telling them apart falls on the holder, through research into issuers, collateral, governance and legal status.

Reading an ERC-20 Transfer on a Block Explorer

A block explorer is a website that displays public blockchain data. When you look up a token transfer, the explorer shows the outer Ethereum transaction and, inside it, the token movement decoded from the Transfer event. Learning to read both layers helps you confirm that a payment really happened.

The outer transaction shows the sender, the contract that was called, the gas used and the fee paid in ETH. Its “to” field is the token contract, not the person who received tokens. The recipient appears in the decoded token transfer section, together with the token name and amount adjusted for decimals.

A successful status matters. If a transaction reverted, the fee is still charged but no tokens moved, and the explorer marks it as failed. A single transaction can also contain several token transfers, as happens in swaps, where one token leaves your address and another arrives.

Explorers usually label the token contract and show whether its source code is verified. Unknown tokens that appear in your history without any action from you are often spam or phishing attempts. Interacting with them, including trying to sell them on an unfamiliar site, can lead to malicious approvals.

A Practical Checklist for Holding ERC-20 Tokens

Before acquiring any ERC-20 token, confirm the contract address from the issuer’s official documentation and compare it with what a reputable block explorer shows. Check how long the contract has existed, whether the source code is verified and whether it is an upgradeable proxy controlled by an administrator.

Look at the holder distribution. A token where a handful of addresses control most of the supply carries concentration risk, since large holders can move the market or influence governance. Also check whether liquidity is deep enough that you could exit a position without moving the price sharply.

Keep a small amount of ETH in the same wallet for gas, and review approvals regularly. Revoking allowances you no longer need costs a little gas but removes a lingering risk. Where a wallet offers a custom approval amount, entering only what the next action needs is safer than an unlimited default.

Track your transactions for tax purposes. In the United States, digital assets are classified as property for tax purposes, so swapping one token for another can be a taxable disposal. Rules are detailed and change over time, so consult a qualified tax professional about your own situation rather than relying on general guides.