Chapter 6
Verifiable Randomness
Randomness on chain is harder than it looks. Block hashes, timestamps, and miner-chosen ordering are influenceable by block producers and predictable to sophisticated searchers. Any game, lottery, or fair mint that stakes real value on 'random' must use a verifiable source — not ambient chain noise.
NFT projects use VRF to assign traits without the team pre-picking winners. On-chain games use it for loot drops and matchmaking seeds. Prediction markets and sampling protocols need unbiased selection when outcomes carry monetary weight.
Plan for latency and cost: VRF is two transactions (request and fulfill) and depends on oracle response time. Commit-reveal schemes are an alternative when all participants can wait through a timed reveal phase — but they fail if one party refuses to reveal or colludes on the secret.