All projects

VeritasCRE

Decentralized prediction market resolution using CRE multi-source consensus and World ID arbitration

Privacy CRE & AI Prediction Markets World

What it is

VeritasCRE is a Resolution-as-a-Service protocol for prediction markets. It replaces centralized oracle committees (like UMA's token-weighted voting used by
 Polymarket) with automated, multi-source consensus powered by Chainlink CRE workflows.

 The problem: Polymarket relies on UMA's optimistic oracle where token holders vote on outcomes. This creates a capital attack vector — a single whale with 25%
  of UMA tokens can swing the vote and force a wrong outcome. Resolution also takes 2-72 hours.

 How it works: When a prediction market closes, a CRE workflow fires automatically. It fetches data from multiple independent sources (CoinGecko + Binance for
 crypto, ESPN + TheOddsAPI for sports, Gemini 2.5 Flash + NewsAPI for news), cross-validates, and computes a confidence score. The smart contracts then route
 based on confidence:

 - ≥90% — Auto-resolves in seconds, no human intervention
 - 60-89% — Opens a dispute window with a 0.001 ETH bond (game theory disincentivizes frivolous disputes)
 - <60% — Auto-escalates to World ID arbitration where verified humans vote 1-person-1-vote, eliminating whale manipulation

 All paid API keys (Gemini, NewsAPI) are protected via Confidential HTTP — keys are stored in VaultDON and injected inside TEE enclaves, never visible to node
 operators.

How it Works

Smart Contracts (Solidity, Foundry): Four contracts on Sepolia — VeritasCREMarket (market lifecycle), VeritasCREResolverConsumer (CRE report ingestion via KeystoneForwarder), VeritasCREResolverLogic (confidence-based routing engine), and VeritasCREArbitration (World ID-gated voting with nullifier tracking per market).

CRE Workflow (TypeScript): A dual-trigger workflow (EVM log + HTTP) with three category-specific resolvers. The crypto resolver calls CoinGecko and Binance, the sports resolver calls ESPN and TheOddsAPI, and the news resolver uses Gemini 2.5 Flash via ConfidentialHTTPClient for AI-powered analysis with TEE-sealed API keys. Results are ABI-encoded and broadcast on-chain via KeystoneForwarder.

Frontend (Next.js 16, wagmi, RainbowKit, shadcn/ui): Deployed on Vercel at veritascre.vercel.app. Features a live Resolution Flow Simulator that runs the same consensus logic with real API calls, on-chain market detail pages, and a World ID arbitration voting interface using IDKit v4.
Testing: 98 tests across 5 contracts including adversarial scenarios (double voting, unauthorized escalation, frivolous dispute bond forfeiture).

Links

Created by

  • Karan Singh Bisht