sip402
x402's streaming session payments only exist as a centralised, off-chain binding (cloudflare:402). sip402 is the first on-chain, self-custodial one: gasless USDC streams, capped on-chain by ERC-7710.
비디오




기술 스택
설명
sip402 — open a tab, pay by the sip
The problem. x402 already ships a batch-settlement scheme for streaming, session-based payments — pay as a resource is delivered, settle in batches. But it's underutilised, because its only real-world binding, cloudflare:402, is centralised: credit-backed fiat, off-chain, with the network as merchant-of-record. You stream now and trust an intermediary to settle later.
What we fixed. sip402 is the first capital-backed, on-chain, self-custodial binding of x402's batch-settlement. One MetaMask ERC-7715 permission opens a standing, revocable payment session. An agent sips small USDC draws as a paid AI stream is delivered; the seller accumulates these commitments and redeems them in batches — N commitments in one redeemDelegations. The cap is enforced on-chain by an ERC-7710 ERC20PeriodTransferEnforcer caveat: an over-budget batch reverts atomically (the dry tab). Settlement is gasless via 1Shot (gas in USDC, EIP-7702), and the AI is real — Venice, metered per token.
How it works — four npm packages
@sip402/client - Buyer: openSession grants one periodic delegation; createCommitment mints a redelegation to the seller. The payment IS the delegation; A2A redelegates sub-budgets to specialists.
@sip402/server - Seller: verify-by-simulation (the chain enforces the cap, not the server), accumulate, and batch-redeem N commitments in one tx.
@sip402/core - Settlement: createDirectRedeemSettler (testnet) and createOneShotSettler (gasless mainnet via 1Shot); settleBatch with atomic over-cap revert.
@sip402/splitter - Reference seller: resells Venice AI per token behind an OpenAI-compatible gateway.
Proven on Base mainnet, gaslessly
A real ERC-7715 grant, redelegated to the 1Shot relayer, batch-redeemed 3 commitments in ONE redeemDelegations (relayer paid gas, owner spent 0 ETH), and the over-cap batch reverted at the on-chain cap. All four packages are published to npm; the site is live at sip402.vercel.app.
x402 prices the request; sip402 prices the delivery.
해커톤 진행 상황
Everything below was built during the hackathon.
Protocol + 4 npm packages — @sip402/core, client, server and splitter, all published to npm.
The x402 batch-settlement binding — a commitment is an ERC-7710 redelegation to the seller; verify-by-simulation; the accumulator batch-redeems N commitments in one redeemDelegations.
On-chain cap enforcement — ERC20PeriodTransferEnforcer; an over-budget batch reverts atomically (the dry tab), so the chain enforces the limit, not the server.
Gasless mainnet settlement — settleBatch on the 1Shot relayer; the session redelegates the ERC-7715 grant to the relayer target, gas paid in USDC (EIP-7702), owner ETH spent = 0.
Real AI — Venice inference metered per token behind an OpenAI-compatible gateway.
Demo + site — guided Connect → Open → Run → Enforce on BOTH Base Sepolia and Base mainnet, with a live USDC ticker, batched Basescan receipts, and the on-chain cap-revert; plus a hostable site at sip402.vercel.app.
Proven on-chain (real txs) — a batched redeemDelegations carrying 3 USDC transfers in one tx, gasless via 1Shot, plus the atomic over-cap revert, on Base mainnet; the full requirement matrix on Base Sepolia.