ReferencePre-launch

Payment scheme in ETH

Native ETH has no signed-transfer standard, so Nouspay pays with signed vouchers against a prepaid vault. Here is the full scheme.

The problem

Most x402 payments use USDC, which supports EIP-3009 transferWithAuthorization: the payer signs a message and anyone can submit it, so the payer pays with one signature and no gas. Native ETH has no such function. To pay in ETH with one signature, a contract has to be involved.

The decision: vault + EIP-712 vouchers (nous-voucher)

OptionHow it worksTrade-off
A. Vault + EIP-712 vouchers (chosen)The agent wallet deposits ETH into NousVault. Each call signs one voucher. Vouchers are redeemed after the answer.One signature, no gas per call. Needs a deposit first. Mandates and the kill switch live in the same contract.
B. WETH + Permit2The agent pays in wrapped ETH with a Permit2 signature.Standard tooling, but WETH rather than ETH and a one-time approval. A possible compatibility path later.
C. Plain ETH transferThe agent sends ETH and puts the tx hash in the header.A transaction and gas on every call. Breaks the single request.

How a paid call works

  1. Open a vault account. The agent wallet calls open(owner, perCallCap, dailyCap) with ETH. The owner is you.
  2. Ask. The agent calls the endpoint. With no payment it answers 402 with an x402 requirement: scheme nous-voucher, network eip155:4663, price in wei, payTo, and extra.vault.
  3. Sign. The agent signs an EIP-712 Voucher(payer, seller, amount, nonce, deadline, requestHash) with domain NousVault version 1. requestHash is keccak256("GET " + resource), so a voucher buys exactly one resource.
  4. Retry with the voucher in the X-PAYMENT header (base64 JSON, x402 v1).
  5. Answer, then pay. The seller checks the voucher through the facilitator, holds it while it works, and only queues it for redemption if it answered. The response carries X-PAYMENT-RESPONSE.
  6. Redeem and claim. Vouchers are redeemed in batches; the amount is credited to the seller, who calls claim(to).

What the vault enforces on every voucher

Account open, not frozen, not expired, nonce unused, signature from the payer, amount within the cap per call, today's spend within the daily budget, seller on the allowlist (when enabled), and enough balance. The owner can change the mandate, unfreeze and withdraw; withdrawals always go to the owner. The owner or the agent can freeze (the kill switch). There is no admin key, no fee in the contract and no upgrade path.

Facilitator

EndpointDoes
GET /api/x402/supportedLists nous-voucher on eip155:4663 with the vault address
POST /api/x402/verifyChecks a voucher against the requirement and the vault, counting vouchers not yet redeemed against the balance and budget
POST /api/x402/settleRecords the voucher once and queues it for redemption

All on https://dapp.nouspay.app. The facilitator fee is TBD.