Order book
📘 Order Book Architecture
RocketFi maintains a dedicated order book for each asset, functioning similarly to centralized exchanges. Orders are placed at prices that are integer multiples of the asset’s tick size, and sizes must align with the defined lot size. Matching follows a price-time priority, ensuring fair and efficient execution.
🏛️ Integration with the Clearinghouse
For perpetual markets, all order book operations reference the Rocket Engine, which handles position tracking and margin checks. Margin validation occurs:
When a new order is placed
When a resting order is matched
This dual-check system ensures consistent margin enforcement, even if oracle prices fluctuate after the order is placed.
🧠 Smart Transaction Ordering
A unique feature of the Rocekt Layer 1 is its semantically aware mempool and consensus logic. Transactions interacting with RocketFi’s order books are sorted within each block to optimize execution:
Non-order actions (no GTC or IOC orders)
Cancel actions
Order actions (GTC or IOC)
Within each category, transactions are ordered based on the block proposer’s submission sequence. Modifications are categorized according to the new order they introduce.
Last updated