DeFi is a whole new world that allows earning money through farming or a thousand other methods. Among these methods is the possibility to earn fees on decentralized exchanges like Uniswap by providing liquidity to trading pairs. It is even possible to earn money by providing liquidity to stablecoins, such as USDT-USDC and so on. But in this case, the earnings will be very low because there is already a lot of liquidity provided by other people. For those who decide to lock their funds on pairs with less liquidity, the gains will be much higher but the risks will also be higher. What risks? The famous Impermanent Loss!
Impermanent Loss – What is it?
The impermanent loss is a feature found in all liquidity pools of AMMs, i.e. automated market makers. The risk of impermanent loss is the possibility that tokens held in a pool will lose value as opposed to simply holding the tokens. The loss of value is to be understood in both absolute and relative terms. As we shall see, the value expressed in fiat currency terms may increase, but to a lesser extent than in a buy and hold strategy. In other words, the impermanent loss is the difference between holding the tokens in an automated market maker and holding them in a proprietary wallet.
It occurs when the price of tokens within an automated market maker diverges in any direction. The greater the divergence, the greater the loss. It is termed “Impermanent Loss” because as long as the relative prices of the tokens in the pool return to the state they were in when entering the AMM, the loss disappears and you earn 100% of the trading fees. However, this realignment does not always take place.
Let’s say there is a liquidity pool related to the ETH/USDC pair.
Let’s also suppose that the current trading ratio between ETH and USDC is 1:300. In other words, 1 ETH costs $300, with USDC being a dollar-pegged stablecoin.
Impermanent Loss – Example
Let’s assume that in the ETH/USDC liquidity pool there are 15 ETH and 4,500.00 USDC, with a total value of $9,000.00.
In this example:
- the liquidity providers control a quantity of tokens worth $9,000.00: 15 ETH ($4,500.00) + 4,500 USDC ($4,500.00) = $9,000.00;
- a user outside the liquidity pool, who simply holds the same amount of the respective tokens, also has tokens worth $9,000.00.
But let’s assume that on external exchanges the price of ETH increases by 15%. This opens up arbitrage opportunities.
Arbitrageurs have an incentive to buy ETH (because it is priced lower than on other exchanges) in the Uniswap ETH/USDC pool, and sell it on another exchange to gain from the spread that has arisen between the different markets.
Let’s assume that the arbitrageur wants to buy 40.00 USDC of ETH. He will then send 40 USDC to the pool and receive 0.13 ETH in return:
- 15 * 4500 = 67,500 (invariant before the trade)
- 67,500 / 4,540 = 14.87 (new ETH_pool after sending USDC)
- 15 – 14.87 = 0.13 (ETH received by the arbitrageur)
The arbitrageur paid on average 307.69 USDC for his ETH (with slippage of 2.56%). He then sells 0.13 ETH on another exchange for 345.00 USDC (we mentioned that the price of ETH/USDC rose 15% from 300.00 USDC), yielding 44.85 USD. The arbitrageur makes a profit of $4.85: he initially invested 40 USDC to buy 0.13 ETH at 307.69 USDC, which he sold back at $345.00 USDC.
Let’s analyze the status after this transaction:
- liquidity providers in the pool control tokens worth: 4540 USDC ($4,540.00) + 14.87 ETH ($4,540.00) = $9,080.00;
- those who simply hold the tokens in their wallet, end up with a value of: 4,500 USDC ($4500.00) + 15 ETH (5175.00) = $9,675.00.
Although the liquidity providers in this example did not suffer a loss in absolute terms, they did suffer a loss in relation to a simple buy and hold strategy, which would have earned them more money.
Now that you know what an Impermanent Loss is, it’s up to you to decide whether you want to make money from liquidity pools or hodl the token you want!