[Utopian.io] Estimated upvote amount from actual upvote bugfix
For over a month people report there is issue with upvote estimated amount calculation at blog pages of Utopian.io. The voting slider shows incorrect dollar values for voters.
Many proofs of bug were described:
- Bug On $Amount To Be Voted On Utopian Voting Slider
- BUG IN THE VOTE WORTH OF UTOPIAN.IO
- Utopian Vote Slider Do Not Show Exact Value
- but @deveerei was the first who explained the bug over a month ago:
Bug - Difference in Estimated Upvote Amount from actual Upvote
Issue
Utopians who click at 👍 under the article or comment can decide how much percentage weight they would like their upvote to give. The slider appear and the estimated upvote amount calculate to dollars in real time.
The values doesn't match with given upvote amount on the list of upvoters. However the list shows correct values. This means the slider was the bugged one only. Not that bad.
Solution
It took me a lot of time to debug what's wrong. From my observations everyting started to mess up about 1-2 months ago. It was the time when SBD and STEEM prices start to spike up. Since SBD was the currency tied to $1 nobody cared about it's "value". Now we see that SBD can have much higher value, no matter what Steem devs say.
Everything what I had to do was update formula by current_median_history_price
factor. So nice Steem API calculates that for us.
The core formula to estimate dollar values
Fixed. It maches with mine $0.58 upvote amount
Even if fixed, the vote estimation can differ by a percent because of few reasons:
- SBD values moves. The prices are very unstable right now :O
- Our vesting shares moves. They grows over time
- Our vesting power moves (significant factor). They grows over time but decreases after every upvote.
That's why the "vote worth" is just an estimation.
Thanks @elear for approval at github!
Links
https://github.com/utopian-io/utopian.io/pull/248
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]