One of the first architectural decisions you will make as a web3 founder is which token standard to use. Pick the wrong one and you are rewriting your contract from scratch three months in. Pick the right one and everything downstream, wallets, marketplaces, integrations, just works.
There are three standards that cover the vast majority of use cases: ERC-20, ERC-721, and ERC-1155. Here is what each one actually does, when to use it, and how they differ under the hood.
What are ERC-20, ERC-721, and ERC-1155?
ERC-20: currency. Every token is identical and interchangeable, just like dollars in a bank account. You do not care which specific dollar you hold, only how many. USDC, USDT, UNI, and LINK are all ERC-20 tokens. If your project needs a payment token, a governance token, or reward points, this is it.
ERC-721: deed of ownership. Every token is unique and has its own identity. Think of it like a title deed to a house: no two are the same, and each one tracks a specific owner. Bored Ape Yacht Club and Azuki are ERC-721 tokens. If your project issues one-of-a-kind digital assets, certificates, or collectibles, this is the standard.
ERC-1155: the multi-tool. A single contract can manage both fungible and non-fungible tokens at the same time. Think of a video game inventory: you might have 500 identical gold coins (fungible), one legendary sword (non-fungible), and 10 health potions (semi-fungible, identical to each other but distinct from gold). Games like The Sandbox and Enjin-powered projects use ERC-1155 for exactly this reason.
Quick comparison
| ERC-20 | ERC-721 | ERC-1155 | |
|---|---|---|---|
| Fungibility | Fully fungible | Non-fungible (each token unique) | Both fungible and non-fungible |
| Use cases | Currencies, stablecoins, governance tokens | Art, collectibles, certificates, domains | Gaming items, mixed inventories, bulk drops |
| Key functions | transfer, approve, transferFrom | ownerOf, safeTransferFrom, approve | safeTransferFrom, safeBatchTransferFrom, balanceOf |
| Gas efficiency | Low per transfer | High per mint/transfer | Lowest for batch operations (up to 90% savings vs ERC-721 batches) |
| Complexity | Simple | Moderate | Higher |
| Tokens per contract | One token type | One collection (many unique tokens) | Unlimited token types in one contract |
Why does the token standard matter?
Choosing the wrong standard is not a minor inconvenience. It is a contract rewrite.
If you build a loyalty points system on ERC-721 (where every point is a unique NFT), you will burn through gas fees and create a terrible user experience. If you build a one-of-a-kind art collection on ERC-20, you lose the ability to track individual ownership entirely.
Here is a simple decision framework:
- Are all tokens identical and interchangeable? Use ERC-20.
- Is every token unique with its own metadata? Use ERC-721.
- Do you need multiple token types in one contract, or batch operations? Use ERC-1155.
- Not sure yet? Start with ERC-1155. It can represent both fungible and non-fungible tokens, so it gives you the most flexibility. The tradeoff is a more complex contract.
How do token standards track ownership?
The core difference between these standards comes down to how they track ownership. Here is the critical mapping in each:
ERC-20 tracks one number per address:
// "Address X has Y tokens"
mapping(address => uint256) private _balances; ERC-721 tracks one owner per token:
// "Token #42 belongs to Address X"
mapping(uint256 => address) private _owners; ERC-1155 tracks balances per token per address:
// "Address X has Y of token #42"
mapping(uint256 => mapping(address => uint256)) private _balances; That nested mapping in ERC-1155 is what gives it the flexibility to handle multiple token types. Each token ID can represent a different asset, and each address can hold any quantity of each.
How Doodledapp makes this visual
Every Solidity concept maps to a node you can drag onto a canvas. You do not need to write any of the code above by hand.
| Solidity concept | Doodledapp node | What it does in a token contract |
|---|---|---|
mapping(address => uint256) | State Variable (mapping type) | Tracks token balances |
function transfer(...) | Function | Defines transfer, mint, burn logic |
require(balance >= amount) | Require | Validates balances before transfers |
event Transfer(...) | Event / Emit Event | Broadcasts transfers (required by all three standards) |
msg.sender | Msg.Sender | Identifies who is calling the function |
constructor(name, symbol) | Constructor | Sets token name, symbol, initial supply |
uint256 totalSupply | State Variable | Stores total token supply |
You can also import OpenZeppelin’s audited ERC-20, ERC-721, or ERC-1155 implementations directly through Doodledapp’s package system, then extend them with custom logic using the visual editor.
Common mistakes to avoid
Using ERC-721 for fungible assets. If your tokens are interchangeable (points, credits, in-game currency), ERC-721 creates unnecessary gas costs and complexity. Every single token gets its own ID and ownership record. Use ERC-20 instead.
Ignoring batch transfer needs. If your application will mint or transfer tokens in bulk (airdrops, game loot boxes, multi-item purchases), ERC-20 and ERC-721 require one transaction per token. ERC-1155 can handle hundreds of tokens in a single transaction, saving up to 90% on gas.
Choosing ERC-1155 when you do not need it. ERC-1155 is powerful, but it is also the most complex standard. If you only need a simple fungible token, ERC-20 has broader wallet support, simpler tooling, and a larger ecosystem of DeFi integrations. Complexity you do not need is complexity that can break.
Skipping the Transfer and Approval events. All three standards require specific events to be emitted on transfers and approvals. Wallets, block explorers, and marketplaces rely on these events to track token movements. Miss them and your tokens become invisible to the ecosystem.
The bottom line
ERC-20 for currencies, ERC-721 for unique assets, ERC-1155 for mixed inventories or batch-heavy applications. Match the standard to your actual use case, not to what sounds most advanced. The right choice saves you months of development time and keeps your gas costs predictable.