Lesson 5
Order Books and the XRPL
An efficient order book paves the way for a functional DEX

Order Book Basics
In the last lesson about XRPL’s DEX, we talked a bit about how the XRP ledger uses a central limit order book (CLOB) to trade digital assets. The order book is essentially a list of offers from traders to buy or sell tokens for a specific exchange rate. These orders are then sorted, and if there’s another trader who would be happy to take that deal, the orders will “cross” and the assets will be exchanged. These offers can include XRP, or any of the other issued tokens representing various real-world assets.
The real value of an order book comes when there’s a large volume of traders. Then it becomes very easy to go from assets you have to assets you want for a fair exchange rate. This is often referred to as having “high liquidity” because assets can easily be traded. Exchanges, like central limit order books or automated market makers, form the bedrock of DeFi as a large portion of finance relies on easily being able to trade assets.
Why is trading on the XRPL a little different than on other blockchains?
The order book was built-in from the beginning.
The XRPL was originally built to enable the internet of value – a way to move value as easily as data moves on the internet today. As part of that, XRP was intended to be a “bridge currency” to connect all sorts of real world assets using the built-in central limit order book DEX. In the same way you can translate between most languages by translating through English as an intermediary, as long as you have an exchange rate to XRP, you can trade any two assets using the DEX.
In order to make that work, the DEX had to be very efficient. Since it has been a first class feature since Day 1, there’s been over a decade of optimization to enable the XRPL’s DEX to handle the transaction volume we see today. The XRPL is one of the few chains to use a central limit order book rather than an automated market maker (and is actually in the process of proposing to use both!). Other chains often implement their DEX’s via smart contracts which can make it harder to manage the state and computations involved in operating a central limit order book.
Beyond the order book, why is the XRPL good for DeFi?
The XRPL is fast and cheap.
Low fees and fast transaction settlement are two large benefits of the XRPL’s Consensus Algorithm. Because validators don’t receive rewards from transaction fees, the fees are incredibly low – usually less than a hundredth of a penny. Additionally, since the network does not have to use computation effort to prove trust like in proof-of-work, transactions can settle very quickly (usually in less than 5 seconds).
These fast transaction speeds on the XRPL are a great compliment to the built-in order book for facilitating real-time trading. Higher volumes of trades can pass through the ledger, which is essential for keeping prices up to date, especially during periods of high trading activity.
You can easily trade assets by turning them into tokens.
You can tokenize a new asset on the XRPL with a single transaction. By tokenizing an asset, you gain access to the fast settlement, broad trading options, and low fees the XRPL is known for just by creating an offer against XRP. Auto-bridging, which will be explained in more detail in the next lesson, takes care of the rest. The more different types of assets that we can trade, the more liquidity we have and the more useful the exchange can be.