# Quantum Randomness

It is imperative for on-chain betting platforms to have transparent house edges and transparent random number generation that is verifiably fair.

While many large off-chain centralized betting platforms claim verifiable randomness with obscure cryptographic proofs that aren't actually free of potential backdoors, **there is no way of knowing for sure what the real odds are or what the real house edge is.**

**Arcadeum fixes this**, by choosing API3 as its third-party RNG provider, which is a cheaper and faster Chainlink that does not sacrifice decentralization.

QRNG has been [proven to be safer](https://github.com/api3dao/api3-whitepaper/blob/master/api3-whitepaper.pdf) than older on-chain RNG methods such as PNRG (used by RANDAO, Chainlink VRF, and others). Unlike PNRG, QRNG is resistant to Sybil attacks.

### Requests & Callbacks

Every bet on Arcadeum consists of two transactions.

Due to on-chain limitations, random number generation cannot be securely and fairly done in the same block or the same transaction.

As such, we separate bets into two transactions:

* The first transaction, called the Request, requests one or more random numbers from its chain's QNRG provider node. This is initiated by the player.
* The second transaction, called the Callback, fulfills the random number(s) requested by the Request. This Callback transaction is paid for by the player in the Request transaction, which charges a small additional gas cost. There are no additional Callback fees charged by the QRNG provider. Only the designated QRNG provider can initiate the Callback. Callbacks can only be initiated one time for every Request ID. Arcadeum has implemented tested safeguards against node malfunctions and accidental node re-entrancy.

![](https://2947062586-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9wTvTLKoYBN47rXfunTV%2Fuploads%2FmwswmKmBDVIBt9ZxCEVU%2Fimage.png?alt=media\&token=95595b40-705c-4540-849b-a9cddc2933a3)

### Chains

Arcadeum uses Australian quantum computing leader [Quintessence Labs](https://www.quintessencelabs.com) as its primary API3 QRNG provider. Thanks to [Airnode RRP](https://docs.api3.org/airnode/v0.9/concepts/), random number generation is provider-agnostic.

Here is the provider Arcadeum uses on each chain:

#### Arbitrum One QRNG (Quintessence)

Arbitrum One Chain ID: `42161`

Quintessence Node Address: `0x224e030f03Cd3440D88BD78C9BF5Ed36458A1A25`

Quintessence Airnode Public Key: `xpub6CyZcaXvbnbqGfqqZWvWNUbGvdd5PAJRrBeAhy9rz1bbnFmpVLg2wPj1h6TyndFrWLUG3kHWBYpwacgCTGWAHFTbUrXEg6LdLxoEBny2YDz`

{% hint style="info" %}
While QNRG providers also support `uint256` generation, Arcadeum only utilizes the `uint256[]` generation endpoint, even when generating single numbers.
{% endhint %}

Quintessence `uint256[]` Generation Endpoint (`bytes32`): `0x4554e958a68d68de6a4f6365ff868836780e84ac3cba75ce3f4c78a85faa8047`

#### Arbitrum Goerli QRNG (byog)

Arbitrum Goerli Chain ID: `421613`

byog Node Address:

byog Airnode Public Key:

byog uint256\[] Generation Endpoint (bytes32):

### Conclusion

What this means is that Arcadeum is truly the first truly provably fair betting platform in the world that shares its house edges and maximum bet equations.

Additionally, Arcadeum is the first betting platform in the world that trustlessly distributes all of its revenue to token holders and affiliates and does not keep any house profits for itself.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://arcadeum.gitbook.io/arcadeum/quantum-randomness.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
