You are viewing a single comment's thread from:

RE: Steem for script kiddies: SBD debt ratio

in #steem3 years ago (edited)

Awesome! I have read a few studies earlier from different sources and the market cap as derived from the products of supply and price was used for the calculation. But I noticed something, during those times, the SBD price was either $1 or below, or both assets had nearly equal market prices (For example; SBD = $3.2 and Steem = $3.32). With this piece, on the Steem blockchain, it is assumed that SBD maintains the peg of $1 and that would be utilized for the debt ratio. Great work and thanks, @remlaps-lite.

Sort:  

With this piece, on the Steem blockchain, it is assumed that SBD maintains the peg of $1 and that would be utilized for the debt ratio.

Thanks for the reply! From the blockchain's perspective, I think the price of SBD is always 1 USD because that's what it has to pay (in STEEM) if people make use of the built in SBD -> STEEM conversion function. I'm pretty sure that it uses $1 in its debt ratio calculation, since that percentage matches what we're seeing with partial payouts right now, but I didn't find the relevant section of code, yet. I might do some more looking again this weekend.

I guess the code for the calculation of the print rate should be there: https://github.com/steemit/steem/blob/master/libraries/chain/database.cpp#L3855-L3887.

Loading...

Thanks again for the link. It looks like that got it. Before work this morning, I updated the script to calculate the SBD print rate and display it side by side with the value stored in the blockchain.

$ ./sbd_ratio.sh
Price: $ 0.267
STEEM supply: 448147324
SBD supply (cap): 11295999
STEEM Market Cap (calculated): 119655335
SBD supply (cap) / STEEM CAP: 0.0944
SBD print rate: 0.56 (calculated), 5600 (queried)

That's a perfect result! :-)
However, it is still not clear to me why 0.5 was not added directly.

Agreed. I'm assuming the original calculation was just a programming error.

You are right, it's quite obvious that $1 is the price considered on the blockchain which makes its supply equivalent to the market cap and it's eventually used in the calculation of the debt ratio. I look forward to seeing more of your exploits after the weekend if you can. Have a great day, mate.