All projects

Dark Oracle Deployed app: https://dark-oracle-pred-market-176028355587.us-central1.run.app/

ZK-verified prediction markets with Chainlink CRE automated resolution on Base

Prediction Markets World

What it is

Dark Oracle is a trustless prediction market protocol where every market resolution is cryptographically proven correct using Groth16 zero-knowledge proofs and automated end-to-end by Chainlink CRE.
The problem: Existing prediction markets rely on trust — centralized operators (Kalshi), economic incentives (Polymarket), or DAO votes (Augur). All of these can be gamed, delayed, or disputed. There is no way for a user to independently verify that a market outcome matches real-world data.
The solution: Dark Oracle eliminates trust entirely. When a market's resolution date arrives, a Chainlink CRE workflow automatically:

  1. Fetches live data from 3 independent APIs (CoinGecko, Binance, Coinbase) via HTTPClient
  2. Computes consensus — averages valid sources, filters failures, determines outcome
  3. Generates a Groth16 ZK proof binding the market ID, outcome, data sources hash, and timestamp into a 771-constraint circuit on BN254
  4. Signs the report via DON consensus (ECDSA + keccak256)
  5. Writes the proof on-chain to the DarkOracleMarket contract on Base Sepolia, where the Groth16 verifier contract checks it using EVM precompiles (ecAdd, ecMul, ecPairing) for 236,483 gas
    The result: every resolved market has a proof hash stored permanently on-chain that anyone can re-verify at any time. No disputes. No committees. No trust required.
    How users interact:
  • Browse active markets on the dashboard with implied probability prices
  • Create new markets with a question, 3+ data source URLs, and a resolution date
  • Take YES/NO positions using USDC collateral (parimutuel model)
  • After resolution, inspect the ZK proof and re-verify it on-chain with one click
    Deployed app: https://dark-oracle-pred-market-176028355587.us-central1.run.app/

How it Works

Architecture (5 layers):
LayerTechnologyPurposeSmart ContractsSolidity, Foundry, Base SepoliaMarket lifecycle, position management, on-chain Groth16 verificationZK CircuitsCircom 2.1, snarkjs, Groth16/BN254771-constraint circuit proving resolution correctnessCRE Workflow@chainlink/cre-sdk v1.0.9 (TypeScript)Automated resolution: cron trigger, HTTP fetches, consensus, proof generation, DON signing, on-chain writeProver ServiceExpress.js, snarkjsREST API generating Groth16 proofs from circuit inputs (~1.2s per proof)FrontendNext.js 16, React 19, wagmi v2, viem, RainbowKit 2.2, Tailwind v4Dashboard, market creation, Proof Inspector with on-chain re-verification
CRE Workflow capabilities used (7):

  • CronCapability — scheduled market resolution trigger
  • EVMClient.callContract() — read pending markets from contract
  • HTTPClient.sendRequest() — fetch prices from 3 APIs + POST to prover service
  • encodeCallMsg() / bytesToHex() — ABI encode/decode contract calls
  • prepareReportRequest() — create DON-signed report
  • EVMClient.writeReport() — submit verified proof to contract
    Smart contracts (Base Sepolia):
  • DarkOracleMarket — 0xE79Aff29c29D3CfD93e1eF647Ba4220f0e6CF5b2
  • DarkOracleVerifier (Groth16) — 0xF0029EC0836173806b3c26C383C55436b41959BC
  • MockUSDC — 0x1a3065F54a56760aB45499Eb166eE9D3b997fd49
    Deployed app: https://dark-oracle-pred-market-176028355587.us-central1.run.app/

Links

Created by

  • Jamall Winn