Link: https://encrypted-treasure-hunt.vercel.app
🗺️💰 Encrypted Treasure Hunt is a blockchain-based game that combines Fully Homomorphic Encryption (FHE) and token incentives to create a fun, fair, and privacy-preserving treasure-hunting experience. Players can either hide treasures or search for them on a 10x10 grid, earning points and rewards based on their success.
- Game Setup
- Map: A 10x10 grid (100 cells) where treasures can be hidden.
- Treasure: Each new player starts with 1 treasure to hide.
- Turns: Each game round consists of 20 attempts to find the treasure.
- Player Roles Hider (Treasure Owner)
- Action: Choose a cell to hide your treasure.
- Reward:
If the treasure is not found within 20 attempts, you earn 10 points. If the treasure is found, you earn 0 points.
Seeker (Treasure Hunter)
- Action: Guess a cell to search for the treasure.
- Reward:
If you find the treasure, you earn 2 points. If you do not find the treasure, you earn 0 points.
- Hiding Phase:
The Hider selects a cell to hide their treasure. The coordinates are encrypted using Zama's FHE protocol and stored on the Sepolia blockchain.
- Searching Phase:
Seekers take turns guessing cells (up to 20 attempts). After each guess, the smart contract verifies if the guess matches the treasure location using FHE computation, without revealing the actual coordinates.
- End of Round:
If the treasure is found, the Seeker who found it earns 2 points. If the treasure is not found after 20 attempts, the Hider earns 20 points.
- Blockchain: Deployed on Sepolia.
- Encryption: Utilizes Zama's Fully Homomorphic Encryption SDK for secure on-chain/off-chain encryption and decryption.
- Privacy: All treasure locations and computations are fully encrypted, allowing verification without revealing sensitive data.
- Smart Contracts: Written in Solidity, leveraging Zama's FHE protocol for privacy-preserving computations.
- Encryption: When a hider places a treasure, the coordinates are encrypted client-side using Zama's SDK.
- Storage: The encrypted coordinates are stored on the Sepolia blockchain.
- Verification: When a seeker guesses a location, the smart contract compares the guess with the encrypted coordinates using homomorphic operations.
- Result: The contract returns a boolean result (hit/miss) without ever decrypting the actual treasure location.
- Privacy: Zama's FHE protocol ensures treasure locations remain encrypted even during computation.
- Fairness: All actions are verified on the Sepolia blockchain, ensuring transparency and trust.
- Security: Zero-knowledge computation prevents cheating or data leakage.
- Join the Game:
Connect your wallet to the game platform. New players receive 1 treasure to hide.
- Hide Your Treasure:
Select a cell on the 10x10 grid to hide your treasure. Your selection is encrypted using Zama's SDK before being sent to the blockchain.
- Search for Treasures:
Guess cells to search for hidden treasures.
- Earn Points:
As a Hider, earn points if your treasure is not found. As a Seeker, earn points if you find a treasure.
- Install a compatible wallet that supports Sepolia.
- Connect your wallet to the game platform.
- Start playing by hiding or searching for treasures.
- Top players receive special rewards and recognition.
- Q: Is my treasure location truly private?
A: Yes. Using Zama's FHE protocol, your treasure's location is encrypted even during computation, ensuring no one can see where it's hidden.
- Q: Do I need special software to play?
A: Just a Web3 wallet that supports the Sepolia network. The encryption is handled automatically by our application.
- Q: How are points distributed?
A: Points are automatically calculated and distributed by the smart contract at the end of each round.
Enjoy the hunt! 🕵️♂️💎