Race. Explore. Win. Loop turns your city into a competitive playground. Stake SOL, race to real-world checkpoints, and be the first to claim the prize pool.
People don’t explore enough, and local businesses struggle to attract foot traffic. Tourism apps are passive, and loyalty programs are boring. We wanted to change that.
Loop is a competitive, location-based scavenger hunt platform built on Solana. It combines the thrill of "The Amazing Race" with instant on-chain rewards and AI-generated content.
- Stake to Play: Users stake SOL (or join free) to enter a time-limited hunt.
- Race Real-World Locations: Players physically visit checkpoints validated via GPS.
- Trustless Payouts: The first player to complete the route instantly claims the SOL prize pool from the vault.
- AI-Powered: Uses Google Gemini to generate unique routes and narratives anywhere in the world.
- Framework: Next.js 16 (App Router), React 19, TypeScript
- Styling: Tailwind CSS, Framer Motion, Shadcn UI
- Visuals: Three.js (Interactive Globe), Leaflet (Maps)
- Wallet: Solana Wallet Adapter
- Smart Contract: Anchor Framework (Rust)
- Data Model: PDAs for Hunts, Vaults, and Player Progress
- NFTs: Underdog Protocol (Badge minting)
- AI Logic: Google Gemini 2.5 Flash (Route generation)
- Persistence: Supabase (Profiles, live location tracking, community hunts)
- Infrastructure: Vercel (Deployment)
Loop utilizes a hybrid architecture to ensure a seamless user experience while maintaining decentralized trust for payments.
graph TD
User[User] -->|Connect Wallet| FE[Next.js Frontend]
FE -->|Generate Route| AI[Google Gemini API]
FE -->|Live Locations| SB[Supabase Realtime]
FE -->|Stake SOL| SOL[Solana Program / Vault]
FE -->|GPS Check-in| GPS[Geolocation API]
GPS -->|Verify| FE
FE -->|Claim Prize| SOL
SOL -->|Payout| User
- Smart Contract (Anchor): Handles the
create_hunt,join_hunt(staking), andclaim_prizelogic. - Supabase Layer: Handles user profiles, badges, and real-time WebSocket subscriptions for the "Live Player Map" (seeing opponents move in real-time).
- Gemini AI: Dynamically creates scavenger hunts based on a city prompt (e.g., "Historic Downtown Athens").
View checkpoints, track your distance, and see other players' live positions on the map as you race toward the finish line.
Don't see a hunt near you? Type in your city, and our Gemini integration will generate a 5-stop scavenger hunt with descriptions and coordinates in seconds.
An interactive 3D globe (Three.js) allowing users to visualize available quests worldwide.
Prize money isn't held by us—it's held in a Program Derived Address (PDA) vault. When the winner checks in at the final spot, the smart contract releases the funds automatically.
- Node.js (v18+)
- Solana CLI (for local Anchor testing)
- Phantom Wallet (or any Solana wallet) set to Devnet
-
Clone the repository
git clone https://github.com/UGAHacksXI/Loop.git cd Loop -
Install dependencies
npm install # or yarn install -
Configure environment variables
Create a.env.localfile in the root directory:# AI Generation GEMINI_API_KEY=your_google_gemini_key # Solana & Payments NEXT_PUBLIC_SOLANA_RPC=https://api.devnet.solana.com NEXT_PUBLIC_VAULT_WALLET=your_demo_wallet_address VAULT_PRIVATE_KEY=your_private_key_array # Database NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key # NFTs UNDERDOG_API_KEY=your_underdog_key
-
Run the application
npm run dev
Open http://localhost:3000 with your browser.
UGAHacksXI/
├── app/ # Next.js Frontend
│ ├── src/app/ # Pages (Quest, Explore, Profile)
│ ├── src/lib/ # Supabase & Solana Helpers
│ └── src/components/ # React Components (HuntMap, 3D Globe)
├── programs/wanderquest/ # Anchor Solana Program (Rust)
│ └── src/lib.rs # Smart Contract Logic
└── Anchor.toml # Anchor Configuration
- Program ID:
WanderQuestProgram1D11111111111111111111111 - Instructions:
create_hunt— Initialize a hunt and vault.join_hunt— Transfer entry fee to vault.check_in— Validate GPS coordinates.claim_prize— Transfer vault balance to the winner.
- Mobile App: Native React Native app for better background GPS tracking.
- Sponsored Hunts: Partnerships with local businesses for coupons/discounts as checkpoints.
- Oracles: Integrating a geo-oracle to fully decentralize the location verification process.
- Vinay Gupta
- Eshan Jaffar
- Vedant Lalit Bhatt
- Ishan Voleti
This project is for demonstration purposes.
