Impermanent Loss is a popular concept when it comes to automated market makers and decentralized exchanges like Uniswap. This term is often defined as the percentage loss a liquidity provider would experience for a given price movement. This means that, as an LP, your position may fall in value due to volatility, causing a loss compared to holding these assets outside of the pool.
This article will spell out the concept in mathematical logic and explain all the assumptions involved.
We consider a market with liquidity L and amounts x and y of assets X and Y respectively. We also have P as the price of X in terms of Y, and a price movement P1 = P.d where d >0
According to the definition of IL touched upon, we establish a generic formula for IL:
Impermanent Loss on Uniswap V2
On Uniswap V2, we have constant product formula and the price between X and Y:
It follows then that:
Impermanent Loss on Uniswap V3
We will use the same approach to calculate IL for V3 based on the above V2 section, and also define Pa, Pb to be the price interval for our concentrated position. Both P and P1 are assumed to be inside this range.
On the other hand, we can also determine the amounts x and y in terms of real and virtual reserves. And note that the amounts of reserves of your position are now x_r and y_r:
Now, we combine (1), (2) with the V3 curve, then the real reserves are described like this:
Comments
Post a Comment