Quantum mechanics tells us that what appears to be an orderly, highly predictable universe is built on a world of unpredictability and mere probability. While the quantum world seems strange, it can be understood and even harnessed for technologies such as semiconductors, LEDs, and quantum cryptography. Something similar can be said about randomness in the metaverse. What looks like a system built on random values produced by random number generators (RNGs) is, in fact, based on programs with a method behind it that can be understood, for better or worse.
The fundamental role of random numbers
Random numbers are of great importance in a number of applications, including games, security systems, governance of decentralized autonomous organizations (DAOs), and generation of non-fungible tokens (NFTs). If your game can’t access randomly generated numbers, your startups will become repetitive and stale. If your security system relies on easy-to-guess authentication codes, it doesn’t provide much security. If any system that needs variety doesn’t get it, it won’t be very effective.
Even if these systems do not appear random, they rely on being supplied with randomly generated values to execute important operations. Without access to randomness, well-planned systems cannot function. However, the random numbers on which these systems are based are not always as random as they seem.
Many RNGs are, in fact, pseudo RNGs (PRNGs). Instead of producing random results, they provide the results of a fixed equation. The output value results from running an initial value, often called a “seed,” through this equation. The result is then used as a new seed and the process starts again. While the result is not random, it certainly may appear that way to an outside observer.
For many applications, this is effective. True randomness is not required in all applications. In a video game with random encounters, for example, there may only be a limited number of actions the game can perform at any given time. A PRNG that provides values outside a certain scope will not be of much use. When the stakes are low, the technical requirements often coincide. However, the quality of a PRNG can vary drastically. This can be a problem for applications with higher risks, many people depending on them, or a variety of use cases.
Some PRNGs are based on simple equations that can be repeated after a short period of time. This repetition creates predictability. Others may be influenced by external factors. This leads to manipulation. Additionally, many PRNGs do not provide a way to determine whether the number provided is the intended value. This lack of verification opens another door to manipulation and can lead to accusations from users that apps that rely on these numbers are being manipulated through biased results.
While being able to verify that a seemingly random number was the one intended by an RNG may seem silly, it’s no laughing matter. The ethos of many blockchain systems is based on transparency and lack of trust. Failure to confirm that a given number occurred truly at random strikes at the very heart of these ideals. When the numbers work, such as providing winnings in games or tightening security, not being able to prove that the numbers were not manipulated can seriously affect community trust.
Furthermore, not all PRNGs are suitable for all possible applications. Some are designed for certain Web3 functions. These are not universally applicable.
The search for true randomness
However, these systems also have flaws. They are often highly centralized, which can lead to tampering by anyone who has access to the machine. True randomness often comes at a much higher price than the services provided by a quality PRNG. Finally, the centralization that these devices depend on means that if something goes wrong, it results in system-wide downtime.
Decentralization and the reliability imperative
Using an RNG that doesn’t meet the decentralization, verification, or security needs of your application can be disastrous. As the collapse of Axie Infinity due to a security breach demonstrated, a technical failure can have major repercussions for even the best apps with the strongest user base. Given the importance of RNGs to the applications that use them, the best one should be used for the task at hand.
The perfect RNG would be unpredictable, tamper-resistant, verifiable, decentralized, and continuously available. If you are selecting an RNG, ask:
- Does it provide enough randomness?
- Can the results be verified?
- Is it safe against tampering?
- Is it decentralized to avoid single point failure?
As blockchain developers continue to expand their vision, push the boundaries of their applications, and provide more and more opportunities for the public to interact with the technology, it is imperative that the best possible support for their applications is available.
Felix Xu Cryptocurrency expert, 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 market capitalization. Felix previously worked at Fosun Investment, the Sackler family office and Vertical Research in New York and Beijing. Felix loves sailing and kitesurfing and has been 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 solely those of the author and do not necessarily reflect or represent the views and opinions of Cointelegraph.