API3 Statistics Twitter Bot

Wrote 2 small python lambdas over the weekend that are using this twitter account to post

  1. API3 stake, unstake and mint events
  2. daily post about staked supply & total supply.

Feel free to share if you want any other features. I might expand on it when bored.

3 Likes

*self note:

  • add circulating supply

Thank you for taking on this initiative, @UgurMersin. I think this is very valuable for analytics and measurements.

This is awesome, is there a way to distinguish whether the staked amounts come from a new user(wallet) or its from the existing users? feel like that is a good add-on

1 Like

I mean, yeah. will be it bit more complex tho.
Might do it in my free time :stuck_out_tongue:

*self note:

Fixed:

  • bot doesn’t tweet the consecutive transactions if more than one occur within a minute
  • need to read the last ~5, put them in an array & check timestamps of each one to determine if it should be tweeted or not.

Open:

  • additionally i can read the staking contract and use the userSharesAt function to determine if a user had a stake before staking by using blocknumber -1 (of stake tx) while calling the function.
  • can probably also do this in reverse and determine if shares of a user are 0 to indicate they “completely left”