Project type: Developer Tooling

Generate Provably Fair Random Numbers in Solidity With Chainlink VRF
ProductsData[[Compute[[[[Use CasesUse Cases![ services powering hybrid smart contract use cases across a wide-variety of industriesLearn more! Tokenization
Chainlink VRF provides cryptographically secure randomness for your blockchain-based applications.
Start building now a demo](#)! 2 of 8.## The next generation of onchain randomness is here Chainlink VRF V2
Learn what’s new about VRF V2 to VRF V2](### Provably random, tamper-proof, and low cost randomness for smart contracts
Build better experiences by leveraging random outcomes in your blockchain-based application with Chainlink VRF.
Grow your blockchain-based application’s user base by ensuring trustworthy and fair outcomes that are verifiable using cryptographic proofs.
Protect your contract with tamper-proof randomness that cannot be manipulated by any user, node operator, or malicious actor.
Join hundreds of highly successful projects ranging from NFTs to gaming and beyond that have chosen Chainlink VRF as their randomness provider for millions of transactions.
### Easily integrate verifiable randomness in your smart contract
function fulfillRandomness(uint256 requestId, unit256[] randomness) internal override {
randomResult = (randomness[0] % 50) + 1;
Talk to an expert## Build provably secure blockchain-based applications with Chainlink VRF across multiple use cases
Distribute rare non-fungible tokens (NFTs) and assign randomized attributes to NFTs, providing players access to auditable evidence that their NFT assets are created and awarded using tamper-proof randomness.
Build better games by leveraging random outcomes in your blockchain gaming application. Map generation, critical hits (battling games), matchmaking (multiplayer games), card draw order, and random encounters/events are now possible with VRF.
Distribute highly-coveted items like tickets events, select participants in a popular public sale, and choose presale winners for luxury items like rare shoes.
Generate rich experiences with challenging and unpredictable scenarios and environments, and find the perfect mix between strategy and fun by using randomness to determine outcomes in PvP battles and other scenarios.
### Bring random number generationto your blockchain-based application
Industry leaders use Chainlink VRF for its unmatched low-cost, reliability, and ease-of-use across blockchains. Integrate Chainlink VRF today to provide trustworthiness for your users.
Leif Eric LeiserCEO and Co-founder
Coder DanCEO and Co-founder
## Grow your application’s reach with Chainlink VRF, a purpose-built RNG for smart contracts
* Produce fair and unbiasable randomness for your blockchain-based application’s outcome
* All random number results are verifiable before becoming available to consuming smart contracts
* Oracles are unable to manipulate the generated result, the only thing they can do is not respond
* Build better experiences by leveraging random outcomes in your blockchain-based application
* Provide users with cryptographic proof of your application’s integrity to facilitate a high level of trust
* Broaden your user base by leveraging fair and unbiasable randomness for your application’s outcomes
* Onchain block data is used as inputs to the RNG, which is combined with the oracle’s private key to generate a random value and proof
* Each random result is verified onchain with cryptographic proofs
* Malicious users, node operators, and smart contract admins cannot tamper with the resulting randomness
* Lower gas fees with Subscription Management App while delegating access to the Subscription’s balance to multiple consumer addresses
* Take advantage of the most configurable VRF experience by setting custom callback gas limits, block confirmation time
* Get even more randomness per request in an intuitive way
## Insecure RNG solutions leave your game and users vulnerable to malicious attacks
Offchain RNG solutionsOnchain RNG solutions!Diagram illustrating how traditional RNG solutions leave users at risk for malicious activity. RNG solutions have no guarantee of tamper resistance and require complete trust in how randomness is generated.
2Without onchain cryptographic verification, malicious or compromised oracles could deliver false data to your contract.
3You and your users take severe risks of being financially impacted by insecure and biasable RNG techniques.
[1Traditional RNG solutions have no guarantee of tamper resistance and require complete trust in how randomness is generated.
2Without on-chain cryptographic verification, malicious or compromised oracles could deliver false data to your contract.
3You and your users take severe risks of being financially impacted by insecure and biasable RNG techniques.
2You and your users take severe risks of being financially impacted by insecure and biasable RNG techniques.
[1On-chain solutions that rely on biasable inputs like blockhashes are at severe risk of being exploited.
2You and your users take severe risks of being financially impacted by insecure and biasable RNG techniques.
## Chainlink VRF eliminates the risks of traditional RNG solutions
Onchain block data is used as an input to generate each random number, proving that the result was generated fairly and for the requestor.
## Onchain verifiable randomness
Each random result is verified onchain using its cryptographic proof before it can be consumed by your smart contract.
You and your users are protected with unbiasable randomness, safe from any compromised oracle or malicious actor.
[Integrate Chainlink VRF](## Case studies
[![](### Aavegotchi uses Chainlink VRF to pioneer dynamic NFTs on Polygon
Read case study](/case-studies/aavegotchi)[![](### Ether Cards uses Chainlink VRF to bring new utility to NFTs
Read case study](/case-studies/ethercards)[![](### The NBA uses Chainlink oracle network and VRF to power The Association NFT collection
Read case study](/case-studies/nba)[![](### Polychain Monsters uses Chainlink VRF to fairly distribute NFTs
Read case study](/case-studies/polychainmonsters)[![](### PoolTogether uses Chainlink VRF to fairly gamify personal savings
Read case study](/case-studies/pooltogether)## Get the latest Chainlink content straight to your inbox.
Email AddressYes, I agree to receive email communications from Chainlink.Thank you for signing up! Please check your inbox to confirm your subscription.![ Something went wrong while submitting the form. Please try again### Developers
* Use Cross-Chain (CCIP) 
* Use Data Feeds 
* Use Randomness (VRF) 
* Market and Data Feeds
* Proof of Reserve
* Become an Advocate
* Code of Conduct
* What Is DeFi?
* What Is an Oracle?
* What Is a Smart Contract?
* What Is an NFT?
* What Is Web3?
* What is Asset Tokenization?
* Careers ARE HIRING!
* Talk to an Expert
[Home
Privacy PolicyTerms of Service
PausePicture-in-Picture(opens a new window)