How Fee Income is Estimated:
Basic Formula (L = liquidity): (L_you / L_others) * (24h_swap_volume * pool_fee_rate)
Calculation Details for This Position
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:
More on Liquidity:
The liquidity amount is calculated from the following numbers that describe a position: amount of token 0 (amt0), amount of token 1 (amt1), price (as x token 1's per token 0) at the upper limit of the position (upper), price at the lower limit of the position (lower) and the current swap price (cprice). Then liquidity for a position is calculated as follows:
Case 1: cprice <= lower
liquidity = amt0 * (sqrt(upper) * sqrt(lower)) / (sqrt(upper) - sqrt(lower))
Case 2: lower < cprice <= upper
liquidity is the min of the following two calculations:
amt0 * (sqrt(upper) * sqrt(cprice)) / (sqrt(upper) - sqrt(cprice))
amt1 / (sqrt(cprice) - sqrt(lower))
Case 3: upper < cprice
liquidity = amt1 / (sqrt(upper) - sqrt(lower))