DIA xRandom: Distributed, Verifiable Multi-chain Randomness Oracle
DIA xRandom, in collaboration with drand, provides smart contracts with unpredictable and unbiased random numbers, facilitating the development of Web3 use cases across multiple blockchains.
Learn how to access the oracles in the DIA Documentation here.
Unpredictable random number generation has become an essential building block for Web3. Decentralised applications, ranging from Web3 games to NFT collections or prediction markets, rely on random numbers to operate. For instance, a random number can grant a game with a lottery mechanism to reward players fairly or provide unpredictable attributes to a collection of NFT artworks.
Providing a source of randomness on-chain is a difficult task due to two main aspects. On one hand, it is very difficult to create random events on-chain due to the deterministic nature of any EVM environment. On the other hand, if the random number generation comes from a centralised source, malicious actors can manipulate the randomness from the source, and provoke irreversible damage to protocols and users.
In order to effectively serve the needs of Web3 applications, random number generation must be tamper-proof, distributed, publicly verifiable and available on multiple blockchain networks.
Introducing DIA xRandom
We are delighted to present a new addition to the DIA oracle suite: DIA xRandom— verifiable and distributed multi-chain randomness oracle. In close collaboration with drand, DIA xRadom will provide dApps with an auditable random number via oracle smart contract, available in 20+ L1s and L2s.
DIA xRandom tackles essential Web3 development needs:
- Multi-chain compatibility: DIA’s xRandom can be easily deployed in all EVM-compatible networks served by DIA including Astar, Arbitrum, Fantom and many more.
- Verifiable randomness: all random values provided by DIA are verifiable off-chain, before becoming available to consuming smart contracts and hence, the oracle is not capable of manipulating the generated result.
- Distributed and decentralised: DIA’s xRandom leverages drand, a distributed beacon generated by a network of participants named the League of Entropy — LoE. As drand is not singularly controlled by any of its members, there is no single point of failure and none of the operators themselves can bias the randomness generated by the League.
- Power your on-chain use cases: DIA’s xRandom can support a wide range of Web3 use cases including gaming, lotteries, prediction markets, NFT launches and many more.
How Does it Work?
To offer distributed and verifiable randomness on-chain, DIA leverages drand’s distributed randomness beacon, enabling verifiable, unpredictable and unbiased random numbers. From random number generation to on-chain distribution, DIA xRandom operates as follows:
- Drand randomness generation: in every drand epoch (currently set at 30s for the existing LoE beacons, but planned to be decreased on future “unchained” beacons) each of the nodes that form the drand network generates a partial signature, which it broadcasts to the rest of the nodes. Once any node has enough, i.e., a threshold number of signatures, it computes the new randomness beacon, which is the hash of the signature aggregate.
- Drand randomness propagation and consumption: the new beacon is propagated through the network to all other nodes. Any node can verify and accept or reject the hash of the signature (i.e., beacon) that it received. Any client or application can consume randomness out of band (i.e., without needing to be part of the drand network) either through the public HTTP APIs or through libp2p’s pubsub protocol, Gossipsub. Clients can also verify that the randomness they received is indeed the one produced by the drand network.
- DIA on-chain distribution: the final randomness signature is shipped on-chain as an oracle smart contract. In order to effectively and securely execute these on-chain transactions, DIA has built a robust, decentralised node infrastructure — dubbed DIA xNode. DIA xNode is a network of third-party, decentralized node providers that grant DIA the blockchain infrastructure to push data on-chain ensuring high rate limits.
“Being able to provide publicly verifiable, and non-biasable on-chain randomness is a significant challenge for the Web3.0 space. DIA’s oracles that integrate drand randomness is a huge first step in that direction. We are very excited about this development, and it has been a pleasure to work with the DIA team.”Sid Sanyaldrand Project Lead at Protocol Labs
Powering on-chain use cases
DIA’s xRandom can support a wide range of Web3 use cases, such as:
- On-chain lottery: due to the deterministic nature of blockchains, decentralised applications require trustless and tamper-proof on-chain random numbers to execute lotteries.
- Randomized NFTs: a random number can enable the randomised assignment of characteristics and attributes for non-fungible tokens
- On-chain gaming: xRandom can be used to generate unpredictable scenarios and rewards, creating engaging experiences for on-chain games.
Request a Randomness Oracle for your dApp
Are you building a decentralised application that requires a reliable source of randomness on-chain? Get in touch with the DIA team via Discord to request a custom oracle for your use cases.
Visit the DIA Documentation to learn more about DIA xRandom and how to integrate it into your smart contract. Additionally, DIA offers demo randomness oracles in various blockchain networks for developers to test in live environments.
Visit the drand Documentation page to learn the drand protocol internals, as well as how to consume randomness from the drand network.