Inspiration

Fans want a price that depends on the game. Stores can't offer one because a loss would cost them on every sale. A prediction market lets the store hedge that risk the instant someone pays. So we built the checkout.

What it does

A hoodie is $68. Or pay $73.77 now and get $53.77 back if Texas lose. The buyer picks the team and the bad-day price; Clause works out today's price from live Gemini odds, buys the matching contract, and holds the payment in a USDC escrow on Solana. When the market resolves, escrow pays the store and sends the rebate back. Anyone can list an item, and sellers get list price either way. Buyers never see a wallet.

How we built it

Next.js, SQLite. Pricing: W = (B − Lq)/(1 − q), store buys W − L contracts at q, nets B in both outcomes. Solana devnet for every payment, release and rebate as USDC transfers with order memos. Gemini's public API for quotes, authenticated API for orders and resolutions; crypto windows trade for real on the sandbox, sports are paper-hedged and labelled. QuickNode for RPC and a Go Streams filter on the escrow wallet with HMAC-verified webhooks. ElevenLabs reads the result. Grok writes the one-liner at checkout.

Challenges we ran into

Gemini's API was down for an hour, so we added a cache and a snapshot and the UI says which it's on. The sandbox has no sports markets, so we added crypto clauses that fill for real. Two servers with the same keys both tried to settle the same escrow.

Accomplishments that we're proud of

A buy that hedges, resolves, settles on chain and announces itself with nobody touching it. Watched it finish in 15 minutes on a Solana price window.

What we learned

Prediction markets are a hedging primitive. The chain is the easy part; custody and on-ramps are the hard part.

What's next for Clause

On-chain escrow program, embedded wallets and a card on-ramp, a Shopify app, and clauses on anything with a market.

Built With

Share this project:

Updates

Submission history