Private. Fair. Gamified On-Chain Predictions.
๐ Live Demo: https://guess-lab.vercel.app/
GuessLab is a next-generation prediction market built on the Aptos blockchain, designed for fairness, privacy, and fun. Unlike traditional platforms where bets are public, GuessLab uses a Darkpool CommitโReveal System to keep predictions hidden until the reveal phase โ eliminating manipulation and copy-trading.
Built for the Build on Aptos Hackathon (IBW).
Existing Aptos prediction platforms (like Panana) expose user bets publicly:
โ Anyone can see your bet
โ Whales manipulate markets
โ No privacy
โ No game mechanics
GuessLab fixes all of this with:
- Private commitments (hashed bets)
- Anonymous positions during commit phase
- Zero-knowledge-style privacy without heavy ZK
- Fair reveal for everyone at the same time
- XP rewards
- PAT token rewards
- User progression
- Embedded wallet support
- Event-based reward triggers
- Real-time BTC/ETH price feeds
- Automated resolution for crypto markets
Contract Address: 0xce3ebc6f453c5152f10be089a252c3703764daa0a0edb17c653f3a4820e134b3
Core on-chain logic includes:
โ Features
init_registry()create_market()commit_bet()reveal_bet()close_commit_phase()resolve_market()claim_reward()- Strong commitโreveal hashing
- AptosCoin escrow system
- Per-user commitment storage
Commitments are stored as secure SHA-256 hashes:
hash(user_addr | market_id | side | amount | salt)
No observer can guess:
- โ Bet side
- โ Bet amount
- โ User strategy
This is GuessLab's core innovation.
โ Features
- Real Petra Wallet integration
- Full devnet connectivity
- Create/Commit/Reveal/Resolve/Claim flows
- Market timers
- Private commit UI
- Photon reward triggers
- Pyth price display for crypto markets
Pages
/โ Market list/createโ Create Market/market/[id]โ Commit/Reveal/Resolve/profileโ Photon XP display (coming soon)
GuessLab integrates Photon's identity & reward engine.
Rewards Triggered:
- Commit โ XP (unrewarded event)
- Reveal โ PAT tokens (rewarded event)
- Resolve โ Achievement XP
- Completion streaks โ Level rewards
Photon makes GuessLab sticky, competitive, and fun.
Used for crypto markets to guarantee fairness.
Capabilities:
- Live BTC/ETH feeds
- Check market condition at reveal end
- Automatically set winner side
- Eliminates admin bias
This makes GuessLab trustless, not just decentralized.
| Layer | Technologies |
|---|---|
| Frontend | Next.js, TypeScript, Tailwind, ShadCN |
| Smart Contract | Move (Aptos) |
| Wallet | Petra Wallet Adapter |
| Oracle | Pyth Aptos SDK |
| Gamification | Photon API |
| Network | Aptos Devnet |
git clone https://github.com/Liejox/Guess-Lab.git
cd Guess-Labnpm installCreate .env.local:
NEXT_PUBLIC_NETWORK=devnet
NEXT_PUBLIC_CONTRACT_ADDRESS=0xce3ebc6f453c5152f10be089a252c3703764daa0a0edb17c653f3a4820e134b3
NEXT_PUBLIC_PHOTON_API_URL=https://stage-api.getstan.app
NEXT_PUBLIC_PHOTON_API_KEY=YOUR_KEYnpm run devaptos move publish --profile pred_marketStep 1 โ Create Market
Admin sets question + commit/reveal windows.
Step 2 โ Commit Phase (Darkpool)
Users commit hashed predictions, completely private.
Step 3 โ Reveal Phase
Users reveal actual bet + salt.
Market updates public totals.
Step 4 โ Resolution
Admin or Pyth oracle resolves.
Step 5 โ Claim Rewards
Winners receive payouts based on proportional stake.
Step 6 โ Photon XP Rewards
Gamified progression, streaks, and PAT tokens.
| Feature | Panana | GuessLab |
|---|---|---|
| Bet Privacy | โ Public | โ Darkpool Commit |
| CommitโReveal | โ No | โ Yes |
| Whale Manipulation | โ Possible | โ Impossible |
| Oracle Support | โ Limited | โ Pyth Price Feeds |
| Gamification | โ None | โ Photon XP + PAT |
| Fairness | Medium | Very High |
- ZK predictions (future upgrade)
- Social prediction rooms
- Group prediction pools
- Daily XP challenges
- On-chain leaderboards
- Multi-chain expansion
- ๐ Live Demo: https://guess-lab.vercel.app/
- Repository: https://github.com/Liejox/Guess-Lab
- Contract Explorer: https://explorer.aptoslabs.com/account/0xce3ebc6f453c5152f10be089a252c3703764daa0a0edb17c653f3a4820e134b3?network=devnet
- Photon SDK: https://photon.so
Built with โค๏ธ on Aptos blockchain for IBW Hackathon