Fee Structures and LP Compensation | AMMs on XRPL | XRP Academy - XRP Academy
3 free lessons remaining this month

Free preview access resets monthly

Upgrade for Unlimited
Skip to main content
beginner55 min

Fee Structures and LP Compensation

Learning Objectives

Understand how AMM fees work including fee collection, accrual, and LP distribution

Compare different fee tiers and when each is optimal for traders and LPs

Calculate expected fee income based on pool volume and your share

Determine break-even fee requirements to offset impermanent loss

Evaluate pool fee attractiveness using volume, TVL, and fee metrics

Providing liquidity is a business. LPs contribute capital, take on impermanent loss risk, and hope to earn fees that exceed their costs. The equation is simple:

LP Profit = Fee Income - Impermanent Loss

If fees exceed IL, LPs profit. If IL exceeds fees, LPs would have been better off just holding. Understanding fee mechanics is essential for making this calculation accurately.

This lesson develops the tools to analyze fee income and determine whether a pool offers adequate compensation for its risks.


FEE COLLECTION ON SWAP

Standard AMM fee process:
├── Trader submits swap (e.g., RLUSD for XRP)
├── Fee deducted from input before swap
├── Fee stays in the pool
├── Remaining input executes at pool price
└── Trader receives output minus impact

Example (0.3% fee, buying XRP with RLUSD):
├── Trader inputs: 10,000 RLUSD
├── Fee: 10,000 × 0.003 = 30 RLUSD
├── Swapped: 10,000 - 30 = 9,970 RLUSD
├── XRP received: Based on 9,970 RLUSD input
├── Fee (30 RLUSD) stays in pool
└── Pool grows by 30 RLUSD

Alternative implementations:
├── Fee from output instead of input (same economics)
├── Some protocols split fees (LP vs protocol)
├── XRPL: All fees go to LPs (no protocol cut)
└── Implementation details vary, economics similar
```

HOW LPs RECEIVE FEES

Automatic accrual (XRPL model):
├── Fee tokens stay in pool
├── Pool assets increase
├── LP token supply unchanged
├── Each LP token now represents more assets
└── No claiming, no gas, no action needed

Value increase per trade:
├── Pool TVL: $1,000,000
├── Your share: 5% = $50,000
├── Trade: $100,000 volume at 0.3% fee = $300 fee
├── New pool TVL: $1,000,300
├── Your share: 5% of $1,000,300 = $50,015
├── You "earned" $15 without doing anything
└── Compounds with every trade

Continuous process:
├── Every trade adds to pool
├── Your position grows slightly each trade
├── Over time, accumulates to meaningful return
├── Check position value to see accrued fees
└── Withdraw to realize in actual tokens
```

UNDERSTANDING FEE RATES

Fee rates expressed as:
├── Percentage: 0.3%
├── Basis points: 30 bps
├── Decimal: 0.003
└── All equivalent

Fee calculation:
├── Fee = Trade Size × Fee Rate
├── $10,000 trade × 0.3% = $30 fee
├── $10,000 trade × 1.0% = $100 fee
├── $10,000 trade × 0.05% = $5 fee
└── Linear relationship

Who pays:
├── Trader always pays
├── Deducted from their transaction
├── Higher fee = worse execution for trader
├── Higher fee = better return for LP
└── Trade-off between parties
```


STANDARD FEE TIERS

Ultra-low (0.01% - 0.05%):
├── Best for: Stablecoin pairs
├── Why: Minimal price divergence, tight competition
├── LP return: Very low per trade, needs high volume
├── Trader cost: Negligible
└── Example: USDC/USDT pools

Low (0.05% - 0.15%):
├── Best for: Stable pairs with some divergence
├── Why: Slightly more volatile but still correlated
├── LP return: Low but steady
├── Trader cost: Minor
└── Example: RLUSD/USDC

Medium (0.25% - 0.50%):
├── Best for: Major volatile pairs
├── Why: Standard for established tokens
├── LP return: Moderate, must offset IL
├── Trader cost: Noticeable on large trades
└── Example: XRP/RLUSD, ETH/USDC

High (0.50% - 1.0%):
├── Best for: Exotic or illiquid pairs
├── Why: Higher IL risk needs higher compensation
├── LP return: Higher per trade, lower volume
├── Trader cost: Significant
└── Example: Long-tail tokens

XRPL fee range:
├── Configurable: 0% to 1%
├── Set at pool creation
├── Can be voted to change (with LP governance)
├── Most pools: 0.3% - 0.5%
└── Lower than some Ethereum pools
```

THE FUNDAMENTAL TRADE-OFF

Higher fees:
├── + More revenue per trade
├── - Less trading volume
├── - Traders use alternatives
├── - Arbitrageurs less active (prices drift)
└── Net effect: May increase or decrease total revenue

Lower fees:
├── + More trading volume
├── + Tighter prices (more arb)
├── + More competitive vs other venues
├── - Less revenue per trade
└── Net effect: May increase or decrease total revenue

The optimization problem:
├── Total LP revenue = Volume × Fee Rate
├── Volume is function of fee rate (decreasing)
├── Optimal fee maximizes this product
├── Varies by pair and market conditions
└── No universal "right" answer

Empirical patterns:
├── Stablecoins: Low fee (0.05%) + high volume = competitive returns
├── Major pairs: Medium fee (0.3%) + medium volume = decent returns
├── Exotic pairs: High fee (1%) + low volume = often insufficient
└── Edge cases always exist
```

CHOOSING FEES ON XRPL

Pool creator sets initial fee:
├── Decision at pool creation time
├── Should consider pair volatility
├── And competitive alternatives
├── And expected volume
└── Can be changed via governance later

Fee change mechanism:
├── LPs can propose fee changes
├── Requires voting by LP token holders
├── Threshold varies by pool setup
├── Not instant (governance process)
└── Infrequent in practice

Recommended approach:
├── Stablecoin pairs: 0.05% - 0.10%
├── XRP/stablecoin: 0.30% - 0.50%
├── XRP/volatile: 0.50% - 1.00%
├── New/exotic: 1.00% (adjust down if volume develops)
└── Monitor and adjust based on results
```


LP FEE INCOME CALCULATION

Basic formula:
Fee Income = Volume × Fee Rate × Your Pool Share

Example:
├── Daily pool volume: $500,000
├── Fee rate: 0.3%
├── Your pool share: 5%
├── Daily fee income: $500,000 × 0.003 × 0.05 = $75

Extending to periods:
├── Daily: $75
├── Weekly: $75 × 7 = $525
├── Monthly: $75 × 30 = $2,250
├── Yearly: $75 × 365 = $27,375

As return on capital:
├── Your LP position: $50,000
├── Annual fee income: $27,375
├── Annual return: $27,375 / $50,000 = 54.75%
└── Before impermanent loss!
```

ESTIMATING POOL VOLUME

Data sources:
├── XRPL explorers (historical volume)
├── Pool analytics dashboards
├── Direct ledger queries
└── Third-party aggregators

Volume variability:
├── Daily volume fluctuates significantly
├── Use weekly or monthly averages
├── Consider market conditions
├── Bull markets: Higher volume
├── Bear markets: Lower volume
└── Don't assume today's volume continues

Volume estimation approach:
├── Look at 30-day historical average
├── Note trend (increasing/decreasing)
├── Consider external factors (news, market)
├── Use conservative estimate for projections
├── Build scenarios (low/medium/high volume)
└── Don't assume best-case scenarios
```

ANNUALIZED FEE RETURN

Fee APY formula:
Fee APY = (Daily Fee Income / Position Value) × 365

Or from volume directly:
Fee APY = (Daily Volume / Pool TVL) × Fee Rate × 365

This metric is called "Fee APY" or "Trading Fee Return"

Example calculation:
├── Pool TVL: $1,000,000
├── Daily volume: $200,000
├── Fee rate: 0.3%
├── Daily fee to pool: $200,000 × 0.003 = $600
├── Daily return: $600 / $1,000,000 = 0.06%
├── Annual: 0.06% × 365 = 21.9% Fee APY

Important caveats:
├── This is GROSS return, before IL
├── Net return = Fee APY - IL
├── IL depends on price movement
├── High Fee APY doesn't guarantee profit
└── Always calculate IL scenarios alongside
```

FEE SCENARIO ANALYSIS

Setup:
├── Position: $50,000 in XRP/RLUSD pool
├── Pool TVL: $500,000 (you own 10%)
├── Fee rate: 0.5%

Low volume scenario:
├── Daily volume: $50,000
├── Daily fees: $50,000 × 0.005 × 0.10 = $25
├── Monthly: $750
├── Annual: $9,125 (18.25% APY)

Medium volume scenario:
├── Daily volume: $200,000
├── Daily fees: $200,000 × 0.005 × 0.10 = $100
├── Monthly: $3,000
├── Annual: $36,500 (73% APY)

High volume scenario:
├── Daily volume: $500,000
├── Daily fees: $500,000 × 0.005 × 0.10 = $250
├── Monthly: $7,500
├── Annual: $91,250 (182.5% APY)

Reality check:
├── High volume scenarios are rare on XRPL
├── $500K daily in single pool is exceptional
├── Most pools: $10K-100K daily
├── Adjust expectations accordingly
└── XRPL ≠ Ethereum volume levels
```


BREAK-EVEN FRAMEWORK

For LP to be profitable:
Fee Income ≥ Impermanent Loss

IL depends on price movement:
├── XRP ±10%: IL ≈ 0.25%
├── XRP ±25%: IL ≈ 0.6%
├── XRP ±50%: IL ≈ 2%
├── XRP ±100%: IL ≈ 5.7%
└── (See Lesson 3 for complete table)

Break-even calculation:
├── If price moves 50%, IL = 2%
├── Need 2% fee income to break even
├── On $50,000 position: Need $1,000 in fees
├── At 0.5% fee rate, need $200,000 volume × your share
├── If 10% share: Need $2,000,000 total pool volume
└── Over what period? Depends on how fast price moves
```

BREAK-EVEN TIME ANALYSIS

Question: How long to earn enough fees to offset potential IL?

Example setup:
├── Position: $50,000
├── Pool TVL: $500,000 (10% share)
├── Daily volume: $100,000
├── Fee rate: 0.5%
├── Daily fee income: $100,000 × 0.005 × 0.10 = $50
├── Daily fee %: $50 / $50,000 = 0.1%

Days to offset various IL levels:
├── IL 0.25% (±10% move): 2.5 days
├── IL 0.6% (±25% move): 6 days
├── IL 2% (±50% move): 20 days
├── IL 5.7% (±100% move): 57 days
└── IL 20% (4× move): 200 days

Interpretation:
├── If price moves 50% in first week: Probably unprofitable
├── If price stable for month: Probably profitable
├── Longer time horizon = more fee accumulation
├── But also more time for price to move
└── Risk/reward depends on volatility expectations
```

MINIMUM VOLUME CALCULATION

Question: What volume is needed to profit at given IL level?

Formula:
Required Volume = (IL × Position Value) / (Fee Rate × Share × Time)

Example: XRP moves 50% over 30 days
├── IL = 2% of position = $1,000
├── Position: $50,000
├── Share: 10%
├── Fee rate: 0.5%
├── Required monthly volume to break even:
├── $1,000 / (0.005 × 0.10) = $2,000,000
├── Daily average: $66,667
└── Is this realistic for the pool? Check historical data

Sensitivity:
├── Double the volume: Half the time to profitability
├── Half the fee rate: Double the volume needed
├── More IL: More volume needed
└── All variables interconnected
```


XRPL AMM FEE PARAMETERS

Fee bounds:
├── Minimum: 0 (no fee)
├── Maximum: 1% (10,000 basis points)
├── Granularity: 1 basis point (0.01%)
└── Set at pool creation

Common XRPL pool fees:
├── Major pairs (XRP/RLUSD): 0.3% - 0.5%
├── Stablecoin pairs: 0.1% - 0.2%
├── Exotic pairs: 0.5% - 1.0%
└── Varies by pool creator strategy

No protocol fee:
├── Unlike Uniswap (protocol takes cut)
├── XRPL: 100% of fees go to LPs
├── Better for LP returns
├── No "fee switch" concern
└── Simpler economics
```

ADDITIONAL LP REVENUE: AUCTION

XRPL continuous auction:
├── Traders can bid for discounted rates
├── Bids go to LPs
├── Separate from trading fees
└── Additional revenue stream

How it works:
├── Base fee: 0.5% (example)
├── Auction slot winner: Pays 0% fee
├── But: Paid for the slot via LP tokens
├── Those LP tokens go to... LP token holders
└── Additional income beyond trading fees

Quantifying auction income:
├── Depends on auction activity
├── More active = more LP income
├── Currently: Limited data on XRPL
├── Theoretical benefit, unclear magnitude
└── Monitor as ecosystem matures

For projections:
├── Conservative: Ignore auction income
├── Moderate: Add 10-20% to fee estimates
├── Aggressive: Don't use (uncertain)
└── Better to underestimate than overestimate
```

XRPL FEE COMPETITIVENESS

XRPL AMM vs alternatives:

XRPL Order Book DEX:
├── No trading fee (just tiny transaction fee)
├── Spread is implicit cost
├── May be cheaper for liquid pairs
├── Better for large orders
└── Check both venues for best execution

Centralized Exchanges:
├── Maker/taker fees: 0.1% - 0.5%
├── Plus spread
├── Plus withdrawal fees
├── Convenience vs cost trade-off
└── XRPL may win on total cost

Ethereum AMMs:
├── Similar fee rates (0.05% - 1%)
├── Plus: $5-50 gas per transaction
├── XRPL much cheaper for small trades
├── Gas makes Ethereum costly
└── XRPL advantage for regular traders

Implication for LPs:
├── Cheaper trading = more volume = more fees
├── XRPL's low transaction costs are LP advantage
├── BUT: Much less ecosystem = much less volume
├── Trade-off: Better economics, smaller market
└── Volume matters more than fee efficiency


---
POOL EVALUATION METRICS

Volume metrics:
├── Daily volume
├── Volume / TVL ratio
├── Volume trend (growing/shrinking)
└── Consistency of volume

Fee metrics:
├── Fee rate
├── Daily fee income to pool
├── Fee APY (annualized)
└── Fee income per $ of TVL

Risk metrics:
├── Asset volatility (historical)
├── Expected IL range
├── Correlation between assets
└── Liquidity depth

Efficiency ratio:
├── Volume/TVL ratio (higher = more efficient)
├── Indicates how "productive" the capital is
├── High ratio = capital is being used heavily
└── Low ratio = capital sitting idle
```

LP POOL RED FLAGS

🚩 Very low volume:
├── Daily volume < 1% of TVL
├── Fees won't cover IL risk
├── Capital better deployed elsewhere
└── Unless strategic reason to LP

🚩 Declining volume trend:
├── Volume falling over weeks/months
├── Indicates decreasing interest
├── Fee income will shrink
└── Consider exiting

🚩 Extreme volatility pair:
├── Both assets highly volatile
├── Uncorrelated movements
├── IL risk compounds
└── Need exceptional fees to justify

🚩 New/unknown token:
├── Liquidity mining may end
├── Project might fail
├── Rug pull risk
└── Due diligence essential

🚩 Unrealistic APY claims:
├── If it seems too good, it is
├── Short-term APYs misleading
├── Verify with historical data
└── Sustainable yield is lower than peak yield
```

LP POOL DECISION FRAMEWORK

Step 1: Calculate expected fee income
├── Get historical volume (30-day average)
├── Apply fee rate
├── Calculate your share based on intended deposit
├── Project daily/monthly/annual fee income

Step 2: Model IL scenarios
├── What if price moves 25%?
├── What if price moves 50%?
├── What if price moves 100%?
├── Calculate IL for each scenario

Step 3: Compare fees to IL
├── How many days of fees to offset each IL scenario?
├── What's probability of each price movement?
├── Expected value = Σ(probability × outcome)
└── Is expected value positive?

Step 4: Consider alternatives
├── Just holding the assets
├── LP in different pool
├── LP on different platform
├── Other yield opportunities
└── What's opportunity cost?

Step 5: Size appropriately
├── Only LP capital you can afford to IL
├── Don't concentrate in single pool
├── Consider position as % of portfolio
└── Have exit criteria defined

Step 6: Monitor and adjust
├── Track actual fee income
├── Compare to projections
├── Watch IL accumulation
├── Exit if economics deteriorate
└── Don't set and forget
```


Fee mechanics are deterministic. Fee collection, accrual, and distribution follow exact mathematical rules.

Fee income can offset IL. Empirically proven—many LP positions are profitable despite IL.

Volume is the key variable. Higher volume = higher fees = better LP returns.

⚠️ Future volume predictions. Historical volume doesn't guarantee future volume.

⚠️ Optimal fee rates. The volume/fee trade-off varies by market conditions.

⚠️ XRPL auction revenue magnitude. Too new to have reliable data.

📌 Looking only at APY. High APY means nothing if IL exceeds fee income.

📌 Extrapolating short-term data. One good week doesn't make a good year.

📌 Ignoring volume trends. Declining volume = declining returns.

Fees are the LP business model. Calculate expected fee income, model IL scenarios, and verify that fees exceed IL in realistic cases. Most pools don't offer this—the attractive returns you see are often cherry-picked or short-term anomalies. Do the math before committing capital.


Assignment: Create a comprehensive fee analysis tool for evaluating LP opportunities.

Requirements:

  • Pool TVL

  • Your deposit amount

  • Fee rate

  • Expected daily volume (low/medium/high scenarios)

  • Your pool share

  • Daily fee income (for each volume scenario)

  • Monthly fee income

  • Annual fee income

  • Fee APY

  • Price change: ±10%, ±25%, ±50%, ±100%

  • IL percentage for each

  • IL in dollars for each

  • Net return (fees - IL) for each price scenario

  • Break-even time for each scenario

  • Fee APY at different volume levels (50K, 100K, 200K, 500K, 1M daily)

  • Required volume to break even at each IL level

  • Low fee/high volume pool

  • High fee/low volume pool

  • Medium fee/medium volume pool

  • Expected fee income

  • IL risk (based on asset volatility)

  • Net expected return

  • Risk-adjusted assessment

  • Document actual TVL and fee rate

  • Estimate volume from available data

  • Apply your model

  • Provide investment recommendation with rationale

  • Calculator functionality (25%)

  • IL integration accuracy (25%)

  • Sensitivity analysis quality (25%)

  • Real pool application insight (25%)

Time Investment: 3-4 hours


Knowledge Check

Question 1 of 1

Which metric best indicates how efficiently a pool's capital is being utilized?

  • Uniswap fee tier analysis (applicable concepts)
  • LP profitability studies
  • AMM fee optimization research
  • XRPL AMM explorers
  • DeFi analytics dashboards
  • Pool-specific metrics
  • Market maker economics
  • Inventory models for LPs
  • Optimal fee setting theory

For Next Lesson:
Lesson 6 explores AMM variants beyond constant product—including concentrated liquidity (Uniswap v3), StableSwap (Curve), and weighted pools (Balancer). Understanding these alternatives helps evaluate whether XRPL's current implementation is sufficient or needs enhancement.


End of Lesson 5

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

Key Takeaways

1

Fee income = Volume × Fee Rate × Your Share.

Simple formula, but volume is the variable that matters most.

2

Higher fees mean lower volume.

There's a trade-off; optimal fee depends on pair and market.

3

Break-even requires fees > IL.

Calculate how much fee income you need to offset various price movement scenarios.

4

Volume/TVL ratio indicates efficiency.

Higher ratio means capital is more productive.

5

Most pools don't offer attractive returns.

Do the math—many LP opportunities look good but don't survive IL analysis. ---