Formula and accounting assumptions
Let r be the final A/B price divided by its initial price, and w be the initial A value weight. The ideal rebalanced LP value is initial value × r^w. Holding the starting assets produces initial value × [w × r + (1 − w)]. The difference is evaluated in B-value units. Fees are entered separately at final prices and added to the LP value, without compounding them back into the invariant.
Worked hypothetical example
For an initial value of 100 B-value units, a 50/50 weight and a fourfold increase in A/B price, holding produces 250 while the ideal LP position produces 200. Divergence is minus 20% relative to holding, requiring 50 fee-value units to offset it. At an unchanged relative price, the two no-fee values coincide. An 80/20 weight changes both comparisons, which is why a standard equal-weight impermanent-loss shortcut is insufficient for every weighted pool.
Interpret the scenarios and limits
The model assumes constant weights and ideal no-fee arbitrage to the final price. It does not describe concentrated liquidity, dynamic weights, trading limits or a path-dependent fee stream. Asset B is the numeraire; changes in its purchasing power are not measured. Entering a fee offset is a scenario assumption, not evidence that those fees are available. Compare absolute fee requirements with the percentage divergence so that a small-looking relative loss is not mistaken for a trivial capital amount.