Crypto glossary
Verifiable random function (VRF)
A verifiable random function (VRF) produces a random output together with a proof that anyone can check, so on-chain randomness cannot be secretly rigged.
Blockchains are deterministic, so generating fair randomness is hard: values like block hashes can be influenced by whoever produces the block. A VRF, first formalised in 1999, takes a secret key and an input and returns an unpredictable output plus a proof. Anyone with the public key can verify that the output was computed correctly, but nobody can predict it in advance without the secret key.
VRFs are used in two main ways. Some proof-of-stake protocols, such as Algorand and Cardano, use them for leader election: each validator privately computes whether it won the right to produce a block and proves it when it does. Oracle networks offer VRF services to smart contracts for NFT trait assignment, lotteries, game loot and random selection of winners.
A VRF guarantees that the output was not tampered with after the fact, but the provider could still withhold an unfavourable result, and requests must be designed so users cannot game the timing. Oracle-based VRF adds cost and latency and depends on the oracle's availability. Alternatives include commit-reveal schemes and Ethereum's built-in RANDAO value.
Example
An NFT collection requests a random number from an oracle's VRF after the mint closes; the proof is verified on-chain before traits are assigned, so neither the team nor minters can choose rare tokens.
