You are viewing a single comment's thread from:

RE: Economic model of steem like blockchains

in #thought7 years ago

There is a bug in the current code so it is not possible to create SBD. Try to do it in your blockchain and you will see that it is not possible.

I created an issue and pull request on steemit if you want to test.

Good work! we need more people interested in these topics and bring more ideas to improve the blockchain.

Sort:  

I saw your issue... But i think it is different.

What i say in the post is that there is no way that I know off to tell the blockchain, hey lets print SBDs, they are issued as rewards not minted or mined.

Your bug i think is worked around(somehow) here:
#define STEEM_MIN_FEEDS (STEEM_MAX_WITNESSES/3) /// protects the network from conversions before price has been established

https://github.com/steemit/steem/blob/master/libraries/protocol/include/steem/protocol/config.hpp

Line 245


price min_price( asset( 9 * gpo.current_sbd_supply.amount, SBD_SYMBOL ),

What is that 9 in the code?

If I understand it properly, that is to calculate that the minimum price of SBD wont allow for the existance os more SBD than the X% market cap of the STEEM

Meaning that:
If the price ever allowed for SBD to become 11% or more of the ammount of STEEM the price will be adjusted at blockchain level to make it become 10% or whatever the chain setting is.

But I guess that check was not needed on STEEM because that block is from HF14 when there was presumably a lot of SBD in circulation because of the premine and initial STEEM supply that generated since the first reward some SBD...

I don't know, I would need to recompile my blockchain to have post payouts faster to see if SBD's are issued at all or not.

What is that 9 in the code?

We want that the total SBD be less than 10% of the virtual supply. That is:

Here you see the 9, and this is the definition of the haircut price

Are you sure that should be a hard coded value?

#define STEEM_SBD_STOP_PERCENT_HF20 (10*STEEM_1_PERCENT )

Why have a value hardcoded and a setting ?

I understand the difference between the stop printing SBD and lets start forcing prices to avoid becoming a banana economy... But if the print % is modifiable the adjustment should take from that setting.

Or I have it all wrong ?

BTW have you found in the code were are SBDs sent when you use the conversion feature?

Dan implies they are destroyed, but i haven't yet found that part of the code.

When the convert_request is created, the balance is immediately deleted from the user account and a convert_request_object is inserted into the database. https://github.com/steemit/steem/blob/master/libraries/chain/steem_evaluator.cpp#L2289

Each block, conversion requests are processed. When the request is ready, it adds the STEEM to the account and adjusts the SBD supply. https://github.com/steemit/steem/blob/master/libraries/chain/database.cpp#L2400

SBD does not get "sent" anywhere. The number is simply subtracted from the system.

Thanks @netuoso, so they are indeed destroyed.

I was wondering it they were sent to @null or something of the likes.

   modify( props, [&]( dynamic_global_property_object& p )
   {
       p.current_supply += net_steem;
       p.current_sbd_supply -= net_sbd;
       p.virtual_supply += net_steem;
       p.virtual_supply -= net_sbd * get_feed_history().current_median_history;
   } );

it adds the STEEM to the account and adjusts the SBD supply.

From the code I understand that new steem is created to pay the user for the SBD ?

Something else i have been wondering is the purpose of the Fund ?

Initially i assumed that was stake reserved for SBD conversions and other possible balance compensation operations.

From the code I understand that new steem is created to pay the user for the SBD ?

Yes. New steem is created, but the virtual supply remains the same.

Think that the virtual supply is the total steem + the total "sbd converted to steem" (this second part is an amount of steem that varies constantly depending on the price and it is not part of the steem supply, the reason it is called virtual). When the conversion is done, we move part of these "sbd converted to steem" into real steem, new steem is created.

Something else i have been wondering is the purpose of the Fund ?

This fund is the total steem power.

This fund is the total steem power.

Well nothing is powered up in the DREAM blockchain yet it shows a few millions there

the reason it is called virtual

Kinda misleading term, it is actually future supply or something in the likes because DEBT would be: (virtual - current) if we take the SBD as what it is... an IOU

  • 10% of the inflation goes to witnesses in form of steem power.
  • 15% of the inflation goes to the fund of total steem power

Meaning that initdreamer is receiving 25% of the inflation in form of steem power.

Well it is now...

Yesterday it only had the Init Mint it was not getting any rewards...

Gotta check when i reinitialize the B/C

This could be a solution. However, you still leave the door open to the bug:

You initialize the price in the initial feed history and start a new blockchain. Suppose that before the first post payout all witnesses set a price. In this case the blockchain freezes because total sbd is still 0.

I was about to reinitialize DREAM to use it with faster values, but I have a price window of 6 hours, I can create 2 more witnesses (have it conf for 3 wit to set price) and try that... we will know in 6 to 7 hours if it died or now :P

You need at least 7 witnesses to set the feed price. Or change this number here:
https://github.com/steemit/steem/blob/master/libraries/protocol/include/steem/protocol/config.hpp#L245

It is changed that why i said i'll make 2 more witnesses...