Prediction Terminal - AI-Powered Prediction Market Intelligence
Autonomous system detecting temporary mispricing on prediction markets via AI + Chainlink CRE
What it is
Prediction markets (Kalshi, Polymarket) handle billions in weekly volume with zero professional infrastructure — no technical indicators on probability curves, no algorithmic signal detection, no AI-assisted analysis, no verifiable execution trail.
Vitalik Buterin manually earned $70K on Polymarket using what he called “anti-crazy mode” — betting against irrational crowd extremes. We automate that.
Prediction Terminal is an autonomous pipeline that detects when crowd opinion deviates beyond statistical norms and validates every decision onchain via Chainlink CRE.
Pipeline: Kalshi API → PostgreSQL → Volume Bands → Signal Detection → Claude AI Analysis → CRE DON Consensus → Ethereum Sepolia
The key insight: prediction market prices are opinion streams, not price streams. Each data point = a real human changing their mind. Silence ≠ stability. This changes everything about how volatility analysis works on predictions.
We rebuilt Volume Bands for opinion data: write-on-change (a point recorded only when probability changes, not every second), elastic time windows (period = 20 opinion changes, not 20 minutes), and asymmetric thresholds (+2.0σ/-2.5σ) because panic overshoots harder than euphoria. Active market: 20 opinion changes in 5 minutes → responsive. Quiet market: 20 changes in 3 hours → patient. The bands adapt to market activity, not the clock.
The system operates on two layers that can disagree:
Layer 1 (Math): Volume Bands detect statistical anomalies — temporary mispricing events where the crowd has pushed probability away from its short-term equilibrium.
Layer 2 (AI): Claude Haiku analyzes each signal in full context — is this real mispricing or noise? It evaluates data sufficiency, trend direction, margin of safety, and outputs a confidence score with complete reasoning.
When they disagree, the AI wins. We have recorded instances where the math triggered a signal but Claude refused to trade — citing insufficient data, contradicting trends, and entry at exactly the band threshold with zero margin. Confidence: 35%. Recommendation: HOLD.
Every signal and every AI analysis is recorded on Ethereum as two separate transactions — one for the signal, one for Claude’s full reasoning text. Not a hash. The actual words. Verified through Chainlink CRE DON consensus. No black box — an open book.
Live stats: 3,250+ onchain data points, 152+ signals detected, 118+ AI analyses recorded. All verifiable on Ethereum Sepolia right now.
Live demo: aria-predictions.vercel.app
Demo video: https://www.youtube.com/watch?v=aYW_EH4eRxs
Contract: 0xb2A808BD68E57F97C7fAdfeC6fc3fC094C829593
How it Works
The system consists of four components connected through Chainlink CRE:
Data Collection Layer: A Node.js server on Render polls Kalshi’s production API every second, detecting price changes across 12 NYC temperature contract instruments. Data is stored in PostgreSQL with write-on-change logic — a new data point is recorded only when probability actually changes.
CRE Workflow (two handlers):
• Handler 0 (Cron trigger): Fires every 60 seconds. Fetches latest probabilities, calculates Volume Bands with asymmetric thresholds (+2.0σ entry for sell, -2.5σ entry for buy), detects signals, and writes market data onchain via PredictionTerminal.recordMarketData() and PredictionTerminal.recordSignal().
• Handler 1 (Log trigger — SignalDetected event): When Handler 0 emits a SignalDetected event, Handler 1 automatically fires. It sends the full signal context to Claude Haiku for AI analysis, receives a confidence score and detailed reasoning, then writes the analysis onchain via PredictionTerminal.recordAnalysis().Smart Contract (PredictionTerminal.sol): Deployed on Ethereum Sepolia at 0xb2A808BD68E57F97C7fAdfeC6fc3fC094C829593. Three core functions:
• recordMarketData() — volatility snapshot (MA, upper, lower bands, deviation)
• recordSignal() — signal event with ticker, direction, deviation in σ
• recordAnalysis() — Claude AI reasoning + confidence scoreDashboard (Next.js 14 + Vercel): Real-time visualization with lightweight-charts showing Volume Band overlays, signal arrows on the chart, and clickable popups displaying Claude’s full analysis, confidence score, recommendation, and direct links to both the signal TX and analysis TX on Etherscan.
Stack: TypeScript, Solidity, JavaScript, Node.js, PostgreSQL, Next.js 14, Chainlink CRE, Claude Haiku (Anthropic), Ethereum Sepolia, Kalshi Production API.
Links
Created by
- Anna Aratovskaya
- Maksim Yurchanka