MARS DAO
Published in

MARS DAO

What is impermanent loss, and how to avoid it?

Impermanent Loss (IL) is a phenomenon that was born along with the advent of decentralized finance (DeFi) and is the result of an algorithmic rebalancing formula using AMM protocols.

Simply put, the term “impermanent loss” refers to the difference in cost between storing tokens in the AMM protocol on the one hand and storing the same tokens outside the protocol on the other. There will be no more losses when prices are back exactly where they were when you entered the pool.

How is impermanent loss calculated?

Since AMM rebalancing formulas favor a predetermined ratio, the value of your tokens may differ from the value of the same tokens outside the pool. To better understand how impermanent loss works, let’s look at an example:

In this example, the rebalancing volume will always maintain a 50/50 ratio between the two tokens.

1. We provide liquidity in a pool of 50% ETH and 50% USDC.

We are going to add 1 ETH and 1000 USDC assets.

At the time of the addition, the prices are equal;

• 1 ETH = 1000 USD

• 1000 USD = 1000 USD

2. Extreme volatility is doubling the price of ETH

• 1 ETH = 2000 USD

3. The AMM protocol rebalancing formula will balance the number of tokens. This makes the value of ETH in the pool equal to the value of USDC in the pool. Since the price of ETH has doubled, 0.5 ETH will equal the amount of USDC.

• 1 ETH = $2,000 → 0.5 ETH = $1,000.

• 1000 USD = 1000 USD

4. Since 0.5 ETH is being sold to keep the proportion of the amount, the sale will add $500 to your USD holdings.

• 0.5 ETH = 1000 USD

• $1,500 = $1,500

• Total = $2,500

5. Now we decide to withdraw our tokens from the protocol. Even though we have more USDC than initially, the amount of ETH has decreased. So we would have more if we kept our tokens in a wallet.

• 1 ETH = 2000 USD

• 1000 USD = 1000 USD

• Total = $3,000

There will be no impermanent loss as long as prices do not move due to volatility. But as the price of the token rises, liquidity providers lose out compared to off-protocol token holders.

In the table below, we can see how a rise in price results in the loss of a staked token.

Strategies to reduce impermanent losses

Now that we know what impermanent losses are, how do we deal with them? In many liquidity pools, IL is an unavoidable reality, but there are undoubtedly several strategies you can use to mitigate or even avoid the effects of IL entirely.

Here are the most basic of these mitigation strategies:

• Avoid volatile liquidity pools

Crypto assets like ETH are not pegged to the value of an external asset like stablecoins, so their value fluctuates based on market demand.

Keep in mind that liquidity pools around volatile assets are the most significant sources of IL risk. And while blue-chip cryptocurrencies like ETH and BTC can be volatile, much smaller coins are even more likely to experience massive intraday price swings, so they are much riskier in terms of time losses.

If you need to avoid permanent losses, staying away from volatile liquidity pools may be wise.

• LP for liquidity pools with identically linked assets

Stablecoins like USDC and DAI are pegged to the US dollar value, so these tokens always trade around the $1 mark. In addition, there are other stablecoins such as sETH and stETH pegged to ETH and WBTC and renBTC pegged to BTC.

In liquidity pools, pegged currency pairs practically do not change in value. As with same-linked asset liquidity pools (such as the USDC/DAI pool), there is very little volatility between token pairs. This dynamic, of course, results in almost no impermanent loss for the LP. So if you want to earn commissions like LP but don’t mind a lot of IL, these liquidity pools can be a good option.

• Even LP pools

Some projects allow you to provide liquidity to one side and not divide the money equally 50:50. Another attractive source of passive income is the use of pools, which are often used to ensure that protocols have sufficient liquidity for transactions and only accept deposits of one type of token.

You send LUSD stablecoin to the Stable Liquidity Pool to ensure liquidity solvency, and in return, you receive a profit accrued for a fee. Providing liquidity for only one currency does not result in IL, as there is no peg, so there will be no uneven price movement.

• LP for pools with ratios other than 50:50

Uneven Liquidity Pools are pools that maintain asset ratios beyond the traditional 50/50 split. Balancer is best known for being the first to develop these types of flex pools, which can have asset ratios such as 95/5, 80/20, 60/40, and so on.

For example:

Let’s say you decide to invest in an 80:20 liquidity pool for the AAVE/ETH pair. If the price of AAVE increases relative to the price of ETH, some LPs are usually exposed to AAVE (since AAVE takes up 80% of the pool). This reduces price volatility compared to 50:50 pools.

An uneven liquidity pool is one way to lower IL, although of course it all depends on the performance of the underlying asset.

• Participate in liquidity mining programs

Today, liquidity mining programs, in which governance protocols distribute tokens to their original liquidity providers, are widespread in DeFi. Why? They provide these protocols with an easy way to decentralize governance, launch liquidity, and win the hearts of early adopters.

However, liquidity mining programs offer another benefit in that, in many cases, the rewards for their tokens can offset any IL that an LP has to deal with. Indeed, what is a 5% impermanent loss over two months if you earned 25–100% of your initial deposit with token rewards?

These rewards can at least offset IL, so as an LP, always be aware of increased liquidity pools.

The Auto.farm platform

Yield farming, or simply farming, is directly related to impermanent loss.

Farming involves lending your tokens to a liquidity pool or providing liquidity. Depending on the protocol, the rewards vary. While yield cultivation is more profitable than storage, providing liquidity has its own risks, including liquidation, control and price risks. The number of liquidity providers and tokens in the liquidity pool determines the level of impermanent loss risk.

The Auto.farm smart contract platform was created to automate the re-staking of popular farming pools to increase APY.

The auto farming contract is connected directly to the official farming pool. This functionality allows you to get APY higher than standard instruments on official platforms, thanks to the constant re-staking of the received user rewards. An additional benefit is optimizing the network fee payment, thanks to the collective formation of a high TVL for each pool and an optimized smart contract.

The platform is available on the Binance Smart Chain, but soon it will be possible to farm on 5 networks.

*Auto.farm is a functional element in the re-staking process and does not touch user assets. The Auto.farm contract is a transit and performs an Automator function.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store