Submission for the Tether Frontier Hackathon Track (Solana side track) on Superteam Earn.
pact pay gives an agent's x402 API call a refund guarantee, with the money moving as USDT on Solana out of a Tether WDK wallet. An AI agent runs pact pay <endpoint> instead of paying the API directly: its self-custodial WDK Solana wallet pays the call's price plus a small premium into a Pact coverage pool, Pact's facilitator makes the upstream call, a classifier grades the response, and if the call failed or the body is garbage, Pact refunds principal + premium in USDT to the agent's wallet. Pact only keeps the premium when the call worked. Nothing in WDK or in the upstream API changes.
| Path | What |
|---|---|
SUBMISSION.md |
The full writeup — problem, what we built, how it works, why it fits the Tether track, what's real vs simulated, how to run, roadmap, links. Start here. |
cli/ |
The pact pay × Tether WDK wrapper CLI + demo.sh. Node 20+. See cli/SPEC.md for the interface, JSON-shape, and honesty contract — that's canonical; this README and SUBMISSION.md don't duplicate it. |
server/ |
A bundled zero-dep reference x402 resource server on :8402 — real 402 challenges in the Solana-devnet shape. Exists so the demo runs offline; set X402_BASE to point the CLI elsewhere. |
dashboard/ |
A static one-page dashboard of the calls Pact has covered (settled / refunded / premium earned), with the WDK agent wallet per row. |
VIDEO-SCRIPT.md |
~90s demo-video script — shot list + voiceover. |
PARTNERSHIP-ONEPAGER.md |
Standalone pitch to the Tether / WDK team. |
PLAN.md |
The build plan and status — what's done, what's stubbed, open items. |
Node 20+.
cd cli
npm install # pulls @tetherto/wdk-wallet-solana
./demo.sh # baseline-success → baseline-FAIL → wrapped-success → wrapped-FAIL, ~40s
# single calls (endpoints: quote, weather, raw url)
node bin/pact-tether.js -v call quote SOL # baseline — WDK agent pays directly, eats USDT on failure
node bin/pact-tether.js -v pact pay quote SOL # wrapped — Pact covers it, success path
node bin/pact-tether.js -v --force-fail pact pay quote SOL # wrapped — induced failure, Pact refunds principal + premiumAdd --json for the machine-readable row only; --live-devnet attempts the real WDK SPL transfer on devnet (needs a funded keypair + a dUSDT mint — see cli/SPEC.md §7). The dashboard is a static page in dashboard/ — open index.html or serve the directory, then point it at cli/pact-tether-calls.jsonl to run it live (see dashboard/README.md).
- WDK Solana wallet: real, and used.
cli/lib/wdk.jswraps@tetherto/wdk-wallet-solana— keypair derivation, address, transaction signing, SPL transfers. Rows carrywdkReal: truewhen it loaded; a labelled ed25519 fallback if it can't, but it tries the real one first. - The Solana x402 payment-proof binding: our code. WDK's x402 glue is EVM-only; there's no Solana x402 signer in WDK. The
402→ proof → retry binding incli/lib/x402.jsis ours, on top of the WDK Solana wallet. Not "WDK x402 on Solana." - The devnet "USDT": a mock SPL mint, labelled
dUSDT (devnet mock). Tether issues no devnet USDT. Also: there is no "USDT0" SPL token on Solana — USDT0 is EVM-family; the Oct-2025 "USDT0 on Solana" news is the Legacy Mesh making the existing native USDT SPL mint part of the omnichain liquidity, not a new token. Mainnet would use the native USDT mint; devnet uses the labelled mock. We never print "USDT0 token on Solana." - The WDK Solana SPL transfer: real on devnet with a funded keypair + RPC; otherwise simulated and labelled (
paymentSimulated: true).demo.shruns simulated by default for reproducibility. - The Pact coverage settlement on Solana: simulated and labelled (
settlementSimulated: true, b58 tx ids,(simulated)explorer links). Pact's live program settles USDC; a USDT pool needs a protocol redeploy (config change, not code) — out of scope here. The settlement maths (premium formula, principal+premium refund, Pact-nets-$0-on-failure) is real; only the chain I/O is faked. Swap points:cli/SPEC.md §7.
Full detail and the reviewer-facing version of all of this is in SUBMISSION.md and cli/SPEC.md.
- Pact Network: https://pactnetwork.io · mainnet program
5bCJcdWdK...[TODO: full program id] (Solana) - Tether Wallet Development Kit: https://wdk.tether.io
- x402: https://x402.org
- Demo video: [TODO: link]