Inspiration

The price tells you what traders think. The rules tell you who gets paid. We noticed how easily those two things can diverge on prediction markets, especially when settlement depends on obscure contract language, unexpected data sources, or ambiguous rules. On Gemini, Chicago high-temperature markets settle using readings from Midway Airport, not O'Hare, despite O'Hare being the station most people associate with Chicago. When we compared historical outcomes, Midway matched 21 out of 21 settled markets, while O'Hare would have matched only 11. That difference was enough to change the outcome on 41% of days.

We found another example in Gemini's New York weather rules: a missing word left it unclear which version of a National Weather Service report determined settlement. A late correction could move the reported temperature across a settlement threshold and flip the outcome. These details revealed a problem we couldn't stop thinking about: traders spend their time analyzing what might happen, but the contract determines what actually counts. That got us thinking: what if there were an agent that read the fine print before you put your money on the line? We wanted to build an agent that would read the fine print, catch the uncertainty others might overlook, and acquire the evidence needed to investigate it.

What it does

Verity looks beyond the odds. It analyzes live Gemini prediction markets, reads their resolution rules, and assigns each market a settlement-risk score based on four factors: ambiguity, settlement source, liquidity, and correlation with other markets.

How we built it

  • Market data: We pull live data from Gemini's public prediction market API, refresh prices every 15 seconds, and store market history in Supabase through a Cloudflare Worker. Exa and publisher feeds bring in crypto news and recent research alongside each market.
  • Risk analysis: Our deterministic Python rules analyst, verity-rules-v1, scores settlement risk and is also ported to JavaScript to run directly in the browser. Google Gemini provides an advisory second opinion, with Cloudflare Workers AI as a fallback. Neither can override the rules-based score.
  • Payments: We built a separate payment service using x402 and EIP-3009 authorizations for USDC on Arc Testnet. Before signing, the service hashes the exact payment request using keccak-256, while one-time nonces prevent replay. We also implemented an optional Circle Gateway rail for nanopayments and completed a live batch settlement on testnet.
  • Voice approvals: For purchases above $0.50, an ElevenLabs voice agent calls the wallet owner, verifies their identity through a four-digit code, explains the proposed purchase, and requests explicit approval before a wallet signature is requested.
  • Delivery verification: We don't treat a merchant receipt as proof of delivery. Verity hashes the evidence it receives and compares it against the purchase record. Anything that fails verification is excluded from risk reassessment.
  • Onchain reconciliation: QuickNode Streams sends AuthorizationUsed and Transfer events to a webhook. Our reconciler matches each payment to its corresponding delivery using request hashes and nonces, removes duplicates, and flags missing, unpaid, replayed, or mismatched deliveries. We also built a Grok Bot workflow to follow up on overdue deliveries.
  • Stack: TypeScript and Node.js power the payment service and website, while Python handles risk analysis. We used GitHub Actions for end-to-end testing and Cursor throughout development.

Challenges we ran into

  • Rules live in PDFs, vary from market to market, and sometimes leave critical details ambiguous. Our pattern-based analyzer catches known issues, but unfamiliar phrasing still requires contextual interpretation. Finding the right balance between consistent, rules-based scoring and model-assisted interpretation was a challenge.
  • We scanned roughly 1,000 live Gemini markets and found that 61% lacked a real two-sided quote and 87% had never traded. We had to separate markets that were interesting to research from those with enough liquidity to actually act on.
  • Proving that a payment corresponded to the evidence received was harder than we expected, especially with batch settlement, where multiple purchases can share one transaction. We had to build reconciliation around individual request hashes and nonces rather than simply confirming that a transaction succeeded.
  • Our payment infrastructure, analysis engine, and website were evolving simultaneously. End-to-end testing became essential, catching integration issues that could otherwise have broken the demo.

Accomplishments that we're proud of

  • We found real settlement gaps on live markets. Gemini’s “Chicago” high-temperature markets settle at Midway, not O’Hare. Midway matched 21 of 21 settled markets, O’Hare would have matched 11, and the two stations landed in different 2°F buckets on 41% of days over a full year.
  • We caught a New York weather rule with a missing word. Rule 13.111(i)(2) says “only the first published version that includes confirmation of the ___ will be used”, so it’s unclear which NWS report decides the market.
  • After fixing what early rounds exposed, it agreed with an independent rater on 9 of 10 actions for a fresh batch of tradeable markets.
  • We built an agent that can’t run away with the wallet. Every payment is bound to one request, capped, human-gated above a threshold, and verified on delivery and on-chain.
  • We integrated the full stack end to end, including a live Circle Gateway batch settlement on testnet, utilized various tools fulfilling bounties, and stayed upfront about what’s live versus test fixtures.

What we learned

  • The most useful information in a prediction market is often in the contract terms, not the forecast. An agent can spend money safely if the structure is right: tie each payment to one request, cap the spending, bring in a human above a threshold, and verify what comes back. Separating “interesting” markets from “tradeable” ones matters as much as the analysis itself. Being upfront about what’s live and what uses test fixtures made the project easier to explain, not harder.

What's next for Verity

  • Extend beyond pattern rules so new settlement phrasing gets flagged automatically, and expand the hand-scored test set.
  • Support other prediction-market platforms beyond Gemini.
  • Move from Arc Testnet and test fixtures to live merchants and real USDC.
  • Improve settlement verification and reconcile each purchase against its corresponding delivery and flag discrepancies in batched settlements.

Built With

Share this project:

Updates

Submission history