A look at the role of central limit order book DEXs in DeFi.
A central limit order book (CLOB) is a digital platform or system that facilitates trading financial instruments such as stocks, bonds, commodities or cryptocurrencies. It is a critical component of modern electronic trading and is used by financial exchanges, marketplaces, and trading venues to compare buy and sell orders from various market participants.
A CLOB is a database that organizes and manages incoming buy and sell orders, aggregating orders from different market participants. These orders are time-sequenced, creating an order book reflecting the market’s current supply and demand dynamics.
The CLOB operates based on a continuous trading model, where orders can be submitted and matched in real-time as new orders are received. The CLOB typically supports multiple order types, including limit orders, market orders, stop orders and more, allowing traders to specify their desired price, quantity and time of execution.
When an order is submitted to the CLOB, it is stored in the order book according to its price level and time of submission. A trade occurs if the order matches another existing one, and the transaction details are recorded. The CLOB ensures that the best available prices are displayed to market participants, as it aggregates and sorts orders based on price and time of submission.
One key feature of a CLOB is that it provides transparency to the market. It allows traders to see the market’s current supply and demand levels, including the quantity and prices of buy and sell orders at different price levels. This transparency enables market participants to make informed trading decisions and assess the liquidity of a particular instrument.
Another important aspect of a CLOB is its ability to handle large trading volumes efficiently. Modern electronic markets often experience high levels of trading activity, with numerous orders being submitted, modified or canceled in real-time. The CLOB is designed to handle high order volumes and execute trades quickly and accurately.
Centralized CLOB vs. Decentralized CLOB
Centralized CLOBs (cCLOB) and decentralized CLOBs (dCLOBs) are two different approaches to facilitating trading in the financial markets. Centralized CLOBs are widely used in traditional financial markets.
In a cCLOB, an exchange acts as a central party that receives and matches orders from market participants. The exchange maintains an order book, which records all the buy and sell orders, and executes trades according to predefined rules. The exchange also typically holds custody of the assets being traded and settles trades on behalf of the participants.
On the other hand, in a dCLOB, the order book is decentralized and maintained on a blockchain. As a result, no central party matches orders or settles trades. Instead, participants interact directly with the blockchain and submit their orders to the decentralized order book. Trades are executed through smart contracts based on predefined rules. Participants retain custody of their assets, with settlements done automatically on the blockchain.
DCLOBs are a relatively new concept that emerged with the advent of decentralized finance (DeFi) platforms, where blockchain technology enables peer-to-peer trading without intermediaries.
Dexalot, for example, is a decentralized exchange (DEX) based on Avalanche that employs a dCLOB. The platform includes a discovery tool that uses the dCLOB to generate an auction for a certain amount of time — usually 24 hours — in which matching is disabled, and all participants submit bids and offers.
This lets participants observe supply and demand, and correctly position themselves to control risk deterministically using limit orders.
Dexalot, like cCLOBs, works by keeping a list of buy and sell orders for a specific asset and automatically matching orders to execute transactions. However, it runs on a decentralized network, where transactions are handled and governed by network members instead of centralized exchanges.
What this means for users
Some in the industry believe that decentralization is beneficial to traders. Pei Chen, vice president of growth for smart contract platform Rootstock, told Cointelegraph:
“CLOB DEXs have the potential of shaping the future of crypto exchanges. They contribute to the decentralization and scalability of DeFi by allowing users to trade assets in a peer-to-peer environment without relying on a central authority and by providing more transparency and autonomy over user funds.”
Chen continued, “Given the intense regulations that centralized exchanges are faced today, CLOB DEXs or decentralized CLOBs have a unique opportunity to get ahead by providing a trustless and permissionless environment. That said, a lack of regulatory requirements may also introduce barriers to adoption. It’s still too early for us to draw meaningful conclusions.”
Despite his business’ decentralized model, Tim Shan, chief operating officer of Dexalot, told Cointelegraph that centralized CLOBs “have a significant advantage over decentralized CLOBs” because they are not “bound to the limitations of blockchains.”
However, he added that “users must custody their assets with the CEXs [centralized exchanges], allow the CEXs to use their assets for the exchange’s own benefit, face the risk of front-running, and be aware of the potential for fraud.”
Another key factor between centralized and decentralized CLOBs is the level of control and transparency. In a cCLOB, the exchange controls the order book and can set rules for order matching, pricing and execution.
The exchange may also manipulate the order book or prioritize certain orders over others. However, this also introduces opacity and reliance on trust in the exchange to act fairly and transparently.
On the other hand, in a dCLOB, the order book is transparent and open for anyone to access and verify. Furthermore, the rules for order matching, pricing and execution are encoded in smart contracts, executed autonomously without human intervention. This eliminates the need to trust a central party, providing more transparency and control to participants.
One of the main advantages of cCLOBs is their ability to support large trade sizes with tight pricing. In addition, centralized exchanges often have deep liquidity pools, which can provide better pricing and faster execution for large trades.
CCLOBs also offer more sophisticated order types, such as limit orders, which allow participants to specify a particular price for their trades without slippage. These features make cCLOBs attractive to institutional traders and market makers.
Technology may also be an advantage for CLOB DEXs in particular, according to Shan, who said, “Blockchain technology has advanced recently with innovations such as Avalanche subnets and custom virtual machines, which allow for far better speed and throughput and lower gas fees. We are seeing fully decentralized CLOB DEXs emerge that will significantly improve the DeFi space.”
On the other hand, dCLOBs may face challenges in supporting large trade sizes with tight pricing due to their decentralized nature. The liquidity in dCLOBs is typically provided by individual participants, who may have limited resources and cannot support large trade volumes.
As a result, slippage and price impact may be higher in dCLOBs than cCLOBs, especially for large trades. DCLOBs may also have limited order types and functionalities compared with cCLOBs, which can limit the trading strategies that participants can implement.
AMM vs. CLOB
Automated Market Makers (AMMs) were initially created to address protocol-level issues such as speed, finality, throughput and computational burdens in blockchain transactions. They revolutionized the user experience of trading by introducing a simple single-click transaction process, effectively sweeping an order book. AMMs use a formula that continuously defines the price based on the ratio of two assets. The price changes only when a participant executes a trade and changes the asset amounts in the pool.
AMMs brought about significant improvements from the earlier days of blockchains when transactions were expensive, and placing and canceling orders consumed excessive bandwidth and computational resources.
However, there were trade-offs associated with AMMs. One challenge was creating liquidity, as retail investors provided liquidity by locking up assets in AMM pools for a share of the trading fees. However, this concept, known as liquidity farming, had a drawback called impermanent loss, where the value lost by the liquidity provider occurred when the prices of the assets in the pool diverged. In other words, the fees collected were often insufficient to cover the opportunity lost due to arbitrage trades.
Another complication of AMMs, especially those that use constant product formulas, is the difficulty in creating liquidity that can support large trades with tight pricing. Supporting liquidity in AMMs typically requires a large amount of capital for medium-sized trades; as the trade size increases, the slippage incurred also increases significantly.
In comparison, CLOBs are more capital efficient and offer more tools for trading, such as limit orders with no slippage, orders with modifiers like time-in-force, and direct visibility into available depth, which helps traders manage their activity in a more granular, deterministic way and better estimate risks.
CLOBs also provide better initial and continued price discovery solutions than AMMs. On the other hand, direct AMM listings and liquidity bootstrapping pool (LBP) style listings — common methods for bringing new assets to the market in DeFi — have significant drawbacks.
Direct AMM listings often result in significant price spikes followed by sharp drops due to market manipulation by operators who know how blockchains work. On the other hand, LBPs, which block sellers and only allow buyers to participate in the price discovery process for a while, create an imbalanced market where the buyer demand is depleted, resulting in inflated prices and eventual price drops.
In contrast, CLOBs allow both bids and offers to be present in the order books, making them more suitable for initial and continued price discovery. They can also be adapted for initial price discovery through auction mode in order books, similar to traditional financial markets.