Skip to main content

Architecture Overview

The on-chain program is the protocol core of Astromarkets — a Solana program written in native Rust.

What exactly is Astromarkets

Astromarkets is a binary (Yes/No) prediction market program on Solana, written in native Rust and deployed standalone with no dependency on external protocols. Anyone can create a tradable on-chain market on "will a future event happen", and users across the network freely buy and sell outcome shares through a central limit order book (CLOB). A single program covers the entire prediction-market lifecycle — market creation → trading → oracle result submission → dispute resolution → settlement & redemption — with every step enforced by on-chain logic, including a fully on-chain order book, requiring trust in no off-chain intermediary.

Design Philosophy

  • Native Rust, no Anchor: hand-written account loading and validation for maximal control over compute budget and account layout, avoiding framework overhead and attack surface;
  • Zero-copy state: core accounts use zero-copy layouts, avoiding deserialization cost;
  • PDA as authority: the market PDA is the signing authority for all vaults and mints; every fund movement is controlled by the program — users cannot bypass it;
  • On-chain auditability: every state change is written to an audit log; off-chain indexers can fully reconstruct market history.

Key Global Constants

Itemmainnetdevnet
Program IDAstroGQSMndgeaAUHtomhSg8x7vkYw7mNxkLbZqbbSjf7zBQywPg3qZrKmohGY6sm9iLT9LQoEDXgYxZAHgH7EJ8
USDC MintEPjFWdd5…TDt1v (official USDC)——————
Taker fee20 bps (0.2%)same
Minimum creation deposit600 USDCsame
Minimum expirynow + 24h——————