How Exactly Is The Hive Debt Calculated? Important Things To Know When Monitoring The Health Of HBD

in LeoFinance8 days ago (edited)

With the current situation with LUNA/UST and the unbelievable implosion that is happening there, its important to be aware of the HBD mechanics and how things work around here.
For every HBD holder it is very important to know that HBD is set to deppeg and loose its peg to the dollar by design. It is in the HBD design to drop in price if the debt of the blockchain is too high and exceed the limit that is set in the code.
Since the debt is what determines will HBD holds its peg or not lets take a closer look how exactly it is calculated, because as many things around Hive it is not exactly a straightforward thing.

HIVE Debt.png

HBD is considered debt on the main token, because in theory all the HBD can be converted back to HIVE, increasing the supply.

How Is The Hive Debt Calculated?

The formula for the Hive debt is as follows

DEBT = HBD in circulation / HIVE Market Cap

This looks quite straight forward, but it is not. It only has two elements, what can be so different 😊.

HBD In Circulation

First the HBD.
If we go to the Hive block explorer and check the current HBD in circulation we will find this

01.png

https://hiveblocks.com/

A 25.1M in circulation at the time of writing this post. But!
The HBD in the DHF (@hive.fund) wallet doesn’t count when the blockchain is calculates the debt. HBD in the DHF account is considered as not available freely on the market, and only when it leaves that account as a proposal payment it becomes available in the circulating supply.

02.png

https://peakd.com/@hive.fund/wallet

At the moment of writing this the HBD balance in the DHF is at 16,072,059.
When we subtract this from the total HBD supply of 25M, we get a 9.06M HBD if circulation that are used to calculate the debt.

03.png

The light color is the HBD in the DHF.

HBD in circulation = 9.06M

Hive Market Cap

The second element from the formula above is the Hive market cap.
Again, the Hive market cap that is used to calculate the debt is not the one that is displayed on the standard coin aggregators like Coingecko.

At the moment of writing this this is what is show on Coingеcko.

04.png

Coingecko is showing a circulating supply of 371M HIVE, a 0.47$ price, and a market cap of 173M. I really can’t tell how Coingecko gets its supply for HIVE since it is at 371M, while the current supply is at 380M. They say that tokens that are locked in wallets for governance like the DHF are excluded from the supply. But even if we go with this approach there is 62M HIVE in the DHF now, so that will be a 318M, not the 371M as they show.
Coinmarketcap on the other hand takes the virtual Hive supply when calculating the Hive market cap. The virtual supply now is around 429M, so the market cap on the CMC is bigger than the one on Coingecko.

Ok, that is how the coin aggregators are doing it when it comes to market cap. But how is the blockchain doing it?

First the formula for the market cap.
Hive market cap = HIVE supply X Price

HIVE Supply

First let’s take a look at the supply.
When calculating the supply for the debt, the blockchain takes into account the virtual HIVE supply. This is the HIVE supply plus the theoretical HIVE that can be converted to HIVE from the HBD.

HIVE virtual supply = HIVE supply + HBD supply / HIVE feed price

HIVE virtual supply = 380M + 25.1 / 0.5 = 430M

Now what is interesting here is that the formula above takes into account the HBD in the DHF as well. Maybe in the future this should be changed and the HBD from the DHF should be excluded when calculating the virtual HIVE supply. This is in correlation with the HBD in circulation method showed above.

The chart for the HIVE supply looks like this.

05.png

The light color on the top is the additional virtual supply from the theoretical HBD to HIVE conversions.

Note that this is a situation until the end of April, May is not included yet.

HIVE Price

Yet again, when calculating the debt, HIVE price is not the same as the market price. It is the HIVE Feed price that is being used to calculate the market cap for the debt.

So, what is HIVE feed price?
HIVE feed price is the 3.5 median price from all the submitted entries from the top 20+1 witnesses in that period. This price usually lags behind the market price. This is the price that is used for many blockchain operations as the HIVE <-> HBD conversions, debt calculations, posts payouts etc. It is the price oracle for the blockchain. It is used for the calculation of the market cap for the debt as well.
At the moment the HIVE feed price as presented on hiveblocks.com is at 0.5, while the market price is at 0.47. This is not that big of a difference, but in volatile times this difference can be bigger. Yesterday for example (May 12, 2022) the HIVE market price was at 0.4, while the HIVE feed price was at 0.6. A 50% difference.
This median price act as a sort of a buffer for the system and exclude the extreme market volatilities that can happen in crypto. It slows the system down a bit but gains security. For example, the one day printing for LUNA in trillions couldn’t happen here just because of the 3.5 HIVE feed price. The price for conversions wouldn’t collapse as fast as the market price, avoiding extreme levels of inflation. There are other important factors that prevent death spiral for HBD and HIVE, especially the debt limit, but the price feed adds on top of them.

06.png

If we take a look at the Coinmarketcap, that takes into account the virtual HIVE supply, same parameter as the debt calculation on chain, the market cap for HIVE is 209M, while for the same supply the market cap on hiveblocks.com at the moment of writing this is 215M. This is because of the difference in the price, 0.48 market price, VS 0.5 feed price.

Debt calculation

As we can see from the above three main parameters are taken into account for the debt:

  • HBD in circulation
  • HIVE virtual supply
  • HIVE Feed price

All of the above are different on the blockchain from the usual ones that the coin aggregators report.
When we apply the above we get this:

DEBT = HBD in circulation / HIVE Market Cap

DEBT = 9.06 / (430M * 0.5) = 4.2%

A 4.2% debt as of today, May 13, 2022.
Yesterday the debt was at 3.6%, but with a HIVE feed price of 0.6. Today that feed price has dropped to 0.5.
If the debt level reaches 10%, the blockchain will no longer gives 1$ worth of HIVE for the conversions, ergo HBD will lose the peg.

How much can it go down?
For example, if the debt is at 11%, the HBD price from the blockchain will be at 10/11 = 0.909. If the debt is at 20%, the HBD price from the blockchain will be 10/20 = 0.5.


At the end a notice that HBD, formerly SBD was created in 2016. A full seven years now. It has been battletested through bear market. It has broken the peg on the downside two times, once in December 2018 and lasted a month. The second time in August 2019 and lasted six months. The lowest it went was around 0.6$

07.png

Note that in that time there was much less fundamentals around the chain. Less apps using it, no DHF funds, no stabilizer etc. Still HBD is designed to break the peg to prevent death spiral and in extreme bad situations this can happen again.

Live data here:
https://hive.ausbit.dev/hbd

All the best
@dalz

Posted Using LeoFinance Beta

Sort:  

Technically speaking the debt limit never goes above 10%. At the moment we have 42 million Hive that supports the value of HBD. This number doesn't show anywhere but it can be calculated by dividing the Hive supply by 9.

If the virtual supply exceeds the maximum supply (which is equal to the hive supply + hive supply/9) then the latter is used for conversions (the so-called haircut rule). In the theory, the blockchain can support a circulating HBD supply of 21 million at the current feed price of 0.5.

The formula to estimate the "haircut" price is circulating HBD supply/(hive supply/9). So, if the witnesses' median feed price is lower than the "haircut" price then the blockchain uses the latter for conversions.

For example, if the HBD in circulation was 30 million instead of 9 million then the conversion value of HBD to hive would be 0.70 (21/30 or max circulating HBD/circulating HBD). This formula only applies when the debt level has reached its limit.

This number doesn't show anywhere

Not directly but you can subtract the current supply from the virtual supply. Both are shown on hiveblocks.com but the virtual supply (bottom number) is not labeled there.

image.png

Dumb question: can anything similar with UST occur on Hive?

Posted using LeoFinance Mobile

Its the main question these days .... from the writing above you should take conclusions.

  1. Because of the debt limit the HBD supply is small. Its 1 to 20 in market cap for HIVE atm.
    HBD supply can not expand super fast as UST did. This is a pro and a con at the same time. It doesn't allow a significant grow in a fast period of time.... UST did 0 to 18B in just one year.

  2. Even if this small supply somehow becomes weight on the chain, super fast drop in the HIVE price, the HBD price will be lowered, meaning it cant print big amounts of HIVE. Say HIVE price drops to 10 cents in one day. First the feed price that is used for HBD to HIVE conversion will take 3.5 days to adjust to those levels. Meaning no instant massive conversion HBD to HIVE. Next if the super low price stays there for days, at the current level of HBD supply and a 10 cents HIVE, the value of HBD will be 0.5$ from the blockchain, reducing the weight on the chain. If it drops further to say 5 cents, the value of HBD will go to 0.25$, losing the weight and the ability to push the HIVE price even further.

  3. The system has been tested and survived with much less adoption and security mechanics, that it has now.

Sounds pretty comforting

Posted using LeoFinance Mobile

Hive dumped more than x7 times from it's HIGH price. Hive quantity is an unlimited. why it will grow in price? any suggest?

well written

Posted Using LeoFinance Beta

I think no... HBD, although I have not read much about it has a stabilizer, UST and Luna was kind of centralised because it depended on how the LGF swapped assets to keep UST's peg.

The Luna peg depended on how the swaps were done by the Luna GAurd Foundation team...and it failed.

Here HBD there are clear mechanisms... first I read that HBD supply will not exceed 10% of market cap of Hive...and has more automatic mechanisms if things break... so not like UST...

better we understand how HBD works better and evaluate the risks. I don't know, atleast HBD is in a small scale use now, so it will scale propotionately with sensible mechanisms that Luna lacked...

Anyway...

Hive has a debt limit protection, called haircut rule, which should prevent such a catastrophic scenario. On the other hand, there is a constant pressure to increase the debt limit and print more HBD. Also 20% interest on an algoritmic stablecoin isn't sustainable.

The Haircut prevents the death spiral, but HIVE will still be printed. The best protection is to never implement an instant redemption from HBD to HIVE, which Luna had and what is totally buckers as an idea.

Posted Using LeoFinance Beta

Really it isn’t?

Posted Using LeoFinance Beta

LUNA/UST is so famous these days.
And no one want the same thing happens to HIVE :)

Posted Using LeoFinance Beta

For sure.

Posted using LeoFinance Mobile

why not. it's possible with every crypto, which has an unlimited quantity. Hive has an unlimited quantity too.

Thanks! I have begun to be very interested in HIVE tokenomics and HBD characteristics since the increase in HBD interest by the witnesses. Feel pretty good, but especially since this LUNA fiasco I have become much more interested in the deeper nuances of HBD as a stablecoin before I put larger amounts in.

This puts me off to a good start for my deeper dive ;-) None of this is easy to understand, but I love stuff that is not easy to understand. That factor itself actually drives me to understand :-)

Posted Using LeoFinance Beta

As mentioned on Twitter, this is an excellent explanation that I will re-use to explain why HBD is a "stable stablecoin". Thanks a lot for sharing it. I guess it will clarify a lot for many!

Cheers!

Great explanation, for an honest view, I would add the HBD from the DHF to the debt calculation as well, since it can also be spent in the future. Otherwise debt looks better than it actually is.

But look at HBD in DHF as this.
Say a short seller want to do the same things as to LUNA and UST.
He will need to get a lot of HBD first, as they got 1B in UST.
All the HBD in the DHF is not for sale. A maximum of 1% can be sold daily if someone push the price of HBD up. Its impossible in a short period of time to get a lot of HBD. HIVE to HBD conversions will be needed and the HIVE price will most likely go up.

Next even if by some magical scenario someone gets a lot of HBD, when they start to short, HIVE price drops bellow debt limit, and HBD loses its value as well. Unlike the UST case where they try to maintain UST price, while LUNA was going down, giving the UST holders a lot of LUNA in the conversion process.

HIVE feed price is the 3.5 median price from all the submitted entries from the top 20+1 witnesses in that period. This price usually lags behind the market price.

A very detailed educative post, but if those top 20+1 witnesses want to flip the switch together ?

Posted Using LeoFinance Beta

Yeah somebody can always pull the plug. But ultimately we can always FORK away if there's to be a radical problem.

Posted Using LeoFinance Beta

You mean like during the Sun Wars?

Posted Using LeoFinance Beta

Well the Hive stakeholders need to be sure in the witnesses they elect to run the chain :)

I'm having a hard time understanding the debt conversion incentive.
If there is too much HBD in relation to Hive's market cap, then the conversion won't be done 1 to 1; but if HBD depegs with a value lower than $1, then people will look to convert it to hive which lowers the supply of HBD until there isn't any left.
So, the good thing is that there will never be enough HBD to be bought and converted to tank the price of hive.
On the other hand, you will have to always be looking out when storing HBD since if the debt goes over 10% you are not getting a 100% conversion rate to Hive.

Also, thank you @dalz for the in depth explanation. This really gives peace of mind around HBD. Some times it can seem challenging learning about an entire blockchain ecosystem.

Brilliant, I must read it again, for its not sunken in, but its very fasinating.

So, its ok if HBD is below the dollars peg is it, since your saying its designed to lose peg to 1$...

I really like that there is a mechanism on how this all works, and it needs to be again read and properly understoof by me!

It's designed to lose peg instead of self destruct the entire chain like Terra. Neither is really good, but the former is certainly less bad than the latter.

Awesome update as always, keep up the good work.

Posted Using LeoFinance Beta

Thanks for all your reports.

If HBD loses its peg, can it later regain it? or we need to take a loss?

Yes It can ... check the bottom chart

thanks. as a long term HBD hodler, its ok for me if it keeps the system alive and will at some point return.

I just think there could be huge risks enticing all this speculation and gambling money to hive.

With all the market moves the last 48hrs, there have been a handful of very insightful articles and I'm so glad that I found this one as there were some mechanisms that you pointed out that I didn't even know were in place to safeguard HBD from a death spiral. The longer I am here and the more I learn, the more I like how Hive works and the fundamentals seem solid.

Thanks Dalz, much appreciate the effort you put into this explanation

Thanks a lot. Great post for me. I bookmark it.


The rewards earned on this comment will go directly to the person sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

This post has been manually curated by @bhattg from Indiaunited community. Join us on our Discord Server.

Do you know that you can earn a passive income by delegating your Leo power to @india-leo account? We share 100 % of the curation rewards with the delegators.

Please contribute to the community by upvoting this comment and posts made by @indiaunited.

Your content has been voted as a part of Encouragement program. Keep up the good work!

Use Ecency daily to boost your growth on platform!

Support Ecency
Vote for new Proposal
Delegate HP and earn more

This is a very well laid out article on HBD mechanics. Luna was a great example of how centelrization of a chain is bad.

Posted using LeoFinance Mobile

Can somehow explain why HIVE has an unlimited quantity? what's the difference between Hive or Luna or DOLLAR? they are both has an inflation model..... and it never be cost 2-3 dollar again. I can bet on this (2022))

Read this ... I punlish infaltion and supply for Hive each month
https://hive.blog/hive-167922/@dalz/hive-inflation-and-supply-for-april-2022

Thank you for taking the time to explain that in plain English. Very helpful and definitely deserving of a !BEER

Cheers

Sorry, out of BEER, please retry later...

Now with regards to Hive Backed Dollars I take depegging adds a safety net to offset a crash like Luna or is it the other way around? Essentially I understand that HBD will stay depegged and this can assure the currency won't fail in the end. Anyways very informative post as I'll take it in more and I'm sure it will click!! Thanks!!

Posted Using LeoFinance Beta

I still think the peg is fairly good and we also have pHBD to arbitrage HBD and keep the prices in line. It's a bit too bad that the internal market is probably the best place to get HBD outside of that pool though. I also don't think a death spiral will happen but the 3.5 days does give everyone some time to respond.

Posted Using LeoFinance Beta

Bookmarkimg this ti read again, it's not easy to understand for me. Have you got an even more dummy version? 😂 Thanks for taking time to write it.

This might be a really dumb question but I have to ask anyways.. What do you mean by HBD debt? It is still very unclear to me.

See first equison. .. its a % of the hbd supply to hive marketcap

It is comforting to read this reminder about Hive and HBD.
Even though each blockchain is built differently anything can cross our path and the result will be different.
More power to Hive.
Great timing for the post.

!BEER

Posted Using LeoFinance Beta

Sorry, out of BEER, please retry later...

This is a very good article in times like this that many people having doubts on crypto because of what happened to luna and ust. I have so much faith in hive and all the projects and activities under its network. I also took advantage of the dip last time and buy more hive to power up instead of being fearful from the bloody market few days ago. Thanks for sharing this very informative post. God bless us all

It is good to know that HBD is "safe" because of the mechanisms that are already set up like the HBD stabilizer. With the data presented above, HBD has been time-tested indeed. And although I have no technical knowledge and stuff, just looking at how it is holding up now, I can only deduce that it is one of the strongest stablecoin there is.

Posted Using LeoFinance Beta

PIZZA! PIZZA!

PIZZA Holders sent $PIZZA tips in this post's comments:
aurikan tipped dalz (x1)
@vimukthi(2/5) tipped @dalz (x1)

Please vote for pizza.witness!

Thank you for this article.

The more I learn about the HBD the more I realize that there is even more to learn.

Posted Using LeoFinance Beta

What is your take on increasing the debt limit to 30%, is there any vulnerability to that security-wise?

Posted Using LeoFinance Beta

Your article and @taskmaster4450's recent explanation on the defenses HBD has are two of the best material to show to anyone when presenting the case for why HBD is the best decentralized stablecoin out there. We have a product that is,

  • Backed by a real asset + DAPP ecosystem
  • Backed by a real community
  • Safeguards in place against price manipulation attacks
  • Overcollateralized (in a sense)
  • Does not lead to hyperinflation of the asset backing the stablecoin
  • Not controlled by a single party or small group

I had some faith left in Terra. They have proven that they were never a proper decentralized project now with their shutting down. I'm open to trading LUNA and UST for quick profits/speculation. Long term investing on the other hand is simply out of question.
!PIZZA

Posted Using LeoFinance Beta

I didn't understand what happens when the debt percentage goes up

HBD price goes down :)

this math thing is giving me headaches but thanks for trying to illuminate the plebs :)

Excellent post 😎 looking forward to many more!

Very interesting post.

How will the 20% APR of HBD influence this, as more people are powering down on Hive to invest in HBD, thus increasing the debt??

Posted Using LeoFinance Beta

This is just my opinion, but... People will continue to power down and convert to HBD until one of two cenarios happen:

  1. The debt goes over 10% making HBD depeg to the lower side so the conversion will no longer be 1-1. However, this creates a selling pressure which hopefully makes people stop converting Hive to HBD.

  2. As the debt approaches 10%, people start buying HBD from the internal market and exchanges instead of converting it, and if the search is bigger than the demand, the price of HBD depegs to the upside since people will be after the future earnings of 20% APY *

*: Maybe is this what happened to the Steem Backed Dollar (SBD)? I'm not familiar to why it depegged to the upside.

I recommend ausbit.dev hive interface for accompanying the debt and other characteristics of the hive blockchain.

Thank you for the feedback, I was thinking in line with your 1st point.