project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Sybil Game

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.

Sybil Game

Created At

ETHGlobal New York

Winner of

🏊‍♂️ Worldcoin — Pool Prize

🔟 WalletConnect — Top 10

🧑‍💻 WalletConnect — 🥈 Best Use of Web3Modal

Project Description

GAME CONCEPT

Sybil Game is the crypto-native version of popular live-trivia games like HQTrivia.

  • 5 rounds of crypto trivia questions with 4 answer choices, 1 correct answer
  • Participants are given 30 seconds to commit your answer on-chain in an “unrevealed” state. Failure to submit an answer results in a loss.
  • Participants are subsequently given 30 seconds to “reveal” their answer submissions on-chain. Failure to reveal their submission also results in a loss.
  • Correct answers advance participants to the following round until the fifth round.
  • Participants win after surviving all five rounds and are sent your portion of the ETH prize pool, split equally among winners.

ANSWER SUBMISSION MECHANICS

Answer Submission Phase

  • Participants are provided a generous 30 seconds to submit their answers on-chain to combat potential network congestion. Some users may try to game the system, but they risk not having their transaction included.
  • All answers are recorded on-chain in an "unrevealed" state to prevent front-running (e.g., querying what other participants submitted).

Answer Reveal Phase

  • Once the answer submission phase expires, participants have 30 seconds to "reveal" their answers on-chain.
  • The game host will then send the correct answer on-chain to compare vs participant answers.
  • Revealing a correct answer advances the participant to the next round.
  • Surviving the final round crowns the participant as a winner. They then receive ETH from the prize pool to their connected wallet.

SYBIL RESISTANCE/WORLD ID

Sybil resistance is paramount in Sybil Game, to prevent multiple answer submissions and bots.

  • To ensure proof of personhood, participants must verify and sign in with World ID using World App before they can join the game. The proof of personhood verifications do not reveal information about the verification or the participant herself.
  • Further methods to verify personhood will be added in the future.

How it's Made

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.

background image mobile

Join the mailing list

Get the latest news and updates