Have you ever wondered how impermanent loss (IL) works and negatively impacts your Liquidity Pool (LP) positions? Especially given the new concentrated liquidity (CL) model that Osmosis is offering, and when using third party automation tools, it’s an important thing to understand.
The following is an adaptation of a twitter thread from @seppwurscht in which he breaks down how he lost over $1250 in just a few days due to impermanent loss. Find the original thread, here:
Exploring Impermanent Loss in Liquidity Pools Through Example
Quasar Finance is a platform that aims to provide automated strategies for efficient use of providing liquidity to pools, learn more about Quasar Finance here. Osmosis is the largest DEX in the Cosmos, and it’s where Quasar is built. It has recently introduced concentrated liquidity as an alternative to the traditional model for liquidity pools, for more information on concentrated liquidity, check out this post from the Quasar team themselves.
As noted later on in this write up, the intention here is not to paint Quasar in a bad light. If anything it should be a reminder that you need to DYOR, understand concepts like IL and CL in their entirety, and above all, understand the risk surrounding everything you interact with in the new frontier of Web3.
About 10 days ago, I deposited some of my coins into the following three vaults on Quasar:
- a) USDC/OSMO
- b) USDC/TIA
- c) ATOM/OSMO
Let’s see how these positions compare now to when I entered them.
For reference, the prices at the time of writing (not initial deposit) were as follows:
ATOM = $9.2, OSMO = $0.63, TIA = 5.35 USDC =1$
3:00PM UTC, Nov 14 2023
The USDC/OSMO Vault
Initial deposit @ (T0): 1622 USDC + 3687 OSMO
Current Balance + Trading Fees @ (T1): 1968 USDC + 2421 OSMO
IL = Current Balance + Trading Fees – Initial Deposit*
Each multiplied by their USD value
1968*$1 + 2421*$0.63 – (1622*$1 + 3687*$0.63) = – 451$
Meaning I now have $451 less in total value than if I had just held the coins I initially deposited. Let’s look at the other pools.
Note: The way I calculated IL is that I took the token prices at the time of writing (T1) and not at the time of my initial deposit (T0). The price at t0 is irrelevant in this case, since we compare the total amount of tokens gained or lost at t1 vs. t0 to calculate IL. To attach a monetary number to the perceived IL, we multiply the total assets at T1 (current balance + accrued trading fees) with the current price and deduct from it the total assets held at T0 (initial deposit), again with the current market price.
If we took the price at T0, it would skew the picture and lead us astray due to the token’s price appreciation or depreciation. Check the following example for a better understanding:
Initial deposit: 114 ATOM + 2017 OSMO (T0)
Current Balance + Trading Fees: 110 ATOM + 1856 OSMO (T1)
Prices T0: Atom = $8, OSMO = 0.5$
Prices T1: ATOM = $9,2, OSMO = $0.63This is a very clear case of IL, as we have less from both assets (ATOM and OSMO) at t1 compared to t0. However, if we used two different prices (t0 + t1) to calculate IL we would get a totally distorted picture, fooling us to think that we made a good investment decision.
- IL (using two different prices) = (110*$9.2 + 1856*$0.63) – (114*$8 + 2017*$0.5) = +$260
- IL (only using current price) = (110*$9.2 + 1856*$0.63) – (114*$9.2 + 2017*$0.63) = -$139
In the first example we might think that we made a good investment decision, since our total balance rose by +$260 from t0 to t1. But this is only because the market surged during this period. In reality, we made a bad investment, as we would have been better off by only holding onto our initial assets (t0) compared to what we currently hold (t1).
- Current value of our initial assets without putting them into a CL vault: (114*$9.2 + 2017*$0.63) = +$2320
- Current value of our initial assets when putting them into a CL vault: (110*$9.2 + 1856*$0.63) = +$2181
Impermanent Loss: b) – a) = $2181 – $2320 = -$139
The same holds true when the market goes down:
We would have been better off, holding onto our t0 assets instead of putting them into a vault. What we just witnessed is impermanent loss!!!
Now let’s take a look at two other pools I was in.
The USDC/TIA Vault
Initial deposit: 787 USDC + 177 TIA
Current Balance + Trading Fees: 1026USDC + 0 TIA
IL= 1026*1$ – (787*1$ + 177*$5.35) = – $708
Perhaps you think more correlated pools, not holding stable coins, fare better? Let’s find out with the next pool:
The ATOM/OSMO Vault
Initial deposit: 114 ATOM + 2017 OSMO
Current Balance + Trading Fees: 110 ATOM + 1856 OSMO
IL = (110*$9.2 + 1856*$0.63) – (114*$9.2 + 2017*$0.63) = -$139
So does it fare any better? Not exactly, in fact, here, the amount of both tokens involved shrank!
Some Retrospective Thought
I allocate a low single-digit percentage of my OSMO and TIA bags to these very enticing CL vaults with the aim of boosting my earnings. Somewhat aware of the dangers of IL, I thought it might be profitable compared to staking due to the high APRs. A big takeaway;
Don’t get blinded by high APRs!
I highly underestimated how fast a volatile market can drain your funds via IL.
In every AMM pool, the asset that appreciates in price is sold off, while more of the underperforming asset is bought. In exchange LPs earn a small % of trading fees as a compensation mechanism.
Buy high, sell low.
As a CL vault moves out of position, it ends up holding 100% of the asset that “underperformed” compared to the other one. Whether the market goes up or down, the vault keeps holding the worst performing of the two assets.
Let’s take the USDC/TIA vault as an example:
a) TIA pumps📈
- The vault moves out of range & ends up holding 100% USDC.
- It no longer earns swap fees as the position is out of range.
- Vault buys back TIA, at the higher price (Buy High) with 50% of USDC.
- New trading range is set & assets deployed to earn fees.
- Repeat.
b) TIA dumps📉
- The vault moves out of range & ends up holding 100% TIA.
- It no longer earns swap fees as the position is out of range.
- Vault has to buy back USDC with 50% of TIA (Sell Low).
- New trading range is set & assets deployed to earn fees.
- Repeat.
To sum it up:
As $TIA moves up, the vault sells TIA for USDC until it’s out of range and holds 100% TIA, somehow taking profits. In this case, only holding TIA would have been the better option. Even worse, as the vault no longer earns trading fees, it must buy back TIA at the higher price.🤯
“So, why don’t you set a broader trading range?” you might ask?
The tighter the range, the more fees accrue to the vault. On Osmosis you can self-manage your position & manually set the trading range. The broader your range, the safer it is, yet fewer rewards are earned. This was a very painful lesson learned. I’ll definitely keep my fingers away from LPing into AMMs and leave it to sophisticated trading firms and market makers to provide liquidity to CL pools.
🔉Retail users listen up, LPing ain’t for us.
P.S. I don’t wanna shit on Quasar here, they’re just providing a service and it’s up to use to decide whether to use it or not. There are other, more stable and less volatile vaults like USDC/USDT or stATOM/ATOM which are less prone to IL and might earn you a positive yield.
Overall, Quasar Finance positively contributes to a better UX on the Osmosis DEX as their vaults deepen liquidity, automatically rebalance, and reduce slippage for traders. Just be wary of which vault you deposit into and be aware of the entailed risk.
In The End, What Killed Me?
- A too tight trading range (+/- 5%)
- High market volatility
- Putting two uncorrelated assets into a vault
- My greed to chase the highest possible yield (APRs > 100%)
- Not doing my homework and investing into products I don’t fully understand.
I had to learn this lesson the hard way, swallowing a very bitter pill. My hope is that you could learn from my naivety and greed and avoid falling into the same trap as I did.
Thanks for reading folks! I hope you’ve found this instance of education through example to be helpful and insightful.
Follow me on twitter @seppwurscht for more!