# Real HIVE >> HBD Conversion Analysis

#### Yesterday's post was quite well-timed.

Right after posting that 2820 word monster the price of HBD spiked to the upside. To be fair there was a good chance of this happening which is exactly why I wrote the post in the first place. When a whale declares they intend to buy hundreds of thousands (perhaps millions) of HBD, we have to take that statement seriously.

hbd borrowedhive collateralremainder
2,34211,177365.5

So last night when HBD was spiking I put my money where my mouth was and slowly converted my 5000 liquid Hive into HBD to dump onto the market. Adding up the numbers I owe back around 2342 HBD, which will be paid back automatically in three days using my 11177 Hive that is currently locked as collateral. This real-life example has taught me that a lot of the numbers I used in my last post are slightly incorrect (as I warned they might be within the conclusion). Nothing like an actual 'real-world' test to better hone the theory.

##### https://hive.ausbit.dev/hbd

If we hit up the HBD tracker by @ausbitbank we can see that average Hive price is securely in the 45 cent range. This was the case yesterday as well, which is why I was confused about some of the numbers I was getting on the live conversion test.

For starters that first conversion is very telling. I locked up an even 2000 Hive and only got back 419 HBD from the loan. This implies that the value of half my collateral (1000 Hive) was worth 419, and that 1 Hive was valued 41.9 cents each. In my post yesterday I would made this calculation and claimed that 450 HBD would be granted to me because the average price of Hive was 45 cents yesterday.

##### The reason for this discrepancy is two fold.

First, it's obvious that the 5% tax is calculated in advance. Theoretically this 5% tax could be calculated in multiple ways and I'm still not sure how it is actually done. For example, the tax could be calculated by:

• taking my collateral (1000 Hive) and dividing by 1.05
• taking my collateral (1000 Hive) and multiplying by 0.95
• giving me 1000 Hive worth of HBD, and then subtracting 5%.

• 1000 / 1.05 * 0.45 = 428.6 SBD (wrong)
• 1000 * 0.95 * 0.45 = 427.5 SBD (wrong)
• 1000 * 0.45 * 0.95... Same exact math as above in different order.

So in all circumstances the number I got was way off from the expected 419 HBD. This made me realize the other huge error within the equation. Hive doesn't use the 3.5 day median average for calculating collateral value (in this case 45 cents)... because doing so would be really stupid, which I realized shortly thereafter.

In my last post I described the "bad debt" situation in which Hive dips 50% and the collateral to pay off the loan no longer covers the loan. What I failed to realize when I wrote this is that using the average median price to calculate collateral value is a TERRIBLE idea for this exact reason. For example, what happens if Hive flash crashes 75% instantly right now but the average is still exactly the same? Anyone could then mint HBD without the correct amount of collateral and Hive could even go into a death spiral at that point. Not good!

#### Does Hive use the Lesser of both numbers?

I suspect that if Hive moons it would also be a bad idea to use the spot price as the collateral measurement. This leads me to conclude that if the current spot price of Hive is BELOW the average, Hive uses the estimated spot price, but if Hive spot price is ABOVE the average then it must round down to the 3.5 day average. Would be nice if someone in the comments could confirm this.

### Checking my work...

So last night I think the spot price was around 44 cents while the average was basically 45 cents. If we use basic reverse engineering we see that I ended up with 419 HBD so...

950 * spot-price = 419
spot-price = 44.1 cents

##### And now the math makes a bit more sense.

Spot price was below the average, so Hive used the spot price median witness feed number instead instead of the 3.5 day average to calculate how much my 1000 Hive was worth. A very small detail that I've already spent way too much time on. lol.

#### Moving on.

I've got to be honest that I'm a little worried I won't make money on this trade because Bitcoin and the rest of the market started dipping immediately after locking up my Hive collateral. We can all see that candle wicking below the MA(200) at that time. I feel like I'm going to be eating my words telling everyone to defend this level... but let's be honest: me being wrong about wen to buy is the standard, not the exception.

You still have time to get out now if you've got cold feet, but at the same time I think Hive has a lot of support at the MA(25) which is only an 8% drop from here. At this point I'm personally pretty committed to the defense of the MA(200), and even have 2000 HBD unlocking in 22 hours which I plan to get another good deal with (hoping that HBD pumps again).

Another TA of note is the golden cross coming in today at 7 PM EST. The MA(50) will go above the MA(100). Unfortunately the MA(50) is the least significant line out of all four of them (25, 50, 100, 200) and there may be no one that trades around it. You might be asking why I'm still tracking the MA(50).

Well if you look at it the spot-price can often trade around it. Like on December 23 Hive pumped exactly to the MA(50) and then crashed immediately. Stuff like that happens all the time and can be easy money for anyone that notices the short opportunity. Same thing happened on Jan 17 when Hive spiked from the MA(100) to the MA(200) in a single wick and crashed in the same wick. Thus far these moving averages have been the most helpful metrics in determining if Hive is overbought or oversold for me personally.

Last night I bought most of my Hive with HBD around the 0.37 ratio. Napkin math dictates that as long as the average 3.5 day price of Hive stays 5% higher than that I should at least break even on my conversions. That's an average price of around 39 cents in three days time. I'm not too worried because even if I lose on this trade it's only going to be a small amount. Live and learn. Bitcoin picked an annoying day to dump that's for sure. Already I can see Hive wicking below the MA(200) again as I type this out. Lame.

##### Conclusion

Even if I lose money on my conversions it will have been worth it just to learn exactly how the system works the day after trying to do an in-depth explanation of it. I have an even better grasp now of how the calculations work and I pride myself on knowing as much as I can about Hive. It's a very complex system, which is easy to forget for someone that's been around for six years. One day at a time. Keep grinding.

Posted Using LeoFinance Beta

0
0
0.000
(Edited)

I dont think the spot price is used for any conversions ... even if its lower... best gues I can make atm, is that the 5% that is applier is taken upfront for all the amount ... in your case 2000, 100 is tax, so you are left with only 900 in effective hive for instant conversion... also the median price is rounded on the second decimal on hiveblocks, that can cause some differences

0
0
0.000
##### I thought I explained pretty well in the post why it can't work any other way.

Not using the spot price to calculate collateral value leads to a guaranteed death spiral the second we get unlucky to the downside. I could mint HBD out of thin air and never pay back the loan given any flash crash greater than 50%.

Also I'm not borrowing 2000 Hive.
I'm borrowing the amount of HBD I'm given, which is 419 HBD.
A 5% tax on 2000 is a 10% tax on the total loan.
We already know this isn't true because HBD is soft-pegged to \$1.05 and conversions begin there.
If this was not the case then market makers would not convert until \$1.10.

You also didn't do the math.
900 * 0.45 = 405 HBD
It needs to add up to 419 HBD.
Rounding to the nearest hundredth is quite insignificant given the actual difference in these numbers.

#### TEST

I will run a test right now to prove I'm right.
I will convert 1 Hive into HBD.
The spot price is lower than the average.
It will use the spot price.
The spot price is 42.5 cents.
I should get 0.2125 HBD minus 5%.
That's around 0.202 HBD.

This is the kind of rounding error we are looking for.
I guessed 0.202 I got 0.204.
I have to assume I'm doing this correctly until shown otherwise.

##### You are right in that spot price is never used during actual conversions where tokens are burned, but it absolutely is used to calculate collateral value and loan amounts given when it's lower than the average.

Again I've done the game theory on this and it can't work any other way without risk of death spiral.

0
0
0.000

There is a risk for minting "free hbd" ... but the price needs to drop lower than 50% in 3.5 days, becouse average.... more like 90% drop

0
0
0.000

No because if it drops 50% instantly right now the system would think Hive was worth 45 cents when it was really worth 22.5 cents. There is no waiting 3.5 days in this scenario. Anyone would immediately be able to mint 100 HBD with \$100 worth of Hive on the spot. Think about it. It CANT work that way, and if it does we are in huge trouble.

Until you show me the math on a conversion you aren't really going to convince me otherwise. Someone of your abilities should easily be able to show a conversion and all the relevant variables... do the math and get the correct number. You haven't done that yet even though you're one of a handful of people that could actually do it and have a history of providing blockchain stats.

0
0
0.000

And guess what?
After someone converts \$100 of Hive into 100 HBD instantly... they can convert the HBD back into Hive and turn a profit just like we've seen in other stable-coin exploits... because after 3.5 days the average will catch up, Hive will be valued lower on the 3.5 average, and more Hive will be printed than was burned initially.

0
0
0.000

I'm doing more of a deep dive on this with the links toni dropped...
Looks like you might be right.
I may have to issue even more corrections and concerns tomorrow.

0
0
0.000

"I suspect that if Hive moons it would also be a bad idea to use the spot price as the collateral measurement. This leads me to conclude that if the current spot price of Hive is BELOW the average, Hive uses the estimated spot price, but if Hive spot price is ABOVE the average then it must round down to the 3.5 day average. Would be nice if someone in the comments could confirm this."
"When operation is initiated, the collateral price to buy HBD with Hive is calculated:
collateral_price = min(last 3.5 days worth of hourly price medians) + 5%"https://gitlab.syncad.com/hive/hive/-/merge_requests/191

0
0
0.000

It looks like `estimate_hive_collateral` is what I'm looking for.

0
0
0.000

!1UP I look forward to hearing the answers to the questions raised in the comments!

!PGM !PIZZA !PIMP

0
0
0.000

You must be killin' it out here!
@underlock just slapped you with 1.000 PIMP, @edicted.
You earned 1.000 PIMP for the strong hand.
They're getting a workout and slapped 1/1 possible people today.

0
0
0.000
(Edited)

🍕 PIZZA !

@curation-cartel(8/20) tipped @edicted (x1)
underlock tipped edicted (x1)

Send \$PIZZA tips in Discord via tip.cc!

0
0
0.000

but let's be honest: me being wrong about wen to buy is the standard, not the exception.

This cracked me up 😂

But those who have been reading your posts for a while know this already haha. I have been reading your articles for over a year now and you have always maintained this stand 😂 After the pump my analysis still showed a support strong at 35-36 cents, but because the pump was big I wasn't confident HIVE would come back down so much near 40 cents. Then I saw you called 45 cents and immediately I lowered my buy orders. One got filled a few hours back, one more to go :P

But then again, now that you're thinking the price might go below - I am starting to worry for my lowest buy order! Decisions, decisions!

0
0
0.000

Thanks for sharing your experiment. The experience you have gained is useful and interesting.

0
0
0.000

Thanks for sharing the results of your research project. It is good to know how the conversions actually work

0
0
0.000