Skip to content

Conversation

@joticajulian
Copy link
Contributor

Hi Matt, this PR helps to improve the accuracy of the calculation.

Problem

Let me show you 2 problems with the actual calculator:

  1. grumpycat downvotes haejin (https://steemblockexplorer.com/@haejin/dent-prettiest-impulse-waves). The actual calculator shows a negative curation reward! and it should be zero.
  2. utopian changes his vote: https://steemblockexplorer.com/@jestemkioskiem/steem-assistant-a0-21. When a curator unvotes and votes again he loses the curation rewards, and all this money is distributed between the other curators... this happened to utopian in that link (see for example that @grzesiekb53 received a very big reward compared with his vote).

Solution

This code uses vote.weight property which represents "sqrt(total_rshares + vote_shares) - sqrt(total_rshares)"... then it is the exact participation of the user. And it is zero when downvote or changes the vote.
Additionally, I have implemented "approx_sqrt" which is the sqrt used in steem

What do you think? I am jga#0699 on discord if you want to chat.

Thanks for all your work to the community.

@MattyIce MattyIce merged commit a27670d into MattyIce:master May 1, 2018
@MattyIce
Copy link
Owner

MattyIce commented May 1, 2018

This is super awesome, thank you!!! I never knew how to calculate the vote.weight value and definitely wasn't sure how to implement the approx_sqrt function.

@quetzalcoatl
Copy link

quetzalcoatl commented Oct 25, 2018

Unfortunatelly, some bugs creeped-in during the translation, see #49 with some tests :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants