Impermanent Loss for Dummies
The first thing to note about impermanent loss is that the term is terrible to describe what is actually happening. We will refer to it…
The first thing to note about impermanent loss is that the term is terrible to describe what is actually happening. We will refer to it from here on as Rebalancing Loss.
Yield farms / Automated Market Makers use a bond curve contract to establish the price of tokens.
x∗ y=k
HUH? don’t worry, you don’t need to know that X is token A, and Y is token B, and that k is the product of the pool. The main take away is that when a user performs a swap on the DEX, the token ratio will adjust (rebalance).
HUH? when you lock up tokens to provide liquidity, you earn a reward for this service. Let’s see an example of how prices are affected by a swap.
Why are users swapping in the first place? Because a DEX (decentralized exchange) allows anyone to participate in exchange without requiring them to “sign up” for a custodial service like Coinbase for example. The biggest win is that no one can ever deny you service or freeze your funds. Users who provide liquidity earn a small percentage of each swap.
So now that we’ve seen the possible outcomes from users participating in a DEX, what actually IS rebalancing loss?
It’s the difference in value if you compare the total value from just holding two tokens, versus if you yield farmed with them.
Lets go over the possible scenarios of price direction before we get more in depth.
Fundamentally, the farm and contract have no idea what “market” prices are going for. The swaps that take place establish the rate between the two tokens, thus updating it’s price. Rebalancing attempts to keep you at roughly the same 50/50 value of the two tokens.
Huh? If someone wants to buy AVAX with their PNG, this causes the price of AVAX to go up and PNG to go down. If you have $100 of AVAX and $100 of PNG initially, then the new price bump means you have $110 of AVAX and $90 of PNG.
Let’s say your original deposit was 1 AVAX and 10 PNG. In order to keep you at roughly 50/50 value, you would end up with 0.9 AVAX, and 11 PNG.
Based on the possible scenarios, there are many different strategies to employ to use rebalancing to your advantage. For example, if you think that AVAX is at the top and going to drop drastically, then you’d want to enter a pair with a stablecoin like AVAX/DAI.e. If you start off with 10 AVAX and the price tanks, you will be rebalanced and end up with 15 AVAX or 20 AVAX. When you think the price is at the bottom, you would remove your tokens from the pool, and swap the stablecoin back into AVAX. You end up with more total AVAX than you began with and your volatility was reduced while the price was falling.
What do you need to watch out for? Because yield farms offer you a bonus reward on top of the swap fees you earn, you almost always come out ahead compared to just holding two tokens and not farming. However, Impermanent loss is a very real possibility, it’s just non-existent until there are rapid price swings. When you see rapid swings of over 100%, the bonus rewards are likely not enough to offset the rebalancing loss, and it would have been better to have simply held the tokens without farming.
The ideal farming situation is for your two tokens to increase/decrease in price at the same rate. so if AVAX goes up 10% and PNG goes up 10%, there is absolutely no risk of rebalancing loss and you are up overall compared to just holding because you also earned the bonus rewards for providing liquidity. Of course this will not always happen, and if one token moves wildly compared to the other, you may end up in a good or bad situation (depending on which token you end up with more of).
So hopefully you have a better idea of what Impermanent loss is, and this should help you make better decisions when it comes to choosing what or whether to yield farm.
If you want to check out other projects on Avalanche, check out https://ecosystem.avax.network/marketplace
If you found this content useful, give us a follow at https://twitter.com/datnoiddefi