How to Estimate Impermanent Loss Before Leaving an Avalanche Pool
If you have an Avalanche liquidity position and want to know whether fees have compensated for price divergence, compare your pool share with holding the same starting tokens. For a constant-product pool, the key input is the tokens’ price ratio from deposit to now; then include fees you actually earned and the costs of exiting.
How does price divergence change your position?
In a constant-product pool, arbitrageurs move the reserves toward the external market price, so your share ends up holding more of the asset that fell relative to the one that rose. The Blackhole swap is a concrete Avalanche C-Chain example of the swap-and-liquidity context; first confirm the pool’s design, because a concentrated-liquidity or other pool does not follow the simple formula below.
- Set the price ratio: Divide the ending price of one token by its starting price, using the same quote asset.
- Calculate divergence loss: For a 50/50 constant-product pool, relative value versus holding is 2√r ÷ (1 + r), where r is the price ratio.
- Compare like with like: Measure fees and exit costs against the value of the same starting assets held outside the pool.
For example, suppose you deposit $500 of AVAX at $30 each and $500 USDC. If AVAX reaches $60 while USDC stays at $1, the price ratio is 2. The pool share is then worth about $1,414, while holding the original 16.67 AVAX and 500 USDC would be worth $1,500. The roughly $86 difference is divergence loss before fees, gas, or any other costs.
The formula gives a relative shortfall of about 5.72% at a 2× move. It is symmetric: a move to half the starting price also gives about 5.72%. At 4× or ¼×, the shortfall is 20%; larger divergence increases it. Uniswap’s v2 whitepaper describes the constant-product mechanism behind this calculation.
How do you tell whether earned fees covered it?
Fees cover the divergence loss only when your net LP result exceeds the value of holding your starting tokens. Use fees attributable to your share over the period, then subtract the cost of depositing, claiming if applicable, and withdrawing; on Avalanche C-Chain, transaction fees vary with network conditions.
Do not treat a displayed APR as realized compensation. APR annualizes a rate that can change with trading volume, pool liquidity, token price, and fee rules; your actual result depends on your share while swaps occurred and how fees are accounted for. Check the position’s accumulated fees or pool accounting rather than multiplying today’s APR by the time you held.
In the example, if the position accumulated $100 in fees and exit transactions cost $5, its net value would be about $1,509, just above the $1,500 hold value. If it earned $60 instead, the net would be about $1,469, below holding. These figures are illustrative, and fee amounts are not guaranteed.
What changes the estimate before you withdraw?
Recalculate with the current external price and actual position composition; the loss is not fixed until you exit. A USDC depeg changes the comparison too: use its market value rather than assuming every USDC remains worth exactly one dollar.
Concentrated liquidity needs a different calculation. If a position is out of range, it can hold almost entirely one asset and earn no swap fees until price returns to range; use the pool’s range and position data, not the 50/50 formula. Before withdrawing through Blackhole swap, I’d compare the estimated proceeds with the same-token hold value after fees and transaction costs.
For a standard 50/50 constant-product position, price ratio estimates divergence loss, and realized fees determine whether the position beat holding. Check the pool model, value both sides at current market prices, and include the cost of exiting before deciding.
Comments
Post a Comment