This website uses cookies

Read our Privacy policy and Terms of use for more information.

Tokens on Ethereum

Lesson 4 of 8
By the end of this lesson you’ll be able to tell the three main token standards apart, say exactly what you hand over when you approve a contract or sign a permit, and check that a token is the one it claims to be before you touch it.
A collage of a house-sized glass bottle on a hilltop, its water low. A blue hose runs out of its neck and away across pale folded hills to a tiny figure on a far ridge, drinking from the end of it.

What a token is

Ether is built into Ethereum. Every other asset on it is a token, and a token is a contract that keeps a list of who holds how many. When you “send” a token, nothing moves: the contract subtracts from your line and adds to theirs.

When a project “mints” tokens, it adds lines. Crypto from Zero made that point at Beginner level; this lesson is about the standards that make it work.

Standards exist so one wallet and one exchange can handle thousands of tokens. ethereum.org: “These standards help ensure smart contracts remain composable,” so a new token “stays compatible with existing decentralized exchanges and applications.”

What it’s for
ERC-20
Interchangeable tokens: stablecoins, governance tokens, most things that trade
ERC-721
One-of-a-kind tokens, where each has its own ID
ERC-1155
Many token types in one contract, some interchangeable and some not, with batch transfers
In ethereum.org’s words
ERC-20
“A standard interface for fungible (interchangeable) tokens”
ERC-721
“a Non-Fungible Token Standard that implements an API for tokens within Smart Contracts”
ERC-1155
“A standard interface for contracts that manage multiple token types”

ERC-1155 suits games, where one contract might hold a currency, a thousand identical potions and one unique sword, and ethereum.org notes it “allows for more efficient trades and bundling of transactions.”

Continue with The Crossover Pro

The rest of this story, plus two paid editions a week. $24.99 a month, or $249 a year. Already a member? Sign in above.

Subscribe to Pro