Last week I've described how HBD limits work as contribution to discussion about changing their values for Hardfork 26. If you didn't read it, the main points you should know are:
- there are three limits to how much HBD is allowed to exist
- two soft limits control HBD print rate for comment rewards
- hard limit works differently by imposing artificial price of HIVE that is higher than market price (when hard limit kicks in)
- HBD printing for proposal payouts and interest on savings is not stopped even if hard limit is hit
- we currently have hard limit equal to upper soft limit (both at 10%)
@blocktrades proposed we raise all those limits and as I understand the reasons are related to HIVE market, like we need more liquidity etc. For me the only thing that is wrong with current limits is that hard and upper soft are on the same level. Simply lack of cushion before hard limit is hit feels uncomfortable. It is not a strong argument, since most prevalent force that can quickly push us towards hard limit is not the rate of HBD printing and conversions, but falling price of HIVE. Also hitting hard limit doesn't really change much, it only limits usefulness of internal HBD-to-HIVE conversion. However making light of it equals belittling importance of price feed - one of key responsibilities of witnesses.
I've made related changes to raise limits to the values proposed by @blocktrades - the code is now more flexible so we can adjust the values later. The last commit contains extra logging and can be cherry-picked in case someone wanted to try it on different branch without the rest of changes.
Before I describe what is in the log, a brief summary: my hypothesis/concern is that hard limit price has a strong tendency to grow over time and by increasing hard limit we are only kicking the can down the road, and not by much. We will hit hard cap again and over time we will be hitting it sooner rather than later. I've requested @gtg to make full run (he is going to publish results once they are available), but the limited replay I tried seems to confirm my speculation. The hard cap price can go down, but it does so in slow pace and in environment with zero interest rate on HBD and no inflation assigned for proposals (those started in HF21).
The log is printed from database::update_median_feed
(routine run every hour that sets new price of HIVE) and contains the following:
GREP:
orGREP24:
tag (the latter once every 24 hours) to make filtering easier- block number
- min/median/max HIVE price as reported by witnesses at the moment (median is the price that becomes new element of 3.5 day price window history)
- min/median/max HIVE median price within 3.5 day price window history before hard limit is applied
- hard limit HIVE price (current internal price -
database_api.current_price_feed
- is always bigger from the two: hard cap or median history price) - debt ratio in percentage points
- current APR on HBD holdings in percentage points
- total HIVE supply in HIVEsatoshi
- total virtual supply in HIVEsatoshi
It was easier to just print that to log instead of f.e. making dedicated plugin, because all the data is already in place.
Once we get the log from full replay it should be easy to filter it into .csv and make nice looking charts :o)
Hard limit price is growing more or less when amount of HBD grows faster than amount of HIVE. Amount of HIVE grows as a result of:
- inflation - steady and decreasing over time (for details see code of
database::process_funds
) - explicit conversions from HBD with use of
convert_operation
- problem with that operation is that it becomes inviable when hard limit is reached, it also always carries risk, since it is delayed by whole price feed history cycle (price can change completely between transaction and actual conversion)
Amount of HBD grows when it is:
- converted from HIVE pool of rewards for comments - limited by lower soft limit, stopped by upper soft limit
- converted from HIVE pool of proposal payouts - always active
- converted from HIVE with explicit
collateralized_convert_operation
- stopped by upper soft limit - printed as interest for HBD savings - while above was either taken from existing pool of HIVE or from HIVE inflation, this one is extra source of inflation; also always active; note that up to HF25 also liquid HBD gave interest, now it is just savings, which reduced the pressure a little, so we can expect less actual new HBD after last hardfork
I'm excluding fees and sending funds to null
as means of regulating amount of HIVE/HBD because in the long run they are negligible.
So... when HBD grows it comes from HIVE (decreasing its supply), plus it has its own source of inflation, therefore even though upper soft limit stops some growth there, as long as interest on HBD (dynamic_global_property_object::hbd_interest_rate
) is bigger than inflation rate on HIVE (minus part for proposals that is always converted to HBD - dynamic_global_property_object::sps_fund_percent
) the hard limit price will grow over time increasing the chance of reaching the cap (yeah, the actual relation is not that trivial, but the above reflects the truth to some extend).
I don't have any solution, I just noticed potential trend. But maybe someone has some proposition on what to add to Hive ecosystem to allow "paying the HBD debt" and/or can make convincing argument that this is not a problem (or maybe full data will show there is no permanent trend but just fluctuation).
Edit: data is ready thanks to @gtg
I've filtered out two .csv files, one containing just one record per day, second one with all records
Full size chart here
Upper chart shows prices: median from current witness reports (market price), median of medians within 3.5 day price history window (internal price candidate) and the yellow line depicting hard cap price. When red line gets below yellow line, the latter price becomes internal price of HIVE. Sharp decline in hard cap price near the end is HF25 when we stopped accounting treasury balance during hard cap computation.
Middle chart shows debt ratio and HBD interest rate. Raising interest rate before HF25 is correlated with increase in hard cap price.
Last chart shows HIVE supply and virtual supply. The difference between the two comes from HBD and is also related to HIVE price. Virtual supply drops when HIVE price rises (existing HBD is worth less HIVE). Current supply only drops near the end which is probably the effect of people using HIVE-to-HBD conversion (virtual supply also drops a bit in the same fragment because it was also the time of rising price of HIVE).