Guide to Ethereum ERC standards
A brief intro to the main ERC standards
Table of Contents for Guide to Ethereum ERC standards
Ethereum is one of the major blockchains around right now. They were the first to introduce smart contracts. Most of these smart contracts are written in Solidity (which is then compiled into bytecode for the EVM - ethereum virtual machine).
When these smart contracts were first introduced, people started creating NFTs and tokens on them, but there was no set standard way to do them.
The ERC standards are often like a common interface that developers agree on, to increase compatibility.
For example the ERC-20 standard is a very commonly used one. If you buy tokens that are on Ethereum network (e.g. ApeCoin - an ERC20 token which is a smart contract on the Ethereum blockchain) then chances are they are compatible with ERC20. This means tools (such as Metamask) knows what kind of functions (like
transferFrom()) are implemented in that token’s smart contract, and tools can be built around this.
This post is a guide to some main ERC standards that smart contract developers should be aware of.
ERC 20 (fungible tokens)
ERC 20 is a standard (and very common) for tokens (“fungible tokens”). It includes functionality such as transferring tokens to/from addresses, showing balances etc.
DAI, ApeCoin, WETH and many more are all ERC20 tokens. If you buy a cryptocurrency on Ethereum network (that isn’t Ether itself) then it is likely to implement ERC20.
ERC-621 - extension for ERC-20 to change token supply
ERC621 is an extension to the ERC20 standard. It adds two functions to increase and decrease the total amount of tokens in circulation. In short, it proposes that totalSupply can be changed
ERC-721 is the standard for NFTs. It is similar in a way to ERC-20, in that you can transfer or mint tokens. ERC-721 works on the basis that each NFT has a unique identifier (unlike ERC-20 where every token is the same (fungible)).
ERC-725 (Ethereum Identity)
ERC-725 describes proxy smart contracts that can be controlled by multiple keys and other smart contracts. ERC-735 is an associated standard to add and remove claims to an ERC-725 identity smart contract. These identity smart contracts can describe humans, groups, objects, and machines. ERC-725 lives on the Ethereum blockchain.
ERC-1155 (Multi tokens - NFTs and more)
ERC-1155 is a more gas efficient standard to work with non-fungible tokens, fungible tokens or partially fungible tokens.
It also allows for batching of transfers, which can save on gas fees.
ERC-1238 (non transferable NFTs)
ERC-1238 is based on ERC-1155, but is more limited in that you cannot transfer the tokens.
ERC-2981 (NFT Royalty)
A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal support for royalty payments across all NFT marketplaces and ecosystem participants.
ERC-4626 (Tokenized Vault)
allows for the implementation of a standard API for tokenized Vaults representing shares of a single underlying ERC-20 token. This standard is an extension on the ERC-20 token that provides basic functionality for depositing and withdrawing tokens and reading balances.
Spotted a typo or have a suggestion to make this crypto dev article better? Please let me know!
📙 Solidity Auditing online quiz
Learn how to audit smart contracts by looking at some example code and trying to find the bugs
⛽ Solidity Gas Optimizations Guide
How to optimize and reduce gas usage in your smart contracts in Solidity
🧪 Guide to testing with Foundry
Guide to adding testing for your Solidity contracts, using the Foundry and Forge tools
📌 Guide to UTXO
UTXO and the UTXO set (used by blockchains such as Bitcoin) explained
📐 Solidity Assembly Guide
Introduction guide to using assembly in your Solidity smart contracts
📦 Ethereum EOF format explained
Information explaining what the upcoming Ethereum EOF format is all about