Order book
Order Book Architecture
RocketFi maintains an order book for each instrument, 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. at the end of each block an auction is performed on the order book, matching all users at the fair value price.
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.
Last updated