ERC-20, ERC-721, and ERC-1155 Smart Contract Standards Explained

Smart contract standards are the reason a token created by one developer can appear correctly in MetaMask, trade on a decentralized exchange, and interact with another protocol without custom integration work. On Ethereum and EVM-compatible chains, three standards matter most: ERC-20 for fungible tokens, ERC-721 for non-fungible tokens, and ERC-1155 for mixed token systems.
These standards are not marketing labels. They are interface agreements. If your contract implements the expected functions and events, wallets, marketplaces, indexers, bridges, and DeFi protocols know how to read it. If it does not, things break quickly. Sometimes quietly.

What Are ERC Smart Contract Standards?
ERC stands for Ethereum Request for Comment. An ERC describes a proposed standard for Ethereum applications, including token contracts. Once widely adopted, the standard becomes a shared language between smart contracts and infrastructure.
Token standards define how tokens are created, transferred, approved, identified, and queried. They also shape how assets are classified:
- Fungible: every unit is identical, like one DAI compared with another DAI.
- Non-fungible: each token is unique, such as a numbered collectible or event ticket.
- Semi-fungible or multi-asset: tokens may behave as fungible or non-fungible depending on the token ID.
Across EVM-compatible chains, ERC-20, ERC-721, and ERC-1155 account for the overwhelming majority of token transaction activity. That is why these standards are the first ones you should understand before writing production token code.
ERC-20: The Fungible Token Standard
ERC-20 defines a common interface for fungible tokens. Each unit of the same ERC-20 token has the same value and properties. That makes it the natural choice for stablecoins, governance tokens, rewards, utility tokens, and tokenized balances.
The standard was proposed in 2015 and became the default model for fungible assets on Ethereum. DeFi later grew around it. Lending markets, automated market makers, yield vaults, and exchanges all expect ERC-20-like behavior.
Core ERC-20 Functions
A basic ERC-20 contract exposes functions such as:
balanceOf(address): returns the token balance of an address.transfer(address,uint256): moves tokens from the caller to another address.approve(address,uint256): gives another address permission to spend tokens.allowance(address,address): checks how much a spender is allowed to use.transferFrom(address,address,uint256): moves tokens using an approved allowance.
The allowance pattern is useful, but it is also where many beginners get caught. If you call transferFrom before calling approve, OpenZeppelin Contracts 4.x commonly reverts with ERC20: insufficient allowance. In OpenZeppelin Contracts 5.x, you may see a custom error such as ERC20InsufficientAllowance instead. Same mistake, different surface.
When to Use ERC-20
Use ERC-20 when your asset is interchangeable. Good examples include:
- Stablecoins such as DAI-style assets.
- DAO governance tokens.
- Protocol reward points that need exchange or DeFi support.
- Utility tokens for access, fees, or in-app balances.
To be blunt, ERC-20 is usually the right answer for financial tokens. It has the best exchange support, the deepest DeFi integrations, and the fewest surprises for users. If you are building a token that should trade in pools or be accepted by lending protocols, do not overcomplicate it.
ERC-721: The Non-Fungible Token Standard
ERC-721 defines non-fungible tokens, usually called NFTs. Each token has a unique tokenId. Token number 14 is not the same asset as token number 15, even if both belong to the same contract.
ERC-721 became the primary NFT standard after its formalization in 2018. It is the standard behind many digital art collections, profile picture projects, membership passes, identity credentials, and ticketing systems.
Core ERC-721 Functions
Common ERC-721 functions include:
ownerOf(uint256 tokenId): returns the owner of a specific NFT.safeTransferFrom(address,address,uint256): transfers a token with safety checks.approve(address,uint256): approves another address to transfer one token.tokenURI(uint256 tokenId): points to metadata for the asset.
The safeTransferFrom function matters. If you send an ERC-721 token to a smart contract that does not implement IERC721Receiver, OpenZeppelin implementations revert with an error such as ERC721: transfer to non ERC721Receiver implementer. That check prevents NFTs from getting stuck in contracts that cannot handle them.
When to Use ERC-721
Choose ERC-721 when uniqueness is the product:
- One-of-one digital art.
- Collectibles with distinct traits and provenance.
- Event tickets with serial numbers.
- Certificates, licenses, or identity credentials.
- Digital twins of luxury goods or real-world assets.
ERC-721 is easy to reason about. One token ID maps to one asset. That simplicity is useful for legal ownership records and provenance-sensitive systems. The downside is cost and operational overhead when you need to manage thousands of different asset types or perform many transfers at once.
ERC-1155: The Multi-Token Standard
ERC-1155 is a multi-token standard. It supports fungible, non-fungible, and semi-fungible assets inside a single smart contract. Witek Radomski and other contributors developed it to address limitations in ERC-20 and ERC-721, and it reached final status in 2019.
OpenZeppelin describes ERC-1155 as fungibility-agnostic and efficient for batch operations. It is now common in games, marketplaces, and complex asset systems.
How ERC-1155 Works
In ERC-1155, each id can represent a different asset. One ID might represent 10,000 identical gold coins. Another ID might represent a single legendary sword. A third might represent 500 limited-edition tickets that later become non-transferable or collectible.
Its key functions include:
balanceOf(address,uint256): checks a user's balance for one token ID.balanceOfBatch(address[],uint256[]): checks multiple balances in one call.safeTransferFrom: transfers one token ID and amount.safeBatchTransferFrom: transfers multiple token IDs and amounts together.
Batch transfers are the practical win. In a game inventory, moving 15 item types with ERC-721 or ERC-20-style contracts can require many transactions or calls. ERC-1155 can bundle those movements. Less gas. Less contract sprawl. Fewer indexer headaches.
When to Use ERC-1155
Use ERC-1155 for asset-heavy applications:
- Web3 games with currencies, weapons, skins, characters, and consumables.
- Marketplaces that manage many asset classes.
- Loyalty systems with multiple reward tiers.
- Tokenized commodities or collectibles grouped by type.
- Event platforms with batches of similar tickets and VIP passes.
ERC-1155 is not always the best choice. If you only need a governance token, use ERC-20. If you need a clean one-token-to-one-asset legal model, ERC-721 is often clearer. ERC-1155 shines when inventory design matters more than single-asset simplicity.
ERC-20 vs ERC-721 vs ERC-1155
The fastest way to choose the right standard is to ask what the asset represents.
| Feature | ERC-20 | ERC-721 | ERC-1155 |
|---|---|---|---|
| Asset type | Fungible | Non-fungible | Fungible, non-fungible, or semi-fungible |
| Typical structure | One token per contract | One collection per contract | Many token IDs in one contract |
| Batch transfers | Not native | Not native | Native support |
| Best fit | DeFi, payments, governance | Art, tickets, certificates | Games, inventories, marketplaces |
| Main strength | Liquidity and compatibility | Clear uniqueness | Operational efficiency |
Development and Security Considerations
Do not write token standards from scratch unless you have a strong reason. Use audited libraries such as OpenZeppelin Contracts. Pin the version in your project. A contract written against OpenZeppelin 4.9 may not behave exactly like one using OpenZeppelin 5.x because several revert strings moved to custom errors.
Also test with realistic workflows:
- Approvals and allowance changes for ERC-20.
- Safe transfers to externally owned accounts and smart contracts for ERC-721.
- Batch minting, batch transfer, and receiver hooks for ERC-1155.
- Marketplace listing flows, not just minting.
- Metadata availability through
tokenURIor ERC-1155 URI substitution.
If you are studying these patterns professionally, Blockchain Council's Certified Smart Contract Developer™ and Certified Blockchain Developer™ programs connect Solidity, Ethereum standards, testing, and deployment practice in one path.
Future Outlook for Token Standards
ERC-20 will remain the default for fungible assets because liquidity infrastructure depends on it. ERC-721 will stay relevant where a unique identity or provenance trail is the core requirement. ERC-1155 is likely to keep growing in gaming, asset registries, loyalty systems, and Layer 2 applications where batch operations reduce cost.
Newer standards and extensions will improve safety and user experience. ERC-777 introduced hooks for fungible tokens, while permit-style approvals and account abstraction patterns are changing how users authorize transactions. Still, these changes build around the same foundation: ERC-20, ERC-721, and ERC-1155.
Final Takeaway
Pick the standard based on the asset model, not the trend. Use ERC-20 for interchangeable value, ERC-721 for unique ownership, and ERC-1155 for mixed inventories at scale. Your next step is simple: build one minimal contract of each type with OpenZeppelin, write transfer and approval tests, then deploy them to an Ethereum testnet before moving toward production.
Related Articles
View AllSmart Contracts
Smart Contract Oracles Explained: Connecting Blockchain Apps to Real-World Data
Smart contract oracles connect blockchain apps to real-world data, enabling DeFi, insurance, IoT, gaming, compliance, and secure Web3 automation.
Smart Contracts
Gas Fees Explained: How Smart Contract Execution Costs Are Calculated
Gas fees measure the cost of smart contract execution. Learn how opcode usage, storage writes, EIP-1559 pricing, and gas limits shape transaction fees.
Smart Contracts
Ethereum Smart Contracts Explained: Features, Standards, and Development Basics
Ethereum smart contracts power tokens, DeFi, NFTs, stablecoins, and RWAs. Learn their features, EVM basics, standards, development lifecycle, and risks.
Trending Articles
Top 5 DeFi Platforms
Explore the leading decentralized finance platforms and what makes each one unique in the evolving DeFi landscape.
How Blockchain Secures AI Data
Understand how blockchain technology is being applied to protect the integrity and security of AI training data.
Claude AI Tools for Productivity
Discover Claude AI tools for productivity to streamline tasks, manage workflows, and improve efficiency.