Scaling Onchain Verifiable Randomness With Chainlink VRF v2.5

We’re excited to announce that Chainlink VRF v2.5 is officially live on Arbitrum, Avalanche, BNB Chain, Ethereum, and Polygon mainnets. This upgrade introduces several key improvements for developers, including low-friction billing, more predictable pricing, and an enhanced UX that enables seamless upgrades to future versions.

Chainlink Verifiable Random Function (VRF) is the most widely adopted random number generator (RNG) in Web3, having fulfilled 20+ million request transactions for thousands of smart contracts across a variety of blockchains. Through continual upgrades and improvements, Chainlink VRF achieves an end-to-end latency of approximately two seconds, supporting a multitude of novel use cases that demand high-speed responses.

As the blockchain gaming ecosystem continues to expand and the demand for onchain verifiable randomness increases, Chainlink VRF remains foundational for powering a multitude of use cases for leading Web3 projects and Web2 organizations at scale.

If you’d like to get started building with Chainlink VRF v2.5, dive into the developer documentation and try the subscription management app.

Major Enhancements of Chainlink VRF v2.5

Randomness plays a key role in various blockchain use cases, such as gaming, NFTs, and art, being essential in creating fair outcomes and experiences. However, ensuring that a source of randomness is secure, auditable, and tamper-proof is challenging, especially in deterministic systems like blockchain networks. RNG solutions derived from a blockchain are susceptible to manipulation as miners or validators may influence outcomes by only publishing blocks with favorable outcomes for them. Offchain RNG solutions lack transparency, making it impossible to verify if the randomness provided has been tampered with.

Chainlink VRF overcomes these limitations using offchain computation and onchain cryptography. Chainlink VRF works by combining block data that is still unknown when the request is made with the oracle node’s pre-committed private key to generate both a random number and a cryptographic proof. The consuming application will only accept the random number input if it has a valid cryptographic proof—which can only be generated if the random number generation process has not been tampered with.

Chainlink VRF onchain RNG
Chainlink VRF provides provably fair, verifiable randomness to onchain applications.

Below are some of the most significant improvements introduced by Chainlink VRF v2.5.

Low-Friction Billing

Across the Chainlink platform, we have been actively working on enhanced payment models to support the long-term economic sustainability of Chainlink services. One of the primary goals is to reduce payment friction for dApps, developers, and end-users using Chainlink services. 

Based on user feedback, Chainlink VRF v2.5 now supports fee payments in LINK and in alternative assets, including native blockchain gas tokens. Payments made in alternative assets are charged at a higher rate versus LINK payments. In parallel, work is underway on a payment abstraction solution where fee payments made in alternative assets are automatically converted into LINK.

The upgrade enables new ways to programmatically pay for VRF’s onchain randomness. For example, dApps can pass the cost of VRF calls to end users at request time, enabling fully autonomous dApps that do not require a team to maintain a subscription contract balance.

More Predictable Pricing

To facilitate greater predictability for developers when using Chainlink VRF, the v2.5 upgrade introduces a new pricing model for calculating the fees paid per request. Instead of charging a static amount of LINK for the premium, VRF v2.5 charges a premium based on a percentage of the gas costs associated with the VRF callback. 

Note that VRF fees are also inclusive of the gas costs associated with fulfilling the request, ensuring dApps receive verifiable RNG responses in a timely manner, even during extreme blockchain network congestion. 

Simplified Upgradability

With Chainlink VRF v2.5 and onwards, the process of upgrading to a new VRF version has become much simpler. The VRF smart contracts now include a new migrate function that can be called by developers to upgrade their VRF integration to the next version, greatly simplifying the upgrade process.

Realizing Novel Use Cases With Chainlink VRF

Verifiability is becoming a priority not only for top blockchain games but also for Web2 giants and some of the largest gaming companies in the world. Major gaming companies and global brands are increasingly adopting Chainlink VRF to bring enhanced transparency to their platforms. 

Organizations such as Lotte Group and the NBA have chosen Chainlink VRF to enhance their NFT strategies, while Nexon’s MapleStory Universe has selected Chainlink as its Web3 infrastructure provider.

Across Web3, the adoption of Chainlink VRF continues to accelerate. Chainsafe VRF usage is a prime example, as it is helping increase the adoption of Chainlink VRF as a part of Chainsafe’s Web3 gaming development tools and services platform.

“Chainlink VRF was already our preferred solution for verifiable randomness in lootboxes, but the release of VRF v2.5 has taken developer convenience to an even higher level. With its new billing model, dApps have more ways to receive payment for their services. This update allows devs to focus more on building and less on managing cryptographic resources, which is a major win for both developers and players.”—Gilad Kahala, Gaming Program Manager at ChainSafe

BetSwirl is using Chainlink VRF to unlock provably random gameplay dynamics in its decentralized gaming platform.

“Since integrating Chainlink VRF over two years ago, we’ve experienced unmatched reliability with an impressive 100% uptime. The introduction of VRF v2.5 with its premium model based on gas consumption is a pivotal advancement, as it not only makes our business model future-proof but also assures that our players always pay a fair price for VRF-generated randomness.”—Romuald Hug, CEO at BetSwirl

If you’d like to explore more RNG use cases enabled by Chainlink VRF, read 35+ Blockchain RNG Use Cases Enabled by Chainlink VRF.

Start Building With Chainlink VRF

With Chainlink VRF v2.5’s key enhancements, it’s never been easier for developers to build advanced onchain apps and experiences that incorporate unpredictable outcomes and provably fair gameplay.

If you’re a developer and want to quickly get your application connected to Chainlink VRF, visit the developer documentation, try the subscription management app, and join the technical discussion in Discord. If you want to schedule a call to discuss your integration in more depth, reach out to an expert.

Need Integration Support?
Talk to an expert
Get testnet tokens
Read the Docs
Technical documentation