Games Need Decentralized Randomness to Be Fair

0

Quantum mechanics reveals that the universe, which appears highly predictable and orderly, is fundamentally built on unpredictability and probability. While the quantum realm seems bizarre, it can be understood and harnessed for technologies such as semiconductors, LEDs, and quantum cryptography. A similar principle applies to randomness in the metaverse. Systems that appear to rely on random values generated by random number generators (RNGs) are actually based on programs with underlying methods that can be understood—either for better or worse.

The pivotal role of random numbers

Random numbers are critical in numerous applications, including gaming, security systems, decentralized autonomous organization (DAO) governance, and non-fungible token (NFT) generation. If a game cannot access randomly generated numbers, its gameplay becomes repetitive and stale. If a security system relies on easily guessed authentication codes, it offers little protection. Any system requiring variety will fail to be effective without it.

Even systems that do not appear random rely on randomly generated values to execute important operations. Without access to randomness, even well-planned systems cannot function. However, the random numbers these systems depend on are not always as random as they seem.

Many RNGs are, in fact, Pseudo-Random Number Generators (PRNGs). Instead of producing truly random outputs, they provide results derived from a fixed equation. The output value is generated by running a starting value, often called a “seed,” through this equation. The output then serves as a new seed, and the process repeats. While the outcome is not truly random, it can appear random to an outside observer.

For many applications, this is sufficient. True randomness is not required in every scenario. In a video game with random encounters, for instance, there may only be a limited number of actions the game can take at any given time. A PRNG providing values outside a specific scope may not be useful. When the stakes are low, technical requirements often align with this limitation. However, the quality of a PRNG can vary significantly. This becomes an issue for applications with higher stakes, many users, or diverse use cases.

Some PRNGs rely on simple equations that can repeat after a short period, leading to predictability. Others can be influenced by external factors, resulting in tampering. Additionally, many PRNGs do not provide a way to verify if the generated number is the intended value. This lack of verification opens another avenue for tampering and can lead to user accusations that applications relying on these numbers are manipulating outputs.

While verifying that an apparently random number was the one intended by an RNG may seem trivial, it is no laughing matter. The ethos of many blockchain systems is based on transparency and trustlessness. Inability to confirm that a given number was truly randomly produced strikes at the heart of these ideals. When numbers perform critical tasks, such as determining winnings in games or reinforcing security, the inability to prove that the numbers were not tampered with can seriously impact community confidence.

Furthermore, not every PRNG is suited to every application. Some are designed for specific functions and are not universally applicable.

Games need decentralized randomness to be fairTrue random number generators (TRNGs) compared to Pseudo RNGs (PRNGs). Source: Level Up Coding

The quest for true randomness

However, these systems also have shortcomings. They are often highly centralized, which can again lead to tampering by anyone with access to the machine. True randomness often comes at a much higher cost than services provided by a quality PRNG. Lastly, the centralization these devices rely on means that if anything goes wrong, it can result in system-wide downtime.

Decentralization and the imperative of reliability

Using an RNG that does not meet your application’s decentralization, verification, or security needs can be disastrous. As the collapse of Axie Infinity due to a security breach demonstrated, a technical failure can have major repercussions even for the best applications with the strongest user base. Given how important RNGs are to the applications that use them, the best one for the specific task must be selected.

The perfect RNG would be unpredictable, tamper-resistant, verifiable, decentralized, and continuously available. When selecting an RNG, ask:

  • Does it provide sufficient randomness?
  • Can the outputs be verified?
  • Is it secure against tampering?
  • Is it decentralized to avoid single points of failure?

As blockchain developers continue to expand their vision, push the boundaries of their applications, and provide more opportunities for the public to engage with the technology, it is imperative that the best possible support for their applications is made available.

Felix Xu is a crypto geek, early adopter, and NFT collector. Felix graduated from NYU Stern and founded two crypto projects, ARPA and Bella Protocol, among the global top 500 by . Felix previously worked at Fosun Investment, the Sackler family office, and Vertical Research in New York and Beijing. Felix loves sailing and kitesurfing and was featured in The Wall Street Journal and The New York Times for his NFT collection.

This article is for general information purposes and is not intended to be and should not be taken as legal or investment advice. The views, thoughts, and opinions expressed here are the author’s alone and do not necessarily reflect or represent the views and opinions of Cointelegraph.