YichengYang-Ethan/oracle3-prediction-market-agent

Oracle3: open-source trading engine and MCP server for prediction markets. Finds fee-adjusted no-arbitrage violations across related event contracts and trades them live on Kalshi, Polymarket and Solana, or on paper, under pre-trade risk limits. 13 MCP tools, JSON CLI, agent skills, 600+ tests.

What it solves

Oracle3 addresses the inefficiency of prediction markets where related contracts often have prices that violate the axioms of probability (e.g., if Event A implies Event B, then A should not be more expensive than B). It identifies these pricing gaps across different venues—such as Kalshi, Polymarket, and Solana—and calculates whether the profit from these arbitrage opportunities survives the taker fees charged by the exchanges.

How it works

The system operates through three primary components:

  1. Relation Mapping: It tracks logical relationships between markets, such as implication, exclusivity, and complements.
  2. Constraint Checking: It monitors live quotes and applies venue-specific fee schedules to determine the net edge of a potential trade basket.
  3. Execution Engine: It executes trades (live or on paper) using a variety of strategies, including constraint-based arbitrage, statistical arbitrage, and model-driven fair-value divergence, all while enforcing pre-trade risk limits and a kill switch.

For AI agents, it provides a Model Context Protocol (MCP) server with 13 tools that allow agents to search markets, check constraints, and manage a paper trading ledger.

Who it’s for

It is designed for quantitative traders, researchers, and AI agent developers who want to automate arbitrage and pricing strategies in prediction markets.

Highlights

  • Multi-Venue Support: Trades live on Kalshi, Polymarket, and Solana.
  • Agent-Native: Includes a full MCP server and predefined agent skills for data discovery and strategy authoring.
  • Fee-Aware: Specifically calculates break-even violations based on venue-specific fee schedules.
  • Risk Management: Features built-in position, drawdown, and exposure limits.
  • Academic Grounding: Uses a pricing model based on the Wang transform calibrated against over 290,000 resolved contracts.

Related

  • Project
  • Project
  • Project
  • Project