Smart contract platforms typically emulate a deterministic virtual machine, which cannot generate random numbers. In such cases, random number generation (RNG) needs to be provided as an oracle service.
Most computer hardware is also designed to run deterministically, which means regular computers cannot generate true random numbers. Instead, pseudorandom number generation (PRNG) methods are used to generate adequately random-looking numbers. Unless stated otherwise, RNG oracle services should be expected to be PRNG-based.
Quantum random number generation (QRNG) is a method of random number generation based on quantum phenomena. There are different methods of implementing QRNG with varying levels of practicality, yet the common point is that the resulting numbers will be truly random because the outcome of a quantum event is theoretically uncertain with well-defined characteristics. Therefore, QRNG is the gold standard for random number generation. Read more about QRNG and randomness in the Web3 Quantum Random Numbers medium post.
Decentralized PRNG (e.g., RANDAO, VRF) has been the popular way of building RNG oracle services. However, this configuration suffers from the same issues as any third-party oracle network, in that setting up an oracle node that can provide PRNG is trivial, which exposes the solution to Sybil attacks. Then, one needs to trust the governing entity to select the network participants, which means decentralized PRNG is only as secure and decentralized as the governing entity.
The API3 whitepaper proposes first-party oracles, which are oracles that own the data they serve, as the solution that optimally counters the Sybil attack risk. However, RNG is an awkward case where it is not possible to talk of an ownership of the data. Here, requiring QRNG creates a very significant barrier to entry to providing on-chain RNG services, and practically eliminates the Sybil attack risk.
API3 QRNG is a public utility API3 provides on behalf of well-established, prestigious organizations who have invested a significant amount of resources to be able to provide this kind of a service. These are the properties that qualify API providers to be the ideal first-party oracle service providers.
After deploying an Airnode that is hosted by the API Provider developers can then access QRNG. It utilizes the request-response protocol to serve data on-chain, serving data as the API3 QRNG requester is called from a dApp. There are currently a handful of QRNG providers, with the ability for this number to expand in the future.
Australian National University (ANU) Quantum Random Numbers API
With the courtesy of the Australian National University (ANU) Airnode was hosted by ANU Quantum Random Numbers to serve Quantum RNG. This means that it is a first-party service. It is free of charge (apart from the gas costs), easy to use, and will be made available on as many chains as possible.
The random numbers are generated in real-time in our lab by measuring the quantum fluctuations of the vacuum. The vacuum is described very differently in the quantum physics and classical physics. In classical physics, a vacuum is considered as a space that is empty of matter or photons. Quantum physics however says that that same space resembles a sea of virtual particles appearing and disappearing all the time. This is because the vacuum still possesses a zero-point energy. Consequently, the electromagnetic field of the vacuum exhibits random fluctuations in phase and amplitude at all frequencies. By carefully measuring these fluctuations, we are able to generate ultra-high bandwidth random numbers.
API3 QRNG is built on Airnode, which means any future improvements to Airnode will also be available for API3 QRNG. Most importantly, this includes faster, cheaper, and more customizable request fulfillments. In addition, integrations to more chains and QRNG providers will be made available over time, and higher-level QRNG services will be built leveraging these.