GRIN Tipping Bot Bounty Proposal
This document aims to technically define the requirements for a Telegram bot that can deposit and withdraw GRIN digital cash cryptocurrency. It is meant to be regarded as a formal application for a bounty suggested in this forum post.
Such a bot could serve more than one purpose.
To popularize GRIN digital cash currency, some small amount of coins could be distributed free of charge to users who satisfy certain predefined criteria. Such as sending a message, getting a certain number of reactions, etc. In this case, the owner of the group would need to enable both deposit and withdrawal features.
If someone runs a Telegram group and would like to accept donations in GRIN. In this case, only the deposit feature would be enabled.
The bot would use the Owner API. It would load the credentials and API endpoint from a config file provided in the process launch command arguments.
Getting the address
- User runs
- Bot replies with slatepack address.
The response message template should be customizable.
- User runs
- Bot send a DM with a slatepack address message and requests to send a slatepack.
- User that has to initiate the SRS flow in the own wallet and send the slatepack to the group. The bot will automatically consider slatepacks that do not reply to any messages as donations.
- If slatepack was correct, the bot will respond with another slatepack and request the user to run the
sendcommand in their wallet. Otherwise, it will inform the slatepack was not correct.
- User will run the send command in their wallet.
- Bot will automatically inform the user when payment is processed by tagging the user in the group. It will also send a message to the group informing of successful donation.
- User interested in getting a withdrawal would need to send a message to the group that states why it would be cool for this user to receive GRIN.
- At any moment, the user from (1) can respond to their message with
/faucetcommand, then the bot will inform the user if qualifies for the faucet withdrawal or not. If qualifies, the bot will send a DM requesting the user's address to encrypt slatepack. After receiving the address it will respond with an SRS flow slatepack. If user did not qualify for withdrawal, it will inform what is necessary (for instance more responses to the original message containing specific keywords or emojis from other users, etc).
- User runs
receivecommand in own wallet with slatepack stated in (2). Responds to message from (2) with own slatepack resulting from
- If correct, the bot will broadcast the transaction and inform the user of it. It will also send a message to the group informing of the successful withdrawal. If not, it will inform you that the slatepack was not correct.
Customized approval mechanisms
Users requesting the faucet would need to provide a message and the bot will review if that message qualifies. Possible criteria are
- Number of responses quoting the message from other users in the group.
- Presence/absence of particular keywords/emojis in the response messages.
- Author of the message satisfying a particular amount of time in the group, having several messages sent, profile photo, etc.
The bot would need to be configurable without restarting. The owner of the group should be able to:
- Enable/disable deposits
- Enable/disable withdrawals
- Update bot response messages templates
- Set the required number of responses to approve the withdrawal
- Set the profile requirements to approve the withdrawal
- Set the approved withdrawal amount
For security reasons, Owner API settings would need to be provided via a config file and not using the admin UI.