Welcome to Cap Bet
Developer documentation for building on Solana's premier peer-to-peer betting platform
Welcome to Cap Bet Developer Documentation
Cap Bet is a production-ready, decentralized peer-to-peer betting platform built on Solana with oracle resolution, challenge mechanisms, and comprehensive testing.
Quick Start
Getting Started
Learn the basics and set up your development environment
API Reference
Explore our REST API endpoints and authentication
Smart Contracts
Interact with our Anchor programs on Solana
Bot Integration
Build automated betting bots and integrations
Key Features
- Peer-to-Peer Betting: Direct betting between users with escrow
- Oracle Resolution: Automated bet resolution with challenge mechanism
- Partial Matching: Bet amounts can be partially filled
- Type-Safe APIs: End-to-end type safety from contracts to frontend
- Real-time Updates: WebSocket support for live bet data
Tech Stack
- Blockchain: Solana + Anchor Framework (Rust)
- Runtime: Bun
- Backend: Hono + oRPC (type-safe APIs)
- Database: PostgreSQL + Drizzle ORM
- Smart Contract: Program ID
13vTbpPE73XtVZ9AxWQMDdasp3M3LXKMMiujqPZvxbkD
Program Overview
The Cap Bet smart contract includes 15 instructions covering the complete betting lifecycle:
- Market creation and management
- Position taking and matching
- Oracle resolution with challenges
- Manual resolution with dispute handling
- Fund withdrawal and cleanup
Need Help?
- Join our Discord
- Check out our GitHub
- Read the Getting Started Guide