Inspiration

We noticed a disconnect in our local community: People don't explore enough, and local businesses struggle to attract foot traffic.

Current solutions are lackluster. Tourism apps are incredibly passive, and loyalty programs are boring "scan-to-win" schemes that struggle to bring value to businesses and tourist locations. We wanted to gamify the real world by incentivizing adventure. We asked ourselves: What if we could combine competitive pressure, social media, and guaranteed, trustful rewards with the instant financial incentives of Solana for travel?

That's how Loop was born. We wanted to build a platform where exploring new cities isn't just fun, it's profitable, competitive, and driven by real stakes.

What it does

Loop is a competitive, location-based scavenger hunt platform.

  1. Stake to Play: Users browse active hunts (e.g., "Athens Coffee Crawl") and stake SOL to enter. This entry fee goes directly into a secure, on-chain vault.
  2. Race in Real-Time: Players physically travel to checkpoints. Our app validates their location using GPS and all transactions are stored immutably on the blockchain.
  3. Live Competition: You can see your opponents moving on the map in real-time (powered by Supabase), adding a layer of urgency.
  4. Winner Takes All: The moment the first player checks in at the final destination, the Solana smart contract automatically unlocks the vault and transfers the prize pool to their wallet and deactivates the quest.

How we built it

We utilized a hybrid architecture to balance the speed of web apps with the trust of blockchain.

  • Solana & Anchor (Rust): We built a custom smart contract to handle the high-stakes logic. We use Program Derived Addresses (PDAs) to create a unique "Vault" for every single hunt. This ensures that the prize money is held trustlessly; we (the developers) never touch the funds.
  • Google Gemini AI: To make the game scalable globally, we integrated Gemini 2.5 Flash. Users can type a prompt like "Haunted spots in Savannah," and Gemini generates a structured JSON route with coordinates, descriptions, and names, instantly creating a playable quest.
  • Next.js 16 & React 19: The frontend is built for speed, using the latest Next.js App Router and Tailwind CSS.
  • Supabase Realtime: To create the "Live Player Map," we broadcast user coordinates via Supabase. This allows players to see if an opponent is gaining on them, creating genuine adrenaline.
  • Three.js: We built an interactive 3D globe for the "Explore" page to visualize hunts happening all over the world.

Challenges we ran into

  • GPS & The Haversine Formula: Web-based geolocation can be jumpy. We had to implement the Haversine distance formula to calculate the user's proximity to a checkpoint. Tuning the "check-in radius" (currently ~100m) to be fair but cheat-proof was a difficult balancing act.
  • Solana PDAs: Understanding how to deterministically derive addresses for the prize vaults on the client side was a steep learning curve. We had to ensure the frontend could find the correct vault for any given hunt ID without querying a central database.
  • AI Consistency: Getting an LLM to output strict, parseable JSON coordinates for specific local landmarks was tricky. We spent a lot of time refining our system prompts to ensure Gemini didn't "hallucinate" locations in the middle of the ocean.

Accomplishments that we're proud of

  • The "Payout" Moment: Watching the SOL actually transfer from the program vault to the winner's wallet instantly upon the final check-in was incredibly satisfying. It proved our trustless model works.
  • Live Multiplayer: Seeing multiple pins moving on the map in real-time turned the app from a solo walking tour into a true racing game.
  • AI Integration: We successfully turned natural language ("Give me a food tour") into a playable game mechanic in under 3 seconds.

What we learned

  • Anchor Development: We gained a deep understanding of Solana's account model, specifically how to manage state and funds securely using Rust.
  • Optimistic UI: To make a blockchain app feel like a "web2" game, we learned to mask transaction latency with optimistic UI updates.
  • Geo-Spatial Math: We brushed up on our trigonometry to handle coordinate math and distance calculations accurately.

What's next for Loop

  • Native Mobile App: Moving to React Native to access better background GPS tracking and push notifications.
  • Sponsored Hunts: We plan to partner with local businesses (coffee shops, retail) who can sponsor the prize pool in exchange for being a mandatory checkpoint—driving real, paying customers to their doors.
  • Geo-Oracles: Integrating a decentralized oracle to verify location data on-chain, preventing GPS spoofing hacks completely.

Built With

Share this project:

Updates