What is Decentralized Order Book?

Update 6 Oct 2023 • Reading Time 7 Minute
Image What is Decentralized Order Book?
Reading Time: 7 minutes

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.

Article Summary

  • 🌐 Decentralized order book is a trading mechanism where buy and sell orders will be filled through a decentralized network of nodes instead of a centralized network.
  • ✨ Decentralized order book comes as a solution by combining the security and transparency of DEX and the effectiveness of CEX.
  • ⭐ dYdX and Drift Protocol started adopting the decentralized order book concept. They try to balance off-chain transaction efficiency and on-chain security and transparency.

About Order Book

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).

What is Decentralized Order Book?

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).

How Decentralized Order Book Work

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.

Difference between Centralized and Decentralized Order Book

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

FeaturesDecentralized Order BookCentralized Order Book
NetworkControlled by a distributed network of nodesControlled by a single entity
SecurityMore resistant to fraud and manipulationMore vulnerable to fraud and manipulation
TransparancyThe order book is publicly visible to all usersThe order book may not be publicly visible to all users
User ControlUsers have more control over their assets and trading experienceUsers have less control over their assets and trading experience
ComplexityMore complex to implement and useSimpler to implement and use
PerformanceMay be slower than centralized order booksFaster than decentralized order books
CostMay be more expensive to use than centralized order booksLess expensive to use than centralized order books

Pros and Cons of Decentralized Order Book

Pros of Decentralized Order Book

  • 🔐 Security. Decentralized order books are much safer from the risk of fraud or manipulation attacks. This is because the order book is not controlled by a single entity.
  • ✨ Transparency. All users can view current and past transactions in the decentralized order book. Make it more transparent and fair for all users.
  • 🕹️ Control. Users have complete control over their assets and trading experience using a decentralized order book.

Cons of Decentralized Order Book

  • 🌀 Complexity. Given its decentralized nature, a decentralized order book is much more complex in terms of technology than a centralized order book.
  • ❄️ Performance. Its transactions can be slower than the centralized order book, especially in times of high-volume trading activity.
  • 💸 Cost. Decentralized order books may have more expensive transaction fees. This is due to the gas fee when interacting with the blockchain.

List of Protocols that Use Decentralized Order Book

1. DyDx

Source: Crypto Alpha Vision

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.

Decentralized order book architecture in dYdX V4

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.

2. Drift Protocol

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.

Keepers Bot role in decentralized order book
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.

Conclusion

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.

Buy Crypto Assets on Pintu

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

Reference

Author:Hikma Dirgantara

Rate this article

Your rating will help us improve.

What's not good?

Any suggestions for this article?

Thank you for your review!Close
Failed to send review. Please try again.Close

Share