Have you ever provided liquidity to a liquidity pool just to realise that some of your coins have gone missing? In this article, we’ll learn what “impermanent loss” is and how it can affect liquidity providers’ profits.
In essence, impermanent loss is a temporary loss of funds occurring when providing liquidity. It’s very often explained as a difference between holding an asset versus providing liquidity in that asset. Impermanent loss is usually observed in standard liquidity pools where the liquidity provider (LP) has to provide both assets in a correct ratio, and one of the assets is volatile in relation to the other, for example, in a Uniswap DAI/ETH 50/50 liquidity pool.
If ETH goes up in value, the pool has to rely on arbitrageurs continually ensuring that the pool price reflects the real-world price to maintain the same value of both tokens in the pool. This basically leads to a situation where profit from the token that appreciated in value is taken away from the liquidity provider. At this point, if the LP decides to withdraw their liquidity, the impermanent loss becomes permanent.
The easiest way to fully understand impermanent loss is to go through a quick example.
Let’s assume an LP provides liquidity to a DAI/ETH Uniswap 50/50 pool. To supply liquidity to a 50/50 pool, the LP has to provide an equal value of both tokens to the pool.
So far, so good, the value of both tokens is the same.
The price of ETH goes up on an external venue such as Coinbase. Now Coinbase’s ETH price is $550. This is where other market participants, called arbitrageurs, come into play. An arbitrageur notices the price difference between Coinbase and Uniswap and sees that as an opportunity for arbitrage that is basically an opportunity to make a profit.
Uniswap uses a constant product market maker to maintain a correct ratio of tokens in the pool. So as more ETH is being bought from the pool, the higher the price of ETH becomes. The arbitrageur buys cheaper ETH on Uniswap until there is no more price discrepancy between the exchanges. Let’s see how much ETH the arbitrageur has to buy to make this happen.
By plugging our external (Coinbase) price into a few formulas that can be derived from the constant product market maker formula, we can see that the point where the Uniswap ETH price will be at $550 is when there are 10,488.09 DAI and 19.07 ETH in the pool. So the arbitrageur is basically able to buy 0.93 ETH in order to achieve equilibrium between Uniswap’s and Coinbase’s ETH price, costing 488.09 DAI and achieving the average price of 524.83 DAI per ETH. Bought ETH can be instantly sold for DAI or any other USD based stable coin on an external venue for $550. The arbitrageur just earned ~25USD minus the fees.
Let’s see how this affected our liquidity provider.
As we can see the LP would’ve had $23.41 more if they just held their assets without providing liquidity. That $23.41 is basically the LPs impermanent loss.
Impermanent loss is called impermanent because at this point the LP lost $23.41 only on paper. If the LP doesn’t withdraw their liquidity and the price of ETH goes back to $500, the impermanent loss is cancelled back to 0. On the other hand, if the LP decided to withdraw their liquidity, they would realise their loss of $23.41, permanently.
Ok, now that we understand what impermanent loss is, let’s see how it can take away LPs profit as the value of one asset increases in relation to the other.
We can see that, for example, if the price of the asset in the pool goes up by 500% the LPs would experience a 25% impermanent loss. Here is the link to the article with the chart and other useful calculations.
So if impermanent loss can take away so much profit, what is the incentive for liquidity providers to provide liquidity in the first place? To understand that, let’s see how LPs can make money on their capital.
In the perfect world with no impermanent loss, the LPs would just be collecting money from trading fees. For example when it comes to Uniswap, each trade that goes through a liquidity pool pays a 0.3% fee that is proportionally distributed to the LPs of that pool.
This basically means that the LP can still make money even when experiencing impermanent loss under the condition that impermanent loss < collected fees.
On top of that, a lot of liquidity pools provide additional incentives for LPs by offering liquidity mining programs. Liquidity mining, in essence, is a way of rewarding LPs with extra tokens for providing liquidity to certain pools or using a protocol. The value of the additional tokens in some cases can completely negate the value lost by impermanent loss, making providing liquidity highly lucrative. If you want to learn more about yield farming and liquidity mining you can check out this article.
So, how about providing liquidity to other pools outside of Uniswap? Would that also result in impermanent loss? Let’s see a few examples.
Curve pools, for instance, only contain assets that should hold similar if not the same value.
These could be different stable coins like USDC and DAI or different flavours of the same token such as sBTC, renBTC and wBTC. The risk of impermanent loss in such pools is greatly minimised as there is no asset in the pool whose value is volatile in relation to the other. This is also why Curve’s liquidity pools, or to be more generic, all the liquidity pools that hold stable assets usually attract way more capital than the pool with non-stable assets.
Another example is Balancer that offers pools with arbitrary weights outside of the standard 50/50 weighted model. This means that, for example, if an LP wants to maintain a high exposure to a certain asset they can participate in a pool where one token has much higher weight than the other one such as 80/20 or even 98/2 pool. This can also reduce the impact of impermanent loss depending on the weights in the pool. The higher the weight of a token in the pool, the lesser the difference between holding the token and providing liquidity in the token becomes.
Another way of fighting with impermanent loss was recently introduced by Bancor. Bancor V2 pools can adjust their weights automatically based on the external prices coming from price oracles. This can completely mitigate impermanent loss even in the pools with volatile assets. You can learn more about Bancor V2 in this article.
So have you ever been affected by impermanent loss? And what is your favourite strategy to deal with it? Comment down below.