About the Project
The Magic Frog is a Bot/Website utilizing the STEEM blockchain to reward everyone involved in a collaborative storytelling project. By submitting small pieces of text (and even images), 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!
New Pot Calculation
First read more about the rewards system here.
Until now the pot was calculated based on the payout of a story's posts. All the paid and pending author rewards were summed up, curator rewards and beneficiaries were subtracted, then 50 % of that makes the pot (since the posts are set to 50% SBD and 50% SP).
This approach had some drawbacks. The rewards are distributed one day after a story ends. This means that the latest 6-7 posts of that story have not been paid out yet. Of course the calculation could simply ignore those latest posts but in any way those payouts would be "lost" and not distributed to the community.
Another solution would have been to wait for 7 days until the rewards get distributed, so that all the payouts can be used, but that felt just a little bit inconvenient and I simply wanted the rewards to be distributed immediately.
The solution is now much much simpler. The value of the pot for a story is always simply the current SBD balance of the respective frog account. This still means that the payout for the latest 7 posts of a story will not be taken into account for the pot of that story BUT they will automatically go into the pot of the next story, so nothing will be lost. Each story benefits from the last 7 posts of the story before and gives its last 7 post payouts to the next story. So there's some sort carryover happening now.
And after all it takes away some nasty calculation that is just prone to errors and inaccuracy.
This also means that if you want to push a story pot to the moon... just send some SBD to the respective frog account. I don't know why would do that instead of delegating but it's possible.
First I updated the API.
/pot endpoint now simply fetches the account data and uses the
sbd_balance property as the total pot value.
So there's also no need for a story number anymore, to iterate over all the posts.
Then the bot needed to be updated.
Until then the bot didn't even use the API endpoint but instead calculated everything on its own. So I changed this method so that it simply fetches the pot from the API.
In the bot.js I then needed to adjust those related variables.
Last but not least those changes needed to be correctly displayed on the website as well:
Again the calculation wasn't even based on this API endpoint (Did I maybe just forget to implement that before... who knows? :P)
And that's it for that part of the update.
Daily Rewards Claiming
Before, the generated rewards were claimed automatically only when a story ends. Since the pot is now the SBD balance it only made sense to claim the rewards daily. So I got rid of the
claimRewards method and merged it into the
getAccount method which is called daily, of course.
Therefore it somehow also made sense to me to get the pot value after the rewards are claimed.
This has one drawback compared to before, when the pot was calculated based on individual posts payouts. The displayed pot value on the website was automatically updated with every upvote. Now it gets updated only once a day but hey... you can't have everything.
Better Reading Experience
Someone once told me that it's a bit inconvenient to read the story when every sentence is separated by the usernames of the storytellers, so I added an option to hide them.
And of course for the button label the respective translation keys were added.
Some very minor changes were applied to the content of the daily story posts. They now display the fantastic new graphic of the pot full of gold, drawn by the amazing @ienrikex.
And there are some slight changes in the text, i.e. I removed the note about that "bug" in busy.org.
On the website I also updated the graphics.