Cap Bet LogoCap Bet Docs

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

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?

Welcome to Cap Bet | Cap Bet Docs