Orderbook and Limit Orders
In Mach Exchange, users can place limit orders directly through the protocol. These orders are recorded in the orderbook and matched with corresponding buy or sell orders as market conditions meet the specified criteria. This system ensures that trades are executed efficiently and transparently.Understanding the Orderbook
An orderbook is a real-time database of all open orders across the Mach protocol. It contains:- Buy Orders (Bids): Orders to purchase assets at a specific price or better
- Sell Orders (Asks): Orders to sell assets at a specific price or better
- Order Details: Information such as asset pairs, volumes, prices, and timestamps
Limit Orders in Mach
Limit orders allow users to specify the exact price at which they are willing to buy or sell an asset. Key features of Mach’s limit order system include:- Cross-Chain Capability: Place limit orders that execute across different blockchains
- Price Control: Set precise price points for execution, ensuring you never pay more than your specified price
- No Pre-funding: Funds remain in your wallet until the order is ready to execute
- Efficient Matching: Orders are matched in real-time as market conditions change
How Limit Orders Work
- Order Placement: Users sign a transaction that grants the smart contract permission to interact with their assets at a specific price point
- Orderbook Entry: The order is recorded in the orderbook without moving funds
- Match Finding: The protocol continuously searches for matching orders
- Execution: When a match is found at or better than the specified price, the funds are pulled and the swap is executed
- Settlement: The entire process is completed in a single block once matched
Benefits of the Limit Order System
Mach’s limit order system provides several advantages:- User Control: Users have precise control over execution prices
- Reduced Slippage: Avoid price impact by setting exact execution parameters
- Passive Trading: Set your desired price and let the market come to you
- Capital Efficiency: No need to lock up funds until execution
- Cross-Chain Flexibility: Execute limit orders across any supported blockchain network