Prophet

A prediction Marketplace where you can bet on without worrying about chains using chainlink ccip

Prophet

Created At

ETHGlobal Mumbai

Project Description

The problem: prediction markets live on one chain, so liquidity is split. Someone with funds on Arbitrum has to bridge before they can join a market on Base, and every chain ends up with its own thin pool.

Prophet keeps exactly one pool per market, in a hub contract on Base Sepolia, and lets anyone bet into it from Base, Arbitrum Sepolia or Ethereum Sepolia. A bet from another chain is a single Chainlink CCIP programmable token transfer: the stake and the bet travel together in one message, and the hub records the position when it arrives. There's no separate bridge step, and every bettor sees the same pool and the same odds.

Settlement can't be gamed. After close, anyone can settle a market, and the contract only accepts the first Chainlink Data Feed round published at or after the close time, so nobody gets to pick the price

How it's Made

used solidity 0.8.24 with foundry on chainlink contracts ccip 2.0 , chainlink data feeds and oppenzeppelin 5

Four contracts:

  • PredictionHub (Base Sepolia) holds every market and pool. It's a CCIPReceiver: _ccipReceive checks the source chain and the trusted spoke address, then records a bet or processes a claim.
  • PredictionSpoke (Arbitrum Sepolia, Ethereum Sepolia) turns each bet into a CCIP programmable token transfer: CCIP-BnM as the token, and the action, market, user and side as the data. Fees are paid in native gas, quoted with router.getFee, and any excess is refunded. Messages use GenericExtraArgsV2 with out-of-order execution.
  • Payouts and refunds go back as a second CCIP transfer, with the fee paid in LINK by the hub and gasLimit 0, so the tokens land directly in the user's wallet with no receiver contract needed.
  • FeedRelayer (Arbitrum) and RelayedFeed (Base) carry Chainlink SOL/USD rounds across chains. RelayedFeed implements AggregatorV3Interface, so the hub settles SOL markets exactly like ETH and BTC.

How Chainlink helped: CCIP's programmable token transfers make a cross-chain bet atomic. The money and the instructions arrive together, so the hub never holds tokens without knowing what they're for. Data Feeds give a settlement price no bettor can pick, and CCIP let us bring a feed to a chain that doesn't have one.

background image mobile

Join the mailing list

Get the latest news and updates