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.

Status
Ready
Random Value
-
Proof Valid
-
Gas Used
-

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

Subscription Model (v2.5)

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.

Best for: Projects with multiple contracts or frequent requests
Direct Funding (v2.5)

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.

Best for: Simple one-off requests or infrequent usage

Common Use Cases

NFT Traits

Random trait assignment at mint - provably fair rarity distribution

Gaming

Fair loot drops, random encounters, shuffled card decks

Lotteries

Provably fair winner selection - verifiable by anyone on-chain