Sneaky-Ninja : Auto curation bot for HIVE

in Programming & Dev2 years ago (edited)

Hey everyone, hope all is well.

I spent most of the weekend copying & editing a lot of code from the old sneaky-ninja project into a brand new repo on GitHub... and after a lot of trial & errors sneaky-ninja-hive is now in a ready state.

Since a lot of support for the STEEM network seems to be mostly gone, I've decided to kill off the original project (it's only a private repo for now) & focus entirely on HIVE.

How does the bot work?

Sneaky-ninja monitors all the new blocks added & identifies blog posts.
After identifying a post the bot will look at the author's posting history over the last 7 days & based on some factors, determine if the post is worth inspecting again when the time is ready to vote.

If found to be worthwhile, a time will be scheduled when the post should be inspected. Once the scheduled time has arrived, sneaky-ninja will only place a vote if certain conditions are met.
Auto reblogging & following the author is also possible.
Multiple accounts can be added.

1. Requirements:

2. Installation:

  • Clone this repo & cd into it
    git clone https://github.com/louis23412/sneaky-ninja-hive.git && cd sneaky-ninja-hive

  • Install dependencies
    npm install

3. Configuring variables & running the bot:

  • Open globalProps.json with your favorite text editor & add your account(s) + key(s)
    Or use nano to edit straight from the terminal
    nano globalProps.json

  • Single account:

"USERLIST" : [
    ["usernameHere", "privatePostingKeyHere"]
]
  • Multiple accounts:
"USERLIST" : [
    ["usernameHere", "privatePostingKeyHere"],
    ["usernameHere", "privatePostingKeyHere"],
    ["usernameHere", "privatePostingKeyHere"]
]

For security reasons, you should only be using private posting keys!

  • Change the variables as needed:
"GLOBALVARS" : {
    "REBLOG" : false,
    "FOLLOW" : false,
    "RFMINWEIGHT" : 33,
    "MINRC" : 80,
    "MINREP" : 35,
    "MAXACTIVEPOSTS" : 7,
    "PROFITMIN" : 10,
    "MAXVOTERS" : 5
}

REBLOG => If true, will reblog all posts where the voting account has used a vote weight larger of equal to RFMINWEIGHT
FOLLOW => If true, will follow the author of the post where the voting account has used a vote weight larger or equal to RFMINWEIGHT
RFMINWEIGHT => Minimum voting weight need to trigger reblogs / follows
MINRC => Minimum resource credit % needed to vote,follow & reblog. Helps to prevent resource credit draining on accounts will small amounts of HP
MINREP => Minimum author reputation level
MAXACTIVEPOSTS => Maximum amount of active posts for the author in the last 7 days (posts pending payout)
PROFITMIN => The bot automatically determines the profit % probability on each post, this is not an accurate indicator of how much curation might be earned, but rather helps the bot identify posts that are worth inspecting. Scales from 0.001 to 100.000
MAXVOTERS => Maximum voters allowed on the post at the time of inspection.

  • Set properties for each tracker. Example:
"ONE" : {
    "MINVP" : 97,
    "SCHEDULETIME" : 3.98,
    "BASEWEIGHT" : 1500,
    "MINAVGPOST" : 3,
    "ACTIVE" : true
}

Up to 10 tracking categories can be used.
Each tracking category should have a higher MINVP than the next! So tracker ONE MINVP should be > than tracker TWO MINVP (The globalProps.json file comes with a basic setup as an example.)

MINVP => Minimum voting power % needed for voters to be active in this category.
SCHEDULETIME => Number of mins after post creation that the post should be inspected for curation.
BASEWEIGHT => The base weight used to calculate the final voting weight. Formula : base weight x average post value. 1500 = 15%
MINAVGPOST => The minimum average value needed of all posts in the last 7 days
ACTIVE => enable/disable this category

  • Save the config file, then run the bot
    npm start

If all went well you should see a continuous update like this (COLORS=true if you want it to look exactly like this):

Screenshot from 2022-01-24 22-29-24.png

More updates coming soon, enjoy! =)

--------------------------------------------------------------------------

Add me on Discord if youd like to talk: CreepyPastaZ ψ(`∇´)ψ#1729

--------------------------------------------------------------------------