Randomness
For an eligible token, the contract derivesrandomTokenId from H("holder", seed) mod supplyAtMint (with a one-step re-roll if it equals the minter’s own token and supply > 1). The rweard forownerOf(randomTokenId)occurs at claim time, which means that the reward will be sent to whomever is holding the token when the reward is claimed.
Eligibility
A token’s reward outcome is determined one block after it’s been minted usingblockhash(mintBlock). Because the mint block’s hash is not determined until the block is finalized and minting block is sealed, no one can know the outcome.
Ethereum exposes blockhash only for the last 256 blocks; if a claim is attempted after that, blockhash(mintBlock) == 0 and the token is not eligible.
Currently, a bot is processing rewards automatically. As an on-chain fallback, anyone can call the “claim” function and trigger the distribution of rewards within the 256-block window.
Fairness
Each token draws a reward usingseed = keccak256(tokenId, blockhash(mintBlock)). The contract first checks for a big reward; if the token is not elibile, the contract re-rolls for a small reward.