Estimate curation reward for upvote in Steemsnippets

in #utopian-io6 years ago (edited)

Components

  • Add a new folder under steemsnippets/steemjs/ called estimate_curation_reward
  • In the new folder create a script estimateCurationReward.js and a corresponding package.json

Proposal

  • Consistent with the rest of the library the function should do only the following in a way that is easy to follow and or reuse...

    • Take as parameters:
      1. a post or comment url

      2. an account name

      3. a callback, where the return parameter is an object of the shape:

        { sbd: some_float, steem_power: some_other_float}

      4. optional: a float estimating the expected payout for the post, if omitted calculations assume $1 or the current estimate on steemit per net upvotes .

  • Fully document the function using jsdoc style

Mockups / Examples

estimateCurationReward(
  'jjay',
  'https://steemit.com/utopian-io/@tdre/serve-sketchy-placeholder-images-with-peek-a-boose',
  function(estimate) {
    console.log(
      'Estimate (SBD/SP): ' + estimate.sbd + '/' + estimate.steem_power
    );
  }
);

Benefits

  • This addition to steemsnippets would further development of tools which help users make informed decisions about how they use their influence on the Steem blockchain. For example, something like the following would become much easier for developers front-end and backend developers alike...

new-estimator-wowza-yowza.png

  • It would also serve as a Rosetta stone for a fairly complicated calculation. Arithmetic clearly expressed through code becomes easier to discuss, compare, and test against.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Good idea! I'll hack this together this week if I have some free time :)

Awesome! I'm pleased you like the suggestion :)

Thank you for the contribution. It has been approved.

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

Hey @tdre I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by tdre from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 61940.19
ETH 2433.78
USDT 1.00
SBD 2.50