# What is QRNG?

Table of Contents

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.

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.

# QRNG as an oracle service

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 (opens new window). 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 (opens new window) 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. The organizations that can provide in-house QRNG are well-established, prestigious and have invested a significant amount of resources to be able to provide this kind of a service, which are also the properties that qualify API providers to be the ideal oracle service providers. In this regard, QRNG is the closest thing to a first-party RNG service.

# Australian National University (ANU) Quantum Random Numbers API

Australian National University (opens new window) is one of the leading research universities in Australia, and also the provider of the well-known and widely used Quantum Random Numbers API (opens new window), which is powered by novel research done by the ANU quantum optics group as described below:

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.

The technical details on how the random numbers are generated can be found in Appl. Phys. Lett. 98, 231103 (2011) (opens new window) and Phys. Rev. Applied 3, 054004 (2015) (opens new window).

# API3 QRNG

API3 QRNG is a public utility we provide with the courtesy of Australian National University (ANU). It is powered by an Airnode hosted by ANU Quantum Random Numbers, meaning 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. Please consider providing feedback and contributing to the open source components of this public utility at the Discord api3-dev channel (opens new window).

# What to expect next?

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.

Last Updated: 6/22/2022, 2:46:08 PM