🎲RNG System
How Random Numbers are Generated for game results
Ruggle utilizes the Gelato RNG library to determine game outcomes, ensuring fairness and transparency. During our migration from Fantom to Sonic, we anticipated support for Chainlink VRF. However, by the time our upgrade was completed—four months after Sonic’s launch—Chainlink VRF and other advertised VRF solutions remained unavailable.
To maintain the integrity of our system and uphold trust, we implemented a hybrid RNG model that combines both on-chain and off-chain randomness sources:
On-Chain Component: We use
RNGLib.sol
to generate verifiable random numbers directly on the blockchain, ensuring immutability and resistance to tampering.Off-Chain Component: We integrate
crypto.getRandomValues()
as an additional randomness source, further enhancing unpredictability and reducing the risk of on-chain manipulation.
Benefits of the Hybrid RNG Model
Increased Security Against Attacks
Purely on-chain RNG solutions can be susceptible to miner manipulation and front-running attacks. By incorporating an off-chain component, we reduce the likelihood of adversarial control over the randomness process.
Transparency & Verifiability
The on-chain component ensures that randomness is publicly verifiable, while the off-chain component adds an additional layer of entropy that can be independently audited.
Reliability in the Absence of VRF Solutions
Given the delayed availability of Chainlink VRF on Sonic, this hybrid approach ensures continuous fair gameplay without reliance on third-party VRF providers.
Enhanced Fairness for Players
By leveraging two independent sources of randomness, we create a system that is both decentralized and resistant to single points of failure, reinforcing user confidence in game outcomes.
This hybrid RNG model demonstrates our commitment to fairness, security, and adaptability, ensuring a robust gaming experience for our users despite unforeseen infrastructure limitations.
Last updated