Mirage Protocol
A privacy-preserving, Sybil-resistant prediction market resolved securely by Chainlink CRE.
What it is
What it is: Mirage Protocol is a decentralized prediction market that prioritizes user privacy and fairness. Unlike traditional platforms where open positions can be front-run or manipulated by whales, Mirage ensures that all predictions remain completely hidden until the market is settled.
How it works: When a user places a bet on a market (e.g., "Will BTC exceed $150k?"), their position is not uploaded publicly. Instead, the protocol locally generates a random salt and securely hashes the user's choice and amount. Only this cryptographic hash is submitted on-chain (Encrypted Commitment). Once the market closes, Mirage triggers our off-chain Chainlink CRE (Confidential Runtime Environment) workflow. The Chainlink Decentralized Oracle Network fetches the real-world outcome via APIs, reaches consensus, and securely settles the market on-chain. Finally, users reveal their local pre-images to claim their proportional winnings.
What problem it solves: Mirage solves two major problems in Web3 prediction markets:
- Sybil Attacks & Fair Play: By integrating World ID, we ensure every participant is a unique human, preventing bot manipulation.
- Information Asymmetry: By using a commit-and-reveal scheme, we hide market sentiment while betting is open, preventing front-running, copy-trading, and whale manipulation.
How it Works
Mirage Protocol is a full-stack Web3 application built on the Ethereum Sepolia Testnet.
- Smart Contracts: Written in Solidity, utilizing a Commit-and-Reveal architecture (
- ShadowMarketV2.sol). We implemented an IdentityGate contract that natively integrates World ID for human verification.
- Oracle & Settlement: We heavily utilized Chainlink CRE (and Chainlink DONs) to execute off-chain JavaScript workflows that securely fetch API data (like CoinGecko) and report the final market resolution back to our SettlementReceiver contract.
- Frontend: Built with Next.js, React, and Tailwind CSS. We use ethers.js for contract interactions and local cryptographic hashing needed for the encrypted commitments.
Links
Created by
- Toygun Tez