All projects

MetaPredict

AI-powered prediction market about prediction markets, settled via Chainlink CRE

CRE & AI Prediction Markets Tenderly

What it is

MetaPredict is a meta prediction market platform where users create and bet on questions about prediction market platforms themselves — like Polymarket, Kalshi, and Azuro.
Example markets: "Will Polymarket launch their own token before 2027?", "Which prediction market will launch a token first?", "Will Polymarket weekly volume exceed 1 billion USD?"
What makes MetaPredict unique is its automated settlement system. When a market's deadline passes, anyone can trigger settlement. A Chainlink CRE workflow then:

  1. Listens for the SettlementRequested event via EVM Log Trigger
  2. Reads market data (question, options, resolution source) from the smart contract
  3. Based on the resolution source, fetches real-time data from Polymarket Gamma API (events, markets, volume, liquidity) and/or Kalshi API (markets, trades, open interest)
  4. Sends all collected data to Google Gemini AI via OpenRouter for analysis
  5. The AI determines the winning outcome, and a signed report settles the market onchain
    The platform features smart resolution source routing — different market types use different data sources. Data-driven questions (like trading volume) fetch from platform APIs, while news-based questions (like token launches) use AI web search. This makes the system flexible enough to handle any prediction market industry question.
    Users interact through a Next.js frontend where they can create markets (binary or multi-choice), place USDC predictions, request settlement, and claim winnings. The smart contract is deployed on Base Sepolia and tested on a Tenderly Virtual TestNet (Base mainnet fork) with real USDC contracts.

How it Works

  • Smart Contract: Solidity, deployed on Base Sepolia using Foundry. Handles market creation (binary & multi-choice), USDC predictions, CRE-powered settlement via onReport, and winner payouts.
  • CRE Workflow: TypeScript workflow with EVM Log Trigger, EVM Read/Write, and HTTP Fetch capabilities. Fetches data from 4 API endpoints (Polymarket events, Polymarket markets, Kalshi markets, Kalshi trades) and sends to Google Gemini AI via OpenRouter for settlement analysis.
  • Resolution Source Routing: The workflow dynamically routes to different data sources based on the market's resolutionSource field — supporting polymarket_volume, kalshi_markets, polymarket_kalshi_data, and ai_search modes.
  • Frontend: Next.js 14 with App Router, wagmi v2, RainbowKit for wallet connection, Tailwind CSS with dark cyberpunk theme. Features market creation, prediction placement, settlement status tracking, and winnings claims.
  • Testing: Deployed and tested on Tenderly Virtual TestNet (Base mainnet fork) with real mainnet USDC contract, validating the full flow against production state.

Links

Created by

  • Argon Stark