Protecting Utopian-1UP against double voting and late vote

image.png

Final piece of the backend (at least for the current version), this pull request offers protection against old messages that would have already been voted by either Utopian-1UP or the Utopian bot.

This protection was necessary for the following reasons:

  • The interest of Utopian 1UP comes from the front-running, voting after the bot as little to no interest at all.
  • If the system doesn't check for previous vote of the trail and allocate a new dynamic vote weight, the vote will be casted a second time and Voting Power will be lost as a result.

Therefore I changed the flow as follow:

  • All suggestions that have not been voted by either the trail or the bot are fetched from the database (where voted==false).
  • The server checks all of the suggestions data to see if they have been voted by either the trail or the bot since last call
  • If yes, voted is updated to true and the suggestion is removed from the list that will be displaid
  • If no, well, nothing happens

In the current version on Heroku, you can see that this is working since although I ve let some old suggestions (already upvoted), they do not show in the main page.

image.png

Next steps:

  • Implementation of SteemConnect into SteemPlus (cause ill need it for later here, I m already on it and Im super excited about it!)
  • Release the 1UP button into SteemPlus!
  • Drink champaign

@stoodkev



Posted on Utopian.io - Rewarding Open Source Contributors

H2
H3
H4
3 columns
2 columns
1 column
9 Comments