An on-chain scavenger hunt game built on Celo blockchain
Scan QR codes, solve clues, earn cUSD rewards!
Celo Treasure Hunt is a mobile-first game where players:
- ๐ Find and scan QR codes hidden around the web or real world
- ๐งฉ Solve clues to unlock rewards
- ๐ฐ Earn instant cUSD payments for each correct answer
- ๐ Compete on the leaderboard
Perfect for events, marketing campaigns, educational games, or community engagement!
- Instant Rewards: Get paid in cUSD immediately when you solve a clue
- On-Chain Progress: All progress stored on Celo blockchain
- Anti-Cheat: Can't claim the same clue twice or skip ahead
- Cheap & Fast: Transactions cost less than $0.001
- Mobile-First: Works great in MiniPay wallet (11M+ users)
- Connect your wallet (MiniPay or MetaMask)
- Browse active hunts and pick one
- Scan QR codes or enter answers manually
- Earn cUSD for each correct answer
- Complete the hunt and check your rank!
- Create a hunt (set name and duration)
- Add clues (set answer and reward amount)
- Fund the hunt with cUSD
- Generate QR codes for each clue
- Share with players and watch them hunt!
Creator Player
โ โ
โโ Create Hunt โ
โโ Add Clues โ
โโ Fund with cUSD โ
โโ Generate QR Codes โ
โ
โโโโโโโโโดโโโโโโโโโ
โ Browse Hunts โ
โโโโโโโโโโโโโโโโโโค
โ Scan QR Code โ
โโโโโโโโโโโโโโโโโโค
โ Submit Answer โ
โโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Correct? โ
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโดโโโโโโโโโโโ
โ โ
Yes No
โ โ
Get cUSD Reward Try Again
โ
Next Clue
- Blockchain: Celo (mainnet & Sepolia testnet)
- Smart Contract: Solidity + Hardhat
- Frontend: Next.js + React
- Wallet: Wagmi + Viem
- Token: cUSD (Celo Dollar)
- QR Scanner: html5-qrcode
- Node.js 18+
- Git
- Wallet with Celo tokens (for deployment)
# 1. Create project with Celo Composer
npx @celo/celo-composer@latest create farcaster-miniapp
# 2. Navigate to project
cd celo-treasure-hunt
# 3. Install dependencies
cd packages/react-app
npm install html5-qrcode recharts
cd ../hardhat
npm install @openzeppelin/contracts
# 4. Set up environment variables
cp .env.example .env
# Add your wallet private key and RPC URL
# 5. Deploy smart contract
npx hardhat run scripts/deploy.ts --network celosepolia
# 6. Start frontend
cd ../react-app
npm run devFor Creators:
createHunt(name, startTime, endTime)- Create a new treasure huntaddClue(huntId, answerHash, reward, metadataURI)- Add a clue with reward
For Players:
submitAnswer(huntId, answer)- Submit an answer to claim rewardgetPlayerProgress(huntId, player)- Check your progress
View Functions:
getHuntClues(huntId)- Get all clues in a hunthunts(huntId)- Get hunt details
โ
Answer hashing (answers never stored on-chain)
โ
Anti-replay (can't claim same clue twice)
โ
Sequential claiming (must solve clues in order)
โ
Time-based constraints (optional start/end times)
Try our demo hunt with 3 clues:
- Clue 1: "What blockchain powers MiniPay?" โ Answer:
CELO_ROCKSโ Reward: 0.1 cUSD - Clue 2: "Where are treasures stored?" โ Answer:
BLOCKCHAIN_TREASUREโ Reward: 0.1 cUSD - Clue 3: "You found it!" โ Answer:
FINAL_PRIZEโ Reward: 0.2 cUSD
Total Rewards: 0.4 cUSD
cd packages/react-app
vercel deploy --prod- Download MiniPay (Opera Mini browser)
- Go to Settings โ About โ Tap version number 10 times
- Settings โ Developer Settings
- Paste your app URL
- Test the full experience!
- Open Farcaster โ Developers โ Manifest
- Paste your app link
- Generate account association
- Add to your
.envvariables
- ๐ช Event Scavenger Hunts: Engage attendees at conferences or festivals
- ๐ Educational Games: Teach blockchain concepts with rewards
- ๐ข Marketing Campaigns: Drive foot traffic to physical locations
- ๐ Onboarding: Gamified tutorials for new users
- ๐ Tourism: Interactive city tours with local rewards
- โ Create hunts
- โ Add clues with hashed answers
- โ Player submission & verification
- โ Instant cUSD rewards
- โ Progress tracking
- โ Basic leaderboard
- Time-limited race mode
- Team hunts (collaborative solving)
- NFT badges for completion
- Interactive map with heatmap
- Live chat between players
- Multiple answer formats (coordinates, images)
- Dynamic difficulty adjustment
All transactions on Celo cost less than $0.001:
| Action | Gas Cost | USD Cost |
|---|---|---|
| Create Hunt | ~150k | ~$0.0001 |
| Add Clue | ~80k | ~$0.00005 |
| Submit Answer | ~100k | ~$0.00007 |
Example: A 10-clue hunt costs ~$0.001 in gas + your reward budget
We welcome contributions! Here's how:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file for details
- Issues: Open an issue on GitHub
- Discord: Join Celo Discord
- Twitter: @CeloOrg
Built with โค๏ธ using Celo Composer
Perfect for hackathons, events, and community building!
Ready to start your treasure hunt? Let's build! ๐