CLOB
GTE onchain Central-Limit Order Book
What is a CLOB?
The order book is an exchange design that resembles traditional finance. For any given asset pair, an order book maintains a bid and ask side – each one being a list of buy and sell orders, respectively. Each order is placed at a different price level, called a limit, and has an order size, which represents the amount of the trade asset that the order wants to buy or sell. Order books use an algorithmic matching engine to match up buy and sell orders, settling the funds of orders that fulfill each other. Most order books use “price-time priority” for their matching engines, meaning that the highest buy offers and lowest sell offers are settled first, followed by the chronological sequence of orders placed at that limit price.
Why build a CLOB?
In markets, traders rely on market makers to provide liquidity. Since asset prices constantly change, market makers need an exchange structure that lets them frequently update their posted liquidity based on their view of prices.
Central limit order books (CLOBs) are the natural place for market makers to provide active liquidity, whereas AMMs only enable passive liquidity providing. ~87% of daily crypto spot trading happens on CEXs (CLOBs) like Binance vs. ~13% on DEXs (AMMs) like Uniswap, especially among blue-chip assets. Traders often prefer centralized exchanges since deeper liquidity from market makers results in less slippage, especially for larger trades.
A fully onchain CLOB was previously impossible to acheive on Ethereum due to high gas fees, latency, and low throughput. As a result, passive liquidity provisioning on an AMM was the only feasible option. Now, with MegaETH, we are able to realize the vision of active liquidity providing on a CLOB. The benefits of onchain active liquidity are huge, including:
- Capital Efficiency: Market makers can provide deep liquidity at specific price levels without relying on an programmatic pricing curve, like in AMMs.
- Price Discovery: Fast block times enable onchain price discovery that rivals that of centralized exchanges.
- LVR Resistance: Loss-versus-rebalancing is a result of price arbitrage between CEXs and passive liquidity on AMMs. Since price discovery is onchain, LVR is greatly reduced.
- Reduced Slippage: Active market making results in tighter spreads and less slippage for traders, especially for larger trades.
How is it fully onchain?
With the high throughput, fast blocks, and low fees on MegaETH, the GTE decentralized order book can be fully onchain. It is cheap enough for market makers to cancel and replace stale orders, which is a necessary part of active liquidity provisioning that caused the main bottleneck for building a crank-less onchain order book. The low latency (1ms block times) on MegaETH also enables fast pricing that is less susceptible to arbitrage from centralized exchanges. With the high throughput and low latency, market makers can provide deep liquidity and tight spreads on GTE’s fully onchain order book.