If you are a smart contract developer and require a secure source of on-chain randomness for your dApp, check out the Intermediate #Chainlink VRF (Verifiable Random Function) tutorial, where we explore how to create a provably secure on-chain dice roll.
Randomness is very difficult to generate on blockchains. The reason for this is because every node must come to the same conclusion, forming a consensus. There's no way to generate random numbers natively in smart contracts, which is unfortunate because they can be very useful for a wide range of applications. Fortunately, Chainlink provides Chainlink VRF, AKA Chainlink Verifiable Random Function.
If you've walked through the Beginners Tutorial, you'll know how to write smart contracts, use Chainlink Price Feeds, and how to deploy a contract to a testnet. If not, head there and come back once you've finished.
In this tutorial, we go through:
⭐️The Chainlink request & receive cycle
⭐️Using the LINK token
⭐️How to use request & receive with Chainlink Oracles
⭐️Consuming random numbers with Chainlink VRF in smart contracts
Intermediates - Random Numbers