Inspiration
We throw things away dozens of times a day, but almost never see the real climate impact of those choices. We wanted to turn that invisible moment into a visible, fun, rewarding “climate arcade” that nudges better habits using tech we love: computer vision + crypto.
What it does
TerraLoop turns any trash can into a smart bin. The web app uses your camera and YOLO to detect what you toss, classifies the material, estimates CO₂ saved, and converts that into a sustainability score. On each verified “good throw,” an Anchor program sends you SOL rewards from a shared vault and updates your on-chain streak and stats.
How we built it
On the frontend, we used Next.js + TypeScript and a YOLO model running in the browser to detect objects and map them to material types and CO₂ estimates. We built an Anchor program on Solana that stores a global config, per-user stats, and a SOL reward vault that signs payouts. The frontend talks to the program via web3, lets users connect Phantom, submit “throw” data (material, CO₂, score), and then displays live on-chain rewards and leaderboards.
Challenges we ran into
We wrestled with Anchor account sizing and PDA seeds (string length and layout issues), getting our config + vault accounts structured correctly, and wiring the generated IDL cleanly into the frontend. On the ML side, running YOLO in the browser with reasonable performance and mapping noisy detections to clean, deterministic “materials” that wouldn’t be exploitable for rewards took a lot of iteration.
Accomplishments that we're proud of
We’re proud that we shipped a full end-to-end loop: detect trash → calculate impact → write to chain → send SOL. None of us started as Solana experts, so getting an Anchor program deployed, funded, and safely sending rewards from a vault to real wallets during a hackathon felt huge. Also, it actually feels fun—more like a game than a lecture about recycling.
What we learned
We learned how powerful (and finicky) Solana + Anchor can be once you understand PDAs, account constraints, and how IDLs drive the frontend. We also learned a ton about running computer vision models in the browser, performance tradeoffs on user devices, and how important it is to design reward logic that’s both intuitive and hard to game.
What’s next for TerraLoop
Next, we want to:
- Add multi-bin support (trash, recycling, compost) and more precise CO₂ models.
- Build school and campus pilots with leaderboards, classes/club competitions, and custom reward pools.
- Harden anti-fraud logic with additional signals (timing, motion, heuristics).
- Wrap it all in a mobile-first experience so anyone can turn their local trash cans into on-chain climate arcades.
Built With
- react-native
- rust
- tailwindcss
- typescript
Log in or sign up for Devpost to join the conversation.