Two AI agents trade weekend cover
Hermee's agent buys protection, Kip's agent underwrites it. They pay each other over x402 and settle on BNB Chain. Run a real trade below.
Protects a stock holder's weekend. It shops for cover, checks the price against a budget and pays with one signature.
- Wallet
- Signs with
- Binance Agentic Wallet on mainnet · test key on BSC Testnet
- Policies bought
- 0
Built on BNB Agent Studio. Prices cover, sells it over x402, binds it on-chain and settles its own book on Monday.
- Identity
- ERC-8004 agent #2530
- Wallet
- Status
- Earned over x402
- $0.00
Watch one agent pay another
A real trade on BSC Testnet: Hermee's agent buys this weekend's cover from Kip's agent. Every step is an on-chain transaction you can open on BscScan. Test tokens only.
Waking the agents up (free servers can take up to a minute)…
- 1Hermee's agent asks for cover
POST /cover/bindNo payment yet, just the terms: which stock, how much, which floor.
- 2Kip's agent names its price
402 Payment Required · PAYMENT-REQUIREDPriced from 21 years of weekends. The reply says who to pay, how much and in which token.
- 3Guardrails before paying
budget · recipient · asset · networkHermee's agent refuses anything above its owner's budget or different from the offer.
- 4One signature pays
Permit2 witness signature · PAYMENT-SIGNATURENo approve-then-transfer. On mainnet this is `baw x402-payment sign` in the Binance Agentic Wallet.
- 5Settle and bind on-chain
facilitator → x402ExactPermit2Proxy · Kip → coverFor()USDT moves Hermee → Kip, then Kip binds the policy for Hermee and moves the premium into the pool.
- 6Protected
200 OK · PAYMENT-RESPONSEThe policy belongs to Hermee. If Monday opens below the floor, the pool pays Hermee directly.
The x402 handshake
x402 turns HTTP's 402 Payment Required into a real payment. The price comes back with the refusal; the retry carries a signature; the seller settles it on-chain before doing the work. The recipient is fixed inside Hermee's signature, so nobody in the middle can redirect the money.
- 1. POST /cover/bind stock, amount, floor
- 2. 402 · PAYMENT-REQUIRED pay 0.16 USDT to Kip, exact/permit2
- 3. retry · PAYMENT-SIGNATURE Permit2 witness signature
- 4. verify + settle 7 spec checks, then simulate
- 5. x402ExactPermit2Proxy.settle USDT Hermee → Kip
- 6. CoverMarket.coverFor policy for Hermee, premium → pool
- 7. 200 · PAYMENT-RESPONSE policy id + tx hashes
Same code, one switch
The Binance Agentic Wallet only runs on mainnet, so on testnet Hermee's agent signs the identical x402 payload with a test key. Moving to mainnet changes configuration, not code.
| BSC Testnet (live now) | BSC Mainnet | |
|---|---|---|
| Hermee's wallet | local test key (Agentic Wallet has no testnet) | Binance Agentic Wallet (MPC, limits set in the Binance App) |
| x402 facilitator | afterhours.fi stand-in, same verify/settle API | Binance b402 (gas sponsored) |
| Kip's agent | Agent Studio, network = bsc-testnet | Agent Studio, network = bsc-mainnet |
| Payment contract | canonical x402ExactPermit2Proxy | the same contract, same address |
# 1. ask Kip for cover -> HTTP 402 with a PAYMENT-REQUIRED header
curl -si -X POST https://afterhoursfi-kip-backup.onrender.com/cover/bind -d '{"buyer":"<wallet>","token":"<NVDAB>","notionalUsd":"1000000000","barrierBps":500}'
# 2. let the Agentic Wallet price and sign the payment (asks you first)
baw x402-payment preview --paymentRequirements <PAYMENT-REQUIRED> --json
baw x402-payment sign --paymentId <id> --selectedIndex 1 --json
# 3. retry with the signature -> 200 + PAYMENT-RESPONSE (policy id, tx hashes)
curl -s -X POST https://afterhoursfi-kip-backup.onrender.com/cover/bind -H "PAYMENT-SIGNATURE: <paymentHeaderValue>" -d '{..., "quoteId":"<id>"}'Plug in: free MCP tools, paid cover
Any agent (a router, an arbitrage bot, a portfolio agent) can check weekend risk for free before it trades, and buy cover when it matters.
quote_covermarket_statusgap_historypool_healthmy_bookPOST /cover/bindRecent agent trades
No agent trades yet. Start the agents above to create the first one.
How the pricing works