ISS
← Field Notes
Games screenshot
December 28, 2025 · Games · 2 min read

A Provably Fair 60-Second Betting Game on Solana With Gas-Free Bets

A real-time Solana betting game on a 6x6 grid where each 60-second round pays a random winning chest, with custodial wallets for instant gas-free bets.

Treasure Hunt is a real-time betting game on Solana. Players bet SOL on a 6x6 grid of treasure chests, each round runs for 60 seconds, one chest is drawn as the winner, and the pot is distributed proportionally among everyone who bet on it. It is live in production at treasurehunt.quest. The whole thing is an exercise in making on-chain money feel as fast as a casual game.

The custodial trick that removes friction

The hardest tension in any crypto game is that on-chain actions cost gas and take time, and casual players will not tolerate either. Treasure Hunt resolves this with a dual-path betting system. Every user gets a custodial wallet created or fetched on their first connect. From there they can bet in one of two modes: a custodial bet that is instant and settled off-chain with no gas, or an on-chain bet that moves real SOL with a memo.

That choice is the core design insight. Most players want the arcade experience, so they get instant off-chain bets against their custodial balance. Players who want everything on-chain can have that too. Same game, two settlement models, and the user picks based on how much they care about on-chain finality versus speed.

Settlement and payout flow

The round lifecycle is where the backend does its real work. When a round ends, the backend selects the random winning chest and sends payouts from a hot treasury. Custodial bettors receive winnings into their custodial wallets, while on-chain bettors can be paid directly to their connected wallet. Framing the game as transparent and provably fair, with instant payouts and a built-in rewards and jackpot system, sets the bar for how that random selection and distribution have to behave.

A pragmatic stack

Nothing here is exotic for the sake of it. The frontend is React 18 with TypeScript, Vite, and Tailwind. The backend is Node with Express 5, TypeScript, and better-sqlite3, talking to Solana mainnet-beta through @solana/web3.js, with the Solana Wallet Adapter covering Phantom and Solflare. State lives in a local SQLite file, and deployment runs on LXD containers behind nginx and PM2 with Cloudflare in front. A single SQLite file as the database of record for a live betting game is a deliberately unglamorous choice, and it keeps the operational surface small.

The takeaway from shipping this is that the blockchain is not the product, the experience is. By hiding gas and latency behind custodial wallets while still offering a genuine on-chain path, Treasure Hunt gets to feel like a game first and a crypto app second. That ordering is what makes it playable.

Have something that needs building, or stabilizing?

These notes are the work log. The paid work runs through Moonshine Labs, my product and engineering studio. Tell us what you're building, or grab a call.

Work with us →
the studio: moonshinelabs.io