Impermanent loss in DeFi

Impermanent loss is the difference between the amount of profit/loss an identical position (ex: 1 WETH + 3000 USDT) would incur from holding vs providing liquidity over the same time frame; excluding any trading fees and/or incentives gathered by the liquidity provider.

Zach D

February 23, 2022 · 5 min read

Impermanent loss in DeFi

Impermanent loss in DeFi

Impermanent loss is a tricky subject and unless you’re already comfortable in the world of DeFi there are about half a dozen other complicated concepts that we’ll need to tackle before we even scratch the surface so… we will do our best to be concise

Here goes nothing

 

DEX:

A Decentralized Exchange is an exchange with zero intermediaries. If you trade directly peer to peer with someone, then you are involved in the decentralized exchange of value. The current “common use” of the term DEX refers to automated swap platforms like UniSwap that operate via liquidity pools and automated market makers, thereby obfuscating the need for any centralized control.

AMM:

An Automated Market Maker is an automated trading system built up of a series of smart contracts, aka liquidity pools, creating on-demand liquidity in a decentralized manner.

Liquidity pool:

A liquidity pool is a pool of two different assets that always aims to be equally balanced. Liquidity pools are what allow DEXs to have liquidity on hand when you want to make a trade.

Liquidity provider:

Liquidity providers can be anyone! You can choose to add crypto assets to a liquidity pool and in so doing share in a percentage of trading fees from that pool.

Arbitrage trading:

Arbitrage trading is a form of trading wherein the trader takes advantage of price discrepancies across markets.

WETH:

When trading on an ETH based DEX, UniSwap or SushiSwap for example, all transactions occur with ERC20 tokens. If you are using ETH you will need to wrap it into WETH (wrapped ethereum) in order to swap or provide liquidity.

Now that we have a basic understanding of some of the required terminology lets focus on impermanent loss:

What is impermanent loss?

Impermanent loss is the difference between the amount of profit/loss an identical position (ex: 1 WETH + 3000 USDT) would incur from holding vs providing liquidity over the same time frame; excluding any trading fees and/or incentives gathered by the liquidity provider.

This simple explanation accurately conveys the core concept of impermanent loss. For a more nuanced explanation you can read: Uniswap: A Good Deal for Liquidity Providers?

arbitrage

What causes impermanent loss?

When the ratio of assets in a liquidity pool varies from the ratio at time of deposit impermanent loss is incurred (but not realized). The further the variance from the “time of deposit ratio” the more dramatic the impermanent loss becomes. The actual mechanisms that cause this to occur are quite complicated so we won’t get into it here as our main goal is to familiarize you with the general concept, not dig into the technical side. To oversimplify: Liquidity pool pricing is based on asset ratio. As the market price of the underlying assets changes, arbitrage traders rebalance the pools by taking advantage of mispriced assets within the pools.

Lets walk through a specific example:

For this example we will assume that 1 WETH = $3000.

➢You have 1 WETH and 3000 USDT

Scenario 1: You hold the 1 WETH and 3000 USDT in your wallet. Dollar value = $6000

Scenario 2: You add your 1 WETH + 3000 USDT to a liquidity pool. Dollar value = $6000

➢WETH price doubles to $6000

Scenario 1: You still have 1 WETH and 3000 USDT in your wallet. Dollar value $9000

Scenario 2: You withdraw your liquidity and receive: ~ 0.707 WETH + 4242 USDT. Dollar value = $8484

The difference between these two scenarios, $516 or about 5.7%, is the impermanent loss. These numbers are an estimate based on the price changes detailed above. If the price of WETH increased further, the amount of impermanent loss would also increase. We used an impermanent loss calculator tool to help estimate the these values.

impermanent

Why is it called impermanent loss?

The term impermanent loss refers to the fact that the losses are not realized until you redeem your liquidity token for the underlying assets. If your assets remain in the liquidity pool until a time when the pool ratio returns to the “time of deposit ratio” your impermanent loss will return to zero.

From our example above lets say that you never withdrew your liquidity. And now the price of WETH goes back to $3000. This means that the pool ratio has returned to your “time of deposit ratio”; 1 WETH/3000 USDT. If you withdraw your liquidity and redeem your underlying assets you will incur zero impermanent loss.

You would get: 1 WETH + 3000 USDT. Dollar value $6000

It is also important to note that impermanent loss is incurred regardless of the direction of price movement. The only factor determining the amount of impermenant loss is the amount of divergence from the “time of deposit ratio”. If, for instance, in our example above the price of WETH dropped by 50% to $1500 you would incur about 5.7% of impermenant loss. If the price dropped further the IL would increase further.

Impermanent loss, trading fees & yield farming

When the price of underlying assets held within liquidity pools gets further away (in either direction) from the price at time of deposit this creates impermanent loss. AMMs typically share a percentage of trading fees with liquidity providers, meaning any trade occurring within the pool that you have provided liquidity for will generate some fee revenue for you. Additionally AMMs often create short-term incentives to entice people to provide liquidity to specific pairs, employing a strategy that specifically targets these increased incentives is referred to as yield farming. Sometimes trading fees and incentives can far outweigh impermanent loss but sometimes they do not. If impermanent loss outweighs trading fees and/or special incentives this means the end user would have been better off just holding the assets rather than providing liquidity.

Conclusion:

At Divi Labs we like to break down complex topics in a way that the average person will understand; much like we build complex products and then refine them in a way that is intuitive for the end user. Impermanent loss is a tricky subject; we hope that people will have a more solid understanding of the term after reading this article. 

We want to give our community the insights needed to be successful in this space. The success of the DIVI project is dependent on the support of our community. We need your help! If you need additional clarification on this topic or anything DIVI or crypto related; jump into our telegram chat and ask away. We love to learn and grow together. 

Recommended reads:

👉 What is a DAO?

👉 Intro to DeFi?

👉 The cost of custody

Stay up to date.

Subscribe to our mailing list to keep up to date with all things Divi including when we are available in your region

    Zach D

    February 23, 2022 · 5 min read