Our football squares game uses Bitcoin blocks to ensure completely fair and transparent randomization. This method is provably fair because:
Here's the exact code we use for randomization:
import seedrandom from 'seedrandom';
// Deterministic shuffle using Bitcoin block hash
function shuffleArray(array: number[], seed: string): number[] {
const rng = seedrandom(seed);
const shuffled = [...array];
for (let i = shuffled.length - 1; i > 0; i--) {
const j = Math.floor(rng() * (i + 1));
[shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
}
return shuffled;
}
// Generate row and column numbers
const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
const blockHash = 'Bitcoin block hash here';
const rowNumbers = shuffleArray(numbers, blockHash + ':rows');
const colNumbers = shuffleArray(numbers, blockHash + ':cols');
You can independently verify any game's randomization:
Bitcoin block hashes are the result of massive computational work by miners worldwide. The exact hash cannot be predicted until the block is actually mined.
All Bitcoin blocks are public and permanent. Anyone can look up the block hash we used and verify our randomization.
Once a Bitcoin block is mined and confirmed, it becomes part of the permanent blockchain. The hash cannot be changed or manipulated.
The entire Bitcoin network agrees on each block's hash, making it an ideal source of public randomness that everyone can trust.