ERC-20 Standard

ERC-20 is the 2015 Ethereum standard that defines six mandatory functions giving all compliant tokens a shared interface, so any wallet or DEX supports USDC

BASICS4 min readBy AlgoSys Editorial TeamPublished Apr 25, 2026Updated Jun 24, 2026
Contents

The ERC-20 standard is a technical specification (a common set of rules) for creating fungible tokens on the Ethereum blockchain. It emerged in 2015 and established uniform requirements that all ERC-20 tokens follow. It is this standardization that allows tokens to work seamlessly with wallets, exchanges, and other smart contracts within the Ethereum ecosystem.

Most tokens you encounter are built on ERC-20: from stablecoins like USDC to utility tokens for various applications. The widespread adoption of the standard has a pleasant side effect. Any wallet or decentralized exchange (DEX) that supports Ethereum automatically supports all ERC-20 tokens. For the user, this means no manual configuration is needed.

Understanding ERC-20 is a basic skill for anyone who wants to work deeply with the Ethereum ecosystem. It explains why such different tokens behave similarly and how they can be transferred, traded, and used in a vast number of decentralized applications.

KEY CONCEPTS

The ERC-20 standard defines a set of mandatory functions and events that a token contract must implement. Thanks to this, all compatible tokens have a unified interface: code that can work with one token also works with all others. The main elements of this interface are broken down below.

Function or Event What it does
totalSupply Returns the total number of existing tokens.
balanceOf Returns the token balance of a specific account.
transfer Sends tokens from the owner's account to another account.
transferFrom Sends tokens from one account to another; typically used by smart contracts.
approve Allows a recipient to withdraw tokens from the owner's account within a specified limit.
allowance Returns the amount that a recipient can still withdraw from the owner's account.
Transfer Event Generated when tokens are transferred and serves as a transaction log.
Approval Event Generated when a permission is set or updated.

HOW IT WORKS

When a new ERC-20 token is created, its smart contract is deployed on the Ethereum blockchain. This contract maintains a ledger of all balances, mapping account addresses to the number of tokens they hold, and the totalSupply function indicates how many tokens the contract has issued in total.

Transferring tokens involves calling the transfer function in the smart contract. Imagine you are sending 100 tokens from address 0x123... to address 0x456...: this triggers a call to transfer(0x456..., 100). The contract updates both balances, decreasing the sender's balance and increasing the recipient's balance.

The approve and transferFrom function pair is necessary for decentralized applications (dApps). First, the user authorizes (approve) a DEX contract to withdraw, say, up to 1000 tokens from their wallet. After that, the DEX can use transferFrom to move tokens from the user's wallet to a liquidity pool or to another user on its own, without the user having to confirm each transfer manually. This is convenient but requires attention: the granted permission remains active until you revoke it.

USE CASES

You encounter ERC-20 tokens with every interaction with decentralized applications on Ethereum. Transaction fees (gas) are most often paid in ETH, but many dApps use their own ERC-20 tokens for specific functions or for project governance. The most common scenario is exchanging one ERC-20 token for another on a DEX.

USDC and USDT stablecoins are also ERC-20 tokens, making them easy to integrate into DeFi protocols for lending, borrowing, or earning yield. The standardized format ensures that such a token can be deposited into yield farming or used as collateral on various platforms. And when you restore a lost wallet, access to the private keys grants access to your ERC-20 token balances through any compatible interface.

To make it clearer, let's compare two stablecoins. Suppose you hold USDC and USDT in the same wallet. Internally, they are structured differently (they have different issuers and backing mechanisms), but externally, both behave identically: the same transfer will send both, the same balanceOf will show the balance of each, and any DEX will accept both for exchange without separate integration. It is the common ERC-20 interface that makes them predictable, regardless of who issued them.

FREQUENTLY ASKED QUESTIONS

The ERC-20 standard is the foundation of a vast ecosystem of fungible tokens. Fungibility means that one unit of a specific token is identical to any other unit of the same token, just like with regular currency. This property makes tokens suitable for trading and for use as a medium of exchange in decentralized applications.

At the same time, the standard only defines basic functions, while implementation details (total supply, token name, and symbol) are determined by the creator. This flexibility allows tokens to serve completely different purposes, from governance rights to in-game currency, while remaining compatible at the interface level.

Security concerns with ERC-20 primarily relate to two things: the smart contract code and how the user manages their wallet. Contract audits and careful handling of keys and permissions help prevent losses and theft. The standard itself is just a set of rules, and a predictable, secure environment is created by their conscientious adherence by developers and users.

FAQ

What does it mean for an ERC-20 token to be "fungible"?

Fungibility means that one unit of a token is indistinguishable from any other unit of the same token, just as one ten-dollar bill is equivalent to another. This makes ERC-20 tokens convenient for trading and as a medium of exchange in applications.

Why do all ERC-20 tokens work in the same wallet without configuration?

The standard defines a common set of functions, such as `balanceOf` and `transfer`. If a wallet or exchange knows how to work with this interface, it automatically supports any token that adheres to it. Separate integration for each token is not needed.

Why are the `approve` and `transferFrom` functions needed?

This pair allows a smart contract to move your tokens with your permission. First, you grant permission via `approve`, for example, to a DEX, setting a withdrawal limit. Then, the DEX uses `transferFrom` to move tokens within that limit without requesting confirmation for each operation. Keep in mind that the granted permission remains valid until you revoke it.

Are USDC and USDT ERC-20 tokens?

Yes, both of these stablecoins are issued on the ERC-20 standard on Ethereum. Therefore, they are easily integrated into DeFi protocols for lending, yield farming, or as collateral: they behave as predictably as any other token of the standard.

What does ERC-20 define about a token, and what is left to the creator's discretion?

The standard only describes the mandatory interface: a set of functions and events. Specific parameters, such as total supply, name, and symbol, are set by the token creator. This allows tokens with very different purposes to use the same underlying ERC-20 structure.

How secure are ERC-20 tokens?

The standard itself is a set of rules, and the risks lie in two areas: the quality of the smart contract code and how the user stores keys and manages permissions. Auditing contracts and careful handling of your wallet significantly reduce the likelihood of loss or theft.

Put this to work in the terminal

Live charts, derivatives, on-chain and macro data, free.

Open terminal →