Commit → lock → reveal → race
Before betting opens, the engine creates a 32-byte secret with cryptographic randomness and publishes a Keccak-256 commitment to the seed, race ID, and six integer probability weights. The weights and race conditions are public and fixed.
At the 90-second cutoff, betting closes. The seed is revealed and the weighted winner is calculated. Four seconds later, an 18-second animation plays. Settlement follows. The next regular race opens three minutes after the previous one opened.
Verify the receipt
The verifier recomputes the commitment, derives a uniformly sampled ticket with rejection sampling, and maps that ticket into the six published weights. It checks that the calculated winner matches the result.
commitment = keccak256(abi.encode(seed, raceId, uint32[6] weights))ticket = keccak256(abi.encode(seed, raceId, uint256 nonce))Tickets below 2²⁵⁶ mod totalWeight are rejected. An accepted ticket modulo totalWeight selects the cumulative weight bucket. The same algorithm runs in TypeScript and Solidity.
What this proves — and its limits
A matching proof establishes consistency with the commitment. It does not prove the operator chose the seed impartially. The operator knows its seed, can search for favorable seeds before committing, and may withhold a reveal. This is a transparent demo commit-reveal system, not a trustless VRF.
The testnet contract allows anyone to cancel an unrevealed race after its deadline and reclaim stakes. A production randomness adapter must use an independently verified source and handle delayed or unavailable responses. No unsupported claim of Robinhood testnet VRF availability is made here.
In local playground mode, your browser owns the clock, seed and credit balance. Device storage is editable and replay links can be constructed by anyone. Shared server mode moves authority to the backend; onchain lab races have their own contract receipts.
The cats are actors
Cardboard traps, fish distractions, puddle jumps, yarn tangles and recovery zoomies are choreography. Cheering adds a visual reaction only. They cannot change the winner. Replaying a receipt always returns the same result.