# #0005 BadBeats

> Can a player verify the game wasn't rigged?

- Kind: showroom
- Status: Active
- Entity: Thunderbird Labs
- Role: Founder, design, build
- Stack: Next.js, Drizzle, Neon, Base
- Started: 2026
- Platform: web
- Production deploys since Sep 1: 0, from the spec, read live from Vercel
- Page: https://daltoncox.com/jobs/badbeats

## 01 Play it: The house commits before you pick.

This is the Tower, working. Eight levels, three tiles each, two of them safe. The multiplier climbs with every level; cash out whenever you like, or bust and lose the bet. Play money, no chain, no account.

Before the round starts, the house publishes the SHA-256 of its secret seed. You can type your own seed. Neither side can change its mind after that, which is the whole point.

*Playable demo (tower): Playable. The house runs in your browser here; in the product it runs on the server. The verification is the same code.*

## 02 The scheme: Commit, reveal, verify.

Each level's bust tile is derived, not drawn: HMAC-SHA256 keyed with the server seed over your seed, the round number and the level, first four bytes modulo three. The server seed is secret during the round and revealed after it.

Verification needs nothing from the house. Hash the revealed seed and compare it to the commitment; recompute each level and compare it to what you saw. The Verify button above does exactly that, with Web Crypto, in your browser.

*The scheme in five lines. Nothing hidden, including the edge.*

| | |
|---|---|
| Commit | sha256(server seed) |
| Bust | HMAC(server, seed:nonce:level)[0..4] mod 3 |
| Odds | 2 of 3 safe per level |
| Payout | 1.5ⁿ × 0.98 |
| Edge | 2%, stated |

## 03 The plan: Three phases, kept apart on purpose.

Phase one is this: email sign-in, the Tower, no blockchain. Phase two puts it on Base with wallet sign-in and real stakes. Phase three is growth. The order is fixed so the fairness scheme is proven before any money touches it.

Planning is complete: product, game logic, the cryptographic scheme, the schema. The build is next, and the Tower on this page is its first running piece.

*From the project's planning documents.*

| | |
|---|---|
| Phase 1 | Tower, email auth, no chain |
| Phase 2 | Base, wallets, real stakes |
| Phase 3 | growth |
| Games | Tower, then Mines, Plinko, Dice |

## 04 Learned: Specify the fairness before the game.

The proof is the product; the game is the demo of it. Writing the commitment scheme first made every later screen a matter of showing it, not inventing it.

The drawing below was the plate until tonight. The playable version above replaced it in one evening because the scheme was already decided.

*Drawing: The plate, as drawn before the Tower ran.*

## Punch list (3 open)

- Phase 1 Tower, no chain
- Proof panel: commit, reveal, verify
- Database schema
