10-line script that anyone can use to downvote abuse - help counteract ongoing FARMING on Hive

image.png



There is an ongoing farming wave on Hive, as reported by multiple Hive anti-abuse groups.

A bot net is spamming posts and comments and upvoting them with leased Voting Power in order to farm rewards close to $1 each.

Example: @gamingmemes/apps---5-min-dd-20210330t173942z

image.png

The (allegedly compromised) accounts that get upvoted by the same abuser are:
@cryptoindex/payout
@classicmemes/payout
@starwarz/payout
@memetasia/payout
@jehovahwitness/payout
@bemotivated/payout
@vapenation/payout
@beefarmer/payout
@billhates/payout
@elontusk/payout
@danfay22/payout
@boatsnhoes/payout
@nexisfan/payout
@thelastbuffalo/payout
@chancewins/payout
@superheroes/payout
@fiftysats/payout
... (hundreds?)

I added those accounts to @keys-defender "all posts/comments auto-downvotes" and despite the fact that it has enough VP to remove rewards from posts thanks to its downvote trail, it does not have enough VP to counteract the upvotes on the comments since the flag trail on hive.vote does not allow that.

@steevc delegated some funds to make @keys-defender downvotes on comments more effective, and while that was much appreciated, unfortunately it was not enough. We need more support.

The real solution would be the one suggested by @logic, to get @dlease to remove their stake:
image.png

..but so far that does not seem to have happened.

 
I therefore ask the community willing to help to do one/more of these 4 things:

A. Downvote the comments/posts of those accounts - you can use my copy and paste script below if you want, no coding experience required.

B. Delegate some funds to @keys-defender (temporarily or not, up to you) so that its downvotes can still be effective.

C. automatically follow all @keys-defender downvotes on comments using https://rewarding.app (haven't used this before but people said it can do that)

D. automatically follow all @keys-defender downvotes on posts using hive.vote -> https://hive.vote/dash.php?i=15&id=3&user=keys-defender&type=2



 
For point A, I understand that the process of manually downvoting tens of comments can be tedious so here is where some automation comes in handy...
Here below you can find a 10-line script to downvote all comments of a target user with a payout above 2 cents. Nothing too fancy but it does its job and anyone can safely execute it in their browser without coding experience.

STEPS:

  1. Open @spammer-username/comments or "/payout"   (make sure you are logged in too)

  2. Scroll down to display all the comments that you want to downvote. If prior to executing the script you scroll down to load even more comments, those will be processed too.

  3. copy and paste the script below into your browser Console. How do I open the Console? Ctrl + Shift + J on Linux/Windows and Cmd + Opt + J on Mac.

Script:

var nap = ms => new Promise(res => setTimeout(res, ms));
var hasPayoutGreaterThan = (elem, amount) => +elem.parentElement.parentElement.parentElement.parentElement
  .innerText.slice(1) > amount;
var downvoteBtns = document.getElementsByClassName('chevron-down-circle');
for (let id = 0; id < downvoteBtns.length; ++id) {
  const currBtnElem = downvoteBtns[id];
  if (currBtnElem && hasPayoutGreaterThan(currBtnElem, 0.02)) {
    currBtnElem.click();
    await nap(500);
    const confirm = document.querySelectorAll('span[title="Downvote"]')[0];
    confirm && confirm.click();
  }
  await nap(4 * 1000);
}


Script in action:

image.png

 
NOTES:

  • To execute the script on a different page just load that page and press the up button while the cursor is in the Console, the last executed command will apppear (ie. my script). Just press enter to run it again.
  • You can change the downvote weight to any other value using the dedicated scrollbar. Do that before executing the script. The chosen vote weight (tech: will be stored in the localStorage as soon as you select a new value and) will be used for all the downvotes.
  • You can change the number 0.02 in the code above to a bigger value. If you do that only comments with a pending payout above the new value will be processed.
  • If while the script is running you realize that you scrolled too far and loaded too many comments, or you simply want to stop the script.. just refresh the page.


Take care,
@gaottantacinque (@keys-defender)


UPDATE: in order to fight abuse more efficiently, I will work on detecting and trying to counteract votes given after 6.5 days by specific users.

H2
H3
H4
3 columns
2 columns
1 column
44 Comments
Ecency