Impermanent Loss isn’t the Boogeyman
DeFi is a weird space. On one hand, it’s absolutely filled to the brim with scam projects, rug pulls, hacks, ponzi schemes and exploits that everybody just apes into. Some might say a glorified casino but without the open bar or at the very least the 50% chance to beat the House in a hand of blackjack. On the other hand, some of the most intelligent people that I know, from all walks of life and corners of the globe, are knee-deep in stablecoin plays, yield farming, nodes and lending strategies that put investment banks to shame. Literal one-man hedge funds with monthly profits that would make TradFi institutions kill for. If you get past the 90 degree learning curve, have a good grasp of blockchain, finance, tokenomics and some patience, you can grow a small amount of money into a small fortune. Even more important, you can make that small fortune work for you at a rate that a bank will never be able or want to provide you.
Why aren’t more people doing this if it’s so good? Well, there’s the risk, of course. Crypto isn’t the most mature of spaces, getting there takes time and a lot of people get rekt. But there is also fear. The fear of screwing something up, of not understanding well enough how to manage funds and stay on top of everything. It’s a struggle for well experienced asset managers to survive in any market, not just crypto, let alone make consistent profit. However, there is a certain pattern that I have personally seen one too many times: Being utterly horrified by suffering impermanent loss (IL).
What is Impermanent Loss?
Whether It’s a friend of mine, an analyst in an investment bank or some guy on the internet, people seem to be very scared of losing their funds to this invisible muncher of tokens. IL is the temporary loss of funds that liquidity providers suffer as the ratio of the assets they are providing changes due to market conditions. It also shows the loss of profit that the provider suffers compared to simply holding onto the assets.
IL affects liquidity pools where there is usually a 50/50 split between funds (Offering $1000 worth of ETH and $1000 worth of CRV for example). Whenever one of the tokens goes through a price change, the ratio of the two tokens within the pool changes in order to keep its initial value. You will always get more of the depreciating token and less of the appreciating token. If one absolutely moons or completely tanks, you will get close to 100% impermanent loss. That’s because the pool will always rebalance itself so that the liquidity provider withdraws what they have initially put in.
By providing liquidity, participants are paid fees from each transaction. Trader Joe for example charges a 0.3% fee for all trades, 0.25% of which goes to the initial pool. The liquidity provider then gets a portion of this 0.25% equal to their proportional share of the pool to be redeemed via a Liquidity pool token (LP token) which is a representation of the provided ratio. So if a pool has $50.000 worth of AVAX and $50.000 worth of JOE, and you have deposited $5000 worth of AVAX and $5000 worth of JOE, you have a 10% share of the pool. Therefore, you will get 10% of each 0.25% fee that goes into the pool for each and every transaction, redeemable of course via the LP token. Since the prices of both tokens are given by the pool ratio, these might be different from exchanges. A situation that arbitrage bots are more than happy to solve. Pretty cool right?
Impermanent loss happens literally all the time. Crypto is a free market and there is a variety of factors that make tokens shoot up or down. Whenever a massive change in price respective to the other token in the provided liquidity pool happens, IL gets closer to 100%.
Let’s see a practical example with MATIC (Polygon) and USDC and let’s assume that MATIC is worth $1. Let’s also assume that you have provided $1000 worth of each, bringing the total value of the pool up to $2000, by having provided 1000 MATIC and 1000 USDC. If MATIC goes down to $0.50 then the pool’s ratio has changed and now you have 2000 FTM and 500 USDC.
For the fellow data nerds out there that want to build a spreadsheet for it, here is the formula and it’s breakdown:
IL(k)= 2k1+k - 1
Where “k” is the change ratio from the initial price to the future one. For example, if an asset increases in value by 10%, then k=1.1. Once you determine “k”, you multiply the percentage by the initial price to get the actual dollar amount.
Example: If IL=0.5% and the initial asset price was $1000, then the dollar amount actual IL is $1000*0.5%=$5.
How bad can it wreck portfolios?
Almost 100%, obviously. Now that we have a grasp of the basics, one thing becomes obvious: Liquidity providers will ALWAYS get more of the depreciating asset and less of the appreciating one. The profit comes from making the fees between all of these changes. Ideally, users want to exit when the ratio of the tokens they initially deposited =1. Meaning it stayed the same as when they started. If an asset either gets completely dumped or utterly moons, the liquidity provider’s portfolio suffers almost 100% IL, as in the example below from dailydefi.org’s awesome impermanent loss calculator.
But if IL happens no matter what, isn’t it too big of a risk with too much loss in order to actually be profitable? Not really. In reality, the price change needed to actually incur a significant loss is quite substantial. Of course, if you choose to provide liquidity in, let’s say a pair of BNB and some random coin that just popped up with no liquidity or whitepaper behind it, if the token goes to zero, so will the value of your redeemable liquidity pool token.
Here is essentially what the graph above is telling us about losses compared to simply HODLing the asset:
While it is definitely something to always keep an eye out for, IL is no more than an economic phenomena that happens naturally when providing decentralized liquidity. It is another element to account for in risk management models.
How to avoid Impermanent Loss
Avoiding it to a clean 100% is extremely improbable. However, as previously shown if well managed, providing liquidity can be profitable and help accumulate a token of choice. Again, if managed properly. Otherwise, simple crypto or DeFi enthusiasts are better off just holding a certain asset. Below is a chart, courtesy of Balancer, showing IL incurred in pools with different ratios compared to simply holding an asset. Check the link provided to Balancer for their awesome 3D calculator as well!
Providing liquidity, or more generally yield farming, is usually done differently in a bear market, bull market or crab market. Goes without saying the first thing to do in order to avoid IL is to provide liquidity to strong assets that are battle-tested. Think ETH, AVAX, CRV, BNB, AAVE, etc. Taking Ethereum for example, providing liquidity to Ethereum and Convex’s CVX token, a yield optimizer platform for Curve, in a bull market will have the following outcome: Not only is the provider exposed to two assets that are climbing with the market, CVX is very correlated with Ethereum and rows with its ecosystem. Every time somebody swaps in this pool, the provider’s holding of both assets increases. Even accounting for IL, if the provider exits their position at a time where ETH and CVX have more or less the same ratio as when deposited, he will have effectively longed the market and have more of the two assets, which have also increased in dollar-denominated value.
Bear markets are different. A liquidity provider can be bullish long term on an asset, let’s say AVAX, but bearish short term and wants to accumulate it. One way to achieve this is to provide liquidity in a variable/stable pool. Let’s take AVAX/USDC as an example. 1USDC = 1USD despite market conditions (barring a massive depeg event, of course). As the theoretical bear market does its thing and drags asset prices down, the provider’s LP token ratio will change to increase AVAX to the detriment of USDC. Add regular compounding to this and you will have even more AVAX. Essentially, the easiest way to visualize the phenomenon is to understand it’s like DCA-ing on the way down into the token that you want to accumulate. The ideal time to exit the position is, surprise, when AVAX’s price climbs back to where it was at the creation of the LP Token.
Either of these work for crab markets, yield crafting is both a science and an art, and there is such a thing as LP Hedging, however there are other, more capital-efficient ways of managing funds during choppy markets. Obviously not financial advice.
Closing thoughts
As stated above, IL is not a scary boogeyman that comes for your portfolio at night. Understand it, account for it and implement it into any risk management model you might be using. The unknown tends to be scary until it's understood. Stay safe out there, farm responsibly and keep learning!