Rock-To-Goal

A Decentralized Location-Based Board GameBased on Indian Cities.

Rock-To-Goal

Created At

ETHGlobal New Delhi

Project Description

Rock to Goal is a blockchain-powered board game featuring 11 Delhi locations where players navigate using provably fair dice rolls.

Identity-First Gaming Using Self Protocol's offchain SDK, players verify their age, nationality, and location before playing. Indian users play free while international players pay an entry fee - all determined through verified identity data rather than self-reporting.

Fair Randomness Every move uses Pyth Entropy to generate cryptographically secure random numbers on-chain. Players roll dice, confirm transactions, and earn points as they navigate Delhi's iconic locations. No centralized control over game outcomes.

Game Flow

  1. Connect wallet (MetaMask)
  2. Verify identity via Self Protocol QR scan
  3. Navigate Delhi map with 11 marked locations
  4. Make moves using Pyth-generated randomness
  5. Earn coins/points through strategic gameplay

Economic Model

  • Verified Indian users: Free entry
  • International users: Pay entry fee
  • Prize pools formed from entry fees
  • All transactions on-chain (Celo network)

Technical Stack

  • Self Protocol: Identity verification & country-based access
  • Pyth Entropy: On-chain random number generation
  • React Frontend: Cyberpunk-themed UI
  • Smart Contracts: Game logic & prize distribution
  • Celo Blockchain: Fast, low-cost transactions

The project combines real identity verification with provably fair gaming mechanics, creating a unique Delhi-themed experience that's both fun and technically innovative.

How it's Made

Rock to Goal is a React web app integrating Self Protocol for identity verification and Pyth Entropy for random number generation on Celo blockchain. Frontend Stack React with Tailwind CSS for the cyberpunk UI. Used wagmi and RainbowKit for MetaMask wallet connection. Custom pixel-art styling with CSS animations for the Delhi map interface. Self Protocol Integration Implemented SelfAppBuilder with country verification to enable free play for Indians and paid entry for others. QR code verification flow using SelfQRcodeWrapper handles age restrictions and nationality proofs. Pyth Entropy Usage Each game move calls smart contracts that consume Pyth's on-chain randomness for dice rolls. This ensures provably fair gameplay with no centralized control over outcomes. Smart Contracts Solidity contracts on Celo handle player registration, move validation, point calculation, and prize distribution. Every action requires on-chain confirmation for complete transparency. Notable Approach Made identity verification mandatory rather than optional, enabling country-based pricing through cryptographic proofs. Each move requires a transaction instead of off-chain computation, maximizing transparency at the cost of higher gas fees. The main challenge was coordinating wallet connection, identity verification, and game state in a smooth user flow through careful state management and sequential loading states.

background image mobile

Join the mailing list

Get the latest news and updates