How results are decided
3dSabong.com is a simulated sabong broadcast. Every fight decides its own result in the pit, and every random moment in it comes from a seed sealed before the fight and revealed after it, so anyone can check the result and run the fight again.
The life of a fight
- A secret seed is drawn. Before anything of a fight exists, the outcome RNG draws a secret 256-bit seed. Everything random in the fight comes from it: which two birds are matched, their build and temper, and every step, peck, kick and fall.
- The seed is sealed. The server immediately publishes
SHA-256("fight|seed"), before the birds are even shown. The seed itself stays secret, so nobody can work out how the fight will go. - The fight decides. Nothing is drawn in advance and nothing steers the birds. The result is whatever happens in the pit: a kill, a peck test, a bird that runs, or a draw when neither can go on.
- The seed is revealed. When the fight ends the seed is published. Anyone can check it hashes to the sealed value, and run the same fight again from it: the same code and the same seed give exactly the same fight and the same result. Every fight page can do both in your browser.
The outcome RNG
- Source
- Operating system CSPRNG via crypto.getRandomValues (Node.js v24.22.2)
- Scaling
- rejection sampling
- Commitment
- The fight decides the result. Everything random in a fight comes from a 256-bit seed drawn by this RNG; SHA-256("fight|seed") is published before the fight and the seed after it, so the fight can be run again to check the result (web/js/replay.js).
- Start-up self test
- Passed · monobit ✓ · poker ✓ · runs ✓ · long run ✓ · chi-square (6 cells, 5 df) ✓ (Nov 1, 2026, 2:45:43 PM)
At start-up the RNG passes the FIPS 140-2 monobit, poker, runs and long-run tests and a chi-square test, or play halts. Every block it produces is checked against the one before it. Each fight's seed comes from it; inside the fight a fast seeded generator (xoshiro128**, keyed with the whole seed) produces the fight's random numbers, so the fight can be run again exactly.
The RNG is built to the requirements of GLI-11 and GLI-19. Certification is done by an accredited test laboratory, not by software; this broadcast has not been certified.
The audit log
Every step of every fight is written to an append-only log. Each entry's hash covers its content and the hash of the entry before it, so changing, removing or reordering any past entry breaks every hash after it. The database itself refuses edits and deletions of the log.
Check a result yourself
Open any fight from the results. Its page shows the sealed value and the revealed seed, checks one against the other, and can run the fight again in your browser. On any computer:
printf '%s' '1234|9f0c…(the 64-digit seed)' | sha256sum
The output must equal the value sealed before that fight. To run the fight again outside the site, use the open-source verifier: node scripts/verify-fight.mjs 1234 https://3dsabong.com. A replay is exact on the same simulation version (each fight records it) and on the V8 JavaScript engine the server uses (Node, Chrome, Edge); other browsers can compute some maths a hair differently. Fights before the change to fight-decided results were drawn from a weight table; their pages show that check instead.