Introduction
Architecture
How FluxPerp routes orders through GPU matching and Solana settlement.
FluxPerp separates matching from settlement. The matching engine keeps the central limit order book in GPU memory, while the Solana settlement program verifies state transitions for collateral, positions, liquidation, and funding.
System path
- Clients submit signed order intents through REST, WebSocket, SDK, or the UI.
- The matching engine batches compatible orders by market and price level.
- Risk checks validate margin, leverage, reduce-only flags, and liquidation state.
- Net fills are committed to Solana program state.
Main components
| Component | Role |
|---|---|
| Matching engine | Maintains order books and fills taker flow |
| Settlement program | Updates collateral, positions, and liquidation state |
| Oracle layer | Supplies mark prices for margin and funding |
| Public API | Exposes markets, orders, account state, and streams |
Tip
The matching engine optimizes throughput, but user collateral remains governed by Solana program rules.