blockchain

ERC-20

The technical standard for creating and issuing fungible tokens on the Ethereum blockchain, defining a common set of rules that all compliant tokens follow.

ERC-20 in cryptocurrency accounting

ERC-20 is the most widely adopted token standard on the Ethereum blockchain. It defines a common interface that fungible tokens must implement, ensuring that all ERC-20 tokens behave consistently across wallets, exchanges, and DeFi protocols. Understanding ERC-20 is important for crypto accounting because the vast majority of tokens you encounter will follow this standard.

What is the ERC-20 token standard?

ERC-20 stands for "Ethereum Request for Comments 20," a proposal submitted by Fabian Vogelsteller in November 2015 and finalized as a standard in September 2017. Before ERC-20, each token on Ethereum implemented its own unique interface, making it difficult for wallets and exchanges to support new tokens without custom integration work.

The ERC-20 standard defines six mandatory functions and two optional ones that every compliant token contract must implement:

Mandatory functions

  • totalSupply: Returns the total number of tokens in existence
  • balanceOf: Returns the token balance of a specific address
  • transfer: Sends tokens from the caller's address to another address
  • transferFrom: Allows a third party (such as a DeFi protocol) to transfer tokens on your behalf
  • approve: Grants a specific address permission to spend up to a defined amount of your tokens
  • allowance: Returns the remaining amount a spender is allowed to transfer

Optional fields

  • name: A human-readable name (e.g., "USD Coin")
  • symbol: A ticker symbol (e.g., "USDC")
  • decimals: The number of decimal places the token supports (typically 18 for most tokens, 6 for USDC and USDT)

This standardized interface means that any wallet, exchange, or smart contract that supports ERC-20 tokens can automatically work with any new token built to the standard, without requiring custom code.

Token approvals

Before a DeFi protocol can move your ERC-20 tokens, you must first approve it by calling the approve function. This creates an on-chain allowance that lets the protocol's smart contract call transferFrom on your behalf. Many users set "unlimited" approvals for convenience, but this carries security risks if the approved contract is compromised. Each approval transaction costs gas and should be tracked in your accounting records.

Other token standards beyond ERC-20

While ERC-20 covers fungible tokens (where every token is identical), Ethereum has other standards for different use cases:

  • ERC-721: Non-fungible tokens (NFTs), where each token is unique
  • ERC-1155: A multi-token standard that supports both fungible and non-fungible tokens in a single contract
  • ERC-4626: Tokenized vaults, used by yield aggregators and lending protocols

Many EVM-compatible blockchains (Polygon, Arbitrum, BNB Chain, Avalanche) use the same ERC-20 interface, making the standard relevant far beyond Ethereum itself.

Why ERC-20 matters for crypto accounting

ERC-20 tokens present specific accounting considerations:

  • Decimals affect precision: The decimals field determines how token amounts are represented on-chain. A balance of 1000000 in a token with 6 decimals represents 1.000000 tokens, while the same raw value in a token with 18 decimals represents 0.000000000001 tokens. Accounting software must handle this correctly to avoid errors
  • Approval costs: Token approvals are separate gas-consuming transactions that represent an expense, even though no tokens are transferred. If you interact with multiple DeFi protocols, approval costs can add up
  • Transfer events: Every ERC-20 transfer emits a standard Transfer event on the blockchain. Accounting systems use these events to detect and record token movements, making ERC-20 transfers straightforward to track compared to more complex protocol interactions
  • Token identification: Each ERC-20 token is identified by its contract address. The same token symbol can exist on multiple chains or even multiple contracts on the same chain. Your accounting system must use contract addresses (not just symbols) to correctly identify and price tokens
  • Wrapping and unwrapping: Some tokens have "wrapped" versions (like WETH, which is an ERC-20 wrapper around native ETH). Wrapping and unwrapping may or may not be taxable events depending on your jurisdiction, but they always need to be recorded

How Tokenbooks handles ERC-20 tokens

Tokenbooks detects ERC-20 token transfers, approvals, and interactions for connected supported wallets. The platform identifies tokens by contract address, applies decimal precision handling, and records movements with valuation context.

Learn more about tracking your token portfolio in our crypto accounting guide or explore how cost basis tracking works across your ERC-20 holdings.