Repository
https://github.com/drov0/reward-logger
Website
https://github.com/drov0/reward-logger
Reward logger
Reward logger is something that does exactly what its name implies : it logs rewards. When you are running a business on the steem blockchain (like @steempress) your revenues come from a lot of different channels, curation rewards, producer rewards, author rewards or even benefactor rewards for some cases.
And these are key performance indicators when you want to monitor how well you are doing, for instance if we were to change our curation methods we don't really have the tools to easily know how that affected our revenues. Of course you can always go to the various tools already provided by the community like steemdb, steemd, steemworld etc to check it out
But steemdb has yet to be updated with the changes regarding hf20 (beneficiaries now pay out sbd). and it can be a bit unstable at times. Plus if you are monitoring several accounts there is no way to really have everything in the same place and you have to do some calculations yourself which is not ideal at all.
So I figured I would build my own version to track all that.
With this tool you simply provide a list of accounts to track and it will fill a mysql database with the data regarding your rewards day by day, which allows you to easily build your preferred visualizations on top of it, or extract it to excel and make graphs/tinker with the data.
This is intended to provide a data layer to support another visual layer later on (I am probably going to build my own and share it with you all later on)
Features
- Track as many accounts as you want
- Completely configurable
- Runs in the background and fills a database with day by day infos on
- curation rewards
- Benefactor rewards
- Witness rewards
- Author rewards
Installation
git clone [email protected]:drov0/reward-logger.git
cd reward-logger
npm install
touch .env
now edit the .env with your database informations :
DB_USER=root
DB_PW=root
DB_NAME=Mysuperdatabase
then execute the content of table.sql on your database to add the table.
edit config.js to add the accounts you want to track, for instance if I want to track steempress and howo :
module.exports = ["steempress", "howo"]
And then just run it, I suggest using pm2 as it will provide you with some easy start stop mechanism and run it in the background :
pm2 start logger.js
Technology Stack
- Nodejs : main language
- mysql : storage
- dsteem : Library to query the steem blockchain
Roadmap
- Optimize the number of operations that are picked, right now there is a lot of data that is recalculated for no reason and it's putting unnecessary strain on api.steemit.com
- Build a dashboard on top to display the data.
How to contribute?
Any contribution is welcome, I believe no code is perfect and can always be improved. Feel free to make pull requests, just make sure to fit to the coding style : 4 space indent and snake_case
I hope to bring you guys some more news about this project soon :)
Oh and if you like what I do, please consider voting for @steempress as witness.
@howo out.
Looks good.
What about
fill_vesting_withdraw
ops? Should they count as a revenue source?Also, on a small note, maybe you can use
INSERT ... ON DUPLICATE KEY UPDATE ...
syntax here. (requires setting a new index on date, though.)Regarding the initial table creation, I would love to see a
npm create_initial_table
custom command to create the initial table.Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
I guess but it's steem you already own, not revenue that's coming from new sources.
I thought about it when coding but I figured that way was clearer for future use and one select call on a primary key on a table that got one row per day per account tracked is really not going to be a performance issue before a very long time.
Ah ! Good point ! I'll add that to a future version.
Thank you for your review, @emrebeyler!
So far this week you've reviewed 2 contributions. Keep up the good work!
More great things, you're awesome @howo
<3
Thanks @howo! I do support your work and I also have had voted steempress as my witness!
Thanks !
Congratulations @howo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Award for the number of comments
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Hi @howo!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Hello. I always use Steempress. Could you check up my postings? I didn't get votings for 3days. Thank you.
Hey, @howo!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Congratulations @howo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Congratulations @howo! You have received a personal award!
SteemFest 3 Attendee
Click on the badge to view your Board of Honor.
Do not miss the last post from @steemitboard:
Congratulations @howo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Congratulations @howo! You received a personal award!
Click here to view your Board of Honor
Do not miss the last post from @steemitboard:
Congratulations @howo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Congratulations @howo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard: