Architecture Overview
The on-chain program is the protocol core of Astromarkets â a Solana program written in native Rust.
Account Model (PDA System)
All market assets are held in program-derived accounts; the market PDA is the sole authority over the vaults and mints.
Price & Precision Model
Units
Market State Machine
States
Matching Engine & Cross Matching
The matching engine is the core of Astromarkets: an order book built on red-black trees, extended with cross-matching semantics for prediction markets.
Oracle Integration (Switchboard)
Astromarkets uses Switchboard (Surge / Pull Feed) as its result data source.
Economics & Incentives
Every mechanism serves an explicit game-theoretic purpose: make honesty profitable and misbehavior costly.