Skip to content

User Flow

Anurag edited this page Jul 29, 2020 · 4 revisions

Initially the contracts has to be deployed on mumbai testnet. The web3 interaction methods have to be created and then the complete flow explained above in the overview section is simulated by writing a script that calls these web3 methods. The user flow is as follows for the Reddit PoC:

  • User submits signed claims, community points are minted and transferred to the user
  • Users can transfer community points to other users, if they choose to - to appreciate other users and so on.
  • Users can subscribe to subreddit membership features by burning points

The subreddit token contract deployed on Matic will be mapped to the corresponding contract on Ethereum.

When the users need to exit their community points token from Matic, they need to burn their tokens on Matic and then submit a proof of the burn transaction on Ethereum. Once the proof is verified, the user is given an ExitNFT.

From here the user has two options. Either do a fast exit or wait for the 7 days challenge period. If the user opts for a fast exit, then the user transfer the exit token ownership to an exchange contract that gives ERC20 tokens in return. A small fees in the form of the tokens is deducted during this swap.

The ERC20MintablePredicate contract is a plasma security enabled contract that will ensure that the exited tokens can be withdrawn by the holder of the exit NFT only after a period of 7 days.

Clone this wiki locally