Domino Market
An autonomous, AI-driven prediction market factory powered by Chainlink CRE and Gemini.
What it is
Domino Market: AI-Powered Autonomous Prediction Markets
What is it?
Domino Market is a next-generation decentralized oracle service that acts as an automated factory for prediction markets. By removing the human bottleneck, the protocol uses artificial intelligence to continuously scan global events and instantly generate logical, tradable markets. It effectively bridges the gap between off-chain AI reasoning and on-chain liquidity.
DEPLOYED LINK -frontend
How it Works
The entire logic is encapsulated in a Chainlink Runtime Environment (CRE) workflow, compiled into a secure WebAssembly (WASM) sandbox for decentralized execution.
- Scheduled Trigger: A CronCapability wakes up the workflow at specific intervals (e.g., every 6 hours).
- Autonomous Ingestion: The workflow utilizes HTTPCapability to securely fetch real-time global headlines from news APIs, bypassing traditional centralized backend vulnerabilities.
- AI Synthesis: These headlines are fed into the Gemini 2.5 Flash model. The AI analyzes the news to find causal links and outputs a structured "Domino Effect" market—for example: "If Tech Stocks rally, will Oil prices surge?".
- Immutable Storage: The market metadata is pinned to IPFS via Pinata, creating a transparent record that cannot be altered.
- Smart Contract Injection: The workflow prepares a final report containing the IPFS CID, which is submitted to the DominoEffectRegistry on the Sepolia testnet, allowing anyone to start trading the new market instantly.
The Problem it Solves
- The "Slow Market" Problem: Traditional prediction markets rely on manual creation, which is slow and often misses the peak interest of a news cycle. Domino Effect generates markets in seconds.
- The Centralization Trap: Most AI dApps rely on a centralized server to call the AI and push data. By using Chainlink CRE, we ensure the AI call and the data processing happen in a verifiable, decentralized environment.
- Trustless Market Logic: Instead of a human deciding what we can bet on, an unbiased AI analyzes data trends to create markets based purely on global event flow.
How it Works
The Architecture
The project is built as a decentralized workflow within the Chainlink Runtime Environment (CRE). Unlike traditional backends, our logic is compiled into WebAssembly (WASM), which allows it to run in a secure, verifiable sandbox across the Chainlink Oracle Network.
The Technical Stack
- Core Logic: Written in TypeScript and powered by the @chainlink/cre-sdk.
- Decentralized Compute: Chainlink CRE serves as the primary engine, executing our code in a trustless environment that eliminates the need for a centralized server.
- Artificial Intelligence: Integrated Gemini 2.5 Flash to perform real-time causal analysis of news headlines and generate structured prediction market data.
- Decentralized Storage: Used IPFS via Pinata to store market metadata, ensuring that once a market is generated, its parameters remain immutable and publicly accessible.
- Smart Contracts: Developed in Solidity (deployed on Sepolia) to serve as the registry and trading engine for the AI-generated markets.
The Security Layer - Sandbox Firewall: We implemented strict Domain Whitelisting within the workflow.yaml to allow safe communication with Reddit, Google Gemini, and Pinata APIs while maintaining sandbox isolation.
- Secrets Management: Sensitive API credentials are never hardcoded; instead, we used runtime.getSecrets to securely map environment variables to the WASM runtime during execution.
- WASM Safety: The workflow is designed using synchronous Capability patterns to ensure execution stability within the Chainlink nodes, preventing asynchronous "traps" or memory leaks.
Development Workflow
- Simulation: We used the cre CLI to simulate the entire lifecycle locally, validating the AI's logic and the IPFS pinning before any on-chain interaction.
- Compilation: The TypeScript source is compiled into a highly optimized WASM binary, ready for deployment to the decentralized oracle network.
Links
Created by
- Krish Sharma