What is Impermanent Loss and How Can It Be Minimized?
The rise of decentralized finance (DeFi) led to the creation of a new type of decentralized exchange, one without traditional order books. Instead, these exchanges source liquidity from pools of assets, and those who provide assets earn from every trade made on those while risking impermanent loss.
Decentralized exchanges like Uniswap, PancakeSwap, or SushiSwap rely on liquidity pools and price oracles for trades. These liquidity pools are made up of two assets — for example, DAI and ETH — and whenever a trade is executed, it’s against the funds within that pool.
Other investors provide the liquidity in those pools. These investors add liquidity to them in order to earn a share of the fees charged when trading happens on these decentralized exchanges.
To provide liquidity to one of these pools, users must deposit an equal amount of both assets. This means that if Ethereum is trading at $100 and they wish to deposit 1 ETH into an ETH/DAI pool, they must also deposit 100 DAI into the pool. Impermanent loss may occur as trades may shift the balance more in favor of one asset than the other, and prices diverge.
Understanding Impermanent Loss
In a famous example, we assume that the 1 ETH and 100 DAI represent 1% of the total assets in the pool. Exchanges using liquidity pools use an automated market maker (AMM) model that requires that the multiplied product of the supply of both coins within it remain constant.
This means that regardless of the ratio, the sum of ETH and DAI in this example pool must always equal the same value. Here, that value would be 100 ETH and 10,000 DAI, as the deposited 1 ETH and 100 DAI represent 1% of the pool. For the liquidity provider, an impermanent loss would occur when the price of ETH here changes, as DAI is a stablecoin.
If the price of ETH here rises to $120, 1 ETH would be worth 120 DAI. As the price rises, traders taking advantage of arbitrage opportunities would swap DAI for ETH until the ratio within the pool reflects the price of the cryptocurrency. Traders would essentially be using DAI to buy ETH below the $120 mark in the pool.
The shift would see the total amount of funds in the pool move to roughly 91.2971 ETH and around 109.54 DAI. The 1% stake in the pool would, as such, be worth 0.9129 ETH and 109.54 DAI. The deposited liquidity would now be worth not the $200 we had from the sum of the 1 ETH at $100 + the 100 DAI, but around $219, with DAI representing a larger share than ETH.
While the liquidity provider here made some profit off of the trading fees accrued during the time in which they provided liquidity if they simply held onto their 1 ETH and 100 DAI, they would have $220.
The impermanent loss here is minimal, at only $1, but given that Ethereum’s most recent all-time high of $4,891 (close to $5k) and swings in crypto asset prices can be major, the impermanent loss can be much more significant.
The loss, however, is impermanent because the accrued trading fees may make up for the shift in asset prices, and crypto market movements may lead to a balance in the market that reverses the loss. If the liquidity provider withdraws, however, the loss is realized.
How to Minimize Impermanent Loss
Because the effects of impermanent loss are felt due to price divergences in the assets being provided to liquidity pools, one of the most efficient strategies to minimize impermanent loss is to add liquidity to pools with stablecoins in them.
The value of these coins has historically only temporarily changed under extreme market conditions, and leading stablecoins have always seen their peg return even after these black swan events occur.
Secondly, the impact of impermanent loss can also be reduced by using a yield aggregator that reinvests the fees accrued by providing liquidity. Similarly, the distribution of tokens through farming programs may reduce the impact of impermanent loss.
Thirdly, having a good grasp of what percentage of trading fees one gets when providing liquidity can help reduce the impermanent loss experienced. Getting a higher percentage of the trading fees for playing a part in providing liquidity can sometimes offset the impermanent loss.
Fourthly, opting for less volatile trading pairs reduces the probability of experiencing an impermanent loss. Picking time-tested digital assets such as BTC (WBTC is DeFi) and Ethereum is recommended since they are less volatile when compared to newly launched ones such as ApeCoin (APE), Shiba Inu (SHIB), just to name a few.
Lastly, when providing liquidity for a pair and the markets experience a wild dip, one can just wait out the chaos till the exchange rate returns to an acceptable level.
Summing it up, impermanent loss refers to the situation where the price of a token when withdrawing from a liquidity pool is lower than the price when the asset was initially deposited. If the difference is higher, the impermanent loss is more elevated.
Some of the ways of preventing impermanent loss include: focusing on liquidity pools with stablecoins, using a yield aggregator to reinvest fees earned, understanding the percentage of trading fees dedicated to rewarding liquidity providers, opting for less volatile pairs, and simply waiting out the market chaos before withdrawing your assets from the liquidity pool.