The Magic Frog: Delegator Rewards! (Development Update)

in utopian-io •  16 days ago


the-magic-frog

Repository

https://github.com/mktcode/the-magic-story-machine

About the Project

https://the-magic-frog.com
The Magic Frog is a Bot/Website utilizing the STEEM blockchain to reward participants for collaboratively telling a story. By submitting small pieces of text, that the community can vote on everyday, the story evolves and sometimes takes quite strange, funny or interesting turns.

The Magic Frog is currently available in English, French and German and more languages will follow!

Delegators get their share of the cake now!

I finally managed to finish an actually very easy task. Delegators, which are very important for the project to succeed, will be rewarded from now on, like everyone else, when a story ends. 20 % of the story pot will be reserved for delegators and distributed among them according to their delegation.

For the first french story, which is on the verge of ending it seems, and there actually are some delegators, it looks like this (at the time of writing):

Account: @grenouille
Total Delegations: 790.548 SP
Story Pot: 12.481 SBD <-- Increases the more delegated SP there is!
Delegators Pot: (20 %) 2.496 SBD

DelegatorSP% of TotalReward
@helo500.52363.311.580 SBD
@pnc250.00831.620.789 SBD
@orlandumike25.0023.160.078 SBD
@zonguin15.0151.890.047 SBD

For the english version, where I am still the only delegator, it looks like this:

Account: @the-magic-frog
Total Delegations: 502.016 SP
Story Pot: 27.399 SBD
Delegators Pot: (20 %) 5.479 SBD

DelegatorSP% of TotalReward
@mkt502.0161005.479 SBD

Implementation

The update is really just one single commit: https://github.com/mktcode/the-magic-story-machine/commit/6c37ba7d4d787afc1391a2fe46c52fdf7185f407

Retrieving delegators:
https://github.com/mktcode/the-magic-story-machine/blob/master/helper.js#L78
I get the delegators from https://api.the-magic-frog.com/delegators?account=, which in turn gets them from https://helloacm.com/tools/steemit/delegators/

Updated rewards calculation:
https://github.com/mktcode/the-magic-story-machine/blob/master/bot.js#L51
As mentioned before, the delegators get 20% of the pot, thus decreasing the storytellers' rewards, which is now only 80 % of the total pot. This should be not a big issue as this update hopefully leads to more delegations, increasing the rewards again.

Transfer rewards:
This is quite straight forward.
Get total delegations: https://github.com/mktcode/the-magic-story-machine/blob/master/bot.js#L51
Calculate each delegator's percentage and share of the pot: https://github.com/mktcode/the-magic-story-machine/blob/master/bot.js#L111
Transfer: https://github.com/mktcode/the-magic-story-machine/blob/master/bot.js#L123

Added translations for transfer memo:
https://github.com/mktcode/the-magic-story-machine/blob/master/locales.js#L104
Of course delegators also get a localized "Thank you!", depending on what account they delegated SP to.

Other Changes
https://github.com/mktcode/the-magic-frog/commit/70529c16d3bdfe26fb2c922bc0cfab15f04ef3c4
Until now it was not possible to submit your own text, when you want the story to end. The text was just "The End!". Now you can submit text, as the last sentence in the story, and end the story at the same time, to start a new one.

And some minor fixed:
https://github.com/mktcode/the-magic-frog/commit/5052469b092c1801513bf81843838595f62fd692
https://github.com/mktcode/the-magic-frog/commit/8d2ae678a2113d6f6058e0e06b5d4b2475cd3856
https://github.com/mktcode/the-magic-frog/commit/c62341df1bc48a8e9ea5c7177d0df0e87d02f595
https://github.com/mktcode/the-magic-frog/commit/55c369389e2752b40b642df4323b5c468b355884

Next Steps

  • write a "Call to Delegators" post! :D
  • change server infrastructure
  • stability improvements
  • own account creation system
  • write visibility task request on Utopian
  • provide "closed" versions for schools
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for your contribution. Very creative project! Maybe I can fork and create a language in Chinese? LOL :)

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

·

@justyy A chinese version would be awesome! I already had you in my mind for that! ;)

Super ! Good continuation to the project!

·

Thank you! :)

Loading...

Hey @mkt
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Great update! I hope we could also get more delegation for the english version too because as of now the pot for the current story is rather low compared to the last story. Also, is it possible to add a preview option on the magic frog website similar to steemit and busy.org? I'm talking about the preview that appear everytime one write an article or comment. Because honestly it's too easy for typo to appear, as the website doesn't have that option. I hope you would consider this @mkt

·

Well, if there's a typo, you can edit your submission on the website. (Not on steemit or busy!) But yeah... a preview is a good idea and it's easy to implement. I added this to my TODO list. ;)

·
·

Thank you!

Good to see some profits coming in ;)

Good luck with that project, I will be following how much new steemians join the adventure ;)