The most basic operational form of our token distribution bot is a discourse theme component which
- scrapes posts tagged ‘done’ every two weeks and records which users were assigned to that post
- collects users stats for their contributions to our ecosystem. This means posts and comments made. Hearts received. (fortunately Discourse already does this out of the box, so its just a slight modification to what’s already happening)
- collects users trust level and uses that as a multiplier of their final score
If the tasks listed ‘done’ have no-one assigned it auto-messages beneath requesting they assign the task to themselves in order to receive their tokens.
After the token claiming message has been sent the bot then deletes the ‘done’ tag and adds a ‘legacy’ tag.
Every 2 weeks the bot sends users a message containing a link to a faucet where they can claim their tokens.
The faucet is set up to release tokens every two weeks (like a standard faucet), but then refers to the users score in our database/spreadsheet to determine how much to give them as a percentage of the overall score of all users.
For example, if we release 10,000 tokens and the user has a score for the past 2 weeks of 200, while all users that week have an accumulated score of 10,000. The user would receive 2% of the total tokens released
If you have experience in, or want to set up a link to Metamask then please let me know as that would take the bot to the next stage.
Security isn’t too important at this point as the account the tokens are sent from will not be the main vault and will only contain enough for that period, which means any hack would not be catastrophic and the incentive fairly small given the tokens likely nominal value at this point in the road-map. Improving security will be a high priority task in later versions of the bot.
We’re going to want the stats from here: Public Happiness
With the multiplier for each category easily modifiable. For now all of the categories would have a value of 1 except for ‘topics viewed’ and ‘posts read’ which i would give a value of 0.2.
The total amount for each person is multiplied by their user trust level, 1-5. This can be easily accessed by clicking on their profile icon.
Here’s a guide on how to grab the Api from any element in Discourse to pull the values into a spreadsheet if thats needed: Integrations: Discourse API
I’ve been thinking about what Discourse already does, and how we can tweak that to make the task easier.
- In the admin section i can set user summaries to go out every 2 weeks
- Summary emails go to all users and already include stats pulled from their accounts via their user ID
- If we add an extra value to users stats we can easily ask the monthly email to also send them that
- The added value can be a randomly generated code or password for retrieving their tokens from our bot. It should not be visible to the public in their profile page.
- Users can then enter their code in our bot, which then checks their profile score against its database to find how many they’ve earned since their last claim, and then releases their tokens via a faucet, or other delivery mechanism
- The edits to add the new element to user stats should be added via a template plugin, or theme component so we don’t have to worry as much about new discourse updates breaking it. We should have our own blank plugin/component to add minor changes into anyway so i’ll ask one of the devs to create one you can code directly into.
To me that seems like the most simple solution as it uses already existing architecture. You are welcome to solve this task in a different way if you like.
Task depreciated. We are going to build a different model