Logarithmic Volatility Protection: More Impermanent Loss Nonsense

I'm starting to realize that my grasp of impermanent loss is extremely flawed. I assumed a lot of stuff during my research into the topic just to make it easier on myself, but as I start diving a bit deeper all the mistakes I've been making are hard to ignore.

Thus far I understand the basics:

Pairing oneself to a stable-coin liquidity pool reduces volatility in both directions. If the price crashes: you'll lose less than if you were all in on the main token. If the price spikes: you'll gain less than if you were all in. Easy... right?

But how much of a hedge is a stable-coin LP pool. Thus far I've just been kinda putting a blanket flat rate on it like 50%. Although recently it became obvious to me that this is grossly incorrect.

delta x.jpg

The standard example I've been doing involves what happens if a whale pumps x2 the liquidity into one side of the LP pool. This is the simplest example due to the math involved. Doubling one side extracts half of the value from the other, pushing the total price of the token x4 in either direction.

Because the coin goes x4 and the slippage for LP holders is only x2 I've just been tossing out the 50% volatility reduction stat. Unfortunately that theory completely breaks down when pushed a little farther. What happens if one side of the pool doubles again and the total price goes x16 in either direction? LP stack only move x4.

This leads me to believe that the volatility protection being offered by stable-coin LP pairings is more accurately exponential/logarithmic in nature. In this case my new guess is square-root protection. The square-root of x4 is x2. The square-root of x16 is x4.

This revelation has a lot of implications to it. For starters, if true, LP holders get very little volatility protection from smaller movements. That's just the nature of the exponential/logarithmic scale. Crazy things only start happening as we venture deep into the chart.

For example, square-root logarithmic volatility protection cuts volatility of an x4 movement down to x2, and an x16 movement down to x4, but what about a 10% movement? The square-root of x1.1 is only x1.049. So pretty much still 50% protection. It's easy to see how I could make the mistake that stable-coin LP pools dish out 50% protection when that's pretty much exactly what they do all the way up to the x4 levels.

However, you certainly wouldn't want to be in an LP pool for an asset that goes x100. You'd end up with only x10. Of course the same is also true for an asset that just lost 99% of it's value like when Steem dropped from $8 to 8 cents: hedging an LP pool would reduce the x100 losses to x10.

Still not entire sure if I know what I'm talking about. Certainly there are a lot of resources out there on this stuff, but there is a certain value to figuring these things out oneself. So I decided to try crunching some numbers manually and see if I learn anything.


Begin Garbage Experiment!

Feel free to skip to the end of this disaster lol.

Guess & Check slippage

  • I took a snapshot of the CUB/BUSD pool.
  • Total USD value: $1,873,592
  • Price ratio of CUB: $3.913 : 1

Buying $100k worth of CUB:

t1.png
No, I don't have $100k to spend :D

We see that if 100k BUSD was pumped into the pool during this snapshot, the slippage is 9.66% and the total price gain of CUB would be double that 19.32%. These numbers might be a little off if they include the LP fee in the calculations, so I'll have to check my work. If the fee is included the price impact will be a little higher than it would be otherwise, and doubling it won't tell us the exact new price of CUB after the trade (only how much we personally lost via slippage).

Total USD value: $1,873,592

  • Half of that is BUSD, the other half CUB. $936,796 each.
  • If I add $100k to the BUSD side, the pool is increased by 9.645%.
  • Already we see that the price impact does include the LP fee.
  • Assuming no fee, 9.645% of the CUB should be extracted from the other side. That's 23091 CUB. Subtracting the exchange fee of 0.2% gives 23,045 CUB, which is 10 CUB more than the estimated, so maybe the math here isn't perfect.
  • However, what we are really looking for here is how much CUB actually gained in value after the trade. We know for a fact that 100k BUSD went into the LP, and near 23,040 CUB will come out.
  • New ratio is 1,036,796 BUSD : 216,366 CUB for new price of $4.792. 22.5% percent higher than before. Considering I was expecting 19.23% the math just keeps getting worse and worse :D.

In any case, if volatility in CUB/BUSD pool is indeed being reduced by a logarithmic square root like I assume it is, how do we check that estimate against the math I've done here? The price increased 22.5% but how much impermanent loss did the LPs suffer?

Before the buy the the market cap of the pool was $1,873,592 and after it was $2,073,622. Someone with $2000 in the pool before the swap increases their stack size to $2214, but if they weren't in the pool that same stack would be $2225. Again, math feels wrong. That's very little slippage.

END Garbage Experiment!


FAIL!

I get the feeling I'll have to take this more seriously as time goes on. As a gamer, it's clear that many of these farming schemes and the like are going to be incorporated into blockchain games. Once that happens people we'll be playing games... for money. Which is something I've done in the past but I'm 100% sure it's going to be exponentially more insane when players provably own their assets (rather than the centralized corporation hosting the servers).

New theoretical numbers.

If an asset goes x100 and we are farming the LP pool do we really only make x10 gains? Only? lol...

Anyway...

Say I control $20000 in a pool of $2,000,000 (1%). How much money would it even take for this token to get pumped x100? Say the ratio starts at 5:1, so $5 CUB, 200k CUB : 1000k BUSD. Just the question makes me realize how little I know about LP pools, because I'm struggling to even put together the math problem. As BUSD enters the pool, CUB is being taken out. It's not obvious how much BUSD you'd have to pump into the pool for the 5:1 ratio to get modified to 500:1 to achieve x100 gains.

I do know that every time we double the BUSD in the pool, CUB gets slashed in half and the ratio goes x4. Do that 3 times and we get an x64 with a ratio of 8M BUSD : 25k CUB. This would spike the price of CUB to $320 (an x64 gain from $5).

Had I kept the $20k in 100% CUB that would spike to $1.28M dollars... lol. Flippin crypto I tell ya. This stuff actually happens. Whereas if that value stayed in the pool the 10k BUSD side would get doubled 3 times ($80k) and the CUB side would also be worth another $80k (250 CUB * $320 each). $160k vs $1.28M is a difference of x8, so again we see that the x64 gain was reduced by the square-root.

This would also prevent significant losses in the opposite direction if CUB were to crash heavily. An x64 (98.4%) loss would be reduced to x8 (87.5%). Which truly sounds devastating either way but in a farm like this who knows how many gains we're taking off the table during that time.

As far as writing this down in equation form I'm having trouble coming up with it. Been a while since I actually tried to do any kind of math. The question still stands: how much money would I have to put into BUSD to spike the price X amount? Again, the answer probably has log() in it somewhere or a weird exponent.

https://www.binance.com/en/support/faq/33f38db8c23e4a0f949b5433cdc7193a

t1.png

lol... fun...

t1.png

See that? Perfectly self-explanatory! ... lol

Conclusion

Looks like I need to learn me some maths before I can parse these concepts any further. Sometimes the posts I write are for me. I feel like this might be one of them.

H2
H3
H4
3 columns
2 columns
1 column
36 Comments
Ecency