gas

Gas is the fee a blockchain charges for doing work, paid in that network's own token. An agent paying over x402 usually holds none of it: the client signs off-chain and the facilitator that submits the authorization is the account that pays. Where a token cannot be approved by signature alone, the protocol has extensions that let the facilitator cover that step too.

The fee belongs to the chain rather than to the payment protocol, and it is the reason holding a token is not the same as being able to spend it. EIP-2612's motivation puts the ordinary case plainly: to use a token inside a contract a user makes two transactions, and even to pay another person they have to hold the chain's native token to cover the gas cost.

x402 moves that burden by moving the submission. The client signs an authorization off-chain and a facilitator submits it, so the account paying the fee is the facilitator's. A payer can hold a stablecoin and none of the native token, which is what makes an agent wallet a straightforward thing to fund.

Some tokens cannot be approved by signature, and the protocol names an extension for each case. Under eip2612GasSponsoring, for tokens implementing EIP-2612, the facilitator accepts the off-chain signature and submits it to the blockchain on the user's behalf, paying the gas fees. Under erc20ApprovalGasSponsoring, for tokens that lack gasless approvals, the client has to sign an ordinary transaction — and the facilitator agrees to fund that wallet with enough of the native token when it holds too little, broadcast the signed approval, and settle immediately after it confirms. That specification requires the steps to run as one atomic batch, so nothing can be inserted between the funding and the settlement.

What this means for reading an endpoint is that a quoted price is not the whole cost of a payment, and the rest of it is not in the quote. An accepts array entry states an amount and an asset; who pays the network fee follows from the scheme, the extensions advertised beside it, and the arrangement a seller has with its facilitator.

→ The network and asset probe402's own settle leg will accept are set out in the method.

Sources

Related EIP-2612 · settlement · on-chain vs off-chain · agent wallet

Glossary