PredictStack is a decentralized prediction market protocol built on the Stacks blockchain that enables anyone to create, trade, and resolve markets on future events with Bitcoin-level security and settlement assurance.
PredictStack allows users to:
- Create prediction markets on any verifiable outcome
- Trade positions using STX tokens
- Earn rewards for correct predictions
- Participate in oracle validation for honest outcome resolution
- Enjoy the security of Bitcoin settlement through Stacks
Anyone can create a prediction market by defining the question, possible outcomes, and resolution criteria. Market creation requires a small STX deposit to ensure quality and prevent spam.
All trading positions are managed through Clarity smart contracts, ensuring transparent, non-custodial trading with no centralized intermediary.
Market outcomes are determined through a decentralized oracle system, where validators stake STX to attest to real-world outcomes, with economic incentives to report truthfully.
By leveraging the Stacks blockchain, all market activity inherits the security and finality of Bitcoin, making PredictStack more secure than prediction markets on other chains.
Once a market resolves, winners receive their rewards automatically through smart contract execution, with no need for manual claims or withdrawals.
PredictStack consists of several key components:
- Market Factory Contract: Creates and initializes new prediction markets
- Market Contract: Handles trading, positions, and fund management for individual markets
- Oracle Contract: Manages the resolution process through validator consensus
- Treasury Contract: Handles protocol fees and incentives for ecosystem participants
├── contracts/
│ ├── market-factory.clar # Creates new prediction markets
│ ├── market.clar # Individual market logic
│ ├── oracle-manager.clar # Manages oracle validation process
│ ├── treasury.clar # Fee management and distribution
│ └── lib/
│ ├── traits.clar # Common contract traits
│ └── errors.clar # Standardized error codes
- Market Creation: A creator defines a market question, outcome options, and deadline
- Trading Period: Users buy and sell outcome shares, with prices fluctuating based on market activity
- Resolution: After the event occurs, oracle validators submit and verify the actual outcome
- Settlement: Smart contracts automatically distribute rewards to users who predicted correctly
PredictStack uses a decentralized oracle system with economic incentives:
- Validators stake STX to participate in outcome verification
- Multiple independent validators must reach consensus on outcomes
- Validators who report dishonestly lose their stakes
- Honest validators earn a portion of market fees
- Political elections
- Sports outcomes
- Financial markets predictions
- Weather forecasts
- Technology product launches
- Entertainment (awards, movie performances)
- Scientific breakthroughs
# Clone repository
git clone https://github.com/adenikeakan/predict-stack
# Install dependencies
npm install
# Run tests
npm test
# Deploy contracts (requires Clarinet)
clarinet consoleThis project is licensed under the MIT License - see the LICENSE file for details.