img

Impermanent Loss and the Risks of Being an LP

Posted on 4/8/2021 by Andras

Decentralized exchanges like Uniswap and Sushi have seen an explosion of activity in the last year. These protocols do a great deal to democratize market making and enable anyone to provide liquidity for traders.

If you’ve been involved with DeFi, you’ve most likely heard about impermanent loss. It happens when you deposit funds into an automated market maker (AMM) and the price of your tokens changes relative to each other. The bigger this change is, the larger the impermanent loss.

You need to know about this phenomenon if you want to provide liquidity in DeFi. The high APYs can be attractive, but in most cases, providing liquidity isn’t as simple as just depositing and forgetting about it. Why? You can lose a lot, and it can be very much permanent.

Even so, providing liquidity can be profitable if you know what you’re doing. This is why we’ll go through some key concepts you need to know about before depositing funds into an AMM.

What is impermanent loss?

Impermanent loss comes from an inherent design characteristic of current AMMs. It happens when you provide liquidity to an AMM and the price ratio between your deposited tokens changes since your deposit. When we’re talking about a loss, we mean a loss in dollar value compared to simply HODLing the tokens.

While we say it comes from an inherent design characteristic of AMMs, it isn’t necessarily true for all of them. Different AMMs work in different ways. It depends on the individual design, but in most cases, you’re exposed to impermanent loss. As a general rule, if the AMM has a similar design as Uniswap under the hood (and many of them do), you’re likely exposed to impermanent loss.

But wait, why do so many LPs provide liquidity if they’re exposed to this risk? Well, it still may be worth it for them – they can earn trading fees from trades happening in the pool. For example, the Uniswap protocol charges traders 0.3% for each trade, all of which goes to LPs. If the trading volume is very high, even that can be enough to mitigate the effects of impermanent loss. But the really high rewards tend to come from other forms of incentives.

For example, a newly launched protocol may want to incentivize LPs to provide liquidity for its token, so they may drop additional rewards to LPs. Due to the way AMMs work, the more liquidity there is in the pool, the less slippage trades may incur. This is why it’s important to have as much liquidity in the pool as possible from the start, and it’s also the reason why new projects often drop additional rewards to LPs to incentivize providing liquidity.

How does impermanent loss happen?

Let’s see how impermanent loss happens in practice.

We deposit 1 ETH and 1,000 USDC in the ETH/USDC pool on Uniswap. Since the token pair needs to be of equivalent value, this means that the price of ETH is now 1,000 USDC. So, the dollar value of our deposit is 2,000 USD.

Let’s also assume that there’s a total of 10 ETH and 10,000 USDC in the pool. The total liquidity in the pool is 20,000, and we have a 10% share of it.

Let’s say that the price of ETH increases to 4,000 USDC. Arbitrage traders will keep removing ETH from the pool and adding USDC to it until the ratio of the assets in the pool reflects that price. Remember, an AMM has no order book, so it has no idea about the “correct” price. What determines the price of assets in the pool is the ratio between them in the pool. Meanwhile, the liquidity in the pool has to remain constant.

If 1 ETH is now worth 4,000 USDC, the ratio between the ETH and the USDC in the pool has changed. There is in fact 5 ETH and 20,000 USDC in the pool now.

So, what happens if we want to withdraw? As we know, we have a 10% share of the liquidity in the pool. This means that, right now, we can withdraw 0.5 ETH and 2,000 USDC. That’s 4,000 USD, and we made some nice profits from our 2,000 USD deposit, right? Not quite. If we simply hold our original deposit of 1 ETH and 1,000 USDC, we’d now have assets worth 5,000 USD.

So this is how a loss in dollar value looks like as a result of impermanent loss. With that said, we’ve completely disregarded trading fees and other incentives, which could mitigate this loss. But now you understand how this can happen.

Pools with no impermanent loss

What can you do to mitigate this effect? Well, an obvious solution is simply not to deposit into pools where you are exposed to impermanent loss. What are your options?

You can look for pools and AMMs where impermanent loss is small or non-existent. For example, Curve Finance is a good place to provide liquidity without a big risk of IL. Pools that contain assets that remain in a relatively narrow price range are less exposed to impermanent loss. Remember how we said that IL comes from a change in the price ratio of assets in the pool? If this change is small, the risk of impermanent loss will also be tiny.

For example, Curve has a pool for different wrapped versions of BTC. We know that WBTC, renBTC, and sBTC should remain in a relatively small price range compared to each other since they all follow the price of the same asset – Bitcoin. This is why there’s a smaller chance of impermanent loss to liquidity providers.

Another thing you can do is provide liquidity to single-sided pools. In this case, you only deposit one token, and as a result, you’re not exposed to impermanent loss. However, usually, when this happens, the protocol is paying you from token inflation for locking up (and not selling) the token. Whether it’s worth taking that risk is up to your own preference.

Other risks of providing liquidity to an AMM

Impermanent loss is a pretty misleading name. It’s called impermanent because it’s unrealized until you withdraw your funds. If the price ratio of the deposited tokens returns to the ratio at the time of your deposit, the effects of IL are mitigated. Even so, the losses can be very much permanent.

As we’ve mentioned earlier, some liquidity pools are much more exposed to impermanent loss than others. As a simple rule, the more volatile the assets are in the pool, the more likely it is that you can get rekt by impermanent loss. Maybe it’s worth starting with a smaller deposit to see how your funds react to market movements, and then you can be more confident about how this all works.

But what other risks are you exposed to? Well, it depends on the AMM you use, the assets you hold, or even the blockchain you are using. If you’re using wrapped tokens, you’re likely exposed to counterparty risk, as someone has to be trusted with custodying the assets that back the wrapped tokens.

Another thing is, of course, smart contract risk. This technology has only existed for a handful of years, and bugs and exploits are commonplace. Sure, some of the older protocols like Uniswap can be trusted more than a newly launched one, but it’s something to be wary of.

Another risk is rug pulls. If you’re providing liquidity to ETH and some obscure token, there can be a number of things that go wrong. For example, the developers may be able to mint an infinite number of tokens, crash the price, and, as a result, completely demolish your deposit through impermanent loss. They can also pull a considerable portion of funds from the liquidity pool. In both of these cases, you’ll seriously suffer as an LP. Naturally, this risk is largely non-existent with pools containing established tokens, like ETH/USDC.