The GHO token will be used to bet in the game. So it is a sort of a multiplayer game where users will have to approve there GHO token to participate in the game. Currently we have set the bet amount as 1 GHO token which will be required to enter the game.
The flow is users will use GHO token to participate in the game. Suppose 4 players have entered the game there entry will be total 4 GHO. Now 2 players have participated for Dice side 2, 1 player has bet on Dice side 4 and 1 player has bet on Dice Side 1. Once the WAIT state of game is finished the result will be called. Lets assume the result will be dice side 4. There is one player who has won and he will get the whole amount. The reward is distributed to all the players of the winning Dice side.
The project uses Reactjs for frontend and express js for backend to maintain game states. Solidity smart contract manages the random generation of dice face using Chainlink VRF. Smart contract is also responsible for other thing like distribution of rewards to the winners.
This is just a prototype we aim to create a full fledged system of multiple mini games like this one. Which will contribute towards AAVE's ecosystem and GHO token usage.