Actifit Bot Development Updates
Repository
https://github.com/mcfarhat/actifit-bot
Introduction
In our continuous work on improving and developing features for Actifit, we provide another update as a result of the recent work done on our backend bot portion of Actifit, which handles aspects such as voting, rewarding, storing and retrieving data.
As usual, this update includes some new developed features, particularly a much updated and a large scope API that helps us further fetch and display data related to Actifit, adjustments and fixes to the actifit voting and scoring bot, a dynamic switch to the banned users list, and the much anticipated user rank system, as well as several other changes some of which are related to HF20 as depicted below.
Technology Stack
The bot is scripted using Node.js, and connects to a MongoDB instance for storing values.
Work Done
Extended API End Points: Commit Link
- In preparation for expanding the scope of Actifit, allowing further access to information being used and stored, and in relation to the new reward and rank system, we created a set of API end points that provide information pertaining:
- Delegation payments on a specific date
- Top delegators list sorted by delegated amount
- User's last recorded delegation amount
- Current actifit moderators list
- Current actifit ambassadors list
- Top AFIT token holders
- Actifit banned users
- Number of reblogs, upvotes, and rewarded posts on a specific day (each a separate API call)
User Rank Implementation: Commit Link
- We implemented a first version of the new user rank system, which also required additional API end points such as rewarded post count per user, and a refactoring of user token count and user delegation amount end points.
HF20 Voting Mana Calculation: Commit Link
- Due to HF20 and the change from VP to VM (Mana), we implemented a change to the bot so as it fetched the correct VM, and starts the reward process accordingly.
Dynamic Banned Users List & Other Changes: Commit Link Commit Link
- In this set of features, we implemented the following modifications:
- Implement dynamic banned users list fetched from DB
- Adding support for encrypted values in JSON data
- Changing max post date to a configurable value
- Decreasing inter-post-comment waiting time to 3 seconds instead of 10 (HF20)
- Implementing JSON meta on comment level in preparation for new reward system
- Skip self votes from reward
- Fix for improper activity count valuation
- Adding limit on max acceptable activity count
Steem Only Delegator Rewards: Commit Link
- In this set of changes relating to delegator rewards, we implemented the following
- Adding option for Steem-only rewards run mode
- Storing delegation payments on local file
- Adding option for skipping (or not) opt out users from specific reward types
Roadmap
Further continuous improvements will be done on top of the bot, particularly as we continue to work on the new reward system and as we further build functionalities required for improving Actifit and the needed APIs for smooth work.
How to contribute?
You can chat to us on the official actifit discord, or to me in discord private @mcfarhat#6013.
Contributions are accepted as pull requests to the official github repo.
We are having continuous tasks assigned to different contributors to our project. More official tasks are continuously announced :)
Thanks for the contribution, @mcfarhat! It's very cool to see you adding new features regularly - I bet it's a learning experience for you as well, or have you done all of this before?
The user rank system sounds interesting. Is there anything you have in mind that you will use it for? Or is it just for bragging rights for the users? haha.
About the code: in general I like that you add comments explaining what each function does and what the parameters are. Sometimes there is stuff like this, which I am guilty of too, but isn't really necessary
Also everything seems fine for the most part, but there are a lot of little inconsistencies that bug me. I've only really been getting into JavaScript recently, so take it with a grain of salt: is there a reason why you are using
var
,let
andconst
instead of justlet
andconst
? The indentation is all over the place, sometimes it's 2, sometimes it's 4, sometimes 8 haha. There are also missing spaces, e.g. you should put 1 space before the opening parenthesis in control statements. Most of these things could probably be prevented by using ESLint for example, so I'd definitely recommend you check it out.Other than that there is nothing really left for me to nitpick (I don't have enough experience for that!) - so all else I would like to say is keep up the great work!
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]
Thanks for a lovely review @amosbastian, thank you!
Yea i've been learning all this stuff myself! I've had a dev start this work before, but now continuing all the work and learning more technologies .. yea it's a hassle, but fun too!
User rank system will have key implications on Actifit's reward system, as it will play a value in the post reward, and the relevant AFIT and Steem upvotes - in addition to bragging rights :)
I agree with you on comments, spacing, var/let/const, sometimes i reuse some code and im just an old school JS guy who's just used to var, so i add my vars, and those let and const ive been seeing with new code. I need to wrap my head around new JS tech in more detail, so far the outcome has been good though - at least result wise lol.
I've heard much about ESLint too, haven't checked it yet, certainly sounds useful.
Thanks! :)
Thank you for your review, @amosbastian!
So far this week you've reviewed 13 contributions. Keep up the good work!
Exceptional work!
This is the most dynamic and growing Dapp in the cryptosphere
Posted using Partiko iOS
Hi @mcfarhat!
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
I am admiring at your great effort and dedication on the project.
Posted using Partiko Android
I like actifit and your great effort !
Posted using Partiko Android
Hey, @mcfarhat!
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!
@mcfarhat, thank you for thd update! Great job! Actifit is a great application! I enjoy it everyday. Keep on doing the good job!