Sybil Game is an onchain live-trivia game with sybil resistance powered by World Id. Participants answer five rounds of multiple-choice questions about crypto and are rewarded from a $100 ETH prize pool upon survival.
GAME CONCEPT
Sybil Game is the crypto-native version of popular live-trivia games like HQTrivia.
ANSWER SUBMISSION MECHANICS
Answer Submission Phase
Answer Reveal Phase
SYBIL RESISTANCE/WORLD ID
Sybil resistance is paramount in Sybil Game, to prevent multiple answer submissions and bots.
SybilGame.sol is the main logic of the game.
SIGN UP FLOW
⁃ We guard the signup with an on-chain anonymous action from WorldID. We store the nullifier hash so that you cannot sign up twice using the same worldID for a game session.
⁃ The user’s address is included in the signal for WorldID, so we know that the user cannot add a new address
⁃ You need to register before the first round starts
COMMIT AND REVEAL SCHEME
⁃ In order to prevent people from copying other people’s answers (by viewing them on chain), we added a commit and reveal scheme. Once a round starts, it starts in the commit stage. The host submits a question on chain. The player has x seconds to respond. The player submits a hash of their answer (which includes a nonce) Then the host submits the answer on chain. The player has x seconds to reveal their answer (answer and nonce), and if it’s correct, they get added to be able to play the next round. It is in the player’s incentive to reveal if it’s correct, since it’s the only way to move to the next level.
SybillGameLauncher.sol serves two purposes, to make it easier for the host to launch new games, and to have a canonical place on change to store the latest game address.
TECH STACK
⁃ Vite
⁃ React
⁃ Tailwind
⁃ Shadcn-ui
⁃ Foundry
⁃ Wagmi
⁃ Web3Modal
FUTURE DIRECTIONS
⁃ Add multi-day support. Your reputation would accrue each day you play.
⁃ One click signup, right now user needs their own wallet. Since the scheme is sybil resistant, we can easily add a flow where the host pays for the user’s gas.
⁃ We can also add email signup
⁃ Payout stage - we didn’t have time to do the payouts, but it should be an easy add.