[Utopian.io] Estimated upvote amount from actual upvote bugfix

in #utopian-io8 years ago (edited)

image.png

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:

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.

image.png
Bugged estimated value

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.

image.png
True values

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.

image.png
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

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.12
TRX 0.34
JST 0.033
BTC 119745.02
ETH 4461.25
SBD 0.77