Impermanent Loss: one of the Liquidity Provider's risks

Do repost and rate:

With the explosion of DeFi, one platform that has aroused particular interest is Uniswap, which is a decentralized protocol executed on the Ethereum network in 2018. In order to provide a completely decentralized service (so called DEX, Decentralized Exchange, as opposed to CEX, Centralized Exchange), they developed the simple concept that the liquidity for the exchanges is provided by third parties (could be anyone), and therefore not by the platform itself, called liquidity providers, who will provide a pair of ERC-20 tokens providing the same amount for each token of the pair.

For example, if a liquidity provider decides to enter liquidity into the ETH-DAI pair, and decides to provide $200, it will provide $100 in ETH and $100 in DAI.

Thus, the so-called on-chain pools are formed, and transactions are executed with respect to the latter, which use an automated market making strategy, through smart contracts, so as to allow exchanges without additional counterparties and, in addition, the use of smart contracts allows transactions with surprisingly low gas usage.

However, this system suffers the effect of slippage, i.e. trades cause price slippages, which are all the greater the larger the trades are compared to the total liquidity in the pool. Reason for which, in order for Uniswap to work efficiently and to allow large exchanges, large pools of liquidity are needed.

"Yes all very nice, but why should someone add his liquidity on a pool?"

Every trader who trades on Uniswap will pay a 0.3% commission, which will be divided proportionally between all liquidity providers.

"Ok so I get paid only if trades are made on the platform, but who guarantees that those trades will happen?

The exchanges are guaranteed when the price on the wider market changes. In fact, this situation represents an arbitrage opportunity, that is the possibility to earn from the price difference between Uniswap and another exchange. Let's make an example: let's suppose that in exchange A the ETH price is $100, similarly for Uniswap (which we denote with U); at a certain point, the price on the ETH market changes to $105, so there is a difference of $5 between exchange A and Uniswap, in fact if I buy 1 ETH on Uniswap and sell it in A, I earn $5.

where p stands for price.

He who carries out the arbitrage operation performs the profitable operation that brings Uniswap back in line with the rest of the market.

This is because the liquidity pool is designed in such a way that the liquidity product of one token for the liquidity of the other token of the pair is constant, so if the liquidity of the first token increases, the liquidity of the other token will decrease proportionally (for example, if ETH doubles, DAI will halve):

where

 are the liquidity of ETH and DAI respectively.

This mechanism, moreover, is what's at the base in the decision of the price of a token compared to the other in the pool.

With this operation, investors, looking for rewards, have rushed to provide their liquidity on the platform.

However, after a few days, going to examine their liquidity within the pool they discover that it is worth less than they put in, if measured in ETH or any other token entered.

Why?

It is a simple consequence of the previous equation in which the liquidity product appears.

 

Impermanent Loss

The price of a token is set as follows:

where

is the price of ETH.

By combining the above equations, we can get the liquidity of each token at any price, where we assumed a constant total liquidity:

Let's take an example, to understand the impact of the price change for a liquidity provider.

Let us suppose that we have provided 1 ETH and 100 DAI, contributing 1% to the liquidity of the pool, where there are 100 ETH and 10,000 DAI. In this pool, the price of 1 ETH = 100 DAI. Let's assume that after a few exchanges, the price becomes 1 ETH = 150 DAI; we now ask ourselves, what is the new value of the liquidity provider's share? Replacing the values in the previous equations we have:

Given the fact that we have 1% of the liquidity, we could now request 0.8164966 ETH and 122.4744871 DAI from the liquidity pool. Its liquidity is valid overall at the current price,

244,9489742 DAI, compared to the 250 DAI we would have had if we had simply kept 1 ETH and 100 DAI in our wallet, thus losing 5,051 DAI.

Clearly, if the price were to return to the value of when the liquidity provider injected its liquidity into Uniswap, this loss would no longer be present (for this reason it is called impermanent). This loss will become real and permanent when you withdraw.

Combining the equations above, we can derive the expression that provides us with the impermanent loss, defined by the price ratio between the moment in which the liquidity has been injected and the present:

where

are the impermanent loss and price ratio.

In the following figure a graph of the impermanent loss is shown.

From the previous figure we can guess that:

  • A variation of the price of 1.25x causes a loss parts to 0.6% regarding the holding;
  • A variation of the price of 1.50x causes a loss parts to 2.0% regarding the holding;
  • A variation of the price of 1.75x causes a loss of parts to 3.8% with respect to the holding company;
  • A price variation of 2.00x causes a parts loss of 5.7% compared to the holding company;
  • A price variation of 3.0x causes a loss of 13.4% parts compared to the holding company;
  • A price change of 4.0x causes a loss of 20.0% parts compared to the holding company;
  • A price change of 5.0x causes a 25.5% share loss compared to the holding company;

The amount of the loss is the same in any direction the variation of the price occurs (the loss caused by a halving of the price is the same as that caused by a doubling of the price).

As we can notice from the figure, the loss tends to settle around 25% to the increase of the Price Ratio, and tends to 100% to tend to zero of the Price Ratio.

The yield of the liquidity provider is given, therefore, from the equilibrium between the impermanent loss caused from the difference of price and the commissions accumulated from the exchanges on the platform.

What do you think? It is better to be a liquidity provider?

Let me know what you think in the comments!

If you like my content, don't forget to support me with one thumbs up!

 

References:

https://pintail.medium.com/uniswap-a-good-deal-for-liquidity-providers-104c0b6816f2

Regulation and Society adoption

Ждем новостей

Нет новых страниц

Следующая новость