Chainlink VRF
Verifiable Random Function (VRF) provides provably fair randomness for smart contracts. Unlike pseudo-random approaches (block hash, timestamps), Chainlink VRF generates random numbers with cryptographic proofs verified on-chain - making manipulation by oracles, miners, or users mathematically impossible.
VRF Request-Response Lifecycle
Click "Request Random" to watch the full VRF lifecycle: request -> oracle generates random + proof -> on-chain verification -> callback to your contract.
Cryptographic Proof Visualization
How the VRF proof is constructed and verified. The oracle's secret key + block data creates a deterministic but unpredictable output.
VRF Architecture
Fund a subscription with LINK or ETH. Multiple consumer contracts share one subscription. The VRF Coordinator deducts costs per request. Simpler management for dApps with multiple contracts needing randomness.
Pay per request directly from the consumer contract. No subscription management needed. The contract holds LINK or ETH and pays the VRF Coordinator directly on each request.
Common Use Cases
Random trait assignment at mint - provably fair rarity distribution
Fair loot drops, random encounters, shuffled card decks
Provably fair winner selection - verifiable by anyone on-chain