Skip to content
BENIBIX Learn

ERC-20 Token Standard

Development⛓️ Blockchain & Web3Crypto Tokens

Also known as ERC-20, ERC20, EIP-20, Fungible Token

The rule book for Ethereum tokens. Each unit of one is worth the same.

Think of it like

It is like a rule that all bus tickets are the same size. Then each ticket fits each machine.

Example

A game makes one million gold tokens as an ERC-20 contract. Lucy's wallet shows them as soon as she gets some, with no extra work.

Why it matters

One shared shape means one wallet can hold thousands of different tokens.

Definition

ERC-20 is the rule book for Ethereum tokens where every unit is the same. It names the functions a token contract must have, such as transfer, balanceOf and approve. Every token works the same way, so any wallet can hold any of them. ERC stands for Ethereum Request for Comments. It was first put forward in November 2015.

Example code

solidity
function balanceOf(address owner) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
Three of the nine functions that every ERC-20 token has to offer.
ERC-20 tokens, on the left: every unit swaps for any other.

Common mistake

Sending tokens straight to a token's own contract address. Many contracts cannot send them back, so they are stuck for good.

Key takeaways

  1. 1
    Same functions. Every token has the same buttons.
  2. 2
    Fungible. Each unit equals every other.
  3. 3
    Works everywhere. Wallets read any ERC-20 token.