steemrewarding.com - several improvements

in utopian-io •  2 months ago  (edited)

rewarding_batch2.png

Repository

https://github.com/holgern/steemrewarding

steemrewarding.com is a feature-rich automatic voting tool. It can be used to create voting rules at https://steemrewarding.com, using several parameters. It is possible to automatically optimize vote delay times in order to increase curation rewards.

Posting authority needs to be given to the @rewarding account. I created a discord server for all topics regarding steemrewarding.com: discord invitation.

steemrewarding is currently used by 131 users which created 2200 rules for posts, 88 rules for comments and 27 trail vote rules. In the last 7 days, 8477 time based votes and 1904 vp based votes were broadcasted through steemrewarding.

New Features

Votes are optimized withing minimum_vote_delay and maximum_vote_delay

Votes are only optimized within both parameter, which can be set in the settings page. This prevents that vote which are placed outside the 15 minute are optimized.

if best_performance > performance * optimize_threshold and vote_delay_min <= maximum_vote_delay + 0.1 and vote_delay_min >= minimum_vote_delay -0.1:
    if optimize_ma_length > 1:
        vote_delay_min = (vote_delay_min * (optimize_ma_length - 1) + best_vote_delay_min) / optimize_ma_length
    else:
        vote_delay_min = best_vote_delay_min
    if vote_delay_min > maximum_vote_delay:
        vote_delay_min = maximum_vote_delay
    elif vote_delay_min < minimum_vote_delay:
        vote_delay_min = minimum_vote_delay

optimization calculation performance improved

The optimization performance was improved by excluding votes from vote trails and by adding a new field vote_delay_optimized to the vote_log table. Votes that were not yet optimized have vote_delay_optimized set to True. In each voting round, 4 votes with this flag are optimized when the vote delay is greater than 15 minutes. As each vote is only optimized once, this speed up the process.

The frontend for opening permlinks and authors urls is changeable

Two new Col classes were constructed from a Col class, in which the frondend can be be given as parameter. The frontend parameter can be changed in https://steemrewarding.com/settings
image.png

class ExternalURLCol(Col):
    def __init__(self, name, url_attr, frontend, **kwargs):
        self.url_attr = url_attr
        self.frontend = frontend
        super(ExternalURLCol, self).__init__(name, **kwargs)

    def td_contents(self, item, attr_list):
        text = self.from_attr_list(item, attr_list)
        url = self.from_attr_list(item, [self.url_attr])
        return element('a', {'href': self.frontend + url, 'target': "_blank", 'class': 'table'}, content=text)

class ExternalAuthorURLCol(Col):
    def __init__(self, name, url_attr, frontend, **kwargs):
        self.url_attr = url_attr
        self.frontend = frontend
        super(ExternalAuthorURLCol, self).__init__(name, **kwargs)

    def td_contents(self, item, attr_list):
        text = self.from_attr_list(item, attr_list)
        url = self.from_attr_list(item, [self.url_attr])
        return element('a', {'href': self.frontend + '@' + url, 'target': "_blank", 'class': 'table'}, content=text)

note field added

image.png
A new field was added to the vote rule table, which can be used to store notes and information about a rule.

votes per day parameter is switchable between sliding and once a day

image.png

The maximum allowed vote rules per day are now switchable between a sliding 24h window and once a day (0:0:0 UTC).

        if sliding_window:
            date_24h_before = datetime.utcnow() - timedelta(hours=24)
        else:
            date_24h_before = datetime.today().replace(hour=0, minute=0, second=0, microsecond=0)

New optimize_vote_delay_slope parameter

A new parameter was added, which can be set in the settings page. When this parameter is greater than 0, it changes the vote weight during vote delay optimization.

vote_weight = vote_weight + (vote_delay_min - old_vote_delay_min) * acc_data["optimize_vote_delay_slope"]

This parameter can be used to adapt the vote weight for the case that the vote delay optimum is far way from 15 minutes.
Let's make an example: optimize_vote_delay_slope is set to 3%/min, vote delay is 15 min and vote weight is 50%. When the optimum is at 1 minute, the vote weight is changed to

50% + (1 - 15) * 3 % = 8 %

This prevents that votes with high weight are broadcast within the first minutes that have a high vote penalty and that reduce the curation rewards for all other voters. The parameter can be used to reduce the vote weight when the vote delay optimization shifts the vote to the front.

vote round delay time included into vote delay

A new parameter voting_round_sec was added to the config file, which is the time of a vote round in seconds. The half vote round is then subtracted from the vote_delay_min parameter of a vote, so that the vote is broadcasted voting_round_sec / 2.0 / 60 minutes earlier. By this, the mean vote delay could be reduced to 1.17 seconds.

        if age_min < pending_vote["vote_delay_min"] - voting_round_sec / 2.0 / 60:
            continue

Rules are editable from the vote log

It is possible to directly edit a rule from the vote log page.
image.png

Commits

add voting_round_sec buffer to maximum_vote_delay_min

Add new optimize_vote_delay_slope parameter for adapting the vote weight

  • commit 939e0f3
  • Add Edit link to vote log, necessary perameter (author, main_post and voter_to_follow) are added to the databases

Add note and add setting for switching votes_per_day to once a day/once every 24h

The frontend for opening permlinks and authors urls is changeable now

Optimize Vote time by considering vote round duration

  • commit 647b02eh
  • Improve curaton reward calculation
  • Add trail_vote info to pending_votes and vote_log

GitHub Account

https://github.com/holgern

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:  
  • Great post with lots of explanations of coding choices, images and code samples.
  • Great code all around, except I'm not a big fan of one letter variables.
  • Good commit messages, but not one line of comments in the new code.
  • Awesome feature to change the front end URL. Decentralisation...

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? Chat with us on Discord.

[utopian-moderator]

·

Thank you for your review, @helo! Keep up the good work!

Thank you you very much for creating this great tool. I've been waiting a long time for something like this and will start using it immediately.

Brilliant, flexible, feature-laden upvoter. I'm working on a precognition module to further improve curation rewards ;-)

Can come in very handy. Great work.

Posted using Partiko Android

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Hi, @holger80!

You just got a 3.28% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

This post has been just added as new item to timeline of steemrewarding on Steem Projects.

If you want to be notified about new updates from this project, register on Steem Projects and add steemrewarding to your favorite projects.

Great Job! I'm looking into using this for SBI also.

Hi @holger80!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @holger80!

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

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

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

Vote for Utopian Witness!

This post has been included in the latest edition of The Steem News in 10 posts - a compilation of the key news stories on the Steem blockchain.

  ·  2 months ago (edited)

This tool is getting better and better: thanks for your dedication to constantly improve it!

I particularly appreciated the addition (in a very short time from my suggestion) of front-end customization.


Everything is okay! 👌


You received an automatic upvote, because I believe in you and I love what you create! 😉

A huge hug from @amico! 🤗

😍 I love promoting @steembasicincome, even with #sbi-skip! 😜


If you dislike this automatic message, please let me know: thanks! 🙏