Not so Impermanent: is IL here to stay?
There are probably no two words that liquidity providers on decentralised exchanges fear more than “Impermanent Loss”.
It is one of the most widely covered but still often misunderstood topics in DeFi. If you have ever provided liquidity for Automated Market Maker (AMM), you have almost certainly experienced it, even without noticing.
What is Impermanent Loss?
In simple terms, IL is the difference in performance between two strategies:
Liquidity Provision - supplying tokens to a DEX for other people to trade with;
‘HODLing’ - keeping tokens in the wallet and doing nothing with them.
It might be a bit counterintuitive, so let’s consider an example.
Alice has 1 AVAX worth $20 and 20 USDC, she supplies her tokens to the AVAX-USDC pool on the Trader Joe. The pair now has 10 AVAX and 200 USDC in its reserves (worth $400 in total), and Alice owns 10% ($40) of the pool.
After some time, the price of AVAX increases to $80, leading to the pool rebalancing along the way due to arbitrage activity. The product of AVAX and USDC reserves must remain the same as before (10 * 200 = 2000), while the exact composition must match the new price (1 AVAX = 80 USDC). After solving a simple system of equations, we can see that poll reserves are now 5 AVAX and 400 USDC.
Alice still owns 10% of the pool, so if she withdraws, she’ll get 5*0.1=0.5 AVAX and 400*0.1=40 USDC worth $80 in total. Nice and easy 100% profit compared to what she initially deposited. But what if she simply kept 1 AVAX and 20 USDC in her wallet instead of LPing?
After AVAX went to $80, her holding would be worth 1*$80+$20=$100. Simply HODLing would have netted Alice twenty dollars more than LPing. Similarly, if the price of AVAX decreased to $5, Alice would have lost just 15 USD if she simply held and 20 USD if she provided liquidity.
Essentially, when prices of assets in pools deviate from those they were deposited at - liquidity providers lose money compared to HODLing.
Impermanent Loss Protection
This simple phenomenon translates to some huge losses in practice. Research from last November shows that liquidity providers in 17 different Uniswap V3 pools have lost 260 million dollars due to Impermanent Loss.
One of the most popular ways to compensate liquidity providers for the IL is fee distribution from each swap. When the user exchanges one token for another, a small fee (often 0.3%) is taken and given back to LPs in the pool. These fees, however, are rarely enough. The same research calculated that liquidity providers in those 17 pools earned only $199.3m in fees in the same period, leaving them with a loss of ~$60m compared to HODLing.
Bancor took protecting LPs a step further with their Impermanent Loss Protection algorithm. In a way, it offered insurance against IL using the $BNT token. When liquidity providers withdrew their positions if they experienced Impermanent Loss, $BNT of the same value was minted and sent to them. In Alice’s case, she would have received $20 worth of $BNT if she exited the liquidity pool.
Theoretically, this system should guarantee that no Liquidity Providers lose money to IL. In practice, however, it has the potential to enter a death spiral similar to UST/LUNA one in cases where many people start withdrawing their liquidity simultaneously. It could look something like this:
Big withdrawals start, and a lot of $BNT has to be minted to cover the IL;
This $BNT is sold on the market to recoup the losses, and the price of $BNT decreases;
Withdrawals continue, and because of the price drop, more and more tokens have to be issued.
This June, Bancor disabled the IL protection due to “hostile market conditions”, which were likely caused by collapsing CeDeFi lenders abusing the system. This decision, actually, left many liquidity providers worse off than if they simply used Uniswap due to the single-sided liquidity provision on Bancor.
THORChain uses the same mechanism for its Impermanent Loss Protection. Coverage ramps up over 100 days, and liquidity providers get compensated from the protocol reserves with the $RUNE tokens. Even though this approach is more robust than Bancor’s, it is still doesn’t eliminate the risk of IL completely. Someone has to take the risk, and in cases with Bancor and THORChain, token holders are left holding the short end of the stick if something goes wrong.
Volatility and Design
Impermanent Loss arises from two things:
Cryptocurrency markets being extremely volatile;
Decentralised exchanges following the x*y=k design with very few modifications.
There are attempts to calculate volatility indexes and use them to predict and hedge against the IL. However, it is hard, if not impossible, to calculate such an index and predict the volatility ahead of time for tokens besides the ETH and BTC.
The avenue for exploring new DEX designs to combat the IL seems much more promising. Balancer, for example, offers pools with asset composition different from the usual 50/50. With 80/20 or 95/5 pools, the impermanent loss is noticeably reduced at the expense of increased slippage during swaps.
Previously mentioned Uniswap V3, on the other hand, increases the risk of IL while improving capital efficiency and swap performance thanks to the concentrated liquidity design. Imagine that instead of using Trader Joe, Alice decided to provide liquidity to the AVAX-USDC pair on Uniswap V3. If she picked the $15-$25 range, her position would be 100% AVAX at $15 or entirely in USDC at $25. So if $AVAX shot to $80, she would miss almost all of the upside as all of her LP would be converted to USDC.
Liquidity Book
It’s hard to predict volatility, but it doesn’t mean it can’t be measured in real-time. Liquidity Book’s innovative design combines the capital efficiency of concentrated liquidity with the innovation of the Volatility Accumulator.
It makes measuring instantaneous volatility during the swap possible without relying on outside oracles or complex calculations. Having an accurate volatility measure then allows Liquidity Book to change swap fees:
Decrease - if the volatility is low and there is little risk of IL;
Increase - if the volatility is high and LPs need to be better compensated for the IL;
The Volatility Accumulator can quickly ramp up in turbulent markets and gradually decay when things calm down and reset when trading almost completely stops; this way, it can protect liquidity providers while still offering swaps at a fair rate. The Volatility Accumulator is capped to prevent fees from growing out of proportion.
Such an intuitive but powerful algorithm is enabled by the underlying design of the Liquidity Book itself. Contrary to Uniswap V3, which uses ticks and ranges, Liquidity Books operates using bins, which are essentially many constant sum pools combined together. Each bin represents a fixed price, so the price moving from one bin to another can easily be used to measure volatility.
Thanks to Volatility Accumulator, the Liquidity Book does not need to shift risk or emit new tokens - when markets are volatile, traders are simply asked to pay slightly higher fees. This approach is innovative in the DEX space and might usher in a new era for DeFi on Avalanche.