-
Notifications
You must be signed in to change notification settings - Fork 7
Moderator Guide
By the end of the guide you should know how to interact with Community Points using MultiBaas tool provided by Curvegrid.
You should use this guide if you need to accomplish one of the following goals:
- Mint (issue/generate) Community Points
- Deposit Community Points (ERC20 tokens) of
r/OMGnetwork
subreddit on the OMG Network - Retrieve the amount of Community Points of a specific address on the OMG Network
- Distribute a predefined amount of Community Points to a list of recipients (subreddit users)
- Chrome or Brave browser.
- MetaMask wallet extension with $5-$10 worth of ETH.
Reddit Community Points represent ERC20 tokens on the Ethereum network that can be transferred to the OMG Network to provide more features and allow scaling transactions to the required number of users. The guide provided below demonstrates how subreddit moderators can interact with the OMG Network using MultiBaas platform.
Currently, the demo application for Community Points Engine supports only ROCK tokens that represent r/OMGnetwork
subreddit. However, the instructions here can be applied to any potential Community Points token.
MultiBaas environments:
- Ropsten: https://reddit-test.multibaas.com
- Mainnet: https://reddit-demo.multibaas.com
ROCK contracts:
- Ropsten: 0xd15c87e2a4c59e63caaeb089c5aff0025b5ab6fe
- Mainnet: 0x79dAc4C6AafF683328b9d000ffD5030c8b1E9DF2
Every ERC20 token is defined by its smart contract address. The current document doesn't demonstrate the issuance of new tokens. You can use the MultiBaas guide to issue ERC20 tokens that will represent your subreddit community.
The Distribution contract holds the main logic to decide how many Community Points should be distributed on each round. If you plan to work only with ROCK tokens, the distribution contract will be prefilled, so you may skip this step.
If you want to add a Distribution contract for your own subreddit, use the first section of the dashboard as follows:
After the contract appears on the list of your contracts, select it and proceed to the next section. Note, you need an owner of a defined Distribution contract to make interactions described below.
Each ERC20 smart contract can have multiple methods you can use to achieve certain goals. The proposed MultiBaas demo dashboard demonstrates several methods based on their smart contract:
Distribution contract
- Subreddit Point Contract: retrieves a Subreddit Point contract associated with the demo Distribution contract
- Advance To Next Round: calculates how many tokens should be distributed during the next round of distribution
Subreddit Point contract
- Transfer: transfers a specific amount of Community Points tokens to an address
- Balance Of: shows the amount of Community Points tokens that an address holds
- Allowance: shows the amount of Community Points tokens that OMG Network's
ERC20 Vault
contract can spend from a specific owner address - Approve: approves OMG Network's
ERC20 Vault
contract to spend a specific amount of Community Points
ERC20 Vault contract
- Deposit: deposits an approved amount of ROCK tokens to the OMG Network’s
ERC20 vault
contract on the rootchain to be credited the equivalent funds on the OMG Network
Considering that the owner of the ROCK contract is the Distributor contract, you can't mint tokens directly. Instead, you have to call Advance To Next Round
method as follows:
- BurnedPoints - the total amount of burned ROCK tokens that were sent to the non-recoverable address
- Total Karma - the total amount of Community Points (e.g. ROCK) that have been minted already
This will calculate the amount of tokens to distribute during this round and call Mint method that will issue a calculated amount of tokens. You can find a corresponding formula here.
Making Community Points transfers has the same approach as any other transfer on the Ethereum or OMG Network. Therefore, define an address of the recipient and the amount of tokens you want to send, and press SEND METHOD
button as follows:
Before you can use any Community Points on the OMG Network, you need to approve the ERC20 Vault
contract for spending these tokens as follows:
This will trigger a MetaMask popup that you need to confirm. After successful approval, you'll see a confirmation message.
If you encounter some errors, make sure to check that the ERC20 Vault
contract is linked in your MultiBaas account. For more details, refer to the following guide.
After approval of the defined amount of tokens, you can deposit them to the OMG Network. Select a Deposit
method and put the amount of tokens you approved in the previous step. This will trigger a MetaMask popup that you need to confirm. After successful approval, you'll see a confirmation message.
To verify your tokens have been deposited to the OMG Network, paste a transaction hash to one of the block explorers, such as Etherscan or paste the address of the wallet to the Account Balance
section as follows:
Traditional Web3 wallets don't support mass-send functionality, which means you can send to one address at a time. MultiBaas allows sending tokens to hundreds of accounts simultaneously to reduce the moderator's time spent on this activity.
To distribute tokens to multiple accounts, you can create a list of recipients with their address and the amount you want to send to them:
After you compiled your list, press DISTRIBUTE ALL
button and sign the transaction as follows:
If the transaction is successful, you will see the following message:
If you need to add multiple recipients at a time, you can use ADD MULTIPLE RECIPIENTS
tab as follows:
This was only a demo of what the MultiBaas tool is capable of. For exploring all contracts that power the Community Points Engine, select ADVANCED -> Contracts
menu and choose your contract as follows: