The next generation of onchain randomness is here Chainlink VRF V2

Provably random, tamper-proof, and low cost randomness for smart contracts

Random number generation (RNG) for smart contracts

Build better experiences by leveraging random outcomes in your blockchain-based application with Chainlink VRF.

Provide your users with a more trustworthy experience

Grow your blockchain-based application’s user base by ensuring trustworthy and fair outcomes that are verifiable using cryptographic proofs.

Provably fair and verifiable randomness

Protect your contract with tamper-proof randomness that cannot be manipulated by any user, node operator, or malicious actor.

Industry standard VRF product trusted by top projects

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

Data & Services
RUN
Randomness
unit256 public randomResult;
f
unction fulfillRandomness(uint256 requestId, unit256[] randomness) internal override {
      randomResult = (randomness[0] % 50) + 1;
}

Power randomness in your smart contract with Chainlink VRF

Build provably secure blockchain-based applications with Chainlink VRF across multiple use cases

NFTs

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.

Gaming

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.

Ordering for processes

Distribute highly-coveted items like tickets events, select participants in a popular public sale, and choose presale winners for luxury items like rare shoes.

Random entity selection

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 generation
to 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.

“Verifiable randomness solutions like Chainlink VRF v2 are essential for developers introducing entropy into onchain gaming and NFT experiences, empowering them to create fair and fraud-proof play-to-earn games.”

“Chainlink VRF’s tamper-proof and verifiable random number generator gives us a transparent source of onchain entropy to demonstrably show that our team cannot influence the distribution of NFTs, giving each user a fair chance to mint the most collectible monsters.”

“Since launching PancakeSwap Lottery V2 with Chainlink VRF, each of our drawings has been publicly auditable, creating unprecedented fairness and transparency that’s likely to become an industry standard in blockchain gaming.”

“Chainlink VRF v2 provides us with full autonomy for setting our own block confirmation times, resulting in more flexibility when developing chance-based games and features for the growing Aavegotchi NFT metaverse.”

Grow your application’s reach with Chainlink VRF, a purpose-built RNG for smart contracts

Random number generation (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

Provide your users with a more trustworthy experience

  • 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

Provably fair and verifiable randomness

  • 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

Randomness on a massive scale

  • 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

Diagram illustrating how traditional RNG solutions leave users at risk for malicious activity.
1

Traditional RNG solutions have no guarantee of tamper resistance and require complete trust in how randomness is generated.

2

Without onchain cryptographic verification, malicious or compromised oracles could deliver false data to your contract.

3

You and your users take severe risks of being financially impacted by insecure and biasable RNG techniques.

Case studies

Get the latest Chainlink content straight to your inbox.