ERC-20 Tokens on the Ethereum Network

ERC-20 denotes the technical specification that governs every fungible token issued on the Ethereum blockchain. A token qualifies as fungible when any single unit substitutes for another unit of the same type. By contrast, the ERC-721 specification produces non fungible tokens that never trade one-for-one.

The specification equips developers with a uniform set of smart contract rules so that any compliant token interacts with wallets, exchanges, or decentralized applications without custom code. Each token represents a quantity of an asset, a claim on a service, a share of ownership, or a transferable right. The representation itself lacks individuality – only the quantity distinguishes one holder from another.

During 2015, smart contract deployment on Ethereum expanded, yet token authors followed no common interface. Each author chose function names, parameter order along with event signatures at will. The absence of a shared protocol prevented exchanges from listing tokens without bespoke integrations and prevented wallets from displaying balances without manual updates.

Origin of the Standard

Fabian Vogelsteller, a developer active in the Ethereum community, authored the proposal on 19 November 2015. He submitted the draft through the project’s GitHub repository under the heading “Ethereum Request for Comment”. The sequential number assigned to the post was 20, hence the label ERC-20.

The draft underwent peer review on the developer mailing list and in public calls. On 24 April 2017, the specification received final acceptance as Ethereum Improvement Proposal 20. The community retained the original name ERC-20 in documentation and source code comments.

Fast Fact

In 2023, the Ethereum Foundation split the change tracking process. Ethereum Request for Comments now govern application layer standards. Ethereum Improvement Proposals continue to govern protocol layer upgrades.

Ether, the native cryptocurrency of the Ethereum network, compensates miners and validators for computation and storage. ERC-20 tokens ride on top of this settlement layer. An issuer may peg a token to a fiat currency, collateralize it with real estate, or grant access to a software service. The specification remains agnostic to the underlying claim.

The ERC-20 contract must expose six mandatory functions and two mandatory events. The functions return data or trigger state changes. The events log state changes for external observers.

totalSupply: returns the maximum number of indivisible units that the contract will ever issue.
balanceOf: returns the token balance held by a given address.
transfer: moves a specified number of units from the caller’s address to a recipient address.
transferFrom: moves a specified number of units from an address that previously granted approval.
approve: authorizes a spender address to transfer up to a specified number of units on behalf of the owner.
allowance: returns the number of units that a spender may still transfer on behalf of an owner.

The contract must emit two event types:

Transfer: logs the origin address, destination address in addition to unit count for every movement of tokens.
Approval: logs the owner address, spender address next to approved unit count each time an approval changes.

Three optional items improve human readability:

name: returns a descriptive string such as “Wrapped Ether”.
symbol: returns a ticker such as “WETH”.
decimals: returns the number of digits that follow the decimal separator. A value of 18 divides one token into 1,000,000,000,000,000,000 atomic units.

Fast Fact

Every cryptocurrency is a token, yet not every token is a cryptocurrency. Tokens frequently represent off chain assets or rights. An ERC-20 token is simply a record that conforms to the interface adopted by the Ethereum community.

Solidity source code illustrates the interface:

function name() public view returns (string memory); function balanceOf(address _owner) public view returns (uint256 balance);

Uniform method signatures allow wallets, portfolio trackers, decentralized exchanges to interpret any new token without modification. Developers query totalSupply to learn the issuance cap, balanceOf to fetch user balances, transfer to execute peer-to-peer payments, approve and transferFrom to enable third party withdrawals, and allowance to audit delegated spending limits.

Hundreds of high volume tokens implement the specification. Examples include:

Bitfinex LEO (LEO)
Maker (MKR)
Chainlink (LINK)
Tether USD (USDT)
USD Coin (USDC)

Fast Fact

ERC-20 compliance guarantees that a token transfers through any Ethereum wallet or exchange that observes the standard. The user experience remains identical across implementations.

The specification enforces six hard rules. A compliant token must expose the six functions and two events exactly as written. No deviation in spelling, parameter order, or return type is permitted. The rigidity guarantees that a decentralized exchange contract written in 2017 still lists a token deployed in 2024 without code changes.

Developers rely on the predictability. When a project issues a token, the team knows that every wallet already supports deposits, withdrawals along with balance queries. Legacy projects continue to operate because the interface never changes. New projects launch without fear of incompatibility as long as the contract implements the prescribed interface.

Market statistics show that more than four hundred thousand distinct token contracts currently satisfy the specification. The figure omits duplicates on test networks and private chains.

Binance, a centralized exchange operator, cloned Ethereum in 2019 to create Binance Chain. The company later launched Binance Smart Chain, an Ethereum-compatible network that supports ERC-20 tokens through the BEP-20 specification. BEP-20 mirrors ERC-20 method signatures, event names in addition to optional fields – allowing developers to redeploy contracts with minimal edits.

Binance Chain uses the earlier BEP-2 specification, which lacks smart contract capability. Tokens on Binance Chain operate at the protocol layer, similar to native ether transfers on Ethereum.

Binance Smart Chain runs in parallel to Binance Chain. The chain hosts the Binance Bridge, a service that locks ERC-20 tokens on Ethereum and mints equivalent BEP-20 tokens on Binance Smart Chain. The bridge enables users to transfer value between the two networks while preserving the token interface.

Posted