Actifit BOT Development Updates: Exchange Functionality, Historical Data, Endpoints & More

in #actifit5 years ago

Repository

https://github.com/actifit/actifit-bot

Introduction

Actifit bot hosts the integral core of the Actifit project and its processes.
For this round, we implemented several new features, modifications and fixes to enhance Actifit, particularly in relation to the AFIT token exchange functionality (to STEEM upvotes), additional historical data, including the creation of a multitude of new API endpoints, as well as several fixes and improvements.
Below you will find more details about this update.

Technology Stack

The bot is scripted using Node.js, and connects to a MongoDB instance for storing and retrieving values.

Work Done

Commit Link

  • Implement additional reward calculation components when fetching historical data (author_reward + transfer). This helps us out fetching more accurate transaction details about Actifit accounts. For this purpose we added author_reward and transfer transactions to properly fetch this data. We particularly skipped inter account transactions but also transfers to bittrex.

  • Enable larger historical data up to 1 year. We enable a full fetch of historical data so as we can compile a bigger picture when needed, especially when pitching to investors.

  • Implement new functionality to confirm payments received for exchange functionality. This is a core functionality to help with the new exchange AFIT tokens to STEEM upvotes, which allows ensuring that the user sent proper funds, and switching his status to verified.

  • Fix issue with potential loophole for prior payments on signup. We made a change to our signup confirmation module, whereby each transaction needs to be fairly recent so as we properly approve the new account creation. This is unlike above item whereby user only needs to pay once to the designated account, @actifit.exchange.

Commit Link

  • Implement a fix to an issue with fetching delegation transactions, whereby some transactions were being erroneously skipped. The approach we did is to avoid relying on the most recent transaction ID, and instead fetch recent transactions for as far as 5 days back.

Commit Link

  • Implement new endpoints that allow confirming payment receipt, checking if user has pending exchanges in place, list of pending exchanges, list of processed token exchanges, unverified account list, full list of funds password accounts. Those are core endpoints which help out perform the needed transactions for exchanges, but also fetching relevant data about current status.

  • Implement new endpoint for rewarding users for posting comments via actifit.io

  • Implement new endpoint for grabbing total posts submitted for Actifit on a single given date, for better statistical data figures

Commit Link

  • Implement core functionality enabling the voting/rewarding script to upvote based on pending list of exchange transactions. This involves the actual execution of the exchange upvote, whereby we loop through all the pending list of exchange transactions, fetch a set maximum of transactions per voting round (to ensure we don't overconsume our bot), grab the current voting value, calculate the exchange rate and apply a proper voting to reward the user accordingly. We also involved helping accounts to reward, so as we drain less our main bot, but also on a limited number of transactions.

Roadmap

Further continuous improvements are planned for Actifit core functionality, particularly as the project grows, starting with the development of new endpoints to improve the website, app, and stats/info gathering processes.

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 :)

GitHub Account

https://github.com/actifit

Sort:  

Thank you for your contribution.

  1. there are quite a lot of console.log, as I understand this might be useful sometimes (are they visible to the end-users?), you might want to extract the logging function into a separate Logger class, which could be configured to write to log files (persistent for debuging purpose)
  2. You might want to format your code, as some are not properly styled.
  3. for Javascript, you might want to cache array length in a for loop such as for (let i = 0, len = groupedTxs[index].length; i < len; i++) {
  4. Inconsistent usage of semi-colon
  5. var could be completely replaced by either let or const
  6. commented out code that is misleading. such as
  7. Missing exception handling when e.g. MongoDB is not accessible.
  8. Nested try-catch all catch general exceptions is not a good idea e.g. code-smell.
  9. Regarding this commit not sure why it has shown changes even quite a lot of code are actually un-changed.

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? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @justyy! Keep up the good work!

Hello! sorry to bother you. I'm having some trouble remembering to activate the app. I use the Samsung S8 phone. Is it possible for you to create a widget for the app. Samsung has a health app, and it has a widget that i keep on my home screen which tracks my steps. It would be awesome if actifit can have something similar.

Posted using Partiko Android

Thank you for the suggestion. We will look into that!

OK cool thank you.

Posted using Partiko Android

Nice development. Bright future ahead

yes......... I totally agree...

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

This post has been included in the latest edition of SoS Daily News - a digest of all the latest news on the Steem blockchain.

Hi, @mcfarhat!

You just got a 0.06% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Great progress being seen on the use of the Dapp and impressive to see what it takes behind the scenes so appreciate the work!

Posted using Partiko iOS

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!

Congratulations @mcfarhat! You received a personal award!

DrugWars Early Access
Thank you for taking part in the early access of Drugwars.

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Are you a DrugWars early adopter? Benvenuto in famiglia!

You can upvote this notification to help all Steem users. Learn how here!

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.031
BTC 60340.70
ETH 2597.57
USDT 1.00
SBD 2.53