Steem: Use Leaky Bucket to Prevent Comment Spamming

Screen Shot 2017-11-10 at 11.16.49 PM.png

Background

Steem/Steemit has 20-second limit for comment: if you post a comment, you will not be able to post another comment in 20 seconds. I believe this feature is used to prevent comment spamming.

The Problem

The 20-second limit cannot prevent bot spamming. If a bot posts one comment per minute, it still can post 1,440 comments in each day.

On the other hand, it's human who suffer from the 20-second limit. Sometimes, I can type a comment within 10 seconds. Then, I will have to wait for another 10 seconds before I can post the comment.

Bot won't suffer from the 20-second limit. Therefore, the 20-second limit for comment is not a good feature to prevent spamming.

The Solution

We can use Leaky Bucket to solve the problem. Using Leaky Bucket, we can set long term interval, burst interval, and burst size.

For example, we can set :

  • burst interval = 1 second
  • burst size = 30 comments
  • long term interval = 10 minutes

Using the above setting, we can write 30 comments at the burst speed of 1 comment per second. But after 30 burst comments are reached, long term interval kick in. The user must wait 10 minutes to send another comment. In each day, the user cannot post more than 24*6+30=174 comments in each day.

This is only an example. The parameters can be adjusted so ordinary users won't need to suffer and spammer cannot send too many comment in each day.



Open Source Contribution posted via Utopian.io

H2
H3
H4
3 columns
2 columns
1 column
10 Comments