Prediction Market — Solana Devnet
Build on a fully on-chain, permissionless prediction market. Native Solana program, TypeScript SDK, and keeper-bot infrastructure for binary markets on devnet.
Get your environment set up and place your first order in minutes.
Get Started →
Page
Description
Overview
What this project is and how it differs from Polymarket
How It Works
Architecture, component roles, and data flow
Quickstart
Deploy the program, create a market, and place your first order
Page
Description
Markets
Binary markets, question hashes, lifecycle states
Prices & Order Book
Price representation, DLOB structure, spread, and crossing
Positions & Tokens
Internal balances, YES/NO tokens, and optional SPL tokenization
Collateral (mock USDC)
Devnet USDC, vault model, and rent economics
Order Lifecycle
Place → fill → cancel → redeem end-to-end
Resolution
Admin resolution, winning outcome, and payout
Page
Description
Overview
SDK packages, installation, and design philosophy
Quickstart
Initialize a connection, fetch markets, and submit an order
Orders
Build, place, cancel, and query orders
Fees
Fill fee flow, keeper incentives, Polymarket / Drift comparison, and roadmap
Outcome Tokens
Split, merge, and opt-in SPL tokenization
WebSocket
Real-time order book updates via OrderSubscriber
Page
Description
Overview
What keeper bots are and why they exist
Getting Started
Configure and run the keeper daemon
Economics
Fill fees, costs, and profitability
Operations
Race handling, WebSocket reliability, and monitoring
Page
Description
Overview
Native Solana program design, p-token CPI savings, and security model
Pinocchio Migration
Upgrade from solana-program to Pinocchio for ~95% CU reduction
Instructions
All 9 instructions with accounts, args, and constraints
Account Structs
Borsh layout for Market, Order, and UserPosition
PDA Seeds
Seed derivation for all program-owned accounts
Solana Upgrade Highlights (May 2026)
Upgrade
Status
Impact on this project
P-Token (SIMD-0266 )
✅ Devnet active, mainnet targeting May 2026
95–98% CU reduction on all vault token transfers; zero code changes required
Pinocchio framework
✅ Available
Rewriting the program with Pinocchio further reduces CU + binary size
Token-2022 Extensions
✅ Mainnet active
Optional for future YES/NO token composability (transfer hooks, metadata)
See Pinocchio Migration Guide to adopt these improvements.
Key Differences from Polymarket
Dimension
Polymarket
This Project
Chain
Polygon
Solana Devnet
Order Book
Centralized CLOB (off-chain)
On-chain DLOB (decentralized)
Order matching
Operator-run
Permissionless keeper bots
Censorship risk
Operator can censor
Any keeper can fill any order
Contract framework
Solidity + Exchange contract
Native Rust Solana program (no Anchor)
Settlement
Polygon Exchange contract
Solana program CPI
Collateral
pUSD (Polygon USDC)
Mock USDC (devnet SPL mint)
Auth
EIP-712 + HMAC
Solana keypair (Ed25519)
Fees
Taker: 0.03–0.07 × feeRate × p×(1−p); maker rebates via treasury
Flat 5 bps fill fee → keeper; no maker/taker fees
Network: Solana Devnet — not for production use.