Be sure to review your contracts with the security considerations in mind.
Chainlink VRF (Verifiable Random Function) is a provably fair and verifiable random number generator (RNG) that enables smart contracts to access random values without compromising security or usability. For each request, Chainlink VRF generates one or more random values and cryptographic proof of how those values were determined. The proof is published and verified on-chain before any consuming applications can use it. This process ensures that results cannot be tampered with or manipulated by any single entity including oracle operators, miners, users, or smart contract developers.
Use Chainlink VRF to build reliable smart contracts for any applications that rely on unpredictable outcomes:
To learn more about the benefits of Chainlink VRF v2, see our blog post Chainlink VRF v2 Is Now Live on Mainnet. For help with your specific use case, contact us to connect with one of our Solutions Architects. You can also ask questions about Chainlink VRF on Stack Overflow.
Chainlink VRF v2 offers two methods for requesting randomness:
Depending on your use case, one method might be more suitable than another. Consider the following recommendations when you choose a method:
The contract addresses and gas price limits are different depending on which method you use to get randomness. You can find the configuration, addresses, and limits for each method on the following pages:
Chainlink VRF v2 is currently available on the following networks: