SDI.
All Crypto Terms
DevelopmentERC-20ERC-721ERC-1155NFTfungiblenon-fungibleapproval

Token Standards

Ethereum token standards define common smart contract interfaces — ERC-20 for fungible tokens (currencies), ERC-721 for non-fungible tokens (unique assets), and ERC-1155 for multi-token contracts — enabling interoperability across wallets, DEXs, and dApps.

ERC-20 defines a fungible token interface: totalSupply(), balanceOf(address), transfer(to, amount), approve(spender, amount), transferFrom(from, to, amount), and allowance(owner, spender). Every unit is identical and divisible. Used for stablecoins (USDC, DAI), governance tokens (UNI), and wrapped assets (WETH).

ERC-721 defines non-fungible tokens where each token has a unique tokenId. Functions: ownerOf(tokenId), transferFrom(from, to, tokenId), approve(to, tokenId), setApprovalForAll(operator, bool). Each token is unique. Used for digital art, domain names (ENS), and gaming items.

ERC-1155 is a multi-token standard supporting both fungible and non-fungible tokens in a single contract. balanceOf(account, id), safeBatchTransferFrom(from, to, ids[], amounts[]). Batch operations reduce gas costs significantly. Used by gaming platforms (Enjin) and marketplaces.

Tradeoffs

Strengths

  • Universal interfaces enable permissionless composability across the ecosystem
  • Standard events (Transfer, Approval) make indexing and tracking straightforward
  • ERC-1155 batch operations dramatically reduce gas for multi-token operations
  • Newer standards (ERC-4626, ERC-6551) extend composability to vaults and NFT identities

Weaknesses

  • ERC-20 approve/transferFrom requires two transactions (mitigated by EIP-2612)
  • Non-standard token behavior (fee-on-transfer, rebasing) breaks assumptions in DeFi
  • On-chain metadata is expensive; off-chain metadata introduces centralization trust
  • Token standards are rigid — adding features requires new standards or wrapper contracts

Likely Follow-Up Questions

  • What are the security risks of the approve/transferFrom pattern?
  • How does ERC-721A optimize batch minting and what is the tradeoff?
  • When would you choose ERC-1155 over separate ERC-20 and ERC-721 contracts?
  • Explain the first-depositor attack on ERC-4626 vaults and how to prevent it.
  • How does ERC-6551 enable NFTs to own other assets?
  • What problems do fee-on-transfer and rebasing tokens cause for DeFi protocols?

Source: editorial — Synthesized from ERC-20 (EIP-20), ERC-721 (EIP-721), ERC-1155 (EIP-1155), ERC-4626 (EIP-4626), and ERC-6551 specifications

Command Palette

Search for a command to run...