Understanding LP Token Economics | Liquidity Providing & Yield | XRP Academy - XRP Academy
3 free lessons remaining this month

Free preview access resets monthly

Upgrade for Unlimited
Skip to main content
intermediateβ€’55 min

Understanding LP Token Economics

Learning Objectives

Explain what LP tokens represent mathematically and economically, including the difference between pool share and absolute value

Calculate LP token issuance for both new pools and deposits into existing pools using the correct formulas

Track LP token value changes as trading activity, deposits, and withdrawals affect the pool

Understand LP token governance rights including fee voting weight and the top-8 voting mechanism

Identify tax implications of LP token acquisition, holding, and redemption in your jurisdiction

Here's a question that trips up most LP veterans: If you deposit $10,000 into an AMM pool, receive 1,000 LP tokens, and the pool doubles in value, how many LP tokens do you have?

Answer: Still 1,000.

Your LP token quantity doesn't change based on pool performance. What changes is what each LP token is worth. This distinctionβ€”between token quantity and token valueβ€”is where most confusion originates.

LP tokens are not like shares of stock where you own a fixed percentage of a company. They're more like a claim ticket at a coat check: the ticket itself doesn't change, but what you get back when you redeem it depends on what's currently in the pool.

Understanding this distinction is the foundation of everything else in this lesson.


LP tokens represent two things simultaneously:

1. Proportional Ownership of Pool Assets

Your LP tokens entitle you to a percentage of whatever assets are currently in the pool. If you hold 10% of all LP tokens, you can redeem them for 10% of Pool Asset A and 10% of Pool Asset Bβ€”regardless of what you originally deposited.

2. Proportional Claim on Future Fees

While you hold LP tokens, you automatically earn your proportional share of all trading fees. These fees increase the pool's total value, which increases what your LP tokens are worth when redeemed.

LP TOKEN REPRESENTATION

What you own:
β”œβ”€β”€ Percentage of total LP tokens: Fixed (until you deposit/withdraw)
β”œβ”€β”€ Absolute number of LP tokens: Fixed (until you deposit/withdraw)
β”œβ”€β”€ Percentage of pool assets: Same as LP token percentage
└── Dollar value: Changes constantly with asset prices and fees

Example:
β”œβ”€β”€ Total LP tokens in pool: 100,000
β”œβ”€β”€ Your LP tokens: 10,000
β”œβ”€β”€ Your share: 10%
β”œβ”€β”€ Pool contains: 50,000 XRP + $125,000 RLUSD
β”œβ”€β”€ Your claim: 5,000 XRP + $12,500 RLUSD
β”œβ”€β”€ Current value: $12,500 + $12,500 = $25,000
└── Tomorrow: Different (prices change, fees accumulate)

Understanding what LP tokens aren't helps clarify what they are:

LP tokens are NOT a fixed claim on your original deposit.

If you deposit 1,000 XRP + $2,500 RLUSD, you will NOT get back 1,000 XRP + $2,500 RLUSD. You'll get back your percentage of whatever is in the pool at withdrawal time.

LP tokens are NOT a stable store of value.

  • Price changes in underlying assets
  • Trading volume (fee accumulation)
  • Other LPs depositing or withdrawing
  • Impermanent loss dynamics

LP tokens are NOT automatically compounding.

Fees accumulate in the pool, increasing your LP token's redemption value. But this isn't "compounding" in the traditional senseβ€”you're not earning interest on interest. You're earning a percentage of each trade, added to the pool.

LP tokens are NOT liquid assets (usually).

While LP tokens can technically be transferred, there's no secondary market for most XRPL LP tokens. Your exit is redemption, not sale.

On XRPL, LP tokens are issued by a special AMM account. To receive them, you need a trust line to that account.

TRUST LINE MECHANICS

When you deposit to an AMM:
β”œβ”€β”€ Transaction creates trust line automatically (if needed)
β”œβ”€β”€ Trust line limit set to 0 (special case)
β”œβ”€β”€ LP tokens credited to your account
└── You can now hold those specific LP tokens

Trust line details:
β”œβ”€β”€ Issuer: AMM account address (unique per pool)
β”œβ”€β”€ Currency: LP token identifier (unique per pool)
β”œβ”€β”€ Limit: 0 (unlimited holding capacity)
└── Balance: Your LP token quantity

Important:
β”œβ”€β”€ Each pool has different LP tokens
β”œβ”€β”€ LP tokens from XRP/RLUSD β‰  LP tokens from XRP/USD
β”œβ”€β”€ Cannot accidentally mix LP tokens from different pools
└── Trust line persists until you remove it
```


When someone creates a new AMM pool, the initial LP token supply is calculated using the geometric mean:

INITIAL LP TOKEN FORMULA

LP_tokens_initial = sqrt(Asset1_amount Γ— Asset2_amount)

Where:
β”œβ”€β”€ Asset1_amount = Quantity of first asset deposited
β”œβ”€β”€ Asset2_amount = Quantity of second asset deposited
β”œβ”€β”€ sqrt = Square root function
└── Result = Initial LP tokens issued to creator

Example - Creating XRP/RLUSD Pool:
β”œβ”€β”€ Deposit: 10,000 XRP + 25,000 RLUSD
β”œβ”€β”€ Calculation: sqrt(10,000 Γ— 25,000)
β”œβ”€β”€ Result: sqrt(250,000,000)
β”œβ”€β”€ LP tokens issued: 15,811.39
└── Creator owns 100% of pool initially

Why geometric mean?
β”œβ”€β”€ Creates balanced relationship between assets
β”œβ”€β”€ Same result regardless of which asset is "Asset1"
β”œβ”€β”€ Standard across AMM implementations
└── Mathematical properties useful for pricing
```

When you deposit into an existing pool, your LP tokens are calculated based on how much your deposit increases the pool:

Double-Asset Deposit (Proportional):

DOUBLE-ASSET DEPOSIT FORMULA

LP_tokens_received = LP_tokens_outstanding Γ— (deposit_value / pool_value)

Alternative formula:
LP_tokens_received = LP_tokens_outstanding Γ— ((1 + D/P)^W - 1)

Where:
β”œβ”€β”€ D = Deposit amount (of one asset)
β”œβ”€β”€ P = Pool amount (of same asset before deposit)
β”œβ”€β”€ W = Weight of that asset (0.5 for equal pools)
└── For 50/50 pools: LP = LP_total Γ— (sqrt(1 + D/P) - 1)

Simplified (for proportional deposits):
β”œβ”€β”€ If you add 10% more of both assets
β”œβ”€β”€ You receive 10% more LP tokens
β”œβ”€β”€ Your ownership = 10% / (100% + 10%) = 9.09%
└── Slightly diluted from 10% because pool grew

Example:
β”œβ”€β”€ Pool has: 50,000 XRP + 125,000 RLUSD
β”œβ”€β”€ LP tokens outstanding: 79,057
β”œβ”€β”€ You deposit: 5,000 XRP + 12,500 RLUSD (10% of each)
β”œβ”€β”€ New pool: 55,000 XRP + 137,500 RLUSD
β”œβ”€β”€ Your LP tokens: 79,057 Γ— 0.10 = 7,906
β”œβ”€β”€ Total LP tokens now: 86,963
β”œβ”€β”€ Your share: 7,906 / 86,963 = 9.09%
└── (Not 10% because denominator grew)

Single-Asset Deposit:

SINGLE-ASSET DEPOSIT MECHANICS

When you deposit only one asset:
β”œβ”€β”€ AMM internally "swaps" portion to balance ratio
β”œβ”€β”€ You pay trading fee on the swap portion
β”œβ”€β”€ Receive fewer LP tokens than double-asset equivalent
└── Convenient but costs ~0.25% of deposit value

Formula (simplified):
LP_received = LP_outstanding Γ— ((1 + D/P)^0.5 - 1) Γ— (1 - fee_adjustment)

Example:
β”œβ”€β”€ Pool: 50,000 XRP + 125,000 RLUSD
β”œβ”€β”€ You deposit: 10,000 XRP (single-asset)
β”œβ”€β”€ ~5,000 XRP "swapped" internally to RLUSD
β”œβ”€β”€ Trading fee (0.5%) on swap: 25 XRP equivalent
β”œβ”€β”€ Net effect: Slightly fewer LP tokens
β”œβ”€β”€ vs double-asset: ~0.25% fewer LP tokens
└── Trade-off: Convenience vs efficiency

When you redeem LP tokens, you receive your proportional share of current pool assets:

WITHDRAWAL MECHANICS

Full Withdrawal:
β”œβ”€β”€ Redeem all your LP tokens
β”œβ”€β”€ Receive: (Your LP tokens / Total LP tokens) Γ— Pool Asset 1
β”œβ”€β”€ Receive: (Your LP tokens / Total LP tokens) Γ— Pool Asset 2
β”œβ”€β”€ Your LP tokens are burned (destroyed)
└── Pool shrinks by your share

Partial Withdrawal:
β”œβ”€β”€ Redeem some LP tokens
β”œβ”€β”€ Receive proportional share of redeemed amount
β”œβ”€β”€ Remaining LP tokens stay in your account
└── Your ownership percentage decreases

Example - Full Withdrawal:
β”œβ”€β”€ Pool now: 55,000 XRP + 165,000 RLUSD (fees grew it)
β”œβ”€β”€ Total LP tokens: 86,963
β”œβ”€β”€ Your LP tokens: 7,906 (9.09% share)
β”œβ”€β”€ You redeem all 7,906 LP tokens
β”œβ”€β”€ Receive: 55,000 Γ— 9.09% = 4,999.5 XRP
β”œβ”€β”€ Receive: 165,000 Γ— 9.09% = $14,998.50 RLUSD
β”œβ”€β”€ Your LP tokens: Burned (balance = 0)
└── Pool now has: 50,000.5 XRP + 150,001.50 RLUSD

Notice:
β”œβ”€β”€ Deposited: 5,000 XRP + $12,500 RLUSD
β”œβ”€β”€ Received: 4,999.5 XRP + $14,998.50 RLUSD
β”œβ”€β”€ Less XRP, more RLUSD (rebalancing occurred)
β”œβ”€β”€ But total value higher (fees accumulated)
└── This is normal AMM behavior
```

You can withdraw only one asset, but you pay the trading fee:

SINGLE-ASSET WITHDRAWAL

Mechanics:
β”œβ”€β”€ Specify which asset you want
β”œβ”€β”€ AMM internally "sells" the other asset
β”œβ”€β”€ You receive only the requested asset
β”œβ”€β”€ Trading fee deducted from amount
└── Useful if you only want one asset back

Example:
β”œβ”€β”€ Your share: 5,000 XRP + $15,000 RLUSD value
β”œβ”€β”€ You want only RLUSD
β”œβ”€β”€ AMM sells 5,000 XRP for ~$15,000 RLUSD
β”œβ”€β”€ Fee (0.5%): ~$75
β”œβ”€β”€ You receive: ~$29,925 RLUSD
└── Convenient but costs fee

When to use:
β”œβ”€β”€ You only need one asset
β”œβ”€β”€ Fee is acceptable trade-off
β”œβ”€β”€ Avoiding external swap saves time
└── Small positions where fee is negligible

Your LP token value changes from three sources:

LP TOKEN VALUE DRIVERS

1. TRADING FEES (Positive)

1. ASSET PRICE CHANGES (Variable)

1. IMPERMANENT LOSS (Negative)

Here's how to calculate your LP position value at any time:

POSITION VALUE CALCULATION

Method 1: Direct Calculation
β”œβ”€β”€ Find current pool reserves (from XRPL)
β”œβ”€β”€ Find total LP tokens outstanding
β”œβ”€β”€ Calculate your share: Your LP / Total LP
β”œβ”€β”€ Asset 1 value: Pool Asset 1 Γ— Your share Γ— Price
β”œβ”€β”€ Asset 2 value: Pool Asset 2 Γ— Your share Γ— Price
└── Total value: Asset 1 value + Asset 2 value

Method 2: LP Token Price
β”œβ”€β”€ Pool total value in USD: (Asset 1 Γ— Price) + (Asset 2 Γ— Price)
β”œβ”€β”€ LP token price: Pool value / Total LP tokens
β”œβ”€β”€ Your value: LP token price Γ— Your LP tokens
└── Same result, different approach

Example Tracking:

Day 0 (Deposit):
β”œβ”€β”€ Pool: 50,000 XRP ($2.50) + 125,000 RLUSD
β”œβ”€β”€ Pool value: $125,000 + $125,000 = $250,000
β”œβ”€β”€ Total LP: 79,057
β”œβ”€β”€ LP price: $250,000 / 79,057 = $3.16
β”œβ”€β”€ Your LP: 7,906
β”œβ”€β”€ Your value: $3.16 Γ— 7,906 = $24,983
└── β‰ˆ Your deposit of $25,000

Day 30:
β”œβ”€β”€ Pool: 48,000 XRP ($2.75) + 140,000 RLUSD
β”œβ”€β”€ Pool value: $132,000 + $140,000 = $272,000
β”œβ”€β”€ Total LP: 79,057 (unchanged)
β”œβ”€β”€ LP price: $272,000 / 79,057 = $3.44
β”œβ”€β”€ Your LP: 7,906 (unchanged)
β”œβ”€β”€ Your value: $3.44 Γ— 7,906 = $27,197
└── Gain: $2,214 (8.86%)

Analysis:
β”œβ”€β”€ XRP price increased (good for holdings)
β”œβ”€β”€ Pool rebalanced (sold XRP, bought RLUSD)
β”œβ”€β”€ Fees accumulated (pool value grew beyond price change)
β”œβ”€β”€ IL occurred (less XRP than if you just held)
└── Net result: Positive (fees > IL in this case)
```

LP TOKENS GAIN VALUE WHEN:

1. Fees accumulate

1. Both assets appreciate

1. Assets converge in price after divergence

LP TOKENS LOSE VALUE WHEN:

  1. Impermanent loss exceeds fees

  2. Both assets depreciate

  3. Pool TVL dilution without volume


LP tokens grant you the right to vote on the pool's trading fee:

FEE VOTING MECHANICS

Voting power:
β”œβ”€β”€ Proportional to LP tokens held
β”œβ”€β”€ More tokens = more influence
β”œβ”€β”€ Top 8 LP holders determine fee
└── Others can vote but don't count in calculation

The top-8 rule:
β”œβ”€β”€ Only 8 largest LP positions count
β”œβ”€β”€ Weighted average of their votes = pool fee
β”œβ”€β”€ Smaller holders have no direct influence
β”œβ”€β”€ But voting signals preferences
└── And positions you for future top-8 status

Voting process:
β”œβ”€β”€ Submit AMMVote transaction
β”œβ”€β”€ Specify your preferred fee (0-1%)
β”œβ”€β”€ Vote recorded in ledger
β”œβ”€β”€ Fee recalculates when any vote submitted
└── Persists until you vote again or withdraw

Example calculation:
Top 8 holdings and votes:
LP1: 1,000,000 tokens, votes 0.50%
LP2: 800,000 tokens, votes 0.60%
LP3: 600,000 tokens, votes 0.40%
LP4: 500,000 tokens, votes 0.50%
LP5: 400,000 tokens, votes 0.55%
LP6: 300,000 tokens, votes 0.45%
LP7: 200,000 tokens, votes 0.50%
LP8: 150,000 tokens, votes 0.30%

Total top-8: 3,950,000 tokens

Weighted fee:
= (1MΓ—0.50 + 800KΓ—0.60 + 600KΓ—0.40 + 500KΓ—0.50 
   + 400KΓ—0.55 + 300KΓ—0.45 + 200KΓ—0.50 + 150KΓ—0.30) 
   / 3,950,000
= 1,935,000 / 3,950,000
= 0.49% (approximately)
VOTING STRATEGY

If you're in top 8:
β”œβ”€β”€ Your vote directly affects fee
β”œβ”€β”€ Consider pool competitiveness
β”œβ”€β”€ Higher fees = more revenue per trade
β”œβ”€β”€ But may reduce volume (traders go elsewhere)
└── Balance is key

If you're NOT in top 8:
β”œβ”€β”€ Vote anyway (signals preference)
β”œβ”€β”€ If top-8 LP exits, you might enter
β”œβ”€β”€ Historical votes on record
└── Coordination with other small LPs possible

Fee strategy by pool type:

High-competition pools (many alternatives):
β”œβ”€β”€ Lower fees attract volume
β”œβ”€β”€ Vote 0.2-0.4%
β”œβ”€β”€ Volume-focused strategy
└── Works for major pairs

Low-competition pools (unique pairs):
β”œβ”€β”€ Higher fees viable
β”œβ”€β”€ Vote 0.6-1.0%
β”œβ”€β”€ Traders have fewer alternatives
└── Works for exotic pairs

Balanced approach (most pools):
β”œβ”€β”€ Middle fees
β”œβ”€β”€ Vote 0.4-0.6%
β”œβ”€β”€ Balance volume and margin
└── Default strategy
```

A consideration for governance:

BLACKHOLED WALLET PROBLEM

The issue:
β”œβ”€β”€ Some wallets are "blackholed" (keys destroyed)
β”œβ”€β”€ Their LP tokens still count toward voting
β”œβ”€β”€ But they can never change their vote
β”œβ”€β”€ Can lead to stale fee settings
└── Pool governance effectively frozen

Example:
β”œβ”€β”€ Pool creator blackholes wallet after creation
β”œβ”€β”€ Had 30% of LP tokens, voted 0.5%
β”œβ”€β”€ That 30% permanently votes 0.5%
β”œβ”€β”€ Other LPs must overcome this fixed vote
└── Limits fee adjustment flexibility

Proposed solution (under consideration):
β”œβ”€β”€ Exclude blackholed wallets from top-8 calculation
β”œβ”€β”€ Would allow active LPs full governance
β”œβ”€β”€ Amendment in discussion
└── Check current status before depositing

What to check:
β”œβ”€β”€ Who are top 8 LPs?
β”œβ”€β”€ Are any blackholed?
β”œβ”€β”€ What are their fixed votes?
β”œβ”€β”€ Can active LPs outvote them?
└── Important for large deposits

Disclaimer: This is educational information, not tax advice. Consult a qualified tax professional for your situation.

LP TOKEN TAX EVENTS (US)

Potential taxable events:
β”œβ”€β”€ Depositing assets to receive LP tokens
β”œβ”€β”€ Receiving LP tokens (acquisition)
β”œβ”€β”€ Redeeming LP tokens for assets (disposal)
β”œβ”€β”€ Earning trading fees (income?)
└── Transferring LP tokens (if ever)

The uncertainty:
β”œβ”€β”€ IRS has not issued specific LP guidance
β”œβ”€β”€ Multiple interpretations possible
β”œβ”€β”€ Conservative vs aggressive approaches
β”œβ”€β”€ Professional guidance essential
└── Documentation critical regardless
```

DEPOSIT AS POTENTIAL TAXABLE EVENT

Conservative view:
β”œβ”€β”€ Deposit = Disposal of original assets
β”œβ”€β”€ Acquisition of LP tokens at fair value
β”œβ”€β”€ Triggers capital gain/loss on deposited assets
β”œβ”€β”€ LP token cost basis = fair value at deposit
└── Most conservative, potentially painful

Aggressive view:
β”œβ”€β”€ Deposit = Non-taxable exchange
β”œβ”€β”€ LP tokens take carryover basis
β”œβ”€β”€ No immediate tax event
β”œβ”€β”€ Tax deferred until LP token disposal
└── Less conservative, more audit risk

Example (Conservative):
β”œβ”€β”€ Original XRP cost basis: $1.00/XRP
β”œβ”€β”€ Deposit 1,000 XRP when price = $2.50
β”œβ”€β”€ Capital gain: 1,000 Γ— ($2.50 - $1.00) = $1,500
β”œβ”€β”€ Report gain in year of deposit
β”œβ”€β”€ LP tokens basis: $2,500 (value at deposit)
└── Any stablecoin portion also evaluated

Single-asset deposit wrinkle:
β”œβ”€β”€ Internal swap is likely taxable
β”œβ”€β”€ Creates additional complexity
β”œβ”€β”€ May trigger gain on converted portion
└── Another reason to prefer double-asset deposits
```

REDEMPTION TAX TREATMENT

Clear taxable event:
β”œβ”€β”€ Disposing of LP tokens
β”œβ”€β”€ Receiving assets in return
β”œβ”€β”€ Gain/Loss = Assets received - LP token basis
└── Report in year of redemption

Example:
β”œβ”€β”€ LP token cost basis: $25,000
β”œβ”€β”€ Assets received at redemption: $28,000
β”œβ”€β”€ Capital gain: $3,000
β”œβ”€β”€ Holding period: Long-term if >1 year
└── Report on tax return

Complication - Mixed assets:
β”œβ”€β”€ Received: 4,500 XRP + $15,000 RLUSD
β”œβ”€β”€ XRP value: 4,500 Γ— $2.89 = $13,005
β”œβ”€β”€ Total received: $28,005
β”œβ”€β”€ Gain: $28,005 - $25,000 = $3,005
β”œβ”€β”€ But: What's basis of received XRP?
└── Unclear - document your methodology

Fee income question:
β”œβ”€β”€ Are accumulated fees taxed as income?
β”œβ”€β”€ Or only as capital gains at redemption?
β”œβ”€β”€ No clear guidance
β”œβ”€β”€ Conservative: Income as earned
β”œβ”€β”€ Aggressive: Capital gains at exit
└── Track both approaches
```

Regardless of interpretation, document everything:

ESSENTIAL RECORDS

For each deposit:
β”œβ”€β”€ Date and time
β”œβ”€β”€ Assets deposited (quantity and type)
β”œβ”€β”€ Asset fair values at deposit
β”œβ”€β”€ LP tokens received
β”œβ”€β”€ Pool total LP tokens at time
β”œβ”€β”€ Transaction hash
└── Screenshot of pool state

For each withdrawal:
β”œβ”€β”€ Date and time
β”œβ”€β”€ LP tokens redeemed
β”œβ”€β”€ Assets received (quantity and type)
β”œβ”€β”€ Asset fair values at withdrawal
β”œβ”€β”€ Transaction hash
└── Any fees paid

Ongoing tracking:
β”œβ”€β”€ Pool fee rate changes
β”œβ”€β”€ Fee accumulation estimates (if tracking income)
β”œβ”€β”€ Pool composition snapshots
β”œβ”€β”€ Your share percentage over time
└── Any votes cast

Why this matters:
β”œβ”€β”€ IRS could request substantiation
β”œβ”€β”€ Supports your tax position
β”œβ”€β”€ Enables accurate calculations
β”œβ”€β”€ Protects against audit
└── Essential for professional preparation

βœ… LP token mathematics are deterministic. The formulas for minting, burning, and valuation are coded into the protocol. No ambiguity about the mechanics.

βœ… Governance voting directly affects returns. Fee rate changes impact your yield. This isn't theoreticalβ€”it's observable in pool data.

βœ… Tax treatment creates real obligations. While specifics are unclear, some tax treatment applies. Ignoring this creates risk.

⚠️ Optimal voting strategy varies. Whether higher or lower fees maximize returns depends on pool-specific factors that change over time.

⚠️ Tax treatment is unsettled. IRS hasn't provided specific LP guidance. Multiple interpretations exist with different risk profiles.

⚠️ Top-8 voting concentration effects. Whether concentrated governance benefits or harms small LPs depends on large LP behavior.

πŸ“Œ Assuming LP tokens represent your deposit. They don't. They represent a share of current pool assets, which may differ significantly.

πŸ“Œ Ignoring tax implications until filing. Discovering you owe taxes on deposits made months ago creates planning problems.

πŸ“Œ Treating LP tokens as liquid. You can't easily sell LP tokens. Your exit is redemption, which may occur at an unfavorable time.

LP tokens are a sophisticated financial instrument that most participants don't fully understand. The mathematics are precise and knowableβ€”there's no excuse for not calculating your exact position value. The governance rights are real but limited by the top-8 structure. The tax treatment is genuinely uncertain, requiring professional guidance and meticulous documentation. Understanding LP tokens completely is a prerequisite for successful liquidity provision.


Assignment: Build a spreadsheet model that tracks LP token value over time and calculates returns accurately.

Requirements:

  • Initial deposit assets and quantities

  • Asset prices at deposit

  • LP tokens received

  • Pool total LP tokens at deposit

  • Deposit date

  • Current pool reserves (Asset 1 and Asset 2)

  • Current total LP tokens

  • Current asset prices

  • Calculated position value

  • Gross return (current value - deposit value)

  • Gross return percentage

  • IL calculation (vs. holding original assets)

  • Net return (gross return - IL value)

  • Implied fee earnings

Part 4: Historical Tracking
Create table to record weekly snapshots:
| Date | Pool Asset 1 | Pool Asset 2 | Total LP | Your Share % | Position Value | Cumulative Return |

  • Deposit details (date, assets, values, LP tokens)
  • Cost basis calculation
  • Space for withdrawal documentation
  • Notes on tax treatment chosen

Template Structure:

=== INPUTS ===
Deposit Date: [Date]
Asset 1 Type: [e.g., XRP]
Asset 1 Quantity: [Number]
Asset 1 Price at Deposit: [USD]
Asset 2 Type: [e.g., RLUSD]
Asset 2 Quantity: [Number]
Asset 2 Price at Deposit: [USD]
LP Tokens Received: [Number]
Total Pool LP Tokens at Deposit: [Number]

=== CURRENT STATE ===
Current Date: [Today]
Pool Asset 1 Reserves: [Number]
Pool Asset 2 Reserves: [Number]
Total LP Tokens Now: [Number]
Current Asset 1 Price: [USD]
Current Asset 2 Price: [USD]

=== CALCULATIONS ===
Your Pool Share: =LP Tokens Received / Total LP Tokens Now
Your Asset 1 Claim: =Pool Asset 1 Reserves Γ— Your Pool Share
Your Asset 2 Claim: =Pool Asset 2 Reserves Γ— Your Pool Share
Current Position Value: =(Asset 1 Claim Γ— Price) + (Asset 2 Claim Γ— Price)
Original Deposit Value: =(Asset 1 Qty Γ— Deposit Price) + (Asset 2 Qty Γ— Deposit Price)
Gross Return: =Current Position Value - Original Deposit Value
Gross Return %: =Gross Return / Original Deposit Value

If Held Value: =(Original Asset 1 Qty Γ— Current Price 1) + (Original Asset 2 Qty Γ— Current Price 2)
IL Amount: =If Held Value - Current Position Value
IL Percentage: =IL Amount / If Held Value
Fee Earnings Estimate: =Gross Return + IL Amount
  • Correct formula implementation: 30%
  • Clear layout and usability: 20%
  • Accurate IL calculation: 20%
  • Historical tracking capability: 15%
  • Tax documentation section: 15%

Time Investment: 2 hours

Value: This tracker becomes your ongoing tool for monitoring LP positions. Building it yourself ensures you understand every calculation, and you'll use it throughout your yield generation activities.


1. LP Token Representation Question:

You deposit 1,000 XRP + $2,500 RLUSD into an AMM pool and receive 1,581 LP tokens. After one month, you decide to withdraw. The pool now contains 45,000 XRP + $135,000 RLUSD with 71,145 total LP tokens. What do you receive?

A) 1,000 XRP + $2,500 RLUSD (your original deposit)
B) 1,000 XRP + $3,000 RLUSD (original plus some fees)
C) Approximately 1,000 XRP + $3,003 RLUSD (2.22% of current pool)
D) Approximately 1,000 XRP + $2,722 RLUSD (proportional to value increase)

Correct Answer: C

Explanation: LP tokens represent a share of CURRENT pool assets, not your original deposit. Your share is 1,581 / 71,145 = 2.22%. You receive 2.22% of each asset: 45,000 Γ— 0.0222 = 1,000 XRP and $135,000 Γ— 0.0222 = $3,000 RLUSD (approximately). The pool composition changed due to trading activity, and fees accumulated, resulting in different quantities than deposited. Options A and B misunderstand LP token mechanics. Option D uses wrong calculation methodology.


2. LP Token Minting Question:

A new AMM pool is created with 20,000 XRP and $50,000 RLUSD. How many LP tokens are issued to the creator?

A) 70,000 LP tokens (sum of quantities)
B) 35,000 LP tokens (average of quantities)
C) 31,623 LP tokens (geometric mean)
D) 1,000,000 LP tokens (standard initial supply)

Correct Answer: C

Explanation: Initial LP token supply = sqrt(Asset1 Γ— Asset2) = sqrt(20,000 Γ— 50,000) = sqrt(1,000,000,000) = 31,623 LP tokens (rounded). This geometric mean formula is standard for AMM pool creation and creates a balanced relationship between the two assets. Options A (sum), B (average), and D (arbitrary) don't reflect the actual protocol mechanics.


3. Fee Voting Question:

A pool has these top 8 LP holders: Four vote for 0.3% fee, four vote for 0.7% fee. Each group holds equal LP tokens. What is the pool's trading fee?

A) 0.3% (lower fee wins ties)
B) 0.5% (weighted average)
C) 0.7% (higher fee wins ties)
D) 1.0% (maximum when tied)

Correct Answer: B

Explanation: The pool fee is a weighted average of top-8 votes. With equal weights: (4 Γ— 0.3% + 4 Γ— 0.7%) / 8 = (1.2% + 2.8%) / 8 = 4% / 8 = 0.5%. There's no "winner"β€”it's always a weighted average. Ties don't exist in this system because the calculation is continuous, not discrete voting.


4. Tax Treatment Question:

Which approach to LP token tax treatment carries the LEAST audit risk (most conservative)?

A) Treating deposit as non-taxable exchange with carryover basis
B) Treating deposit as disposal, recognizing gain/loss, with LP tokens taking fair value basis
C) Ignoring deposits entirely and only reporting at withdrawal
D) Reporting all accumulated fees as income quarterly

Correct Answer: B

Explanation: The most conservative (lowest audit risk) approach is treating deposit as a disposal of original assets (potentially taxable) and assigning LP tokens a fair value cost basis. This recognizes more income sooner, which tax authorities prefer. Option A defers recognition, which is less conservative. Option C ignores potential taxable events entirely. Option D addresses fee treatment but not the deposit question. Note: "Conservative" for tax means recognizing more income sooner, not paying less tax.


5. Value Tracking Question:

Your LP position shows: Original deposit value $10,000, current position value $11,500, "if held" value $12,200. Which statement is correct?

A) You've earned $1,500 in fees
B) You've experienced $700 in impermanent loss
C) You've earned approximately $2,200 in fees and experienced approximately $700 in IL
D) You've lost money and should exit immediately

Correct Answer: C

Explanation: IL = "If held" value - Current position value = $12,200 - $11,500 = $700. Fee earnings (approximately) = Gross return + IL = $1,500 + $700 = $2,200. The fees you earned ($2,200) were partially offset by IL ($700), resulting in net $1,500 gain. This is actually a good outcomeβ€”fees exceeded IL. Option A ignores IL, Option B ignores the gain, Option D misinterprets the numbers.


  • AMMCreate transaction specification
  • AMMDeposit transaction specification
  • AMMWithdraw transaction specification
  • AMMVote transaction specification
  • AMM ledger entry format
  • XLS-30 AMM specification (full mathematical details)
  • Uniswap V2 whitepaper (similar mathematics, good background)
  • IRS Notice 2014-21 (cryptocurrency as property)
  • IRS FAQ on virtual currency (general guidance)
  • Consult qualified tax professional for specific advice

For Next Lesson:
Lesson 3 covers Fee Structures and Revenue Mechanicsβ€”understanding exactly how fees are collected, distributed, and how to calculate your expected yield from any pool. This converts LP token ownership into actual return projections.


End of Lesson 2

Total words: ~5,600
Estimated completion time: 55 minutes reading + 2 hours for deliverable

Key Takeaways

1

LP tokens represent pool share, not fixed value.

Your LP token quantity stays constant, but the underlying assets and their values change continuously. What you withdraw will differ from what you deposited.

2

Minting math is straightforward.

Initial pools use geometric mean (sqrt of product). Subsequent deposits mint proportional LP tokens. Single-asset deposits cost a small fee.

3

Value tracking requires active calculation.

Pool reserves Γ— your share percentage = your claim. Track this regularly rather than assuming your position is "fine."

4

Governance power is concentrated in top 8.

If you're not a top-8 LP, your vote doesn't directly countβ€”but voting still signals preferences and positions you for future influence.

5

Tax documentation is non-negotiable.

Regardless of which interpretation you follow, maintain complete records of every deposit, withdrawal, and pool state. Your future self will thank you. ---