Xmagnetic AMM pools and LP token shares
Magnetic displays two-asset automated market maker (AMM) pools on the XRP Ledger (XRPL). Liquidity provider (LP) tokens represent a proportional claim on a pool's current assets, including collected trading fees. Understanding that share explains why the assets a position represents can change even when its LP token count stays the same.
Identify the assets behind a pool
An XRPL AMM can pair XRP with a trust line token or hold two trust line tokens. A trust line token's currency code and issuer identify the asset, so matching tickers alone don't establish that two listings describe the same pair.
Within an XRPL network, a given asset pair has at most one AMM. Reversing the order of those same assets doesn't create a different pool. This makes the network and token issuers part of identifying a position.
How swaps change pool balances
The AMM derives its exchange rate from the assets it holds. Trading one asset for the other changes their relative balances and therefore the rate. For a given trade size and starting asset ratio, larger reserves generally mean a smaller change in that ratio.
XRPL integrates AMM liquidity with its limit order books. An offer or cross-currency payment can use an order book, an AMM or both, depending on the available rates. Magnetic's trading summaries distinguish contributions from the order book and AMM pool; a pool's trading-fee income depends on trades consuming its liquidity.
LP balances, ownership shares and fees
A deposit into an existing AMM issues new LP tokens. The fraction of outstanding LP tokens you hold determines your proportional share of the pool. Your token count alone doesn't establish that percentage because the total supply can change as liquidity enters or leaves. Magnetic's My Position section separates the LP token amount, pool share and estimated value.
Under XRPL's AMM trading-fee rules, trading fees go into the pool. LP holders benefit by redeeming their tokens for pool assets. This mechanism doesn't require a daily payment of additional LP tokens, so an unchanged LP token balance doesn't by itself indicate missing fees.
The APR field expresses an annualized rate, which doesn't establish a daily payout schedule or guarantee the return you'll receive. Changes in the assets' relative prices can leave a liquidity position worth less than holding the assets separately, even when the pool has collected fees.
What a withdrawal redeems
Redeeming LP tokens releases assets from the pool's current holdings. A proportional withdrawal of both assets uses the pool's composition at withdrawal time, so the quantities can differ from those originally deposited.
At the XRPL protocol level, withdrawing both assets proportionally has no AMM withdrawal fee. A single-asset withdrawal applies the pool's trading fee to the portion effectively converted from the other asset, rather than to the entire withdrawal. Network transaction costs are separate.
If a token issuer requires authorized trust lines, the account must be authorized to deposit or withdraw that token. This requirement doesn't automatically prevent deposits or withdrawals of the pool's other asset.
Fee voting and temporary trading discounts
LP holders can vote on a pool's trading fee from 0% to 1%, in increments of 0.001%. Votes are weighted by LP token holdings, and up to eight providers' votes count. If more providers vote, the eight with the most LP tokens count. The AMM recalculates the weighted fee when a new vote is placed; a change in LP balances alone doesn't trigger recalculation.
LP tokens can also fund a bid for that AMM's auction slot. While the slot is active, its holder and up to four additional accounts the holder names pay a trading fee equal to one tenth of that pool's normal fee. The slot lasts until the holder is outbid or 24 hours pass, whichever comes first. A displaced holder's bid refund depends on the time remaining.
The discount applies to trades against that AMM. The auction-slot cost comparison accounts for the LP tokens committed and relevant XRP transaction costs, which can outweigh the trading-fee savings.
Pool position checklist
- Before comparing two listings, match the network, asset currency codes and trust line token issuers.
- When assessing a pool's APR, consider changes in relative asset prices alongside collected fees.
- Before depositing or withdrawing a token requiring issuer authorization, confirm the account is authorized for that token.
- Before bidding for an auction slot, compare the bid's value and transaction costs with savings on trades against that AMM.