#POSH Bot - How does it work?

Hello there, @fbslo here with quick update on development of #posh bot. If you are not familiar with #posh bot, please read post by @acidyo HERE.

Edit: If you are not interested in how the bot works, you can read only "How can you start with the bot", normal users don't have to understand how the bot works behind the scene.

If your registration was not processed, don't worry, It will be processed manually. Twitter is rate-limiting the app and public Hive nodes are not reliable, so bot might miss your registration.

Update 2: There was a big design flaw with registrations (registration processing was not scalable), so I am working on fixing it. ALL registrations will be processed.

In this post, I will try to explain how bot works (for more questions, check out source code or ask in comments or on discord: fbslo#8470).

Source code: https://github.com/fbslo/posh-bot

What is #Posh Bot

#Posh bot will reward users who share Hive posts on Twitter with tokens.


How can you start with the bot?

Registartions are (temporarily) closed.

If you missed it, follow @poshtoken, @acidyo (and maybe @fbslo) so you don't miss the official announcement of the #posh bot when you will be able to register again.


All registrations (comments and transfers) will be processed asap.

You must register your account to be able to receive tokens, otherwise, they will be given to @null. Based on the feedback that old method was too complicated, @arcange proposed different registration method.

To register your account, send 0.001 HIVE/HBD to @poshtoken. Bot will send you money back with an encrypted memo. A memo will look like this: #Please create tweet with this content: "#poshbotregistration 811592"

To finish the registration, create a new tweet with content from memo, in this example #poshbotregistration 811592.

If you already used the old method, even if bot didn't reply to your comment, DON'T WORRY, all registrations will be processed, but it might take some time (a day or two) to do it manually. Thank you for understanding.

Old method will still work if you prefer it:

Old method, create tweet in this format: register-hive-account-hiveUsername (e.g. This tweet: https://twitter.com/GPujs/status/1283045955625979905) and then comment under REGISTER POST with comment: register link-to-tweet, (e.g. register https://twitter.com/GPujs/status/1283045955625979905)

You can see examples under registration post: @poshtoken/register-your-twitter-account


How does it work:

  1. The bot uses Twitter streaming API (since search API does not return all results). It "listens" in real-time for all posts with hashtag #posh and store them to MySQL database. code

  2. Before tweet is stored to the database, bot will check if it includes any link. If it doesn't, the tweet will be ignored. All links on twitter are shortened (t.co), so bot must follow the URL and check if it's one of the Hive frontends (currently hive.blog, peakd and 3speak.online). If there is at least one Hive link, the tweet is stored. code

  3. After 1 day (bot checks every 30 minutes for posts older than 1 day), bot will use Twitter API again and check number of likes and retweets (sadly, number of replies is not returned from API). Bot than calculates a score (let score = retweets * 5 + likes) from Twitter engagement. code
    If the author of the tweet posted his/her own Hive article, bot will also check the number of comments on Hive post, then check if comment author transacted with ENGAGE token in last 100 transactions and add the number of commenters * 5 to the score and store it to the database as well as the time of score calculation. code

  4. After another day, bot will get all the tweets where the time of score calculation was over one day ago from the database, calculate the sum of all scores, divide the result by X tokens (currently 1000 tokens) and distribute tokens to each tweet. code

  5. The daily post with statistics will be posted on this account. code

Note that "tokens" are just digital points, not on any blockchain yet.


There might be some bugs in first few days. Thank you for understanding and your patience.

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