Skip to content
EnabledTier ADeFi & DEX

AMM XLS-30

Native automated market makers extend the XRPL's existing order book DEX. AMM is enabled on the XRP Ledger. xrpscan reports Mar 22, 2024 (UTC) as its activation date and rippled 1.12.0 as its first version.

Sources reviewed Oct 5, 2026 · English page updated Oct 5, 2026 · Phil · CryptoTuts founder

Status
Enabled
XLS
XLS-30
Enabled
Mar 22, 2024 (UTC)

What does this amendment change?

Why does this amendment exist?

Before AMM, the native XRPL DEX used only order book offers. A pool adds algorithmic pricing and can be used together with offers along a payment path.

How does the mechanism work?

An AMM holds two assets in an equally weighted pool and calculates exchange rates from the ratio of their pool balances. Payments and OfferCreate can use this liquidity together with the order book. Depositors receive LP tokens, vote on the trading fee according to their share, and can bid for a time-limited auction slot offering a discounted fee.

What changes compared with the predecessor?

BeforeAfter
The native DEX obtained its liquidity exclusively from individual order book offers.An asset pair can additionally have a native pool that the payment engine and DEX automatically include as a liquidity source.

Who is this change relevant to?

XRP holders and users

Holders can swap assets or voluntarily provide liquidity. LP tokens represent a share of the pool but eliminate neither price risk nor possible losses relative to simply holding the assets.

Wallets and app developers

Wallets and DEX interfaces must correctly represent combined order book and pool liquidity, multiple deposit and withdrawal modes, and slippage.

Exchanges and issuers

Issuers gain native pools for their assets. Freeze and authorization rules still apply. Token transfer fees can apply to swaps through Payment or OfferCreate, but AMMCreate, AMMDeposit, and AMMWithdraw are exempt from those transfer fees.

Node operators

Nodes execute pool formulas, LP accounting, fee votes, and auction slots deterministically. Deleting a large empty AMM may require several AMMDelete transactions.

What limitations and risks remain?

  • Only one native AMM is permitted for each distinct asset pair.
  • XLS-30 supports only pools with two equally weighted assets.
  • A single-asset deposit or withdrawal includes an internal swap component, which is charged the trading fee.
  • An AMMDelete pass removes at most 512 trust lines. If more entries remain, the empty AMM remains in the ledger and AMMDelete returns tecINCOMPLETE; further AMMDelete transactions can finish deletion.
  • A pool guarantees neither returns, a stable price, nor sufficient liquidity at all times.

What fee and performance figures does the specification provide?

  • AMMCreate requires no object reserve for the AMM account it creates. Instead, approximately one owner reserve is burned as an increased transaction fee.
  • The trading fee is a pool property determined by up to eight weighted LP votes.
Technical details: transactions, fields, codes and invariants

Transactions

  • AMMCreate
  • AMMDeposit
  • AMMWithdraw
  • AMMVote
  • AMMBid
  • AMMDelete
  • Payment (AMM swap)

Ledger objects

  • AMM
  • AccountRoot of the AMM
  • RippleState for LP tokens

Fields and flags

  • AMMID
  • Amount / Amount2
  • Asset / Asset2
  • LPTokenOut / LPTokenIn
  • TradingFee
  • VoteSlots
  • AuctionSlot
  • tfLPToken 0x00010000
  • tfSingleAsset 0x00080000
  • tfTwoAsset 0x00100000
  • tfWithdrawAll 0x00020000
  • tfTwoAssetIfEmpty 0x00800000

Result codes

  • tecINCOMPLETE

Invariants

  • When no one holds LP tokens anymore, the AMM must retain no asset reserves.

What does a concrete workflow look like?

A user deposits both pool assets and receives LP tokens. A later cross-currency payment can use part of the order book and the AMM along the same payment path.

How does this amendment relate to others?

Every direct relationship has a type, an explanation and a primary source.

What happens next for this amendment?

AMM is enabled on the XRP Ledger. xrpscan reports Mar 22, 2024 (UTC) as its activation date and rippled 1.12.0 as its first version.

These rules are already part of Mainnet. Server operators need a compatible xrpld (formerly rippled) version; ordinary wallet users do not need to enable anything manually.

Where does it sit within its amendment family?

AMM and Clawback: protocol progression

  1. DeletableAccountsEnabled · from rippled 1.4.0
  2. TicketBatchEnabled · from rippled 1.7.0
  3. DisallowIncomingEnabled · from rippled 1.10.0
  4. AMMEnabled · from rippled 1.12.0
  5. ClawbackEnabled · from rippled 1.12.0
  6. fixDisallowIncomingV1Enabled · from rippled 2.0.0
  7. fixInnerObjTemplateEnabled · from rippled 2.1.0
  8. fixAMMOverflowOfferEnabled · from rippled 2.1.1
  9. fixAMMv1_1Enabled · from rippled 2.2.0
  10. fixPreviousTxnIDEnabled · from rippled 2.2.0
  11. AMMClawbackEnabled · from rippled 2.3.0
  12. fixAMMv1_2Enabled · from rippled 2.3.0
  13. fixInnerObjTemplate2Enabled · from rippled 2.3.0
  14. fixFrozenLPTokenTransferEnabled · from rippled 2.4.0
  15. DeepFreezeEnabled · from rippled 2.4.0
  16. PermissionedDEXEnabled · from rippled 2.5.0
  17. fixAMMv1_3Enabled · from rippled 2.5.0
  18. PermissionDelegationDeprecated · from rippled 2.5.0
  19. fixAMMClawbackRoundingEnabled · from rippled 3.0.0
  20. SponsorOpen for voting · from xrpld 3.3.0
  21. PermissionDelegationV1_1Enabled · from xrpld 3.3.0
  22. fixCleanup3_3_0Enabled · from xrpld 3.3.0
  23. fixCleanup3_4_0Enabled · from xrpld 3.4.0
  24. MPTokensV2In development

Which primary sources support this information?

← All XRPL amendments and XLS specifications