summary: In DeFi (Decentralized Finance), impermanent loss refers to the loss in value.
content: In DeFi (Decentralized Finance), impermanent loss refers to the loss in value when investing liquidity in a liquidity pool compared to just holding tokens. The event occurs when the price of a user's tokens changes compared to when they deposited them in a liquidity pool. The larger the change is, the bigger the loss. In order words, Impermanent Loss means less dollar value at the time of withdrawal than at the time of deposit. Trivia The impermanent loss also illustrates how much more money a DeFi user would have had if they simply held onto their assets instead of providing liquidity. Some liquidity pools are much more exposed to impermanent loss than others. Impermanent loss is simply the difference between holding tokens in an Automated Market Maker and holding them in a wallet. It occurs when the price of tokens inside an AMM diverges in any direction. The more divergence, the greater the impermanent loss. Introduction Automated Market Makers such as Uniswap, SushiSwap, PancakeSwap, and MindSwap allow anyone with funds to become a market maker and earn trading fees. Liquidity Pools with assets that remain in a relatively small price range will be less exposed to impermanent loss. Stablecoins or different wrapped versions of a coin will stay in a relatively contained price range. In this case, there’s a smaller risk of impermanent loss for liquidity providers (LPs). Liquidity Pools Liquidity pools often feature two assets, one might be a stablecoin such as DAI, and the other could be a more volatile cryptocurrency such as Ethereum (ETH). Examples of Impermanent Loss Scenario A A provider needs to offer equal levels of liquidity in both DAI and (ETH) but suddenly, the price of ETH goes up. This creates an arbitrage opportunity because the price of ETH in the liquidity pool now doesn’t reflect what’s going on in the real world. To ensure the ratio of DAI to ETH remains balanced, other traders will buy ETH at a discounted rate until there’s equilibrium again. After arbitrage, a liquidity provider may end up with a greater amount of DAI and slightly less ETH. Impairment loss assesses the current value of their assets against what they would be worth if left sitting in an exchange. The loss only becomes permanent if a provider decides to withdraw their liquidity for good. Mathematical Scenario In this simple example, there is only one liquidity provider in a Uniswap pool made of 50% ETH and 50% DAI, and they supply 10 ETH and 1000 DAI to the pool. A liquidity pool with one provider does not present a realistic scenario but provides a good example to understand how impermanent loss hypothetically functions. Hypothetically, when a user enters the liquidity pool, ETH is worth USD 100: The price of 1 ETH = 100 DAI The pool consists of 10 ETH and 1000 DAI Then, the price of ETH doubles to $200 The price of 1 ETH = 200 DAI Arbitrageurs from outside of Uniswap come in and buy all the ETH in that user's pool until the price reaches 200 DAI and matches external exchanges. Based on the x \ y = k formula, the liquidity pool will now consist of: 7.071 ETH and 1414.21 DAI At the new ETH price of $200, the total value of your holdings in the liquidity pool would be: $1414.21 + $1414.21 = $2828.42 If the user had just held on to their original 10 ETH and 1000 DAI, the total value of their holdings outside of the liquidity pool would now be: $2000 + $1000 = $3000 Their impermanent loss is: $3000 – $2828.43 = $171.57 Balancer Uneven Pools The Balancer protocol allows AMMs to fully utilize idle capital even if it is not evenly spread across different tokens. Anyone can provide liquidity using Uniswap pools, with the requirement that the value provided with the ERC20 token is the same as the value provided with ETH. This means that all Uniswap pools are even, “50/50” pools. Uneven Balancer pools incur higher slippage, which reduces trading volume, APR, and impermanent loss. With Balancer, if a token holder believes in a token, they can keep strong exposure to that token while at the same time earning trading fees through balancer pools. Example of Uneven pools As a theoretical example refer to figure 1, imagine if a user is very optimistic about ETH and wants to provide $1,000 worth of liquidity with ETH and DAI. They consider three different liquidity pools, with different ETH/DAI weights respectively: 50/50, 80/20, and 95/5. The chart below shows how the pool value would change with a changing ETH price assuming an initial ETH price of $250: The chart displays how uneven pools allow for a much tighter correlation to only holding ETH. While allowing for a higher value correlation to selected tokens, uneven Balancer pools incur higher slippage, which reduces trading volume and APR. The same logic applies to pools with three or more tokens. For example, a pool with four tokens and weights 40/40/10/10 would behave like a 50/50 pool when analyzing trades between the first two tokens but like an 80/20 pool when analyzing trades between the first and the last tokens (40/10 = 80/20). MindSwap The Everipedia team's exotic AMM MindSwap uses high fees to offset the impermanent loss. Liquidity Providers earn a 0.7% transaction fee anytime someone uses their pool to trade between IQ and PredIQt tokens. Summary AMM protocols pay trading fees to liquidity pools and providers and often distribute platform tokens to users. On Uniswap, liquidity providers earn a 0.3% fee every time a trade occurs. For liquidity providers, more trading and more volatility mean more money. With enough trading volume on the protocol, liquidity providers can accumulate fees to negate the occurrence of impermanent loss. AMMs also have reward incentives for liquidity providers via project tokens. If a user provides tokens to a designated Uniswap liquidity pool distributing token rewards, they can earn UNI tokens on Uniswap. Providing tokens to the right Balancer or Curve Finance pools would earn the user BAL or CRV tokens. These tokens can be used elsewhere in the decentralized finance ecosystem and traded on exchanges. The accumulation of fees and the value of reward tokens can not only offset the impermanent loss but make being a liquidity provider profitable. 