What is ERC-20: the Ethereum token standard

ERC-20 is the standard interface for fungible tokens on Ethereum and other EVM-compatible blockchains.

ERC-20 is a specification that describes how a token contract on Ethereum must behave. It defines functions such as balanceOf, transfer, approve and transferFrom, the Transfer and Approval events, and optional fields such as name, symbol and decimals. Because every compliant token exposes the same interface, wallets, exchanges and payment systems can support thousands of tokens with one piece of code.

For payments, the essential parts are transfer and the Transfer event. When a customer pays in USDT or USDC on Ethereum, their wallet calls transfer on the token contract, and the contract emits a Transfer event with the sender, recipient and amount. A payment gateway watches these events for its addresses, rather than the plain ETH value of the transaction, which is zero for token transfers.

Every ERC-20 transfer is an Ethereum transaction, so it costs gas paid in ETH. A customer with USDT but no ETH cannot pay. Token transfers consume more gas than a simple ETH transfer, and fees rise when the network is busy, so Ethereum is often the most expensive network for small payments.

Typical mistakes for developers: forgetting decimals (raw amounts are integers, and USDT uses 6 decimals while many tokens use 18), trusting the token symbol instead of the contract address, and misunderstanding approve. Approve lets another address spend tokens on the owner’s behalf; malicious sites ask users for unlimited approvals and later drain wallets, so a payment flow should never need one.

Moonvex accepts ETH, USDT and USDC on Ethereum. Each payment gets its own address or a permanent deposit address, and the service tops up gas itself when sweeping tokens.

When accepting ERC-20 tokens

  • match the token by contract address, not by name or symbol
  • convert raw amounts using the contract’s decimals
  • read Transfer events, not the transaction’s ETH value
  • remember that sending tokens out requires ETH for gas

FAQ

Are ERC-20 and BEP-20 compatible?

They share the same interface and address format, because BNB Smart Chain is EVM-compatible. But they are different networks: a token on Ethereum does not exist on BSC unless bridged.

Why did my ERC-20 transfer fail but still cost a fee?

On Ethereum, gas is spent for the computation even if the transaction reverts, for example due to an insufficient token balance or too low a gas limit.

Is it safe to approve a token for a website?

Only when you understand why the site needs it and the amount is limited. A simple payment never requires approve; the customer just sends a transfer.

Where it matters

Related terms

Start accepting payments today

An account and your first project in a minute, no monthly fee.

Create account