No-loss reward platform for games and competitions.
Genie is a no-loss reward platform for games and competitions. User can start a challenge by choosing a game and creating a pool contract, setting winner conditions and other configurations like ticket price. Every player can join the pool by staking the ticket price. The players' stakes form a fund that invested into a lending protocol and generates interest rate, this becomes the winning reward. When the game is over and winner is selected, he receives the prize and all of the players can withdraw their stake back.
The project is built from couple of components: 1. Solidity smart contracts. Pool contract is responsible for storing users' funds safely, and to generate the rewards by using a lending protocol. We use Compound as lending protocol, and integrate with Chainlink for off-chain game data. 2. The DApp. A frontend application built with react and redux. We use Portis and Metamask as Ethereum providers for the web3 lib. The application used for pool creation - the image uploading done with Sia. and for interacting with pools - joining and leaving. 3. Backend expressJS service. Stores pool data that is not on chain like pool name, description, etc. 4. theGraph graphql service. Indexes Ethereum events and provides query API for pools, users, deposits, rewards, etc. 5. Watchtower service that check's the game API if there's a winner. When the watchtower finds the winner, he notifies the pool which verifies the winner versus the chainlink oracle. The chainlink oracle uses an external adapter to find the winner, and it writes response to the pool contract. Receiving the response, the pool rewards the winner.