Fee Calculation: Every Step
Note that univ3 uses a calculated liquidity number that is meaningless to interpret on its own, but tells your what portion of the total liquidity in a pool belongs to you. Also look at this
spreadsheet
to see every single formula.
Basic Fee Formula (L = liquidity): (L_you / L_others) * (24h_swap_volume * pool_fee_rate)
Calculation Details for This Position You Created Above:
Liquidity for This Position:
All Other Existing Liquidity (liquidity for all other positions crossing the current price tick):
24 Hour Swap Volume (across all ticks):
Token Amounts Needed:
Future Numbers (aka Impermanent Loss ☹ )
A crucial issue when investing in any xy=k pool is impermanent loss, aka when you would earn more doing nothing than you did investing. The only way to overcome IL is to earn more in fees than you lose through IL.
Fees Earned (Days Held * Simple Fee Estimate
New Position Value (this calc is detailed in the linked on the left), unlike a simple xy=k pool, the calculation is more complicated and uses the calculated liquidity number
New Token1 Amount * New Token1 Price + New Token2 Amount * New Token2 Price + Fees Earned
HODL Value: original token1 amount * new token1 price + original token2 amount* new token2 price
vs. HODL: New Position Value - HODL Value