⌛Staking & Impermanent Loss
One of the main issues with liquidity providing on an LP is impermanent loss. IL is the loss incurred by a market making position vs. keeping the initially allocated amounts fixed. Another approach of IL could be referred as unrealized profit or loss (uPNL): this a more accurate way to call such profit or loss, as it only becomes realized if one chooses to sell out of a position which has changed in value.
Given an initial price P0, the value of P0 of a 2-asset portfolio is initially given by:
V=V0+P0⋅y
On the other hand, a new value V1 after the first transactions P1 is given by:
V1=x′+P1⋅y′
Given a new value and new prices, the equation will still be the following:
x+P1⋅y
The IL or uIL is the delta between the portfolio change of the market making portfolio and the change in value of a portfolio of assets with fixed quantities. This is the loss on top of a mark to market move of an equivalent fixed-quantity portfolio:
x′+P1⋅y′−(x+P0⋅y)−(x+P1⋅y−(x+P0⋅y))
Which simplifies to:
x′−x+P1⋅y′−P0⋅y−(P1−P0)⋅y
Also, we will call R the ratio between the current and previous price given a fixed-period of time t:
R=P0P1
Hence, unrealized impermanent loss ϵ will be given by the following equation:
ϵ=V0uPNL=R−21⋅(R+1)
Last updated