xrpl.to now uses embedded non-custodial wallets. Xaman, Crossmark & GEM Wallet login is no longer supported.Now using embedded wallets. Xaman, Crossmark & GEM no longer supported.
Insights

What Is the XRPL DEX?

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 World's Oldest DEX

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.

Central Limit Order Book (CLOB)

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.

AMM Integration (XLS-30d)

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

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.

Pathfinding

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.

No MEV Extraction

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.

CLOB vs AMM

AspectCLOB (Order Book)AMM (Pools)
Price controlYou set exact priceAlgorithm sets price
Best forActive tradersPassive LPs
Funds locked?No (cancel anytime)Yes (deposited in pool)
SlippageNone if order fills at your priceIncreases with trade size
Earning feesNoYes (0-1% per trade)
Liquidity typeExplicit limit ordersPooled reserves

On the XRPL, you do not need to choose. The protocol automatically routes trades through whichever mechanism - or combination - offers the best price.

Fee Structure

  • Transaction fee - approximately 0.000012 XRP per trade (~$0.00002). This fee is burned, not paid to validators.
  • AMM trading fee - 0% to 1%, set by LP vote. Paid to liquidity providers, not the network.
  • No gas auctions - fees do not spike during high demand like on Ethereum.

For a full breakdown, see XRPL DEX fees explained.

Start Trading

Trade on the oldest, most battle-tested DEX in crypto. No account needed, no KYC, no smart contract risk.