The XRP Ledger has a decentralized exchange built directly into the protocol. No smart contracts, no external programs - just native trading at the ledger level.
The XRPL DEX has been operating continuously since the XRP Ledger launched in 2012. Unlike Ethereum or Solana DEXs that rely on deployed smart contracts, the XRPL DEX is part of the ledger itself. Every token issued on the XRP Ledger is immediately tradeable on the DEX without any additional setup.
This design means there are no smart contract vulnerabilities to exploit, no contract upgrades that could change the rules, and no dependency on any third-party code. The DEX is as reliable as the ledger itself.
The XRPL DEX uses a central limit order book - the same model used by traditional stock exchanges. Traders submit offers (limit orders) specifying exactly what they want to buy and sell, and at what price.
OfferCreate Transaction
Every trade is an OfferCreate with a TakerPays (what you want) and TakerGets (what you spend). If the offer matches existing orders, it fills immediately. If not, it sits on the order book until matched or cancelled.
Partial Fills
Orders can be partially filled. If you offer to sell 1,000 tokens but only 400 are matched, the remaining 600 stay on the book.
In March 2024, the XRPL added protocol-level Automated Market Makers via the XLS-30d amendment. AMM pools hold two assets and set prices algorithmically based on the ratio of assets in the pool.
The key innovation is that AMMs and the CLOB work together. When you place a trade, the XRPL automatically checks both the order book and any relevant AMM pools to find the best price. It can even split a trade across both if that gives a better rate.
Liquidity providers earn trading fees (0-1%, set by LP vote) by depositing assets into AMM pools. See the AMM pools guide for details on providing liquidity.
Auto-bridging is a unique XRPL feature that uses XRP as a universal bridge currency. When trading Token A for Token B, the DEX automatically checks if routing through XRP (A to XRP to B) gives a better rate than direct A-to-B trading.
This happens on every OfferCreate transaction with no extra effort from the trader. The effect is powerful: if there are N tokens with XRP pairs, auto-bridging creates up to N-squared effective trading pairs. Market makers only need to provide liquidity against XRP to serve the entire market.
For Payment transactions, pathfinding goes even further. It finds the optimal route across up to 5 intermediary steps, hopping through multiple tokens and order books to find the cheapest conversion path. This works alongside auto-bridging and AMM routing.
Unlike EVM-based DEXs where validators can reorder transactions to extract value (MEV/front-running), the XRPL consensus protocol has no block proposer ordering. Transactions are processed fairly without any party being able to see and front-run pending trades. This protects every trader equally.
| Aspect | CLOB (Order Book) | AMM (Pools) |
|---|---|---|
| Price control | You set exact price | Algorithm sets price |
| Best for | Active traders | Passive LPs |
| Funds locked? | No (cancel anytime) | Yes (deposited in pool) |
| Slippage | None if order fills at your price | Increases with trade size |
| Earning fees | No | Yes (0-1% per trade) |
| Liquidity type | Explicit limit orders | Pooled reserves |
On the XRPL, you do not need to choose. The protocol automatically routes trades through whichever mechanism - or combination - offers the best price.
For a full breakdown, see XRPL DEX fees explained.
Trade on the oldest, most battle-tested DEX in crypto. No account needed, no KYC, no smart contract risk.