A decentralized prediction market platform built on Uniswap v4 with ENS integration for human-readable market names.
Visit /demo in the frontend to see an interactive walkthrough of all features.
| Contract | Address |
|---|---|
| MarketFactory | 0xC8e9fB7E459F9E684D1416e021C28Ae155151447 |
| PredictionMarketHook | 0xC8AF775a8C11B217581d4850d1d02296C953bAC0 |
┌─────────────────────────────────────────────────────────────────┐
│ USER FLOW │
├─────────────────────────────────────────────────────────────────┤
│ 1. User looks up "btc-100k.predict.eth" │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────┐ │
│ │ ENS RECORDS │ │
│ │ • Pool address │ │
│ │ • Resolution oracle │ │
│ │ • Expiry timestamp │ │
│ │ • Resolution criteria (IPFS) │ │
│ └─────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 2. User places bet against Uniswap v4 pool │
└─────────────────────────────────────────────────────────────────┘
- Node.js 18+
- pnpm 8+
- Foundry
pnpm installcd packages/uniswap-v4
forge buildcd packages/uniswap-v4
forge testpnpm dev- ENS Integration - Text record schema and utilities
- Uniswap v4 Hook - Smart contracts with privacy features
- Frontend - Next.js application
Create a .env file:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id
SEPOLIA_RPC_URL=your_rpc_url
PRIVATE_KEY=your_private_keyDeploy main contracts:
cd packages/uniswap-v4
PRIVATE_KEY=your_key forge script script/Deploy.s.sol --rpc-url $SEPOLIA_RPC_URL --broadcastcd packages/frontend
vercel --prod- Frontend: Next.js 16, React 18, Tailwind CSS
- Web3: wagmi, viem, RainbowKit
- Contracts: Solidity 0.8.26, Foundry
- Protocols: Uniswap v4, ENS
MIT