All projects

Quantish Oracle

AI-powered cross-platform prediction market resolution on Chainlink CRE

Prediction Markets CRE & AI

What it is

Quantish Oracle is a decentralized prediction market resolution engine built on Chainlink CRE. It solves the oracle problem for prediction markets by aggregating real-time pricing data from three major platforms (Polymarket, Kalshi, and Limitless) and using AI-powered verification for market settlement.

The system consists of three CRE workflows:

  1. Market Creator (HTTP Trigger) - Creates on-chain prediction markets from natural language questions. Any user can submit a question via HTTP, which gets encoded and written to the QuantishOracle smart contract through a DON-signed report.
  2. Price Aggregator (Cron Trigger) - Runs every 5 minutes, reading on-chain market data and calculating cross-platform consensus prices. Detects arbitrage opportunities (>5% spread between platforms) as a signal for market health. Writes aggregated price feeds on-chain via DON consensus.
  3. Market Resolver (Log Trigger) - Listens for SettlementRequested events on-chain. When triggered, it reads the market question from the contract, fetches cross-platform price data, and queries Gemini AI (via OpenRouter) for real-world event verification. The AI uses web search grounding to verify outcomes with factual data. Settlement is written as a DON-signed report with outcome (YES/NO) and confidence score (0-10000).

The QuantishOracle.sol smart contract routes DON reports using prefix bytes: no prefix for market creation, 0x01 for settlement, 0x02 for price feed updates. This allows a single contract to handle all three workflow types.

This addresses a real gap: existing prediction market oracles rely on single-source data feeds. Quantish Oracle cross-verifies across three platforms, adds AI reasoning with search grounding, and provides transparent on-chain price feeds for composability.

How it Works

Built with Chainlink CRE (v1.1.0) using TypeScript workflows compiled to WASM. The stack:

  • CRE SDK (@chainlink/cre-sdk) for workflow logic, DON consensus, and on-chain interactions
  • Solidity (0.8.24) smart contract compiled with Foundry, using OpenZeppelin for access control
  • Gemini 2.0 Flash AI (via OpenRouter) for market outcome verification with web search grounding
  • Quantish Discovery API for cross-platform market data (Polymarket CLOB API, Kalshi via DFlow/Solana, Limitless on Base L2)
  • viem for ABI encoding/decoding within CRE workflows

Each workflow uses different CRE triggers (HTTP, Cron, Log) and capabilities (EVMClient for contract reads/writes, HTTPClient for API calls). The contract implements the IReceiver interface for DON report verification and routes reports based on prefix bytes.

The project builds on Quantish's existing prediction market infrastructure (800+ wallets, $327K volume) to provide real cross-platform data rather than synthetic test data.

Links

Created by

  • Josh