You are viewing a single comment's thread from:
RE: Why is median_history_price no longer the median of feed price? My investigation.
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%).
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 :-)