Transparent, Verifiable, On-Chain. A next-generation prediction market platform built on Solana with full transparency and instant settlements. Every bet, resolution, and payout is verifiable on-chain.
Traditional prediction markets suffer from opacity and trust issues. You never know if odds are manipulated or if your payout will arrive.
PrismaFi changes the game:
- ๐ Full Transparency: Every bet, resolution, and payout is verifiable on-chain
- โก Instant Settlements: Claims settle in <1 second with Solana's speed
- ๐ฐ Ultra-Low Fees: $0.00025 per transaction vs $5-50 on Ethereum
- ๐ Permissionless: Anyone can create markets without gatekeepers
- ๐จ Beautiful UX: Minimalist-brutalist design with real-time updates
๐ Try it now on Solana Devnet
- Install Phantom Wallet
- Switch to Solana Devnet
- Get free SOL from Solana Faucet
- Visit the demo and start trading!
- Create Markets - Anyone can create prediction markets with custom questions
- Binary Betting - Place bets on Yes/NO outcomes with real SOL
- Market Resolution - Market creators resolve with the final outcome
- Claim Winnings - Winners get proportional payouts based on pool distribution
- Real-Time Odds - Live probability updates as bets come in
- Trustless Resolution - Markets automatically resolve using real-world price data from Pyth Network
- Zero Human Intervention - No manual resolution needed, eliminates manipulation risk
- Instant Settlements - Resolves immediately when market expires with latest price feed
- Verifiable Outcomes - Anyone can verify the Pyth price feed used for resolution
- Price Feeds Available:
- ๐ BTC/USD - Bitcoin price markets
- ๐ ETH/USD - Ethereum price markets
- โก SOL/USD - Solana price markets
- ๐ต Stablecoin pairs (USDC, USDT)
- ๐ช Top altcoins (BNB, ADA, MATIC)
- Flexible Conditions - Set markets for price above/below/equals specific thresholds
- Real-Time Price Display - See current Pyth price vs your threshold live on market page
- Auto-Resolve Button - Anyone can trigger resolution after expiry (fully permissionless)
Example Oracle Markets:
- "Will BTC reach $100,000 by Dec 31, 2025?" โ Auto-resolves YES/NO based on Pyth price
- "Will ETH stay above $3,500 for next 24 hours?" โ Trustless verification
- "SOL price above $200 on Jan 1, 2026?" โ Instant settlement at exact time
- Multi-Agent Analysis - Three specialized AI agents working together
- SentimentAgent - Analyzes social media sentiment and community discussions
- DataAgent - Examines historical market patterns and win rates
- StrategyAgent - Recommends optimal position sizing and confidence levels
- Actionable Insights - Get AI reasoning, not just recommendations
- Automatic Resolution - Markets resolve automatically based on real-world price data
- Trustless - No human bias or manipulation possible
- Instant - Resolves immediately after end time
- Verifiable - Anyone can verify the oracle price on-chain
- Price Feeds - Support for BTC/USD, ETH/USD, SOL/USD, and more
- Personal Dashboard - Track all your bets, stats, and P&L in one place
- Global Leaderboard - See top traders ranked by win rate, ROI, and profit
- Activity Feed - Real-time blockchain events (bets, markets, resolutions)
- Public Profiles - View any user's trading history and performance
- Social Sharing - Share markets, profiles, and winning bets on Twitter/X
- Auto-Refresh - All pages update automatically (configurable intervals)
- Manual Controls - Refresh button and pause/resume toggle on every page
- Live Indicators - Visual status showing when data was last updated
- SSR-Compatible - Works with Next.js server-side rendering
- Search Markets - Find markets by question or description
- Category Filter - Browse by Crypto, Sports, Politics, Tech, etc.
- Status Filter - Show active, resolved, or all markets
- Activity Filter - Filter events by type (bets, markets, resolutions)
Frontend:
- Next.js 14 (React 18) - Server & client rendering
- TypeScript 5.0 - Type safety
- Tailwind CSS - Styling
- Lucide Icons - Icon library
Blockchain:
- Solana (Devnet) - L1 blockchain
- Anchor 0.30 - Smart contract framework
- Solana Wallet Adapter - Wallet integration
- @solana/web3.js - Blockchain interactions
Smart Contract:
- Rust - Contract language
- Anchor Framework - Development framework
- UMA-style resolution - Optimistic oracle pattern
- Pyth Network - Price oracle integration
AI Layer:
- Swarms - Multi-agent AI orchestration
- SentimentAgent - Social media analysis
- DataAgent - Historical pattern recognition
- StrategyAgent - Trade recommendations
Oracle Layer:
- Pyth Network - Real-time price feeds
- Automatic resolution - Trustless market settlement
- Multiple price feeds - BTC, ETH, SOL, USDC, and more
Deployment:
- Vercel - Frontend hosting
- Solana Devnet - Smart contract deployment
- Swarms API - AI insights engine
- Pyth Hermes - Price oracle endpoint
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Prediction Market Program โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Instructions: โ
โ โโ initialize() โ
โ โโ create_market() โ
โ โโ place_bet() โ
โ โโ resolve_market() โ
โ โโ claim_winnings() โ
โ โ
โ Accounts: โ
โ โโ GlobalState (singleton) โ
โ โโ Market (per market) โ
โ โโ Bet (per user per market) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Next.js Frontend โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Pages: โ
โ โโ /markets (10s refresh) โ
โ โโ /markets/[id] (5s refresh) โ
โ โโ /dashboard (8s refresh) โ
โ โโ /leaderboard (15s refresh) โ
โ โโ /activity (6s refresh) โ
โ โโ /profile/[wallet] (12s refresh) โ
โ โ
โ Custom Hooks: โ
โ โโ useRealTimeData (polling + state) โ
โ โโ useAnchorWallet (Solana wallet) โ
โ โ
โ Components: โ
โ โโ RealTimeStatus (live indicator) โ
โ โโ BinaryTradingInterface (betting) โ
โ โโ ResolveMarketInterface (creator) โ
โ โโ ClaimWinnings (winners) โ
โ โโ MarketAnalyzer (AI insights) โ
โ โโ ShareProfile/Market/Bet (social) โ
โ โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Swarms AI Layer โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Multi-Agent Orchestration: โ
โ โโ SentimentAgent (social analysis) โ
โ โโ DataAgent (historical patterns) โ
โ โโ StrategyAgent (recommendations) โ
โ โ
โ Output: โ
โ โโ Market sentiment score โ
โ โโ Historical win rate analysis โ
โ โโ Optimal bet size suggestion โ
โ โโ Confidence level + reasoning โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Node.js 18+ and npm
- Rust 1.70+ (for smart contract)
- Solana CLI 1.18+
- Anchor CLI 0.30+
- Phantom or Solflare wallet
git clone https://github.com/Edgadafi/cypherpunk-hackathon2025.git
cd cypherpunk-hackathon2025cd prediction-market
npm install --legacy-peer-deps
cp .env.example .env.localEdit .env.local:
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
NEXT_PUBLIC_PROGRAM_ID=your_deployed_program_idcd ../prediction-market-latam
anchor build
anchor deploy --provider.cluster devnetCopy the deployed program ID to your .env.local file.
cp target/idl/prediction_market.json ../prediction-market/src/idl/cd ../prediction-market
npm run devVisit http://localhost:3000
- Connect your Phantom wallet
- Click "Create Market" button
- Fill in:
- Question (e.g., "Will Bitcoin reach $100k in 2025?")
- Description with resolution criteria
- Category (Crypto, Sports, Politics, etc.)
- End date/time
- Confirm transaction (~0.01 SOL)
- Market goes live immediately!
- Browse markets on
/markets - Click on a market to see details
- Choose Yes or No
- Enter amount in SOL
- Confirm transaction
- Your bet appears in your Dashboard
- Only market creator can resolve
- Navigate to your created market after end time
- Select the winning outcome (Yes or No)
- Confirm resolution transaction
- Winners can now claim their winnings
- Go to market detail page or Dashboard
- If you won, you'll see "Claim Winnings" button
- Click to claim your proportional share
- Winnings transferred to your wallet
- Bet marked as claimed
Creating an Oracle Market:
- Click "Create Market"
- Select "๐ฎ Oracle Market" tab
- Choose asset (BTC/USD, ETH/USD, SOL/USD, etc.)
- Set threshold price (e.g., $100,000 for BTC)
- Choose comparison (Above / Below / Equals)
- Set end date/time when resolution occurs
- Add question and description
- Confirm and deploy
Betting on Oracle Markets:
- Same as standard markets
- See real-time Pyth price updates
- Threshold and current price displayed
- "Would Resolve As" indicator shows prediction
Auto-Resolution:
- After end time, market is ready to resolve
- Anyone can click "Auto-Resolve with Oracle"
- Smart contract fetches Pyth price feed
- Compares price vs threshold using your condition
- Market resolves YES or NO instantly
- Winners claim as usual
Benefits:
- โ No trust in market creator needed
- โ No waiting for manual resolution
- โ Cryptographically verifiable outcome
- โ Zero manipulation risk
- โ Instant settlement
- Total Bets - Number of bets placed
- Active Bets - Unresolved markets
- Win Rate - % of bets won
- Total Wagered - SOL bet across all markets
- Profit/Loss - Net P&L (won - wagered)
- ROI - Return on investment %
- Total Yes/No - Amount bet on each outcome
- Implied Probability - Current odds (Yes%)
- Total Volume - Sum of all bets
- Participants - Unique bettors
- Ranked by total profit (descending)
- Secondary sort by win rate
- Shows top 50 traders
- Updates every 15 seconds
- Core betting functionality
- Market creation & resolution
- User dashboard
- Real-time updates
- Social features
- Leaderboard & activity feed
- Oracle-powered auto-resolution (Pyth Network) ๐
- Advanced charts & analytics
- Notification system
- Mobile app (React Native)
- Email/SMS alerts
- Portfolio tracking
- Scalar Markets - Bet on continuous values
- Liquidity pools & AMM
- Conditional markets ("If A then B")
- Market maker interface
- API for trading bots
- USDC/USDT Support - Bet using stablecoins for price stability
- On-Ramp Integration - Direct fiat-to-crypto (Ramp, Moonpay, Transak)
- Off-Ramp Integration - Convert winnings to fiat
- SPL Token Program - Support for multiple token types
- Migration Path - Seamless transition from SOL-only to multi-token
- Token Selection UI - Choose between SOL, USDC, USDT when betting
- Solana mainnet deployment
- Partnerships with data providers
- Integration with Pyth/Chainlink oracles
- Mobile app launch
- Marketing campaign
- Governance token ($PRISMA)
- Create market with wallet connected
- Place Yes/No bets on different markets
- Verify dashboard shows correct stats
- Resolve market as creator
- Claim winnings as winner
- View leaderboard and activity feed
- Share market/profile on social media
- Test real-time refresh (pause/resume)
# Frontend tests
npm test
# Smart contract tests
anchor testWe welcome contributions! See CONTRIBUTING.md for detailed guidelines.
Quick Start:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript strict mode
- Use Tailwind for styling
- Write meaningful commit messages
- Test on Solana Devnet before PR
- Update documentation for new features
See also:
- ROADMAP.md - Future features and plans
- CHANGELOG.md - Version history
- TROUBLESHOOTING.md - Common issues and solutions
- Devnet Only - Not on mainnet yet (use test SOL)
- SOL-Only Betting - Currently supports only SOL for betting. Stablecoin support (USDC/USDT) planned for v2
- Binary Markets - Scalar markets coming in Phase 3
- Manual Resolution - Creator must manually resolve (automation planned via oracles)
- No Dispute Mechanism - Trust-based resolution (UMA integration planned)
- No On-Ramp/Off-Ramp - Direct fiat-to-crypto conversion not yet integrated
- Automated resolution via Pyth Network oracles โ (Completed)
- Stablecoin Support (USDC/USDT) - Bet using stablecoins instead of SOL
- On-Ramp Integration - Direct fiat-to-crypto via Ramp, Moonpay, etc.
- Off-Ramp Integration - Convert winnings back to fiat
- SPL Token Program Integration - Support for multiple token types
- Dispute mechanism for incorrect resolutions
- Gas optimization for claim transactions
- Improved error messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Solana Foundation - For the amazing blockchain infrastructure
- Anchor Framework - For simplifying smart contract development
- Vercel - For seamless frontend deployment
- Cypherpunk Hackathon 2025 - For the opportunity and inspiration
- Live Demo: https://cypherpunk-hackathon2025-three.vercel.app/
- GitHub: https://github.com/Edgadafi/cypherpunk-hackathon2025
- Twitter: @YourTwitterHandle (coming soon)
- Discord: Join our community (coming soon)
Project: PrismaFi
Team: Edgadafi
Category: DeFi / Prediction Markets
Blockchain: Solana (Devnet)
Demo: Live on Vercel
Made with โค๏ธ for the Solana ecosystem