0xCast is a decentralized prediction market platform built on Stacks, allowing users to create and trade on binary outcome markets using STX.
0xCast leverages the power of the Stacks blockchain and Clarity smart contracts to create a trustless, transparent prediction market protocol. Users can create markets on any binary outcome event, purchase shares representing their predictions, and claim winnings when markets resolve.
- Decentralized Market Creation: Anyone can create prediction markets for binary outcome events
- Multi-Outcome Markets: Support for markets with 3-10 possible outcomes, not just binary
- STX-Based Trading: All trades are conducted using STX tokens
- Dynamic Odds Calculation: Real-time odds based on pool distribution
- Transparent Resolution: Market outcomes are resolved on-chain with full transparency
- Automated Payouts: Winners automatically claim their rewards through smart contracts
- Liquidity Pools: AMM-based liquidity provision with LP rewards
- Governance System: On-chain governance with proposals and voting
- Oracle Integration: External data feeds for automated market resolution
- Built on Stacks: Leverages Bitcoin's security through Stacks' Proof of Transfer consensus
- Progressive Web App: Install on mobile and desktop with offline support
- Mobile Optimized: Touch-friendly interface with pull-to-refresh and bottom navigation
0xCast is a fully-featured PWA that works offline and can be installed on your device.
- Install on mobile and desktop
- Offline support with cached data
- Background sync for pending transactions
- Push notifications (coming soon)
- Pull-to-refresh on mobile
- Touch-optimized interface
Desktop:
- Look for the install icon in your browser's address bar
- Click "Install" to add 0xCast to your applications
Mobile:
- Open in your mobile browser
- Tap the menu or share icon
- Select "Add to Home Screen" or "Install App"
When offline, you can:
- View cached markets
- Browse your positions
- Queue transactions (will sync when online)
Pending transactions will automatically sync when you reconnect.
0xCast now supports markets with 3-10 possible outcomes!
- Choose 3-10 unique outcomes
- Each outcome tracked separately
- Proportional payout based on winning outcome
- "Who will win the championship?" (Multiple teams)
- "What price range will BTC be?" (Multiple ranges)
- "Which project will launch first?" (Multiple projects)
- Contract:
market-multi.clar - Maximum outcomes: 10
- Minimum outcomes: 3
- Payout calculation: Proportional to total pool
0xCast/
├── contracts/ # Clarity smart contracts
├── tests/ # Contract test files
├── settings/ # Network configuration files
│ ├── Devnet.toml # Local development network
│ ├── Testnet.toml # Stacks testnet configuration
│ └── Mainnet.toml # Stacks mainnet configuration
├── Clarinet.toml # Clarinet project configuration
└── README.md # This file
- Clarinet - Clarity development environment
- Node.js and npm (for testing)
- Clone the repository:
cd /Users/macosbigsur/Documents/Code/Stacks-project/0xCast- Verify Clarinet installation:
clarinet --versionCreate a new contract:
clarinet contract new <contract-name>Check contract syntax:
clarinet checkRun tests:
clarinet testStart local console:
clarinet console0xCast includes comprehensive scripts for generating economic activity across all platform features.
# Market Operations (Binary)
npm run bulk-markets # Create multiple markets
npm run auto-trade # Automated trading
npm run lifecycle # Full market lifecycle
npm run stress-test # Performance testing
npm run analytics # Analytics reports
# Liquidity Pool Operations
npm run liquidity # Create/manage liquidity pools
# Governance Operations
npm run governance # Create proposals, vote, execute
# Multi-Outcome Markets
npm run multi-market # Create and trade on multi-outcome markets
# Oracle Operations
npm run oracle # Submit price feeds and event data# Create 5 markets across different categories
npm run bulk-markets
# Add liquidity to markets
npm run liquidity
# Run automated trading
npm run auto-trade
# View analytics
npm run analyticsFor detailed usage instructions, see Economic Transaction Guide.
- Update your mnemonic in
settings/Testnet.toml - Deploy to testnet:
clarinet deployments generate --testnet
clarinet deployments apply --testnet- Update your mnemonic in
settings/Mainnet.toml - Deploy to mainnet:
clarinet deployments generate --mainnet
clarinet deployments apply --mainnet
⚠️ Warning: Ensure you have sufficient STX for deployment fees and thoroughly test on testnet before mainnet deployment.
- Blockchain: Stacks
- Smart Contract Language: Clarity
- Development Framework: Clarinet
- Testing: Vitest
- Core prediction market contract
- Market creation and management
- Share trading mechanism
- Market resolution system
- Frontend dApp interface
- Oracle integration
- Governance features
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
For questions and support, please open an issue in the repository.