All projects

AutoPulse

Fully autonomous prediction markets using Chainlink CRE and AI agents.

Prediction Markets

What it is

AutoPulse: Autonomous, AI-Powered Prediction Markets
What it is: AutoPulse is a decentralized prediction market platform that introduces a truly "set-and-forget" betting experience. It uses the Chainlink Runtime Environment (CRE) as an autonomous orchestration layer to manage the entire lifecycle of a market—from real-time price monitoring to automated, AI-enhanced settlement—without any human intervention.
The Problem it Solves: Traditional prediction markets suffer from two major friction points:

  1. Manual Resolution: Most markets require a human "oracle" or a manual trigger to resolve, which is slow, expensive, and introduces a single point of failure.
  2. Limited Data Context: Standard markets often rely on simple "Yes/No" price checks. They lack the nuanced "sentiment" or "analysis" that deepens user engagement and provides a more comprehensive view of why a market moved.
    How it Works: AutoPulse operates through three integrated layers:
  • The Orchestration Layer (Chainlink CRE): A TypeScript-based workflow acting as the "autonomic nervous system." On a cron schedule, it queries the smart contract (EVMClient) to identify expired markets, fetches live market metrics (HTTPClient) from external APIs like CoinGecko, and triggers on-chain resolution.
  • The Intelligence Layer (Generative AI): For AI-powered markets, the CRE workflow sends market context to an LLM (Gemini). The AI generates a sentiment score and a natural-language analysis, which is then recorded on-chain during resolution, providing users with verifiable "AI-settled" insights.
  • The Trust Layer (Smart Contracts & Data Feeds): Our Solidity contracts utilize Chainlink Data Feeds (AggregatorV3Interface) for tamper-proof price verification. The contract only allows the authorized aiResolver (the CRE workflow) to submit AI resolutions, ensuring a secure and closed loop of automation.
    Key Technical Highlight: By using Chainlink CRE, we combine Time (Cron), External Data (HTTP), and Blockchain Execution (EVM) into a single, verifiable workflow, eliminating the need for centralized bots or manual keepers.

How it Works

AutoPulse was "vibe coded" using AI agents to rapidly architect a secure, multi-layered automation stack:

  • Smart Contracts (Solidity/Foundry): Robust betting logic on Sepolia using Chainlink Data Feeds for tamper-proof price verification.
  • Orchestration (Chainlink CRE): A TypeScript workflow using the @chainlink/cre-sdk that autonomously monitors contract state (EVMClient) and executes resolutions.
  • AI Intelligence: Real-time market metrics from CoinGecko are processed via the Gemini API within the CRE environment to generate verifiable on-chain sentiment and analysis.
  • Frontend: A premium Next.js 14 dashboard with TailwindCSS and Wagmi/ConnectKit for a seamless, real-time user experience.
    By leveraging AI, I was able to focus on high-level orchestration and security while the agents handled the complex integrations between off-chain data and on-chain execution.

Links

Created by

  • Ulugbek