XRP Wiki
REF · 03.08 / Technology & Protocol

Automated Market Maker (AMM)

How the XRP Ledger's native AMM works, added to mainnet in 2024 alongside the existing order-book DEX.

In 2024, the XRP Ledger added a native Automated Market Maker (AMM), a second, complementary way to provide liquidity and trade on the ledger alongside the long-standing order-book decentralized exchange.

What an AMM is, briefly

Unlike an order book — where buyers and sellers post specific prices and wait for a match — an AMM works from a shared pool of two assets (for example, XRP and a stablecoin) contributed by liquidity providers. Trades happen directly against that pool, with the price determined algorithmically by the pool's current ratio of the two assets, following a constant-product-style formula similar in spirit to AMMs popularized on Ethereum (such as Uniswap).

Why add an AMM to a chain that already had a DEX

The order-book model works well when there is enough active trading interest to keep an order book populated with reasonable prices. For thinner markets, an AMM can provide continuous, passive liquidity without requiring anyone to actively manage open orders — anyone can deposit assets into a pool and earn a share of trading fees, without needing trading expertise.

Because both mechanisms are native to the same ledger, they can interoperate: a payment or trade can be routed through whichever venue (or combination of the order book and an AMM pool) offers the best price at that moment, without the user needing to choose manually.

Liquidity provider tokens

When you deposit assets into an XRPL AMM pool, you receive LP tokens representing your share of that pool, which can later be redeemed for your proportional share of the pool's assets (plus accumulated trading fees, minus any price movement effects — the same "impermanent loss" tradeoff inherent to AMMs generally).

Governance of pool parameters

XRPL AMM pools include an on-chain voting mechanism that lets liquidity providers vote (weighted by their share of the pool) on parameters like the pool's trading fee, rather than those parameters being fixed permanently at pool creation or controlled by a single administrator.

Native, not a smart contract

As with the order-book DEX, the AMM is implemented as a native ledger feature (activated via the amendment process — see What Is the XRP Ledger?) rather than as a smart contract deployed by a third party. This means it benefits from the same transaction finality and fee-burning cost structure as any other XRPL transaction type, and does not depend on a specific external smart-contract deployment being trustworthy or well-audited.