What is Impermanent Loss?

Alex Lielacher

For liquidity providers in AMM protocols, one of the primary risks to be aware of is Impermanent Loss (IL).

In this article, we explain what Impermanent Loss is, and how it creates a risk to liquidity providers, and provide some solutions to mitigate this risk.

What are AMMs?

Automated Market Makers (AMMs) were first described in 2016 by Ethereum co-founder Vitalik Buterin on Reddit as a way to simplify on-chain market making on the Ethereum blockchain. One year later, in 2017, Bancor made history as the first AMM. A year later, Uniswap emerged and managed to establish itself as the leading Ethereum-based AMM.

AMMs are software-controlled, autonomous decentralized exchanges where the prices of the assets held in a trading pool are controlled by an underlying algorithm. The liquidity in each trading pool is provided by so-called Liquidity Providers (LPs), who typically deposit equal amounts of two assets per pool.

LPs are entitled to the fees levied to traders in proportion to their contribution to the liquidity pool. Additionally, liquidity providers are typically rewarded with the protocol’s native governance token — a process referred to as yield farming or liquidity mining.

Therefore, liquidity providers are incentivized to participate in AMMs because they earn fees and yield in the form of newly-issued protocol tokens.

Unfortunately for liquidity providers, Impermanent Loss poses a significant risk to their DeFi returns.

What is Impermanent Loss?

AMM protocols are controlled by an underlying mathematical formula that adjusts the ratios of the assets in the pool while simultaneously determining their prices. While this formula allows the market to function, it is also what is responsible for Impermanent Loss.

Impermanent Loss occurs when the mathematical formula adjusts the asset ratio in a pool to ensure they remain at 50:50 in terms of value and the liquidity provider loses out on gains from a deposited asset that outperforms.

To explain IL in more detail, let’s look at an example.

Let’s assume you want to yield farm on Binance Smart Chain’s leading decentralized trading protocol, PancakeSwap.

You choose to provide liquidity to the trading pool CAKE/BNB and deposit the two tokens at a 50:50 ratio — as per the platform’s requirements — with the aim of yield farming as many CAKE tokens as possible.

You connect your Trust Wallet to Binance Smart Chain 8 and exchange some BNB for CAKE so that you can deposit both assets into the pool.

Say when you start, the price of 1 BNB token equals around 25 CAKE tokens. You deposit 5 BNB and 125 CAKE into the pool.

Now, however, the price of CAKE starts to rise as more and more people are starting to buy CAKE tokens in the secondary market. As a result, the protocol adjusts the ratio of your deposited tokens to ensure the value remains split 50:50 across the two assets.

1 BNB token is suddenly worth only 15 CAKE tokens because of CAKE’s price jump. However, because the protocol has automatically adjusted the amount of tokens held in the pool, you lost out on the CAKE rally.

That is ‘Impermanent Loss’.

In the diagram below, you can see a visual representation of IL. While prices remain unchanged, there is no Impermanent Loss but as the price of one asset increases substantially, LPs lose out.

If the LP decides to exit the Pancake Swap ecosystem and receive their deposited liquidity back at this point, they will find that the value of their holdings will be less than if they had just held their BNB and CAKE in a wallet.

Binance describes the phenomenon as “essentially the opportunity cost of pooling a token that appreciates in price.”

However, say the LP doesn’t exit Pancake Swap. Following more trades, if the price of the assets changes and the price of BNB falls back to its original value, the LPs overall holdings will go back to their original value too. Then, they would have 1 BNB and 25 CAKE again.

This explains why it is called Impermanent Loss.

It is possible that the price of the assets will return to its original level, the longer an LP participates in an ecosystem. Despite this, IL still poses a risk to liquidity providers’ revenues.

Parallels with traditional stock exchanges

Impermanent Loss is unique to AMMs. However, there is a similar phenomenon that occurs in traditional finance.

Centralized market makers on stock exchanges suffer losses when the asset they are making a market for moves aggressively in one direction.

Since market makers simultaneously hold positions on both the bid and the offer, if the market moves sharply in one direction, they make losses.

For example, when the stock market collapsed in March 2020, traders who had orders on the bid side were filled, and left with losses, as the next selling opportunities occurred much lower. In a sense, this is similar to what liquidity providers in AMM protocols experience with Impermanent Loss. If the price moves sharply in one direction, you lose out — at least in the short term — on potential gains.

How to Mitigate Impermanent Loss?

The simple way to mitigate impermanent loss is to provide liquidity for pairs where the relative price of each asset remains constant with the other in the pair.

Pools such as sETH/ETH on Uniswap or stablecoin AMMs like DAI/USDC/USDT/sUSD on Curve contain assets that will stay relatively stable with each other.

The downside is that providing liquidity with stablecoins is limited in terms of potential price increase, and the number of pools available is much fewer.

Some advanced methods for preventing impermanent loss:

Fortunately for liquidity providers, there are other ways to mitigate Impermanent Loss. Two options are:

  • Balancer Labs

  • Hummingbot

Balancer allows LPs to create custom ratios for assets within a pool, allowing users to bet on the asset they believe will outperform. That way, LPs can then mitigate their losses if the market moves the way they believed it would.

Conversely, liquidity miners can make use of the recently launched Hummingbot Miner 3. The Hummingbot Miner is a specialized liquidity mining bot that enables users to liquidity mine on multiple markets on Binance in a fully-automated manner.

The bot makes markets on centralized order books and thus enables traders to earn liquidity mining rewards without Impermanent Loss being an issue. However, a sharp move in one of the assets in a trading pair could still have negative effects on rewards in the same way a price drop impacts market markers on the stock market.

Bottom Line

Most popular AMMs — such as Uniswap and PancakeSwap — have opted for simplicity and user experience over features that may mitigate IL. Therefore, it is important for DeFi users to manage Impermanent Loss and other DeFi risks on their own accord.

Get the Trust Wallet app now!

The most trusted & secure crypto wallet