close

DEV Community

Nyx Lesende
Nyx Lesende

Posted on

Measuring Order Book vs AMM Share on the XRP Ledger

When the AMM amendment activated on the XRP Ledger in 2024, the expectation was that liquidity would migrate into pools the way it did on every smart-contract chain before it.

You do not have to speculate about whether that happened. The ledger publishes both numbers.

Getting the split

const { H24 } = await (
  await fetch('https://api.xrpl.to/v1/stats')
).json();

const ob  = H24.globalVol24hOrderbook;
const amm = H24.globalVol24hAMM;

console.log('order book share:',
  (ob / (ob + amm) * 100).toFixed(1) + '%');
Enter fullscreen mode Exit fullscreen mode

Right now that prints 89.0%.

Venue Volume (XRP) Trades Avg trade (XRP)
Order book 7.35M 108,966 67.41
AMM pools 912.1K 42,069 21.68

The interesting number is the average trade size

The order book takes a minority of the trade count but the large majority of volume. Big orders route to the book; small ones are content in pools.

That is the whole story in one ratio, and it inverts what you see on most chains.

Why the order book survived here

The XRPL has had an on-chain central limit order book since 2012. AMMs exist elsewhere largely as a workaround: where posting and cancelling quotes costs meaningful gas, continuous market making is uneconomic, so liquidity gets parked in a passive curve instead.

On the XRPL a cancel costs a fraction of a cent and confirms in three to four seconds. Professional quoting is viable on-chain, so the book stays deep.

Market structure follows transaction economics. The industry generalised from expensive-blockspace chains and concluded AMMs had won outright. This is a live counterexample.

Tracking it over time

async function sample() {
  const { H24 } = await (await fetch('https://api.xrpl.to/v1/stats')).json();
  const ob = H24.globalVol24hOrderbook, amm = H24.globalVol24hAMM;
  return {
    at: new Date().toISOString(),
    obShare: ob / (ob + amm),
    traders: H24.uniqueTraders24H,
  };
}

// append to a file on an interval and you have a time series
Enter fullscreen mode Exit fullscreen mode

Both figures are 24-hour rolling windows, so sampling more often than hourly mostly gives you overlapping data.

Practical takeaway

If you are routing orders, optimise for total depth rather than picking a venue — the XRPL consumes book and pool liquidity in the same trade path. For liquid pairs the book usually gives the better fill because it honours price-time priority instead of filling along a curve.


Live prices, holder counts, trustlines and order-book depth for every XRPL token are at xrpl.to.

Top comments (0)