A tabletop console where friends tap NFC wallet badges to play for prizes on Ethereum.


Ethereum Game Box is a tabletop console where friends tap NFC wallet badges to play games for an onchain prize pool. Nobody needs a wallet app, ETH for gas, or transaction pop-ups.
Each badge holds a private key that never leaves its NFC chip. Players tap to join, claim an ENS name, and stake test USDC. The Box runs the game, signs the result with a hardware P-256 key, and submits it through a relayer that pays the gas. The contract pays the winner on Sepolia.
ENS handles Box licenses, player names, and competitive titles. A win can transfer champion.stockduel.gamebox.eth and count toward a cup. Players keep their names across Boxes, and anyone can look up the titles and championship results.
The Box includes Quick Draw and Stock Duel. Games from the store use an AI judge running through 0G's private inference. The judge reads the match log and decides the payout. We also built a deliberately rigged game that reports inflated scores to test whether the judge catches cheating.
The hardware is a Raspberry Pi 5 with a touchscreen, wireless NFC tap stations, and a USB signing token
The project is a TypeScript pnpm monorepo with Solidity contracts built using Foundry.
Each player uses a HaLo NFC wallet badge. ESP32-S3 tap stations read the badges through PN532 readers and send packets over ESP-NOW to a USB receiver on the Pi. We use libhalo to communicate with the chips. Each station has a display, light, and vibration motor for immediate tap feedback.
The Box signs operations with a HYP2003 USB token. It generates its P-256 private key internally and never exports it. A Python daemon accesses the token through PKCS#11 and patched OpenSC. Ethereum's P256VERIFY precompile checks the signatures onchain. GameBoxNames registers each Box's public key, so contracts can verify which Box authorized a stake or result.
A Cloudflare Worker relays signed requests and pays the gas. A Durable Object submits transactions one at a time. The relayer simulates each request before spending gas.
We use ENSv2 on Sepolia for Box licenses, player identities, and expiring championship titles. GBX staking keeps a Box's license active. Signed wins transfer titles and score cups. The public site reads ENS and contract events through viem without a backend or database.
For store games, a Cloudflare Worker starts an AI judge in a Cloudflare Container. The judge uses 0G's private inference to compare the game's claims with the Box's match log. Our rigged game deliberately inflates its scores to test this check. The Worker verifies each turn's enclave signature against 0G's serving contract, then submits the verdict to StorePot. Valid verdicts pay the players; failed judging returns their stakes. This flow has judged and settled real matches on Sepolia.

