Have you ever imagined trading crypto with the speed and efficiency of a centralized exchange’s order book while maintaining the decentralization and complete control of a decentralized exchange? A decentralized order book is a solution that combines the best of both world. So, what is a decentralized order book? What are its advantages over CEX order books or automated market makers? Find out more in the following article.
An order book is an electronic documentation that displays crypto assets’ buying and selling activity on a trading platform. On centralized exchanges (CEX) such as Pintu, Coinbase, and OKX, the order book is centralized and controlled by each platform. On decentralized exchange (DEX) platforms, such as Uniswap, Pancakeswap, and Curve, the order book uses Automated Market Makers (AMMs).
However, each of these order book mechanisms has its drawbacks. In the CEX order book, there is a risk of private keys not being entirely held by users and transparency issues. On the other hand, DEX with AMM overcomes these issues as the user has complete control over the private keys and assets. However, AMMs cannot implement CEX’s order book features such as limit orders, bids and offers, and AMMs have liquidity issues that can impact users.
A decentralized order book comes as a breakthrough to overcome both problems. It aims to combine the advantages of trading on DEX (self-custody and privacy) and CEX (low slippage, efficient pricing, and fast settlement).
A decentralized order book is a trading mechanism where buy and sell orders are filled through a decentralized network of nodes instead of a centralized network. Users can get more competitive prices and transparency with no centralized network.
In addition, its decentralized nature makes it safer from manipulation and potential fraud. With a decentralized order book, users will have more control over their assets and a much better trading experience.
Initially, on-chain decentralized order books were less popular due to several constraints. It starts from the need for high throughput to the relatively high cost compared to AMM systems. However, on-chain decentralized order book systems have recently gained interest. Thanks to layer two scalability solutions with optimistic rollups and ZK rollups technologies that improve performance while lowering costs.
However, the more popular system so far is the hybrid order book. Through this system, the order book process will go through off-chain order matching while settlement remains on the blockchain (on-chain).
Decentralized order books use smart contracts that store and manage order books. When a user creates an order, the smart contract will send a message to the entire network of nodes to add it to the order book.
Then, the smart contract will match the order based on pre-existing rules, which can be based on price or time priority. Once fulfilled, the order is automatically executed, and assets are exchanged between the two parties.
In a fully on-chain order book, order placement, matching, and settlement will be done on-chain. A validator will verify all transactions. Then, the validator will determine the price index. They also input the last trading price from various exchanges through “votes” to the network. Meanwhile, in the off-chain order book, the entire process of transactions, trading, liquidity, and price indexes will be carried out entirely off-chain.
As the name implies, the main difference between the two lies in the network. A decentralized order book network is spread across various nodes, while a single entity controls a centralized order book. In this case, the single entity could be a centralized exchange, broker, and custodian facilitating all transactions.
Here are some other differences between a decentralized order book and a centralized order book
|Features||Decentralized Order Book||Centralized Order Book|
|Network||Controlled by a distributed network of nodes||Controlled by a single entity|
|Security||More resistant to fraud and manipulation||More vulnerable to fraud and manipulation|
|Transparancy||The order book is publicly visible to all users||The order book may not be publicly visible to all users|
|User Control||Users have more control over their assets and trading experience||Users have less control over their assets and trading experience|
|Complexity||More complex to implement and use||Simpler to implement and use|
|Performance||May be slower than centralized order books||Faster than decentralized order books|
|Cost||May be more expensive to use than centralized order books||Less expensive to use than centralized order books|
dYdX is a decentralized exchange (DEX) that allows users to do derivative trading (perpetual and margin), spot trading, and lending. Currently, dYdX is not entirely using a decentralized order book. This is because the order book and matching engine used are still centralized. However, with the system update in dYdX V4, dYdX will become a fully decentralized exchange using a decentralized order book. dYdX does this by creating its blockchain, the dYdX Chain. It was developed using the Cosmos SDK and the Tendermint Proof-of-Stake consensus protocol.
In the future, dYdX V4 will have a fully decentralized, off-chain order book and matching engine that can generate much higher throughput than previous blockchains.
So, all orders and canceled transactions will be transmitted through the network like any other blockchain transaction. Then, the network will match orders in real time, and the resulting trades will be confirmed on the chain periodically. Not only will this result in higher throughput, but the order book will also maintain its level of decentralization.
Another DEX that uses a decentralized order book is Drift Protocol, a DEX built on the Solana network. Similar to dYdX, Drifit Protocol still carries a hybrid system combining off-chain transactions and on-chain settlement.
So, when a user buys or sells using a limit order, for example, the transaction will be sent to the Solana blockchain. This process is referred to as an on-chain order. Then, validators (Keeper Bots) will monitor each limit order and create an off-chain order book structure that categorizes all limit orders based on price, period, and position size. When one of the criteria is met, the Keeper Bots execute it.
As it plays a crucial role, Keeper bots will earn a fee from each executed trade. With the most profitable Keepers being: the fastest, provide the best price for takers, and fulfill orders in the protocol desired sequence (largest and oldest).
With this method, Drift Protocol achieves efficient computation (high throughput and intensive computational are calculated off-chain) while maintaining decentralization (each Keeper Bot keeps a copy of the order book). This should translate to better performance even during periods of network congestion.
An order book is an electronic ledger that documents the buying and selling of crypto assets on a trading platform. On CEX, order books are centralized, while on DEX, AMMs are much more popular. However, both systems have drawbacks; CEX may lack transparency, and AMMs may not support certain features like limit orders.
To address these challenges, the decentralized order book introduces technology that combines the advantages of both approaches: the security and transparency of DEX and the speed and efficiency of CEX. This system is governed by a decentralized network of nodes and smart contracts, ensuring transparent and efficient order processing. Prominent protocols employing the decentralized order book concept include dYdX and Drift Protocol.
Looking to invest in crypto assets? No worries, you can safely and conveniently purchase a wide range of cryptocurrencies such as BTC, ETH, SOL, and others safely and easily on Pintu. Pintu diligently evaluates all its crypto assets, highlighting the significance of being cautious.
Pintu is also compatible with popular wallets such as Metamask to facilitate your transactions. Download Pintu app on Play Store and App Store! Your security is guaranteed because Pintu is regulated and supervised by Bappebti and Kominfo.
Aside from buying and trading crypto assets, you can expand your knowledge about cryptocurrencies through various Pintu Academy articles. Updated weekly, all Pintu Academy articles are made for knowledge and educational purposes, not as financial advice