ERC-20

ERC-20 is the Ethereum standard interface for a token: how it is transferred, and how a holder lets somebody else spend on their behalf. That second half is a pair of functions, approve and transferFrom, and the awkwardness of that pair is why the agent-payment rails reach for a signature instead.

The standard's own abstract describes a standard API for tokens within smart contracts, giving basic functionality to transfer tokens and to let tokens be approved so they can be spent by another on-chain third party. Its status is Final. approve allows a spender to withdraw from an account repeatedly up to an approved value, overwriting any earlier allowance; transferFrom moves tokens from one address to another and is described as the method for a withdraw workflow, letting contracts transfer tokens on a holder's behalf.

The awkwardness is that the approval is itself a transaction. A holder has to send one, pay gas for it, and leave a standing allowance in place afterwards — which is the arrangement EIP-2612 and EIP-3009 each replace with a signed message.

For a payment over x402 the token is still an ERC-20 token; what differs is how permission to move it is expressed. That is also why a quote names an asset contract rather than a token name: the interface is standard, the contract is what identifies which token it is.

→ probe402 records the asset contract each tracked endpoint quoted, beside the network it quoted it on — open an endpoint from the endpoint list.

Sources

Related EIP-3009 · EIP-2612 · USDC · stablecoin

Glossary