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.

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:
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
lol... fun...
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.
Posted Using LeoFinance Beta
The best way is to keep it simple. You want an even amount in every pool if possible as a starting spot. Or maybe 3/4 Stable 1/4 Not! You also need to base this implied volatility around the bull market. Volatility will be going up again hard when bract drops in bear market. We still have a good year left, maybe 11 months? hmm..
I aint no Einstein but what I took from this post was that things can be more complex than we first realized due to ongoing unseen variables being added to equations which obviously then alters assumed possibly outcomes.
I pride myself on understanding about 30% of most of your posts. This one? Not so much. The only thing that really sticks out to me here is this: no one adds ONLY BUSD to a Cub/BUSD pool. By definition, they have to add equal amounts of both. So, the only "variable" in this pool is the price of Cub. If there is $2M in the pool ($1M CUB at say $10 (so 100k tokens and $1M BUSD) and the price of Cub goes to $20 then the value of the pool would be $2M CUB and $1M BUSD. At which point the pool would sell some Cub and add BUSD until they're balanced again. You would still end up with $3M in the pool but you'd have $1.5M in Cub (75k tokens of Cub and $1.5M BUSD). So if you were a holder of 10% of the pool at the beginning (10,000 CUB and $100k BUSD) you would "lose" 2500 CUB while gaining BUSD but....I've now confused myself so consider this a "garbage" comment as well. lol I can't follow my own train of thought any further. Sorry.... :-)
Posted Using LeoFinance Beta
I may be completely off base with my logic but that's where I was headed and then it got too complicated.
Posted Using LeoFinance Beta
The price of CUB can't go to $20 until the ratio in the pool changes to 20:1
It's also impossible for an LP to ever be off balance. Both sides are always equal in value in terms of USD. Add to one side, subtract from the other.
I don't think that's necessarily true. Say Cub got listed on Coinbase. It would be very possible for the price of Cub to go up or down completely independent of what was trading in the LPs. If the price goes up, arbitrageurs would come in and equal out the LP's again with the new price so they matched. That's the part I'm not sure about. How do they do that? The arbitrage they make is what becomes the LP holders impermanent loss plus transaction fees. In other words, the arbitrageurs "skim" a little of the profit out of the LPs so the LP holders don't make as much. I agree, the asset won't go to $20 with the LP asset staying at $10. Arbitrageurs will come in way before that to even it up again. I was just using round numbers to make it easier to do the math.
To offset impermanent loss, many LPs incentivize farmers by offers rewards. In our case those rewards are Cub. The extra Cub farmed protects the LP holders from impermanent loss due to the price fluctuating on one or both assets if you're using something other than a stablecoin.
Posted Using LeoFinance Beta
This is 100% false. Many articles that try to explain impermanent loss do phrase it in this weird way though. It's not suddenly possible for people to extract value out of an LP pool just because we get a centralized exchange listing. Impermanent loss 100% occurs because coins in the LP are for sale and they are being bough and sold at market value on the curve.
Think about it this way: Impermanent loss is impermanent. If the price goes up, LPs take the loss, but if the price goes back to where it was, there is no loss. Did the arbitrageurs give the money back? lol... I don't understand why so many websites try to push that obviously false narrative.
Arbitrageurs don't make any money off of the LPs: they make it off of the liquidity located on the centralized exchange. This is very obvious just from the fact that impermanent loss is impermanent.
Right, but my understanding is there is an automatic balancer. At a certain divergence in value between the two assets, it will automatically buy or sell one or both of those assets to rebalance the pool so they are equal again. Impermanent loss is the difference between what you get when liquidating your pool stake vs what you would have had if you'd just kept the two assets outside the pool. If one asset goes up in value, the balancer (arbitrageur) will sell some of it into the asset on the other side. This transaction has a fee associated with it as they are buying/selling that asset from somewhere else to put back in the pool and keep it balanced. Whether that fee is from the exchange they're buying it from or whether there's a fee charged by the balancer itself, or both, I don't know but...that's where the impermanent loss comes from.
I would argue that if a pool started with a 50/50 balance and then the price of one asset doubled and then went back to where it started, and no money was taken out or put into that pool along the way other than by the balancer, and then the entire pool cashed out exactly where they entered, in that scenario, the pool facilitator (Uniswap, Cubdefi, etc.) would actually suffer a loss. That loss would be the transaction fees it incurred to rebalance the pool along the way in both directions.
Posted Using LeoFinance Beta
This is also problematic because this is not a thing that actually happens in the real world. No one just sits on half of their stake being a stable coin: they trade it, and on average traders lose by a big margin.
Again impermanent loss only happens because you have LP tokens in the pool, which means your coins are for sale. Say the value of CUB goes from $5 to $10. The CUB that you personally have in the pool is going to be sold at $5, $6, $7, $8, $9, $10, and every value in between on the way.
So basically what you are saying is this: Well if you had just held the CUB and waited for it to spike to $10 you would have saved money! YEAH! NO SHIT! The entire concept of impermanent loss is flawed to the core and makes ridiculous assumptions like average people could have traded the market better than just farming the pools. Like, no... they can not... it is proven.
Again, arbitragers can not sap the LP pool.
I'm telling you this for a 100% fact.
No money flows from the LPs to the arbitragers.
Zero dollars.
Fact.
The only reason "impermanent loss" happens (terrible descriptor) is because your coins are for sale on an algorithmic curve and you are betting AGAINST the traders. LP holders are the house in the casino, and traders are the gamblers... so when people are like: "Well in this perfect scenario the gamblers beat the house on this occasion..." You can understand how that is an infuriating mindset that completely ignores the reality of the situation.
Again, arbitragers have nothing to do with any of this.
Impermanent loss happens with or without centralized exchange listings.
Outside exchanges affect impermanent loss 0%.
This 'automatic balancer' you speak of is just the ratio of x to y coins in the pool.
There is no balancer; the price is always right were it should be: at x to y.
The price of a coin in an AMM pool is always x:y where x is one coin and y is another.
The problem you're having with this concept is that it's being explained to you as if Centralized exchanges are the standard and Uniswap is this weird thing that doesn't make sense. It's being explained as though the price on the centralized exchange is correct and it's the AMM that needs to be balanced.
This is patently absurd and self-centered on the part of the centralized exchanges. The price on UNISWAP is the correct price, and it is actually the centralized exchanges that are wrong. Why? Because the liquidity on a AMM is ALWAYS going to be higher than a centralized exchange by orders of magnitude. There is only one price: the current ratio. And every single coin in the pool is being sold at that price when combined with the slippage algorithm. UNI-SWAP. One swap; one pool. No order book.
This will become more and more obvious as AMM takes over as the superior solution to liquidity issues.
Ok. I guess we have different definitions somehow. You say this:
And I read this about what Balancer (BAL) does:
Like I said, my understanding is that when the pools become unbalanced due to price fluctuations, AMM's will rebalance them by buying and/or selling the assets represented in those pools to even them out again. There is a "formula" they use that creates the "impermanent loss" that will only become permanent if the staker leaves the pool.
Logically, it makes sense. If the price of ETH is 20% higher on Coinbase than it is in my LP, I'd leave the pool and go sell my ETH on Coinbase. But that's not possible because the pool will rebalance itself by selling some ETH and converting it into the other asset so the value of both sides is the same. I'll lose some ETH while gaining some of the other asset. The overall value of the pool will go up but it won't increase by as much as it would have had the 2 assets been held outside the wallet. Impermanent loss.
I guess I would just say that the centralized market prices are NOT wrong. They reflect the buying vs selling pressure IN THEIR PARTICULAR MARKET. If their prices get out of whack with other markets, arbitrageurs will come in and correct it. If I can buy BTC for $54k on Coinbase and sell it for $55k on Kraken I'll short Kraken and long Coinbase in equal amounts until the prices get close enough its not worth the risk.
No market is WRONG. It's simply a reflection of what someone is willing to pay for something and what price someone is willing to sell for.
Posted Using LeoFinance Beta
It's actually really hard to grasp, I don't know tech but I can figure out process and how this stuff works. Alot of it is trial and error and I'm getting different results.
You also have to factor in the kind of investment, currently you're looking at it from an ape in perspective. From what I'm seeing alot of people have dibbled in with airdrop and small investments.
For me, it worked out when I removed liquidity from CUB to BUSD and used the BUSD to buy CUB I got an additional 15 CUB. So you need a higher ratio of BUSD to CUB or something fucked up upon removal.
I've dumped my CUB in the Den. I've also had a few k sitting in another den of a cryptocurrancy which has provided ok returns. I wish I did it sooner because it was covering what I was losing in trial and error (hasn't covered the 4% fee yet and probably won't.
I've since bought bleo and also bought bleo from income off HE. I'm staking earned Leo to my blog acct though.
Brought it across and dumped abit into the bleo and bnb farm.
I think the bleo is the best option as we know Leo is relatively stable itself and will continue to grow.
You only lose when you put in low and it becomes high. But you can just wait lol
Also I keep adding more bleo at different price points (on purpose) this averages out the price disparity and amount of loss you will suffer going forward.
I want to know what happens if you say put in 100 CUB and 100 BUSD as liquidity and CUB Moons to $500?
But best two farms on there are
Bleo BNB
CUB Den
Followed by token staking.
Posted Using LeoFinance Beta
Yeah nah, this was all too smart for me. Are LPs good or bad?
Obviously I'm being a jerk... I know the answer is : depends.
nah the LPs are amazing... especially now during a hyperinflationary period that suppresses the price.
Great! Glad I got involved then!
So many calculations, why not just look at the code to figure the formula?
Posted Using LeoFinance Beta
It would appear there’s more math here then meets the eye. Perhaps a math consult is in order, at a math geek site.
Posted Using LeoFinance Beta
How does the CUB-BNB pool affect the CUB-BUSD pool? Imagine a BNB whale buying tons of CUB for BNB. That would come out of the CUB-BNB pool, right? But then the CUB-BUSD ratio would create a different CUB value. I assume that would open doors to arbitrage then, right?
From all I am reading from you, I am perfectly happy to stay in the den for now, at least with my CUB position.
I have to reconsider my bLEO-BNB position, though. CUB went down more than BNB did and bLEO stayed strong. If I sell that position now and swap it into the CUB-BUSD, I would get cheap CUB and enter the stronger APR farm. Hmm...
Posted Using LeoFinance Beta
Yes, but you'll lose some Leo and gain a little BNB. Because now it takes less Leo to equal the BNB side. I think.
I staked ETH and wLEO and lost a couple hundred Leo because LEO went from .70 to $1. and ETH either went down slightly or stayed the same. Thus, when I exited the LP, I got back more ETH than I put in and less LEO. If I would have just held the two in my wallet, I would have ended up with the same amounts of both, obviously, but my value would have gone up more because I would have kept all the LEO.
Posted Using LeoFinance Beta
If more pairs available, everything becomes more equal.
Posted Using LeoFinance Beta
Exactly learn some math, I must also do it :-).
Posted Using LeoFinance Beta
You just reminded me that I haven't done math in more than 5 years! Thanks!
Posted Using LeoFinance Beta
My brain is in shock. He hadn't seen so much mathematics since I graduated from high school. Hmm ...
Posted Using LeoFinance Beta
Hahaha... I saw that $100k for a garbage experiment and I was thinking, "Damn... this guy has deep pockets!" Crazy stuff. I have just been in the CUB-BUSD pool so far. But may have to consider putting some into just the CUB den.
Posted Using LeoFinance Beta
That is some equation heavy math lesson :P I am in the busd-cub pool. I will be satisfied with the gain that comes from 10x growth of cub. $50 cub.
Posted Using LeoFinance Beta
Well... I have lost a small fortune so far on Cub ... but it’s just paper losses.... not losses until I sell... I magically turned 1.5 BNB ($450) into about $ 280 so far. I’m hoping Cub bounces back to $ 7 some day and I will break even. Learning a lot of great stuff though.
Posted Using LeoFinance Beta
I love mathematics because it shapes everything around us, but this is another level, I am in math 1 and this is advanced calculus for rocket scientists.
But if I learn it I won't have losses when it comes to investing.
Posted Using LeoFinance Beta
Can $CUB adopt what Bancor Network is doing to protect against Impermanent Loss ?
Posted Using LeoFinance Beta
Well, something to complex for many people lol, I got the idea that more BUSD represents less CUB, so when I want to take my liquidity back I will get something different than what I first put into the pool, when when it comes to know the specific number, there comes the problem.
There is much to learn about this, and it for sure will be getting more and more complex as developments and new ideas come to reality.
Thanks for trying to explian how it works!
Posted Using LeoFinance Beta
I am still working on it...
Posted Using LeoFinance Beta
TLDR :D buy?
!invest_vote
Posted Using LeoFinance Beta
@solymi denkt du hast ein Vote durch @investinthefutur verdient!
@solymi thinks you have earned a vote of @investinthefutur !
and know you know why i hold my cub in den :)
Is the best gamble investment for long term IMO :)
Posted Using LeoFinance Beta
https://twitter.com/PowerGames8/status/1372379937701728259
As a musician....could I somehow like...tie a track into a LP? Errr.....huh? Sorry. Brain is melting right now.
LOL Same.
Good lord what have I stepped into...and then compound on top of that $CUB harvesting, and then autocompound on top of that Kingdoms... the maths is melting my brain and my spreadsheet-jitsu is failing me.