HLS tool update - know your pending comment author rewards ( along with post author rewards )

avatar

Good evening to everyone , I hope you all are doing good .
I just updated my HLS tool today to update an existing feature .

Post Author rewards

Couple of months ago I added this feature of "Know your pending Post author rewards " .

What it basically did is , it took all your posts in past 7 days and calculated the second layer token rewards for those posts .

It was well received by users because

  1. There aren't many places right now ( Except this tool and Marky's tool ) where you can see all second layer token rewards at the same place .
  2. We use multiple tags on most of our posts and we would like to know all tokens earned on a particular post at one place.

Comment Author rewards

But there was something missing , the comment rewards , right now there isn't any app which tells you the second layer token rewards at the same place for both comments and posts - I didn't add this to the script back then because it just took way too much time to retrieve the info .

Amount of time taken initially

So it followed the same procedure as post author rewards .

  1. Retrieve all the comments made by your account in past 7 days ( pending payouts ) .
  2. Calculate the second layer tokens rewards for each comment .
  3. Convert those second layer token rewards to Hive ( for each comment )
  4. Add everything and display the summary .

So at first when I did this , I tried with a particular username who had posted 1000 comments and it took my on an average 67 minutes to retrieve these .

Filters added

Then I started working on reducing the amount of time taken because 67 minutes is just ridiculous .

1st filter -
So the first filter that I added was to remove the comments / posts for which there were 0 upvotes .

Obviously if 0 upvotes then 0 earnings , don't even have to check how many tokens you are eligible to gain .

This reduced the time taken considerably . If an user made 1000 comments then on an average 400 comments are upvoted ( I just calculated this for 15 users so it might not be accurate ), it took 20 minutes now instead of 67 minutes .

But still that isn't enough , 20 minutes is huge too .

2nd filter

This was a game changer and I was kinda stupid to have overlooked this .

Initially for each and every comment there was an API call made to retrieve the latest token price ( to convert it to Hive ) . This was taking way too long cumulatively speaking .

So at the start of the script itself I retrieve and store all the latest token price and then for each and every comment the same price is used .

This reduced the time taken from 20 minutes to 3 minutes .

So right now , if you have say 500 comments which are upvoted ( atleast 1 upvote ) then it will take approximately 200-250 seconds to retrieve all the data .

Well that isn't fast either - 0.5 seconds for 1 comment ?

That's true . 0.5 seconds per comment ? That's huge but believe me I have done my best , I researched and looked at all possible ways to reduce the time .

If anyone has any more ideas , I would love to hear it and implement it ASAP depending on the complexity of the solution .

Finally

Steps to get the data

  1. Go to https://hivelayers-stats.herokuapp.com

  2. Choose "Post rewards" in top left.
    image.png

  3. Now you will see 4 options -

    • 1st is only for a particular URL
      1st_feature.gif
    • 2nd is for only posts ( all pending posts )
    • 3rd is for only comments ( all pending comments )
    • 4th is for both pending posts and comments .
      last_feature.gif

Here you can see the number "62" - it means that out of all your pending posts and comments there are only 62 posts/comments which got atleast 1 upvote.

And wait for it to load everything and at the end you can see the Summary -

image.png

Things to note

  1. This is only for second layer tokens and not for Hive
  2. The Summary contains both author and curation rewards together .
  3. The convertion price to Hive is the latest token price.

I will try and improve this as and when I can . That's it for now . Will meet you tomorrow with another post .


Regards,
MR.

Posted Using LeoFinance Beta



0
0
0.000
33 comments
avatar

I was wondering when we'd see or get how to calculate the rewards on comment for the second layer token, would even better to check for one month, this is particularly good especially for engagers on leofinance and POB

0
0
0.000
avatar

Hey @josediccus . This feature is for "pending" comment rewards so we can't go beyond 7 days .

But I got what you said . Would be cool to see how much we earned in the past 30 days ( for comments or posts ) right ?

Will keep that in mind , in future I will consider adding that :)

Posted Using LeoFinance Beta

0
0
0.000
avatar

Yeah I it's for seven days, nevertheless one can still use seven days to calculate for how 30 days result would look like. How now seven days is cool, it actually is a feature that's on demand. It's good we're doing something for the second layer tokens


Posted via proofofbrain.io

0
0
0.000
avatar

nevertheless one can still use seven days to calculate for how 30 days result would look like

Yeah this was what I thought when I coded it :) Thanks for the feedback , really appreciate it .

Posted Using LeoFinance Beta

0
0
0.000
avatar
(Edited)

You are the statistics master! I especially like the summary portion of the generated report. Looks like I am really stacking up on CTP and LEO tokens from just engaging!

Here is the summary of my upcoming rewards from just commenting on others' content.

Leo Finance

uopytuinTr.png

Posted Using LeoFinance Beta

0
0
0.000
avatar

Awesome :) I was hoping that someone will try out and post their results .

I am glad you like it :)

Posted Using LeoFinance Beta

0
0
0.000
avatar
(Edited)

great you finally got this to work. A very handy tool. thanks for your great contribution to this awesome platform


Posted via proofofbrain.io

0
0
0.000
avatar

I just hope it helps users gain some insight on their earnings :)

Thanks for the kind words .

Posted Using LeoFinance Beta

0
0
0.000
avatar

This is a really fun tool with interesting results when I used it.

Would it speed things up if you told it to ignore tokens where the amount paid out equals 0? I had quite a few of those in my report. 😊

Posted Using LeoFinance Beta

0
0
0.000
avatar

amount paid out equals 0

In order to check if it is zero or not it has to retrieve the data :( So unfortunately no .

Can I check the value is zero before retrieving ? NO :((

Only think that can be checked is number of upvotes before grabbing token value which I have added .

Can you tell me how much time it took for you to retrieve the data ? Did it take too much time ?

Posted Using LeoFinance Beta

0
0
0.000
avatar

Can you tell me how much time it took for you to retrieve the data ?

I didn't make a note. Sorry. It felt like quite a long time but I'm not sure. I'll try and remember to time it next time. 😊

!ENGAGE 20

Posted Using LeoFinance Beta

0
0
0.000
avatar

Thank you for your engagement on this post, you have recieved ENGAGE tokens.

0
0
0.000
avatar

This is a great addition to your HLS tool, thanks for coding it! Even for users with limited activities like me, this tool brings lots of interesting information, and I use it regularly.

0
0
0.000
avatar

I am happy to read this :)

For the users who don't comment a lot but want to check their stats , this is a great feature I believe . It will give you the data in no time too .

Posted Using LeoFinance Beta

0
0
0.000
avatar

Ah, this is really cool. There used to be a thing over on that other chain that did something like this and I used to use it all the time back in the day.

Posted Using LeoFinance Beta

0
0
0.000
avatar

I looked at mine and man that comment section was so long. It also took quite a while to load so I was kind of hoping for the totals at the top. But I guess it could still be calculating so it might not make sense to put it at the top.

Posted Using LeoFinance Beta

0
0
0.000
avatar

I actually tested it using your account :p lol .

BTW was it retrieving the data fast or no ?

Atleast 1 comment per second ?

But I guess it could still be calculating so it might not make sense to put it at the top.

YEah that's right , it cannot calculate the total until it has gone through all comments .

Posted Using LeoFinance Beta

0
0
0.000
avatar

I think it was fast enough because I never got down to the comments before the next one was loaded up.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Another great tool from the "King of Charts and Databases". This is a great tool, I was really looking forward for this feature as this really gives your pending rewards and you can plan your things well according to the receivable rewards.


Posted via proofofbrain.io

0
0
0.000
avatar

@amr008 - Love this tool! :) Any chance you can add a couple things?

  1. SPT tracking
  2. ONEUP tracking
  3. Would love to see the pending HIVE Payouts as well just to have it all in one place

I may be missing some tokens - but I wrote an article a while back that might be a useful reference (even if not exhaustive) here:
https://peakd.com/hive-167922/@zwhammer/maximizing-hive-rewards-with-second-layer-tokens-guide-to-second-layer-tokens-tags-on-hive

P.S. - @themarkymark shut down his tool, so yours is the only one up that I am aware of.

0
0
0.000