Inspiration
It started with five dollars and a dance battle.
Two of us had a dance-off in a dorm hallway. Both of us were sure we'd won, so nobody paid, and weeks later the five dollars was still an argument. Every friend group has one: the trick shot that "definitely counted," the bet someone "forgot," the friend who wins every dispute by being the loudest.
So we asked: what if every friendly bet had a fair referee and a payout nobody could dodge? That's You're On. Bet your friends on anything you can film, let AI make the call, and the winner gets paid in seconds.
What it does
- Challenge: point your camera at a friend in the same room. Your phone turns their face into an embedding (a list of numbers, never a photo), the server matches it to an opted-in player nearby, and their phone buzzes with the challenge.
- Set the terms: say the bet out loud: a bottle flip, a cup stack, a trick shot, a catch, whatever you can film. The app turns it into exact terms, including edge cases like "Does it count if it bounces off the rim?", and both phones show the same terms card.
- Lock in: each player swipes up and confirms with Face ID. Both stakes move into a Solana escrow in a single transaction, so either both are locked or neither is.
- Prove it: a phone that isn't the performer's films the attempt. Claude judges it against the exact terms, while SAM 3.1 confirms the physical facts the bet depends on. For a bottle flip, that means the bottle is upright and has stopped moving; for a cup stack, that the cups are still standing. For throws, SAM's tracking alone decides whether the shot went in. There's also a Dance Off mode, where on-device body-pose tracking scores each dancer against a reference routine.
- Settle: the loser swipes GG, or the 10-second appeal window passes, and the winner is paid in USDC. Disagree with the call? Appeal, and a separate AI panel re-reviews the same frames without seeing the first ruling. The panel is built for three seats from different providers (Claude, GPT and Google's Gemini).
The app never says "wallet," "gas" or "seed phrase." Everything is shown in dollars, and our server pays every network fee.
Why the money is safe
- The escrow can only pay the two players. Every way a bet ends (a win, a split, a refund) goes through one payout path to those two wallets. There is no admin withdrawal.
- The AI picks the outcome, never the destination. Our judge key can say who won, but it can't send money anywhere else.
- Nothing gets stuck. Every live bet has a timeout that anyone can trigger, so funds come back even if our server goes down.
- Every ruling is on the record. The program stores a hash of the exact terms and of the evidence frames behind each ruling, so anyone can check the call afterward.
How we built it
- Mobile: React Native with Expo, plus a custom Swift module for camera capture and Apple Vision body pose. The face embedder runs on the phone: it crops to the detected face, resizes to $112 \times 112$, runs a MobileFaceNet model (
w600k_mbf) and normalizes the result. - Server: Hono on TypeScript, with Postgres and Drizzle. Every bet is a state machine, and every change is written to an append-only event log.
- Chain: an Anchor escrow program on Solana devnet. Both players and our server sign one transaction that creates and accepts the bet together. Each phone checks the exact transaction against the terms it displayed before Face ID lets it sign.
- Judging: there's no fixed list of bets. When terms are set, Claude compiles them into a "check spec" for that specific bet: which objects to find and which physical facts to verify. At ruling time, Claude reviews the frames against the terms while SAM 3.1 (self-hosted on Modal) segments the objects the spec names and checks those facts. Dance Offs use Apple Vision body pose.
- Live updates: QuickNode Streams sends every escrow event to our server the moment it lands on chain, and the server pushes it to both phones and to a big-screen "stage" for spectators, with slow-motion replays, a gavel on every GG, and each pair's head-to-head record.
Face matching accepts the closest enrolled face only when it is both close enough and clearly closer than the runner-up:
$$ \cos(\mathbf{a},\mathbf{b}) = \frac{\mathbf{a}\cdot\mathbf{b}}{\lVert\mathbf{a}\rVert\,\lVert\mathbf{b}\rVert}, \qquad s_1 \ge 0.30 \;\;\text{and}\;\; s_1 - s_2 \ge 0.05 $$
where $s_1$ and $s_2$ are the best and second-best scores. This keeps the app from challenging the wrong person when two faces look alike.
Challenges we ran into
- Language models shouldn't decide physics alone. A win only stands if SAM 3.1's checks back it up; for a throw, SAM's track is the only thing that says in or out. If the tracker loses the object, or Claude's confidence is below $0.8$, the result is a redo instead of a guess.
- Cheating. People block the camera, swap places mid-dance, or bring in a friend. The filming phone is never the performer's, and the Dance Off checker throws out rounds where someone leaves the shot, a third person joins, or the dancers swap sides. The server also re-scores every uploaded pose recording instead of trusting the phone's score.
- Making the two-player lock-in atomic. Collecting both players' approvals into one Solana transaction, with our server paying the fees, took several redesigns.
- Live updates that never skip an event. A stream can be late or drop an event, so the server falls back to fetching it straight from the chain.
- Phone cameras. Our face crops came out sideways until we rotated each frame upright before cropping.
What we learned
- Fairness comes from the design, not the model. Redos, appeals, and making physical facts something the tracker has to confirm mattered more than any single prompt.
- Hiding the crypto is a feature. People trust "your \$5 is locked" far more than anything about wallets or keys.
- Shipping AI, computer vision, voice and a blockchain in one week means building every integration so it can fall back or switch off when something fails.
What's next
Real-money deposits, more Dance Off routines, group bets, and a public leaderboard of the pettiest rivalries on campus.
Built With
- anchor
- apple-vision
- claude
- drizzle-orm
- elevenlabs
- expo.io
- face-id
- fly.io
- gemini
- hono
- livekit
- modal
- node.js
- postgresql
- python
- react
- react-native
- react-native-vision-camera
- rust
- sam-3
- solana
- swift
- tensorflow-lite
- typescript
- vite