Randomness

0xBets ensures randomness in all of its games through the use of the following technologies:

Chainlink VRF (Verifiable Random Function) is a provably fair and verifiable random number generator (RNG). It allows smart contracts to access random values without compromising security or usability. For each request, Chainlink VRF generates one or more random values and cryptographic proof of how those values were determined. The proof is published and verified on-chain before any consuming applications can use it. This process ensures that results cannot be tampered with or manipulated by any single entity, including oracle operators, miners, users, or smart contract developers.

0xBets uses Chainlink's VRF function on Polygon to ensure that all games are played fairly and without bias, just like in a casino.

Learn more about Chainlink VRF here: Introduction to Chainlink VRF | Chainlink Documentation

VRF Fee

To use Chainlink's randomness, a VRF fee must be paid upfront by the user. This is why gas fees may seem high.

What is Randomizer.AI?

Randomizer.AI on Arbitrum is a decentralized and trustless random number generator that can be utilized by smart contracts. It allows for easy randomness by calling a single contract function and receiving a callback near-instantly.

Randomizer uses native ETH for fees, eliminating the need to fund requests with ERC20 tokens and saving gas fees on swaps and approvals. Additionally, Randomizer has a real-time module that allows users to get instant results from dApps as soon as their transaction is verified. Independent beacons supply and combine VRF data and send callbacks to requesting clients.

Randomizer utilizes proof of stake similar to Ethereum 2.0, where beacons stake ETH for their position, and ETH fees are awarded based on fulfilled requests and deducted for missed requests.

The random number generation process utilizes on-chain battle-tested Elliptic Curve VRF logic to ensure that there is no manipulation by any party.

Learn more about Randomizer.Ai here: https://randomizer.ai

Decentralized Random Number Generation (0xRNG)

0xRNG is a decentralized random number generator (RNG) that uses Gelato web3 functions to listen for random number requests and generate random numbers on demand.

The process involves generating 32 random bytes using Gelato web3 functions and submitting the result on-chain to a coordinator. The coordinator then hashes the result with a seed and passes them to the intended application.

Key Features of 0xRNG

  • Decentralization: By using Gelato's decentralized compute network, 0xRNG ensures that the generated random numbers are free from manipulation or bias.

  • On-chain Coordination: The generated random numbers are submitted on-chain, providing transparency and verifiability.

The gas cost calculation for 0xRNG is as follows:

Transaction fees (TXFEES) = L2 Gas Price (P) * Gas Limit (G)

Gas Limit (G) = Gas used on L2 (L2G) + Extra Buffer for L1 cost (B)

L1 Estimated Cost (L1C) = L1 price per byte of data (L1P) * Size of data to be posted in bytes (L1S)

Extra Buffer (B) = L1 Estimated Cost (L1C) / L2 Gas Price (P) Data Size (L1S): A static 40 bytes of data are assumed to be posted, though this may change in the future.

Why and how to change the Randomness Source

On Polygon, Chainlink VRF is the only option for obtaining randomness because it is the cheapest source available.

On Arbitrum, you can choose between 0xRNG and Randomizer VRF for your randomness needs:

  • 0xRNG is cheaper, but its verifiability is not entirely on-chain.

  • Randomizer VRF is a third-party source of randomness that is purely verifiable on-chain but requires more expensive fees.

To change your randomness source on Arbitrum, follow these steps:

  1. Connect your wallet to the dApp and click on your wallet logo.

  2. From the dropdown menu, select "Settings".

  1. Choose the randomness source you want to use.

Last updated