Post Promoter JavaScript Voting Bot - Update 4

loudspeaker-1459128_640.png

Hello everyone, I'm back with another round of updates to the Post Promoter JavaScript Bid-Based Voting Bot software (wow that's a mouthful)! More bots are coming online all the time using the software so it is pretty thoroughly battle tested at this point. Anyway let's get right down to it...

Bug Fixes

There have been a number of minor bug fixes here and there, but I'll highlight two pretty major ones. The first bug was the bot would sometimes miss bids that came in right after a bidding round had ended and it started voting. The second one was that if two bids came in during the same bidding round for the same post using different currencies, it counted both bids as the currency of the first bid.

This second bug started to be exploited by someone sending a small SBD bid for a post and then following it up with larger STEEM bids for the same post. That caused the bot to think the total amount bid was in SBD (which are worth quite a bit more than STEEM at the moment) and therefore give that post a larger than expected vote.

Anyway both issues have been fixed and fully tested and released to all of the bots that I'm running at least.

Separate Voting from Commenting

Previously, when a bidding round ended the bot would go through each bid in order and vote and comment on the post. Then it would wait 30 seconds and move on to the next post. It needs to wait since Steem limits comments to once every 20 seconds. Since some of the larger bots get a ton of bids each round, this caused the process of voting to go on for almost an hour in some cases! This also had the effect of messing up the bid window timing a little bit.

To resolve this I have separated the voting from the commenting so now the bot will go through the bids in order and vote on them every 5 seconds (since there is a 3 second limit for voting) and separately go through each bid in order and comment on them every 30 seconds. This allows the voting to complete 6 times more quickly than before.

Automated Payouts to Delegators

Last but not least, this is the big update that has been requested quite often. The bot now allows automatic payouts to delegators based on the amount that they have delegated! This is more difficult than it should be since there is no Steem API call to get a list of who has delegated to a specific account and how much they have delegated, so I had to create that myself.

Now when the bot is first run it calls the "loadDelegations()" method which goes through the bot's entire account history to get a list of all of the delegators and the amount of VESTS they have delegated. This happens rather quickly, even for accounts with long histories.

Then when it comes time for payout it looks for the special "$delegators" token in the "auto_withdrawal.accounts" list and splits that portion of the withdrawal up among the delegators based upon their delegation amount:

 "auto_withdrawal": {
    "active": true,
    "accounts": [
      {
        "name": "$delegators",
        "stake": 8000
      },
      {
        "name": "account2",
        "stake": 2000
      }
    ],

In the example above, 20% of earnings will be sent to the "account2" account and 80% of the earnings will be divided up among all of the delegators to the bot based on their delegation amount.

Additionally, I thought the code to load the list of delegators and amount delegated to a specific account might be useful for all sorts of other purposes, so I moved that into a separate module called "delegators.js" which you can find here: https://github.com/MattyIce/postpromoter/blob/master/delegators.js so that way it's easier for everyone else to use for other projects.

Thanks for your support!

As always I want to thank everyone who has helped and supported me in creating this software. I love that it has been able to help so many people get their content promoted and to help so many investors earn a return on their STEEM investment. Please stay tuned for more updates in the coming weeks!

Links to relevant commits:



Posted on Utopian.io - Rewarding Open Source Contributors

H2
H3
H4
3 columns
2 columns
1 column
36 Comments