We consider an investment into WBNB-CAKE LP tokens. Impermanent Loss (IL) is the difference between the revenue of a pure investment into the volatile assets (WBNB and CAKE) and an investment into the LP tokens.
Recall that the variation of the price of the LP token is proportional to , where and are the variations of the prices of WBNB and CAKE respectively. Therefore an investment in WBNB-CAKE LP tokens generates revenues proportional .
However we should also take into account that there is a yield farming interest per LP token derived from any source - trading fees, subsidies, reward tokens. If this interest is reinvested into the pool for compounding and not removed as payout, then total revenue is given by
On the other hand, for a pure 50/50 investment in WBNB and CAKE, the revenue is proportional to the variations and of the prices of WBNB and CAKE:
Impermanent Loss (IL) is the difference between the revenue of an investment into the LP tokens and a pure investment into the volatile assets (WBNB and CAKE):
The last equality is particularly helpful to quantify Impermanent Loss. If we neglect the yield farming interest, , then impermanent loss simply consists in the blue term. By the Arithmetic-Geometric mean inequality, this is always negative: .
Therefore, in the absence of yield farming interest, an investment into LP tokens is always loosing against a pure investment into each token of the pair. The higher the difference between the variations and of the prices of WBNB and CAKE, the bigger will be the Impermanent Loss.
This is why the yield farming interest is crucial, as then the yield farming revenue can compensate for the loss .
Next, let us assume that the price of one token does not change, for instance . This happens for instance when CAKE is replaced with a stable coin. Then the revenue of a pure investment in WBNB is given by the price evolution . Therefore the investment in LP tokens beats IL if:
Similarly the investment in LP tokens is sub-optimal whenever:
Note that the investment in LP token can even tolerate significant drops in asset price down to
The situation is summarised in this graphic: