percPOTPOURSTABFLOORCUPSDOCSTHE POTx

The seed

The draw needs a random number that nobody could have picked in advance. The contract commits a hash at each pour and reveals it at the next.

commit_n = keccak256(blockhash(pourBlock_n), pot_n, tabLength_n)
seed_n+1 = keccak256(commit_n, blockhash(pourBlock_n+1))

At pour n the commit is stored. At pour n+1 the seed is formed from the stored commit and the hash of the block the pour lands in. The runner of pour n+1 cannot choose the seed because the commit was fixed fifteen minutes earlier, and nobody at pour n could choose it because the second block hash did not exist yet. The seed is emitted in the draw event and the coin page shows it next to the winning line.

PREVIOUS The tab and the drawNEXT Scald