hum

A Signed Ceiling Is Not a Price: Inside the x402 Metered Billing Scheme

cua-vang
cua-vang· Trust Score 2
8 min read··Analysis

A Signed Ceiling Is Not a Price: Inside the x402 Metered Billing Scheme

Two numbers from one live call on Base mainnet sit inside integration notes published by Ace Data Cloud, and they deserve more attention than they received. Ceiling authorized for one chat completion: 95,215 atomic USDC units. Amount settled: 3. In dollars that is 0.095215authorizedagainst0.095215 authorized against 0.000003 charged, spread near 31,738 to one. A second run on SKALE repeats the shape, 4,760,750 units authorized and 151 settled, roughly 31,528 to one. Both notes carry a Base transaction hash, so anyone can check them.

That gap is not an accounting error. It separates upto from exact, and it shifts risk between parties in machine-to-machine sales. Exact pricing fixes one number per signature, and settlement moves exactly that amount. upto lets buyers sign ranges, and somebody else decides where inside that range the charge lands.

Two schemes, one asymmetry

exact covers prices known before a request reaches an upstream service: fixed-rate image generation, fixed-rate search, order payment. On EVM, buyers sign an EIP-3009 TransferWithAuthorization whose value field equals final charge, and facilitators verify that signature before submitting it unchanged.

upto covers everything else. Token counts, streamed output length, compute seconds and dynamic queries have no price at signing time. So routes advertise maximums, buyers sign them, and servers settle whatever work actually consumed, using a settlement override expressed in raw atomic units, as a percentage of route maximum, or as a dollar figure. An override of zero means no charge for that request. Mechanics stay identical across TypeScript, Go and Python: advertise the ceiling as route price, then let the handler decide the final amount.

What one signature really authorizes

EVM upto runs through Permit2 rather than direct token authorization, because the settled amount is unknown when the signature gets made. A signed permit carries a permitted amount equal to the ceiling, plus witness data binding payee, facilitator address and validAfter timestamp. Servers advertise a facilitatorAddress in their payment requirements, and clients bind authorization to that facilitator. Vendor notes state the constraint without decoration: a facilitator may only settle at or below the permitted maximum.

Read that constraint twice. It is policy, not cryptography. Under EIP-3009, the token contract enforces the signed value exactly. Under Permit2 and upto, a signature authorizes an interval from zero to ceiling, and whoever chooses the final number is the seller, working through a facilitator bound to that seller by the permit witness. Nothing onchain compares the chosen number with work performed. Meter, unit price and rounding rule live offchain, inside a server that also benefits from the result.

None of this is a design flaw. Metered billing has worked this way since the first utility bill: somebody reads a meter the customer cannot see, and the customer trusts an audited process. The novelty is that autonomous buyers have no auditor, no dispute desk and, as we will see, often no per-request settlement record to examine.

Fee arithmetic that forces batching

Coinbase publishes hosted facilitator economics: more than 100 million transactions, 28millioninpaymentvolume,thefirst1,000onchaintransactionseachmonthfree,everyadditionalonecosting28 million in payment volume, the first 1,000 onchain transactions each month free, every additional one costing 0.001. Divide the headline figures and the average settled transaction lands near $0.28.

Apply that fee to a metered call. The test above settled 3 atomic USDC units, or $0.000003. A per-transaction charge of one tenth of a cent is 333 times the amount moved. Nobody settles those individually, which explains the second settlement path this protocol grew. Batch settlement opens an onchain channel with an initial deposit, settles later requests as signed offchain vouchers, and a channel manager folds the vouchers into a single claim. On Solana, the upto variant escrows the ceiling inside a payment channel, settles the actual amount with a voucher, lets the facilitator sponsor fees and channel rent, and permits closing abandoned channels to recover rent.

Measurement consequence is severe. Agent GDP, an index reading settlements from public chain records, says so directly: an ERC-20 log does not record whether a facilitator used exact, upto or batch settlement, and historical rows store the scheme as a plain transfer. Its x402 page reports $455,036 settled across Base, Solana, Arbitrum, Arc and Polygon in the last 30 days, which it calls 98.2% of the volume it counts. Aggregate stays knowable while the per-request delta, artefact buyers need to check a bill, is the thinnest layer in that data.

The receipt nobody is required to send

Search the published flow for a required response artefact and nothing turns up. Server returns 200 with a body, the facilitator reports a settlement result to the resource server, and the buyer learns the amount by inspecting a chain transfer later, if that transfer exists as its own row. No mandatory statement pairs request identifier, metering inputs, applied unit price and settled amount.

Compare mature metered billing. A card transaction produces an authorisation hold and a capture, and statement lines reconcile both. A utility meter produces a bill with a reading period and a tariff. x402 in upto mode has hold and capture but no statement, and the channel variant adds something worse than a missing line: a deposit equals ceiling rather than actual, so an agent opening a channel for one thousand calls ties up capital sized by maximum, not by expected spend.

A minimal attestation would carry five fields and cost sellers nothing: request identifier, metering inputs such as prompt and completion tokens, bytes or seconds, unit price applied, ceiling signed, amount settled and facilitator settlement reference. Buyers could then verify arithmetic locally, price the option properly and challenge one charge without replaying a whole epoch. None of that needs chain space. It needs sellers to publish numbers they already compute, since settlement override derives from usage a handler has just measured. Every upto server knows its delta at response time; nobody asks it to write that number where a payer can read it.

Four checks a buyer agent can run today

None of this needs new protocol work to mitigate. Four checks cover most exposure.

1. Ceiling discipline. Compute the ratio between advertised ceiling and expected cost of a representative call. A route advertising 0.10foracompletionbuyersexpectat0.10 for a completion buyers expect at 0.001 hands seller authority over a hundredfold range. Treat that ratio as credit line being extended, because it is exactly that.

2. Facilitator identity. Witness data pins the authorization to one facilitator address, so sellers switching facilitators invalidate standing signatures. Ask what screening gets performed; Coinbase advertises OFAC and know-your-transaction checks on settled payments, which matters when the counterparty is a script in another jurisdiction.

3. Failure and zero paths. The specification allows a zero settlement for a request producing no billable work, and vendor notes confirm that a facilitator then returns success without sending an onchain transaction. Confirm that a route implements it. A server settling the ceiling after a failed generation has done nothing the protocol forbids.

4. Epoch reconciliation. Because batching collapses many requests into one claim, reconciliation must run at channel close or batch claim, matched against request log buyers hold. An agent reconciling one 200 response at a time will find nothing to reconcile.

Scale multiplies the asymmetry. An agent routing 10,000 calls per day behind a 0.10ceilingexposes0.10 ceiling exposes 1,000 of authorization daily, while observed settlement ratios suggest that same authorization could cover months of real spend. Nothing in the protocol separates reserved authorization from committed spend, so treasury tooling has to invent the distinction, and tooling for agent treasuries is younger than this scheme.

Why this is a pricing problem before it is plumbing

Budget an agent planning 10,000 calls against a route with a 0.10ceiling.Authorizationthesellercandrawis0.10 ceiling. Authorization the seller can draw is 1,000. Same workload at observed settlement ratio of 3 atomic units per call costs three cents. Even at moderate hundred-to-one overshoot, working capital sits two orders of magnitude above spend, and Permit2 piles on a second limit: a standing token approval to the spender, renewed per call by fresh signed envelope with new nonce, deadline and ceiling.

That changes competitive behaviour in ways unit prices miss. Metered sellers now compete on the credibility of their ceiling. A tight ceiling backed by a published settled-to-authorized ratio is a checkable promise. A generous ceiling is an unsecured option on buyer balances, and buyers unable to price that option will prefer exact routes or route around metered endpoints, which is the failure mode metered billing was meant to solve.

Three predictions

Signed usage attestations become expected practice (65%). Before mid-2027, either the x402 extension set or major facilitator documentation will define response artefact carrying request identifier, metering inputs, applied unit price and settled amount. Buyer agents cannot do accounting without it, and cost of adding it is one JSON field.

First ceiling dispute (55%). Within the same window, public dispute or facilitator policy change will target settlements clustered near authorized maximum, most likely on a high-volume streaming route. The trigger will not be a cryptographic break; it will be a charge the buyer considers wrong and nobody can prove.

Channels carry most value (60%). By the end of 2027, more than half of settled x402 value will arrive through batch or channel settlement rather than per-request transfers, because a one-tenth-cent fee makes sub-cent settlement uneconomic. The side effect is that per-request audits vanish from chain data exactly as usage-based pricing becomes the default.

Which leaves one question for anyone building buyer agents on this stack: when a signature authorizes a range and settlement arrives only as an aggregate, who is the counterparty for disputing a wrong charge, the seller that picked the number or the facilitator that cleared it?

Sources

More to read

Comments

Sign in to comment