Decentralized Pop Culture Prediction Markets on Stacks Blockchain
PopPredict is a decentralized prediction market platform for pop culture events, built on the Stacks blockchain. Users can create markets, place bets on outcomes, and earn STX tokens based on their predictions. The platform features achievement NFTs that track user performance and milestone achievements.
- 🎲 Parimutuel Betting - Pool-based betting with dynamic odds
- 🏆 Achievement NFTs - Soulbound tokens for tracking milestones
- 🔐 Decentralized - Powered by Clarity 4 smart contracts
- 💜 Stacks Native - Built on Bitcoin's Layer 2
- ⚡ Real-time Markets - Live odds and market updates
- 🎨 Modern UI - Beautiful Next.js frontend
Pop-predict/
├── pop-predict-smart-contract/ # Clarity smart contracts
│ ├── contracts/
│ │ ├── contracts.clar # Main prediction market contract
│ │ └── achievement-nft.clar # SIP-009 NFT contract
│ ├── tests/ # Contract tests
│ ├── deployments/ # Deployment configurations
│ ├── settings/ # Network settings
│ ├── CONTRACT_README.md # Contract documentation
│ ├── CLARITY4_GUIDE.md # Clarity 4 features guide
│ └── DEPLOYMENT.md # Deployment details
│
└── pop-predict-frontend/ # Next.js web application
├── app/ # Next.js 15 app directory
├── components/ # React components (coming soon)
├── lib/ # Utilities and helpers
├── public/ # Static assets
└── package.json # Dependencies
- Node.js v18+ and pnpm
- Clarinet v3.11.0+
- Leather Wallet or Hiro Wallet
- Testnet STX tokens (get from faucet)
git clone https://github.com/yourusername/Pop-predict.git
cd Pop-predictcd pop-predict-smart-contract
# Check contracts
clarinet check
# Run tests
npm install
npm test
# Deploy to testnet (configure settings/Testnet.toml first)
clarinet deployments generate --testnet --medium-cost
clarinet deployments apply -p deployments/default.testnet-plan.yamlcd ../pop-predict-frontend
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Open http://localhost:3000| Contract | Address | Explorer |
|---|---|---|
| pop-predict | STVQ61FEWR6M4HVAT3BNE07D4BNW6A1C2BKDND68.pop-predict |
View |
| achievement-nft | STVQ61FEWR6M4HVAT3BNE07D4BNW6A1C2BKDND68.achievement-nft |
View |
pop-predict.clar:
- Create binary or multi-outcome prediction markets
- Place stakes between 1-100 STX
- Oracle-based market resolution
- Parimutuel odds calculation
- 3% platform fee
- Event logging with timestamps
achievement-nft.clar:
- SIP-009 compliant NFT standard
- Soulbound tokens (non-transferable)
- Automatic milestone minting
- User stat tracking (predictions, wins, earnings)
For detailed contract documentation, see CONTRACT_README.md
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS with custom Stacks theme
- Blockchain: Stacks.js for wallet integration
- State Management: React Context + Hooks
- UI Components: Radix UI (coming soon)
- Forms: React Hook Form + Zod validation
/- Homepage with featured markets/markets- Browse all prediction markets/market/[id]- Market detail and betting interface/portfolio- User's active stakes and history/achievements- NFT achievement gallery/create- Create new prediction market
cd pop-predict-smart-contract
# Run console for testing
clarinet console
# Check for errors
clarinet check
# Run unit tests
npm testcd pop-predict-frontend
# Development
pnpm dev
# Build
pnpm build
# Production
pnpm start
# Linting
pnpm lintcd pop-predict-smart-contract
npm testTests cover:
- Market creation and validation
- Stake placement and tracking
- Parimutuel odds calculation
- Market resolution and winnings distribution
- NFT minting and stat tracking
- Edge cases and error handling
cd pop-predict-frontend
pnpm test- Contract Documentation - Complete smart contract API reference
- Clarity 4 Guide - Clarity 4 features and migration
- Deployment Guide - Testnet/mainnet deployment instructions
- API Documentation - Frontend integration guide (coming soon)
- Core smart contracts (prediction market + NFTs)
- Clarity 4 implementation
- Testnet deployment
- Frontend theme and design system
- Basic UI components
- Wallet integration
- Market browsing and filtering
- Betting interface
- Portfolio dashboard
- Achievement gallery
- Market creation UI
- Advanced market types
- Liquidity pools
- Governance token
- Mobile app
- Mainnet deployment
- Multi-oracle support
- Cross-chain bridge
- API for third-party integrations
- Advanced analytics
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Write tests for new features
- Update documentation
- Keep commits atomic and descriptive
- Complete security audit
- Extensive testing
- Bug bounty program
- Community review
- Mainnet readiness
Found a security vulnerability? Please email security@poppredict.app instead of opening a public issue.
This project is licensed under the MIT License - see the LICENSE file for details.
- Stacks Foundation - Blockchain infrastructure
- Hiro - Developer tools and Clarinet
- Next.js - React framework
- Tailwind CSS - Styling
- Website: poppredict.app
- Twitter: @PopPredict
- Discord: Join our community
- Email: hello@poppredict.app