Random Number Generation

As blockchains cannot generate random numbers, the Wenwin smart contracts use a third-party Verifiable Random Function (VRF) to generate the lottery's draw numbers. The VRF provider used by Wenwin is API3's QRNG for the primary randomizer and Supra's dVRF as a secondary fallback randomizer.

To ensure the resiliency of the system in times when the randomness source is unavailable, the following mechanisms have been implemented:

  1. Anyone can trigger a retry if a randomness request via the current source fails to be fulfilled within a predefined timeframe.

  2. After a predefined number of failed retries, the deployer can swap the randomness source with a different one.

It's important to understand that the deployer cannot change the randomness source other than in the unlikely scenario in which the current oracle fails repeatedly, as per the specifications above. Additionally, the predefined timeframe and the number of allowed retry attempts are immutable and cannot be changed after the contracts have been deployed.

Last updated