vet402

Your agent pays once. When the answer goes missing, the seller's deposit on Arc pays it back.

vet402

Created At

ETHGlobal Mumbai

Project Description

vet402 on Arc turns a paid answer that never arrived into a refund from the seller's own deposit, gas included. On 2026-09-28, vet402, an AI agent I own, made 50 x402 purchases on Arc mainnet, settled in one batch. 31 delivered. 19 charged it and returned nothing it could use. A payment that goes right sends 0 transactions to the contract, so x402 keeps settling in one step through Circle Gateway. Tap "Start a dispute" at https://vet402-mumbai-live.vercel.app and a real claim runs on Arc testnet. On 2026-11-06 at 04:23 UTC the seller's answer came through Arc's Memo contract 2 s after the claim, with the claim id, the Gateway transfer and the Swarm box in its memo (c, a). On the iPhone in the video at 0:10 the same button reaches Delivered in 3.6 s. With World ID, only the person who set the budget can release the agent's money. With Arkiv, every Arc ruling becomes a record any buyer can query, and with Swarm, anyone can fetch the sealed box of a dispute.

x402 now sits at the Linux Foundation with Visa, Mastercard and Google among its premier members, and its stablecoins settle "with zero chargebacks", as Cloudflare puts it. vet402 adds the way back for a paid answer that never came, and the same contract already ran two disputes on Arc mainnet.

Bounties: Arc (Arc Studio Continuity Track: Bring Your Project to Arc, Best Smart Contracts with Advanced Stablecoin Logic, In Arc Studio, Best Mobile Web Consumer Agent Using the Marketplace Discovery API), Arkiv (Build on Arkiv and the Arkiv + Swarm bonus, existing projects), and World ([Cont] Best Use of IDKit).

Why it matters

x402 made the payment final. vet402 on Arc makes the purchase final: the answer arrives, or the seller's deposit pays the buyer back, gas included.

When a line drops after payment, a retry pays again. At the event a plain retry to Seller B left 2 transfers in Circle's record for one request: e9cbd6d5-d3a3-4693-9e6d-f9d33a197b31 and b9d962ef-6276-4f29-a94d-87618539a6fd, 2026-11-05 16:04 UTC. circlefin/arc-nanopayments#43 tracks the same case. With SealedDelivery, vet402 asks for the key with the payment it already made, and one request is charged once.

Any x402 seller can add it

The README of packages/sealed-delivery shows the whole integration in 4 lines that a test runs as written: an import, 2 lines on the seller (the middleware and the route) and 1 on the buyer (openSealed). The middleware seals each answer, signs the promise, and runs a lookout that answers claims on Arc by itself.

How it works

  1. vet402 pays once through Gateway. That one EIP-3009 signature later doubles as its evidence, so the buyer signs once.
  2. The seller returns the answer locked with a fresh key, plus a signed promise: the hashes of the key, the answer and the ciphertext, bound to this buyer, this payment nonce and this price.
  3. vet402 asks for the key. When it comes, the job is done and SealedDelivery stays untouched. On 2026-11-06 at 01:42 UTC Seller A delivered in 2.1 s this way (transfer 8df8ff6d-df86-4aa1-b9fb-840347074510).
  4. When the key is missing, vet402 sends one claim with the promise and the payment signature it already made. The seller has 60 s to put the key on Arc.
  5. Silence ends in finalize. A key that opens a different answer ends in prove. Either verdict credits the buyer the price plus its gas from the seller's deposit and burns the same amount again, sent to 0x…dEaD where no one can spend it.
  6. The seller's answer goes through Arc's Memo contract at the seller's cost. The memoId is the claim id, and the memo names the Gateway transfer and the Swarm reference, so one claim id leads to the payment, the evidence and the verdict.
  7. Money a dispute wins back goes into the buyer's Gateway balance through depositFor once 0.05 USDC has come back, so the agent spends it again with Nanopayments.

The cost of a dispute falls on the side that broke the promise. A claim used about 0.005 to 0.007 USDC of gas at 20 to 25 gwei on 2026-11-06 and a whole dispute about 0.009 to 0.013 USDC, and the seller's deposit pays all of it, so the most a buyer spends is the 0.001 USDC price. The claim measures its own gas. An answer repays that gas in the same transaction, and a verdict repays the price, the claim's gas and 230,000 gas for the calls after it, counted at the claim's gas price up to 100 gwei. Before paying, vet402 reads coverageFor and buys only from a seller whose deposit covers that verdict (server/tryJobWire.ts). With the claim at or below 100 gwei, the later calls at the claim's gas price and a deposit that covers the verdict, the buyer ends at or above zero in every outcome (contracts/README.md, The economics).

Honest sellers get a tool too. The claimGuard option of the seller middleware in packages/sealed-delivery reads a buyer's Claimed and KeyRevealed events on Arc through buyerClaimRecord, and a seller can refuse a buyer whose latest claims keep ending in an answer, or ask it a higher price, before anything settles.

Measured on Arc

Final contract, Arc testnet, 2026-11-06 01:59 to 02:04 UTC, the run in the video. Price 0.001 USDC, four test sellers with 0.5 USDC deposits:

  • Seller A answered the claim. The buyer got the answer, plus 0.000174 USDC over its claim gas (c, a).
  • Seller F swapped the answer. Buyer after its own gas: +0.009599 USDC (c, a, p).
  • Seller E stayed silent. Buyer after its own gas: +0.001731 USDC (c, f).
  • Seller D sent a wrong key, which Arc reverted, then stayed silent. Buyer after its own gas: +0.001863 USDC (c, r, f).

"Buyer after its own gas" is everything that came back, less the 0.001 USDC price (except for A, which got its answer), less the buyer's fees for the claim, the verdict and the withdrawal. flushBurn, which sends the burned half on, is open to anyone. In this run vet402's buyer also sent each one, at 0.001174 USDC, and still ended ahead every time. Since 2026-11-06 05:40 UTC it leaves flushBurn to others. Video 1:10 to 1:36, and the events on the verified explorer at 1:36. DEMO.md lists every transaction of the event.

Arc mainnet runs the same source at 0xf3e2a77e1a93eeb791ae1016f411e5bb8a05e6d9, Sourcify exact_match. On 2026-11-06 from 02:03 to 02:04 UTC the buyer ended 0.000139 USDC ahead when the seller answered and 0.001355 USDC ahead when it stayed silent (a, f). Video 3:30.

The idea starts from FairSwap (Dziembowski, Eckey, Faust, CCS 2018, https://eprint.iacr.org/2018/740). SealedDelivery holds a seller deposit in place of the payment, because the payment has already settled through Gateway.

The consumer agent on Arc

Open https://vet402-mumbai-live.vercel.app on a phone and type a job. vet402 reads Circle's Discovery catalog for Arc testnet (134 listings on 2026-11-06, Quicknode nodes and BotPay), scores every listing against the words with BM25 and buys from the live seller it picks. On 2026-11-05 at 22:48 UTC, for Did my last payment go through?, it picked Quicknode's Arc testnet node, showed the 3 it compared, and asked "May I spend up to 0.0001 USDC on this job?". Money moves on Approve. That job paid Quicknode 0.0001 USDC on 2026-11-05 at 22:48 UTC (transfer 12166eb9-22bb-431b-b621-c68ad4c93538). Video 1:57, 2:16 filmed on an iPhone, and the limit and the dropped line at 2:25.

The approval card shows both sides of a purchase: Discovery says what a seller sells, and the deposit on Arc says the seller answers or pays. The agent's purchases can carry the same protection. Beside the catalog it ranks vet402 Payment Check, vet402's own seller, which seals its answer on Arc. When coverageFor confirms the seller's deposit, the approval card adds "Protected on Arc: if the answer goes missing, the seller's deposit pays you back." On 2026-11-06 at 04:59 UTC the phone layout approved it, and the answer arrived 1.3 s later, checked against the hashes the seller signed. The receipt reads "Answer received and checked. You paid 0.001 USDC once." vet402 Balance Check answers "How much USDC does my agent have?" the same protected way, and the person sets the agent's limit on the phone, enforced by the server ("Over your limit of 0.001 USDC. Nothing was paid."), with "What your agent bought" listing each purchase. "Try it with the line dropped" runs the protected path for real: the phone read "The line dropped. vet402 asked Arc, the seller answered there, and you got your answer. Charged once." 4.1 s after the tap (2026-11-06 07:28 UTC). When the key goes missing, the agent files the claim itself.

World

Four paths, each on film:

  • Approve, production, 2026-11-06 05:06 UTC: "Held 0.5 USDC for your agent." (video 2:34)
  • An old approval sent again, production, 02:59 UTC: "Not approved: this approval is for another hold." (2:49)
  • Cancel, production, 02:59 UTC: "Not approved. Nothing was held or paid." (2:53)
  • A hold above 0.5 USDC with no selfie, staging with the World ID Simulator, 14:13 UTC: "Not approved: this hold needs a selfie check, which World App could not give right now. Nothing was held." (2:46)

World ID sits at the one moment money reaches an agent. The amount is bound into the proof's signal, and a replayed approval is refused in production (video 2:49). A hold of 0.5 USDC or less needs Proof of Human, and a larger hold needs Proof of Human and a Selfie Check in one approval. A person releases the money. The risk World ID answers is the agent's own planner, another web page, or someone at the laptop without the owner's phone asking for more money than its owner meant. What matters is that the same verified human who set the budget approves this exact amount, right now. Proof of Human comes from an Orb-verified person, so the session that sets the budget belongs to one real human, and every later hold has to come from that same human. vet402 reads no name, age, passport or sybil_score. My World App approved vet402's budget and a 1 USDC hold in production on 2026-11-05 at 22:16 UTC. The budget proof carries its amount as the signal, every hold counts against that budget, and in production an approval is the only way money reaches the hold (server/world.ts, covered by the backend tests). On 2026-11-06 production ran a budget at 02:10 UTC, a Replay refusal and a Cancel at 02:11 (filmed again at 02:59), and an approval in World App on my iPhone at 02:18. On the current version, a 0.5 USDC hold approved at 05:06 UTC is filmed from the scan to "Held 0.5 USDC for your agent." Above 0.5 USDC the backend asks for Proof of Human and a Selfie Check in one approval and holds only when World's verify lists the selfie with success true, so a larger hold stays closed until a selfie-checked human approves it (server/world.ts, covered by the backend tests). On this version the production hold on film is 0.5 USDC. Video 2:34, 2:46, 2:49 and 2:53.

Arkiv

With Arkiv, a seller's standing is its expiry: a vet402_seller entity lives 7 days and only a delivered answer extends it. Each ruling Arc makes becomes a vet402_verdict entity anyone can query by the seller's payTo (attribute seller), and vet402 reads them before every payment, so vet402 pauses payments to a seller for 7 days after Arc rules against it. On 2026-11-06 at 03:27 UTC Arkiv held 6 rulings from the final contract. One dispute is one Arkiv transaction: executeBatch writes the payment, seller and evidence entities together, and the evidence entity passes to the buyer that filed the claim ("Arkiv: 1 transaction, 3 entities", 2026-11-06 04:25 UTC). The receipts page reads every receipt entity straight from Arkiv in the browser: 88 payments and 76 settlements on 2026-11-06 at 10:56 UTC. Video 1:51, 2:57, 3:03, 3:11 and 3:14.

Swarm

Anyone can fetch the box from a dispute and check it against the hashes Arc stored at claim time. The four boxes of the 01:42 to 01:44 UTC run went up through my own Bee node, stamped with batch b6455d93…, and a vet402_evidence entity on Arkiv points to each. Seller F's box: https://api.gateway.ethswarm.org/bytes/35f6fbb546122abef6e34da823a2912ea79fd04ae66ddb29ccedd44a011fbd28. Boxes from my Bee node are pinned, and the screen shows how long Swarm keeps each one (claim 0x0cf117a0…: until 2026-12-13). The receipts page itself sits on Swarm behind one fixed feed, bzz://bffd1e6065a6b595d7540e202aac6d7bed3da69ba9abae3530af2eafafec6dd9, which any Bee node opens. The live receipts page is at https://vet402-mumbai-live.vercel.app/receipts.html. Video 3:18.

Each Arc requirement

Wording from https://ethglobal.com/events/mumbai/prizes, read 2026-11-05 at 23:31 UTC. Continuity Track is selected on the Hacker Dashboard.

  • "Take a project you already own and use Arc Studio to add a working Arc integration": vet402, ERC-8004 agent 9907, paid through Gateway on Arc mainnet on 2026-09-28. See Boundary
  • "Nanopayment infrastructure shipped into an existing AI agent or API monetization tool": vet402 is that agent. Added: SealedDelivery, the sealed buy path, a spend hold in its own Gateway balance, one receipt per payment
  • "Include a shareable Arc Studio project URL that judges can open, and show Studio in your demo.": Arc Studio share link https://studio.arc.io/share/arc-testnet-batch-payment-mobile-darg2ucc42 (app id f6f547d3-78ad-4550-9805-8fc08ac65425). Its Netlify build is the front end alone, and the full app with its backend runs at https://vet402-mumbai-live.vercel.app. Studio in the video at 0:56
  • "Projects must demonstrate a working frontend and backend plus an architecture diagram.": The public page, the backend that pays and claims, docs/architecture.png
  • "Write, test, and deploy smart contracts in Arc Studio": Arc Studio wrote the first SealedDelivery and made 5 testnet deployments from its own turns. The final source went into Studio's code editor, forge test in Studio's Terminal passed 246 with 0 failed (236 in the public repo on forge 1.8.3, README Tests), and forge create from that Terminal deployed 0xE9C35ad2caF5D76CA5a5F61ca2256995197C2A4B on 2026-11-06 at 01:35:22 UTC (t), verified on the explorer
  • "demonstrate advanced programmable logic using USDC or EURC, such as conditional flows, onchain automation, or multi-step settlement": USDC at 0x3600000000000000000000000000000000000000. Conditional: claim, then answer, finalize or prove. Multi-step: the verdict credits the buyer, withdrawClaimable pays it out, flushBurn sends the other half to 0x…dEaD, and depositFor returns the refund to Gateway. Automation: the seller's lookout answers claims through Arc Memo by itself
  • "Then connect them to a web or mobile app, new or existing, without leaving Studio.": The whole app source sits in the Studio sandbox, including server/sealedDelivery.ts, which files the claims. Studio's Terminal ran the app's 432 tests with 0 failed (633 on a clean clone of commit dc06b0c on 2026-11-06, README Tests), and Studio's Preview ran a dispute from the public page with its calls listed in Tracing
  • "Conditional escrow with onchain dispute and automatic release": Conditional release of the key, backed by a USDC deposit, with an onchain dispute and an automatic credit to the buyer on silence or fraud. When the 60 s window closes, vet402's agent sends finalize by itself (packages/sealed-delivery/src/buyer.ts), and anyone else may. The payment itself settles straight to the seller
  • "Bonus consideration for contracts designed to be reused by other builders": Ownerless and permissionless: any seller can deposit and sign promises. packages/sealed-delivery gives a seller the middleware, the lookout and claimGuard, in the 4 line README example a test runs
  • "An agent that finds and selects services through the marketplace discovery API": BM25 over all 134 Arc testnet listings, as above, with vet402's own protected seller ranked beside them
  • "Per-use payments with Nanopayments": One Gateway nanopayment per job, each with its own transfer id. Money a dispute wins back returns to the Gateway balance through depositFor
  • "Consumer controls such as spend limits, approvals, and a history of what the agent bought": "Your agent's limit" on the phone (0.001, 0.005 or 0.01 USDC per job, enforced by the server: "Over your limit of 0.001 USDC. Nothing was paid."), one approval card per job, and "What your agent bought" listing each purchase. On the owner's app the money behind it is a hold that only a World ID approval opens (the public page spends from a test hold), and every receipt has a copy on Arkiv
  • "A mobile-first experience a non-crypto user could pick up immediately": On a phone the person types a job in plain words, taps Approve on "May I spend up to 0.001 USDC on this job?" and reads the answer with a plain receipt: "Answer received and checked. You paid 0.001 USDC once." The card names both Circle products in one line, "Found in Circle's Discovery catalog, paid with Arc Nanopayments." vet402 holds the keys, pays the gas and talks to Gateway, so the person only sees amounts and answers. Chain details sit under Details. Video 2:16 on an iPhone
  • "Link to GitHub/Replit repo": https://github.com/kzmttkc/vet402-mumbai

Boundary

  • vet402 on 2026-11-03 (tag mumbai-pre-event-2026): an agent that bought from x402 sellers on ten chains with its own funds, Arc among them, and published every attempt, including the answers that never came.
  • Built at ETHGlobal Mumbai, in the app Arc Studio started: SealedDelivery on Arc testnet and mainnet, the catalog agent, World ID approvals on the owner's app, Arc's rulings on Arkiv and dispute boxes on Swarm.
  • What changes for the buyer: a missing answer used to end as a published measurement, and now the seller's deposit on Arc pays the buyer back.

Pre-event work ends at tag mumbai-pre-event-2026 in kzmttkc/vet402 (343cd0c348bdbb12db61a09e1ca04b621d7fd68e, 2026-11-03 17:27 UTC). The one purchase shown from before the event is Gateway transfer 5a5ba394-146c-4029-b7e4-5f9a4f1668aa, 0.005 USDC, 2026-09-28 05:15 UTC, settled in batch 0x3a78bad401267d8f0914878db7b15e81a27b44637330f619eefef863209d6616 on Arc mainnet. The first event commit is 4c452189d8a3943a46c5257d8bd1da448585f066 (2026-11-05 15:30 UTC). From before the event the repo carries src/existing/arc-gateway.ts, copied from the tag, and the starter app Arc Studio generated at a6e3fa2.

AI use, file by file: the "How I used AI" table in README.md. Every instruction sent to Arc Studio, as sent: prompts/README.md.

In production, and what stays after judging

  1. In production now: since vet402's production deploy at 2026-11-06 16:30 UTC (commit 47ed7c7 in kzmttkc/vet402, https://github.com/kzmttkc/vet402/commit/47ed7c7c2b6503c8f10f12f99d04a5567e615d9d), vet402's production buyer checks its Arc-confirmed rulings on Arkiv before every payment, reusing an answer for up to 10 minutes, and skips a ruled payTo before it reserves money or signs (src/lib/observatory/arkiv-ruling-gate.ts). A dry run with no transfer at 15:00 UTC stopped Seller F's address 0x1401bd7c7fab3fe8a429672fc1c5371456c8445d 3 times out of 3 and let an address with no ruling through 3 times out of 3.
  2. Next: vet402's production buyer, the one that paid through Gateway on Arc mainnet on 2026-09-28, reads coverageFor before it pays a sealing seller and files the claim through packages/sealed-delivery when the key is missing. Done when a payment to a seller whose deposit does not cover the price is refused before any signature.
  3. SealedDelivery stays on Arc testnet and mainnet, ownerless and always on, refunds return to the agent's Gateway balance through depositFor, World ID keeps guarding the hold, and packages/sealed-delivery lets any x402 seller offer the same promise.

One payment. One receipt. Anyone can check it.

How it's Made

I designed SealedDelivery's mechanism: a seller deposit in place of escrow, the double verdict with a burned half, coverageFor before every payment, and the claim's gas repaid at its own price. Arc Studio and Claude Code wrote the code to that design, and every instruction to Arc Studio is in prompts/. Claude Code drives Arc Studio through the arc-studio CLI. SealedDelivery is Solidity 0.8 on OpenZeppelin's ECDSA and EIP712, tested with Foundry (246 passed in Studio's Terminal). The buyer signature is the EIP-3009 authorization Gateway already receives (domain GatewayWalletBatched), so a claim reuses it. Answers are sealed with keccak in counter mode, so prove can decrypt on chain. The backend is Node and Express on Bun, the screen is Vite and React, payments go through @circle-fin/x402-batching, World ID through IDKit with server-side v4 verification, receipts and rulings through @arkiv-network/sdk on Rabdi in one executeBatch per dispute, dispute boxes through @ethersphere/bee-js on my own Bee light node, pinned, and each seller's answer through Arc's Memo contract.

background image mobile

Join the mailing list

Get the latest news and updates

vet402 | ETHGlobal