Order Process
The Lifecycle of a Trade Order
[Orderbook.trade](https://www.orderbook.trade) employs a "Hybrid Off-Chain Matching / On-Chain Settlement" model. This ensures the speed of Web2 (millisecond latency) while maintaining the security of Web3 (non-custodial settlement) .

Detailed Steps
1. Signing
The user (or Agent) constructs an order object containing:
Asset: e.g., "Buy ETH-PERP"
Price: Limit Price
Quantity: Amount
Nonce/Expiry: Replay protection
This object is signed using the user's private key (EIP-712 standard).
Key Benefit: This action is Gasless. Creating an order costs 0 GAS .
2. Submission
The signed order payload is sent to our Matching Engine via a high-performance WebSocket or REST API endpoint.
3. Matching
The Matching Engine processes the order:
Validation: Checks signature and available margin/balance.
Matching: Runs the order against the Central Limit Order Book (CLOB).
If it crosses the spread, it executes immediately (Taker).
If it doesn't, it rests on the book (Maker).
4. Soft Finality
Once matched in the engine's memory, the system sends an execution report back to the user's frontend.
Speed: < 50ms.
UX: The user sees the trade as "Complete" and their balances update instantly in the UI. They can immediately use these funds to trade again.
5. OnChain Settlement
The engine aggregates thousands of matched trades into a compressed batch. This batch is submitted to the on-chain Settlement Contract.
Security: The contract verifies the signatures and mathematically proves the balance changes are valid.
Result: Assets are cryptographically moved on the blockchain. This provides "Hard Finality" and ensures the platform cannot fake trades or steal funds.
Last updated