Close Menu
InvesthenaInvesthena
    What's Hot

    Crypto.com Proof of Reserves Faces Renewed Scrutiny

    November 30, 2026

    DailyAI Briefing: OpenAI countersues Apple, plus 4 more

    November 29, 2026

    Zcash stays below $750 as weak spot demand threatens recovery

    November 29, 2026
    InvesthenaInvesthena
    • Business
    • Economy
    • Investing
    • Stocks
    • Best Savings Accounts
    InvesthenaInvesthena
    Home»Economy»What Is the ERC20 Ethereum Token Standard?
    Economy

    What Is the ERC20 Ethereum Token Standard?

    November 17, 2026
    The Merkle logo
    Share
    Facebook Twitter LinkedIn Pinterest Email


    ERC-20 is the shared rulebook for fungible tokens on Ethereum. It lists six functions and two events that a token’s smart contract must expose under agreed names, so any wallet, exchange or other contract can work with any token in the same way.

    “Fungible” means every unit is interchangeable with every other unit, the way one ETH equals any other ETH. A token contract that implements the required functions and events can be called an ERC-20 token.

    Where ERC-20 came from

    ERC stands for Ethereum Request for Comments. The number 20 comes from the GitHub issue where the proposal was discussed: issue #20 in the Ethereum EIPs repository.

    The formal document is EIP-20. It lists Fabian Vogelsteller and Vitalik Buterin as authors, carries a creation date of November 19, 2015, and has the status Final. Its history section points back to an earlier outline by Buterin on the Ethereum wiki for standardized contract interfaces.

    The motivation in the EIP is short. If every token speaks the same interface, wallets and decentralized exchanges can reuse one piece of code for all of them.

    The required functions and events

    These six functions are mandatory. The signatures below are the ones in EIP-20.

    • totalSupply(): Returns the total number of tokens in existence.
    • balanceOf(address _owner): Returns how many tokens one address holds.
    • transfer(address _to, uint256 _value): Moves tokens from the caller to another address.
    • approve(address _spender, uint256 _value): Lets another address spend up to a set amount of the caller’s tokens.
    • allowance(address _owner, address _spender): Returns how much a spender may still take from an owner.
    • transferFrom(address _from, address _to, uint256 _value): Moves tokens on an owner’s behalf, using an allowance set by approve.

    transfer, transferFrom and approve each return a bool that signals success.

    Two events are also mandatory:

    • Transfer(address indexed _from, address indexed _to, uint256 _value) must fire whenever tokens move, including transfers of zero.
    • Approval(address indexed _owner, address indexed _spender, uint256 _value) must fire on every successful call to approve.

    Three more functions are optional: name(), symbol() and decimals(). The EIP says other contracts must not expect them to be present. In OpenZeppelin’s widely used implementation, decimals defaults to 18 and affects only how balances are displayed, not the contract’s arithmetic.

    What “meeting the standard” means in practice

    There is no certificate and no central registry. A token meets ERC-20 when its contract has the six functions and two events with the exact names, parameters and return types above, and behaves as the EIP describes.

    The behavior rules are few:

    • transfer should fail if the sender’s balance is too low.
    • transferFrom should fail unless the owner has authorized the caller.
    • A transfer of zero tokens counts as a normal transfer and must emit the event.
    • A contract that creates new tokens should emit a Transfer event with the _from address set to 0x0.
    • Code that calls a token must check for a false return value and must not assume it never happens.

    The two ways to move tokens map to two situations. With transfer, you send your own tokens directly. With approve plus transferFrom, you first grant a contract an allowance, and that contract then pulls the tokens when its own logic runs. Decentralized exchanges and other applications rely on the second pattern.

    Everything else is left to the token’s author: how the supply is created, whether it can grow, and who controls it. ERC-20 describes the interface, not the economics or the safety of a token.

    Known pitfalls

    The approve race condition. Changing an existing allowance from one nonzero amount to another opens a window in which the spender might use both the old and the new amount. The EIP advises user interfaces to set the allowance to zero first and then set the new value. It also says token contracts should not enforce this themselves.

    Tokens sent to contracts that cannot handle them. A plain transfer does not notify the receiving address. If that address is a contract with no code for moving tokens out again, the tokens can be stuck for good. Ethereum.org puts losses from this problem at more than $83 million in ERC-20 tokens as of June 20, 2024. Its suggested mitigations include depositing through approve and transferFrom, and adding a recovery function to contracts.

    Non-standard return values. Some widely held tokens do not follow the return type rule. USDT, BNB and OMG are documented as returning no bool from some ERC-20 methods. Other tokens return false on failure instead of reverting, which the standard permits but which a careless caller can miss. USDT also refuses to change a nonzero allowance to another nonzero value.

    Developers usually handle these cases with a wrapper. OpenZeppelin’s SafeERC20 library reverts when a token returns false, accepts tokens that return nothing, and includes a forceApprove function for tokens such as USDT.

    How later standards relate

    Later standards either extend ERC-20 or cover cases it does not.

    • ERC-721 (created January 2018) is the standard for non-fungible tokens. Each token is distinct and its ownership is tracked individually.
    • ERC-777 (created November 2017) adds operators who can send tokens for a holder, plus hooks that notify senders and recipients. It stays backward compatible with ERC-20.
    • ERC-1155 (created June 2018) lets one contract manage many token types, fungible or not, and transfer several of them in one batch.
    • EIP-2612 (created April 2020) adds a permit function. The holder signs a message off-chain and anyone can submit it to set an allowance, so the holder does not need ETH for a separate approval transaction.
    • ERC-4626 (created December 2021) standardizes tokenized vaults. The vault holds one underlying ERC-20 token and issues shares that are themselves ERC-20 tokens.

    ERC-223 and ERC-1363 are two further proposals that target the stuck-token problem by letting a receiving contract react to an incoming transfer.

    ERC-20 remains the base layer for all of them. The six functions listed above are still what a wallet calls when it shows a token balance or sends a payment.

    Sources



    Source link

    Previous ArticleLighter’s exploit raises uncomfortable questions for Hyperliquid’s $5.7 billion market
    Next Article Learning the language of machine learning | MIT News

    Related Posts

    Zcash stays below $750 as weak spot demand threatens recovery

    November 29, 2026

    EBA Flags Stablecoin Risks and Urges EU to Review DeFi Lending

    November 25, 2026

    Kava Votes to Freeze HARD Lend Borrowing After 53.9M KAVA Exploit

    November 24, 2026

      Subscribe to Updates

      Subscribe to our newsletter for early access to new products, exclusive deals, and exciting updates. Don't miss out! Our subscribers are always the first to hear about limited-time offers and new arrivals. Plus, you'll get sneak peeks and bonus content that adds value to your experience.

      By opting in you agree to receive emails from us and our affiliates. Your information is secure and your privacy is protected.

      Top Posts

      Crypto.com Proof of Reserves Faces Renewed Scrutiny

      November 30, 2026

      Zcash stays below $750 as weak spot demand threatens recovery

      November 29, 2026

      Bitcoin Lightning fix targets routing node losses

      November 29, 2026

      Investhena is a digital news blog covering the latest updates in crypto, global economy, and investing. We focus on clear, timely insights to help readers stay informed and understand market trends without unnecessary complexity.

      Letest News

      Crypto.com Proof of Reserves Faces Renewed Scrutiny

      November 30, 2026

      DailyAI Briefing: OpenAI countersues Apple, plus 4 more

      November 29, 2026
      LEGAL INFORMATION
      • Contact us
      • Terms & Conditions
      • Privacy Policy
      Copyright © 2026 investhena.com | All Rights Reserved

      Type above and press Enter to search. Press Esc to cancel.