A decentralized prediction market platform built with Next.js, Supabase, and RainbowKit for MetaMask wallet integration.
Head to http://10.40.197.61:3001/ for a working blockchain implementation, since Vercel cannot interface with the server. This link will work when our server is up and running.
- Admin Dashboard: Create prediction markets with custom questions and descriptions
- Shareable Links: Generate unique links for each market to share with participants
- Wallet Integration: Connect with MetaMask using RainbowKit
- Confidence Voting: Vote with confidence levels from 0 to 1 (0% to 100%)
- Real-time Statistics: View live voting results and market statistics
- Auto-resolution: Markets automatically resolve based on weighted vote thresholds
Create a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
# WalletConnect Project ID (optional)
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_id_here- Create a new Supabase project at supabase.com
- Go to the SQL Editor in your Supabase dashboard
- Run the SQL schema from
supabase-schema.sqlto create the necessary tables and functions - Copy your project URL and anon key to the environment variables
npm installnpm run devOpen http://localhost:3000 to see the application.
- Connect your wallet
- Create new prediction markets
- Set resolution thresholds
- Generate shareable links
- Monitor voting progress
- Access markets via shareable links
- Connect wallet to vote
- Vote YES or NO with confidence levels
- Provide optional evidence/reasoning
- View real-time market statistics
The application uses the following main tables:
users: Wallet addresses and user informationprediction_markets: Market details and metadatavotes: Individual votes with confidence levels and evidence
Deploy to Vercel:
npm run buildMake sure to set your environment variables in the Vercel dashboard.
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS
- Database: Supabase (PostgreSQL)
- Wallet: RainbowKit + Wagmi
- Deployment: Vercel