You are viewing a single comment's thread from:

RE: Why is median_history_price no longer the median of feed price? My investigation.

in #witness-category6 years ago

Thank you for resteemd.

You are right, the code of percent_sbd:

auto percent_sbd = uint16_t( ( ( fc::uint128_t( ( dgp.current_sbd_supply * get_feed_history().current_median_history ).amount.value ) * STEEM_100_PERCENT ) / dgp.virtual_supply.amount.value ).to_uint64() );

So although percent_sbd is actually 999.99, but it return 999, and sbd_print_rate return 100(1%) instead of 0.26(0.0026%).

Sort:  

Cool, Great find. Code scares me, there is no way I would have been able to read the code to find that, but math is my thing :-)

Coin Marketplace

STEEM 0.24
TRX 0.21
JST 0.036
BTC 98210.68
ETH 3384.50
USDT 1.00
SBD 3.43