Data Analytic Investments
RIPPLE book coverRIPPLE — the book·numbered first edition·$29Buy now
Ripple Book

XRP Ledger AMM Pools, LP Tokens and the Order Book

The XRP Ledger added automated market maker (AMM) functionality in 2024. This article explains how AMM pools work on the ledger, what LP tokens are, and how the AMM interacts with the existing order book DEX.

D
Data Analytic Investments
••2 min read
XRP Ledger AMM Pools, LP Tokens and the Order Book

The XRP Ledger's AMM functionality was activated in 2024 through the AMM amendment. It adds a second trading mechanism alongside the existing order book DEX, and the two interact in a way that is specific to the XRP Ledger's design.

How AMM pools work

An AMM pool holds two assets in a ratio determined by the constant product formula (x × y = k). When a trader swaps one asset for another, the pool's ratio changes, and the price adjusts accordingly. The pool does not use order books or counterparties — it trades against its own reserves.

Anyone can create an AMM pool for any asset pair that does not already have one. Each pair can have at most one AMM pool.

LP tokens

When liquidity is deposited into an AMM pool, the depositor receives LP (liquidity provider) tokens. These tokens represent a proportional share of the pool. When the depositor withdraws, they return the LP tokens and receive their share of the pool's assets, including any fees accumulated since deposit.

LP tokens on the XRP Ledger are standard IOU tokens issued by the AMM account. They can be held, transferred, and used in other XRP Ledger transactions.

Interaction with the order book

The XRP Ledger's payment engine considers both the AMM and the order book when routing a trade. If the AMM offers a better price than the order book, the trade routes through the AMM. If the order book is better, it routes through the order book. The engine can also split a trade between both.

This combined liquidity means that traders benefit from both mechanisms without needing to choose between them explicitly.

Impermanent loss

Liquidity providers in an AMM pool are exposed to impermanent loss: if the price ratio of the two assets changes significantly, the value of the LP position may be less than simply holding the assets. This is a standard feature of constant product AMMs, not specific to the XRP Ledger.

This article is for information only.

Explore Topics

#XRP Ledger#AMM#LP tokens#DeFi#liquidity pool
D

Written by

Data Analytic Investments

Content creator and writer sharing insights and stories.

Share · Megosztás:XFacebookLinkedInWhatsAppTelegramE-mail

This article is a companion piece to the book.

RIPPLE — the book

An Unofficial Documentary Study of Ripple and the XRP Ledger

22 chapters · every claim with a named source · numbered first edition · $29