Understanding Impermanent Loss in DeFi - Another risk lives in the high stakes world of DeFi.

    The DeFi craze of 2020 introduced the world to a new and interesting way to earn passive income through liquidity mining and other forms of yield farming. If you haven’t yet jumped into DeFi staking, you may not be aware of some of the risks associated with a liquidity pool (LP). In addition to the usual risks of token staking (price dumps, rug pullsAPY taking a dive, etc.) you take on an additional category of risk: impermanent loss.

    What is An Impermanent Loss In Yield Farming?

    Yield farming, in which you lend your tokens to gain rewards, is directly related to impermanent loss. However, it is not the same as staking, as investors are required to inject money into the blockchain to validate transactions and blocks to earn staking rewards. 

    On the contrary, yield farming entails lending your tokens to a liquidity pool or providing liquidity. Depending on the protocol, the rewards vary. While yield farming is more profitable than holding, offering liquidity has its risks, including liquidation, control and price risks. 

    The number of liquidity providers and tokens in the liquidity pool defines the risk level of impermanent loss. The token is coupled with another token, usually a stablecoin such as Tether (USDT) and an Ethereum-based token like Ether (ETH). Pools with assets like stablecoins within a narrow price range will be less vulnerable to temporary losses. As a result, liquidity providers face a lower risk of impermanent loss with stablecoin in this scenario.

    So, since liquidity providers on automated market makers (AMMs) are vulnerable to future losses, why do they continue to provide liquidity? It is because trading fees might compensate for the temporary loss. For instance, pools on Uniswap, which are highly susceptible to temporary loss, can be profitable due to trading fees (0.3%).

    What is Impermanent Loss Protection?

    Impermanent Loss Protection (ILP) is a type of insurance that protects liquidity providers from unexpected losses.

    Liquidity provisioning is only profitable on typical AMMs if the benefits of farming surpass the cost of temporary loss. However, if the liquidity providers suffer losses, they can utilize ILP to protect themselves against impermanent loss.

    To activate ILP, tokens must be staked on a farm. Let’s use the example of the Bancor Network to understand how ILP works. When a user makes a new deposit, the insurance coverage provided by Bancor grows at a rate of 1% per day the stake is active, eventually reaching full range after 100 days. 

    Any temporary loss that happened in the first 100 days or at any time after that is covered at the time of withdrawal by the protocol. However, only partial IL compensation is available for withdrawals made before the 100-day maturity. For instance, after 40 days in the pool, withdrawals receive a 40% compensation for any temporary loss.

    For stakes withdrawn within the first 30 days, there is no IL compensation; the LP is liable to the same IL they would have incurred in a conventional AMM.

    How Does Impermanent Loss Happen?

    The difference between the LP tokens’ value and the underlying tokens’ theoretical value if they hadn’t been paired leads to IL.

    Let’s look at a hypothetical situation to see how impermanent/temporary loss occurs. Suppose a liquidity provider with 10 ETH wants to offer liquidity to a 50/50 ETH/USDT pool. They’ll need to deposit 10 ETH and 10,000 USDT in this scenario (assuming 1ETH = 1,000 USDT).

    If the pool they commit to has a total asset value of 100,000 USDT (50 ETH and 50,000 USDT), their share will be equivalent to 20% using this simple equation = (20,000 USDT/ 100,000 USDT)*100 = 20%

    Source: YouTube/AmarpreetSingh25

    The percentage of a liquidity provider’s participation in a pool is also substantial because when a liquidity provider commits or deposits their assets to a pool via a smart contract, they will instantly receive the liquidity pool’s tokens. Liquidity providers can withdraw their portion of the pool (in this case, 20%) at any time using these tokens. So, can you lose money with an impermanent loss?

    This is where the idea of IL enters the picture. Liquidity providers are susceptible to another layer of risk known as IL because they are entitled to a share of the pool rather than a definite quantity of tokens. As a result, it occurs when the value of your deposited assets changes from when you deposited them.

    Please keep in mind that the larger the change, the more IL to which the liquidity provider will be exposed. The loss here refers to the fact that the dollar value of the withdrawal is lower than the dollar value of the deposit.

    This loss is impermanent because no loss happens if the cryptocurrencies can return to the price (i.e., the same price when they were deposited on the AMM). And also, liquidity providers receive 100% of the trading fees that offset the risk exposure to impermanent loss.

    How To Calculate The Impermanent Loss?

    In the example discussed above, the price of 1 ETH was 1,000 USDT at the time of deposit, but let’s say the price doubles and 1 ETH starts trading at 2,000 USDT. Since an algorithm adjusts the pool, it uses a formula to manage assets.

    The most basic and widely used is the constant product formula, which is being popularized by Uniswap. In simple terms, the formula states: 

    Using figures from our example, based on 50 ETH and 50,000 USDT, we get:

    50 * 50,000 = 2,500,000.

    Similarly, the price of ETH in the pool can be obtained using the formula:

    Token liquidity / ETH liquidity = ETH price,

    i.e., 50,000 / 50 = 1,000.

    Now the new price of 1 ETH= 2,000 USDT. Therefore,

    This can be verified using the same constant product formula:

    ETH liquidity * token liquidity = 35.355 * 70, 710.6 = 2,500,000 (same value as before). So, now we have values as follows:

    If, at this time, the liquidity provider wishes to withdraw their assets from the pool, they will exchange their liquidity provider tokens for the 20% share they own. Then, taking their share from the updated amounts of each asset in the pool, they will get 7 ETH (i.e., 20% of 35 ETH) and 14,142 USDT (i.e., 20% of 70,710 USDT).

    Now, the total value of assets withdrawn equals: (7 ETH * 2,000 USDT) 14,142 USDT = 28,142 USDT. If these assets could have been non-deposited to a liquidity pool, the owner would have earned 30,000 USDT [(10 ETH * 2,000 USDT) 10,000 USD].

    This difference that can occur because of the way AMMs manage asset ratios is called an impermanent loss. In our impermanent loss examples:

    How To Avoid Impermanent Loss?

    In some cases of liquidity mining, if the market is volatile, an impermanent loss is inevitable since prices are bound to fluctuate. However, you can take some steps to make sure you avoid impermanent loss or at least don’t suffer a heavier blow when prices move.

    Use of Stablecoins Pair

    If you want to avoid impermanent loss altogether, make two stablecoins liquid. For example, if you provide liquidity to USDT and USDC, there will be no risk of impermanent loss since stablecoin prices are meant to be stable.

    However, the major downside to this approach is that you won’t benefit from any rise in the market. If you’re liquidity mining in a bull market, there’s no point in holding stablecoins because you won’t get any returns on them.

    However, if you’re liquidity mining in a bear market, try to provide liquidity to stablecoins and earn trading fees. This way, you’ll be profiting through trading fees without losing any money.

    Look Out for the Trading Fees

    In all the examples we’ve provided above, we haven’t factored in trading fees. Traders using the pool are required to pay trading fees. The AMM gives a share of these fees to the liquidity providers.

    Sometimes, these fees are enough to offset the impermanent loss you’ve experienced during liquidity provision. The impermanent loss decreases with an increase in the number of fees collected.

    Invest in Low Volatility Pairs

    Some cryptocurrency pairs are more volatile than others, so providing liquidity to them can increase your risk of impermanent loss.

    For instance, if you intend to provide liquidity to a particular crypto pair and, studying the market, you believe one of them will outperform the other soon, don’t provide the liquidity.

    However, if you think both currencies will rise or fall relative to each other in terms of price, you’re good to go, since it won’t make much of a difference.

    The bottom line is to stay wary of volatile currencies by monitoring their current and future performance.

    Opt for a Flexible Liquidity Pool Ratio

    One thing that increases the chances of impermanent loss is the 50:50 ratio that most AMMs have. In doing so, they want to create a balanced liquidity pool.

    However, there are many decentralized exchanges where you can provide liquidity in different ratios. Moreover, these exchanges, such as Balancer, allow you to pool more than two cryptocurrencies.

    When Balancer pools have higher ratios, like 95:5, any price change in this instance doesn’t cause as much impermanent loss as a 50:50 pool does. Therefore, if possible, provide liquidity to these pools.

    Wait for the Exchange Rate To Return to Normal

    When you provide liquidity to a crypto pair, their rates will naturally change in the market. However, the more the prices deviate from those at which you made your deposit, the higher your permanent loss will be.

    Therefore, you can wait for the crypto prices to return to their initial rates, and not withdraw your currency until then. However, this isn’t as simple as it may sound because the cryptocurrency market is quite volatile.

    One-Sided Staking Pools

    Not all AMMs have two-currency liquidity pools. Some popular AMMs, such as Liquidity, have a single asset type. In this type of LP, you can supply a stablecoin, such as the LUSD, to the pool to ensure its solvency.

    In exchange for this liquidity, you’ll get a cut of the accrued liquidation fees of the platform. Since there’s only one currency, and there are no ratios between two assets, there’s no impermanent loss in this scenario.

    Final Words

    Finally, it’s imperative to remember that you can experience impermanent loss irrespective of the price change direction. It doesn’t matter which of the two currencies in the crypto pair undergoes an increase or decrease in price. The result will be an impermanent loss.

    The only way you won’t have any impermanent loss is if the price at the time of the withdrawal is the same as that at the time of deposit.

    But suppose you want to leverage the potential of liquidity provision as passive income. In that case, it’s best to calculate impermanent loss using the fluctuations in crypto prices in the market. Most importantly, to maximize passive income, don’t provide liquidity to volatile pairs, since they’re the most susceptible to impermanent loss.

    By now, you’ve hopefully learned enough about both impermanent loss and ways to avoid it. For a beginner or intermediate crypto user, these tips should be sufficient. But if you’re an experienced user, use yield farming techniques to ensure your returns are always greater than the potential impermanent losses.

    DISCLAIMER: The Information on this website is provided as general market commentary, and does not constitute investment advice. We encourage you to do your own research before investing.

    Join our community to update news and discuss this article: 

    Most Popular

    Related Posts