Constant product
Constant product is the name of a formula that automated market makers, or AMMs, often use to set prices. The AMM on the XRP Ledger functions like a constant product market maker.
In plain words
In an AMM, a mathematical formula sets the price at which currencies are exchanged. The price is based on the supply and demand of the currencies involved. Constant product is an algorithm that AMMs often use for this.
How it works
The XRP Ledger implements a geometric mean AMM with a weight parameter of 0.5. With that weight it functions like a constant product market maker. The weights of the two assets are currently always 1 to 1, so they cancel out in the calculation.
The swap calculation
The AMM swap formula takes the amounts of both assets in the pool before the swap and the trading fee. From these it gives the amount of one asset that must be swapped in to receive a target amount of the other.
Source: xrpl.org, xrpl.org, xrpl.org. Read 6 December 2026.
Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made