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

in Programming & Dev3 years ago (edited)

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: https://hive.blog/walllstreetbets/@gamingmemes/apps---5-min-dd-20210330t173942z

image.png

The (allegedly compromised) accounts that get upvoted by the same abuser are:
https://hive.blog/@cryptoindex/payout
https://hive.blog/@classicmemes/payout
https://hive.blog/@starwarz/payout
https://hive.blog/@memetasia/payout
https://hive.blog/@jehovahwitness/payout
https://hive.blog/@bemotivated/payout
https://hive.blog/@vapenation/payout
https://hive.blog/@beefarmer/payout
https://hive.blog/@billhates/payout
https://hive.blog/@elontusk/payout
https://hive.blog/@danfay22/payout
https://hive.blog/@boatsnhoes/payout
https://hive.blog/@nexisfan/payout
https://hive.blog/@thelastbuffalo/payout
https://hive.blog/@chancewins/payout
https://hive.blog/@superheroes/payout
https://hive.blog/@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 https://hive.blog/@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.

Sort:  

Some of you may find this useful. It's super quick and possibly buggy, but heres a ui to lookup a users pending payouts and attempt to remove them (setting weight to whatever is needed to get 0 net_rshares)

Nice. Just used it to wipe out a spammer. Thanks

!BEER

( Note: you need to log in for the downvoting feature to appear )

Delegated ~10,500 HP for a bit

💪💪🔥

I hope more people will help out with this. They are losing out on rewards thanks to these scammers. With the freedom of Hive it's up to us all to deal with abuse.

!LUV

Followed the downvote trail, hope that helps.

Great. The more the better.

!BEER

Hey how are you doing? We are well.

What's new? Coming back to the hive?   =]

@iamstan Do you still live in a van down the river? XD

We are spending cryptotime working on ETH DOT and HBAR, and 24/7 farming now. Probably will expand a bit more. Hoping that a real de-centrailized platform will emerge. Problem is our world is controlled by debt. The biggest debtors have all the cards. Just came by to check on the small minded. I still live by the river but am looking to purchase a storage container I can place by the ocean somewhere?

Great to hear you’re keeping yourself busy!
Yeah, debt is king (luckily not for me - or at least not directly).
That seems like a good plan, plenty of space down here in FL.

It hasn’t been too bad for me. We came back from to FL a year ago and haven’t left since then. Still working for the NY company.
So same old except for our 1-month old boy!! 😊

Cool I hoped you were able to stay in Florida. Do you have to pay NY tax still? I lived in North Miami and Ft Lauderdale in the late 80s. Loved it there but moved back to Texas missed southern respect and kindness. Now in the last free state in AmeriKa. Oklahoma. It is awesome here. Congrats on the baby boy Wow cool! Check out HBAR I think it will be big https://hedera.com/get-started. DOT it has a future.

Probably not for 2021 but it's very likely that I'll have to pay NY taxes for 2020. It's going to be a mess and I'm actually working on them right in these days.
I'll check out hedera, thanks!
All the best to you, love n freedom and your kids! 😊

What about you how has life been during the biggest scam on earth?

Wow!! Long time no see! I'm good, thanks!

DLease should not take a side on this issue, that would be a bad signal for a fintech service. But I've added you as a following downvote trail and maybe I'll run your script from time to time.

Thanks, much appreciated

Downvote trail followed, keep it up! !BEER 🍻

Posted using Dapplr

Reinstated my delegation and also put my downvote VP to use following the downvote trail on rewarding.app.

Think I got it set up correctly.

it looks like comments are still not processed (haven't used rewarding.app so i cannot advise..)

image.png

Yeah I'm not sure how to properly set it up myself.

Yeh, it's not really intuitive. Last night I went on and implemented my own vote trail for my accounts eheh

I did a bit of fiddling so maybe it'll work now.

Ahh I may have fixed it now, I think it wasn't working because it was trying to vote a 50% of what key-defenders votes with. which would be 0.5% which I don't think you can do.

If not then I'll continue to fiddle with it until it suddenly works. :)

Sorry, out of LUV tokens to be sent today. Try tomorrow. (Having at least 5 LUV in your wallet allows you to freely give 3 per day)

thanks anyway, cheers !BEER

I joined it but guess it will not end well for me. Time will tell.

@gaottantacinque @keys-defender You have posted an automatic reply to my post generating a series of downvotes automatically without stopping to verify what my post is about. If your job is to protect our Blockchain from scammers and give warnings of fraudulent sites, then we are on the same team, since my post informs precisely about the fraudulent website included in your blacklists.
I appreciate the immediate review of your procedures and the fair assessment of postings with potentially dangerous links.