Quantum mechanics tells us that what appears to be a very predictable and orderly universe is built on a world of unpredictability and mere probability. Although the quantum world looks bizarre, it can be understood and even exploited 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 actually based on programs with a method behind them that can be understood – for better or for worse.
The crucial role of random numbers
Random numbers are of great importance in a number of applications, including gaming, security systems, decentralized autonomous organization (DAO) governance, and non-fungible token (NFT) generation. If your game doesn’t have access to randomly generated numbers, your starts will become repetitive and boring. If your security system relies on easy-to-guess authentication codes, it won’t provide much security. If a system that needs variety doesn’t get it, it won’t be very effective.
Even if these systems don’t look random, they rely on the provision of randomly generated values ​​to perform important operations. Without access to randomness, well-planned systems cannot function. However, the random numbers these systems rely on 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 is the result of running a starting value, often called a ‘seed’, through this equation. The output is then used as a new seed and the process starts again. While the outcome is not random, it can certainly appear random to an outside observer.
This is effective for many applications. True arbitrariness is not required in every application. For example, in a random encounter video game, the game can only perform a limited number of actions at any given time. A PRNG that provides values ​​outside a certain range will not be of much use. When the stakes are low, the technical requirements often match. However, the quality of a PRNG can vary dramatically. This can be a problem for higher-stakes applications, many people depending on them, or a variety of use cases.
Some PRNGs rely on simple equations that can repeat themselves after a short time. This repetition provides predictability. Others can be influenced by external factors. This leads to tampering. In addition, many PRNGs do not provide a way to determine whether the specified number is the intended value. This lack of verification opens a new door for manipulation and can lead to accusations from users that applications relying on these numbers are being manipulated by biased output.
While it may seem strange to be able to verify that a seemingly random number was the number intended by an RNG, it is no laughing matter. The ethos of many blockchain systems is based on transparency and trust. The failure to confirm that a certain number was truly randomly produced goes to the heart of these ideals. When the numbers are doing their job, such as generating winnings in games or strengthening security, not being able to prove that the numbers haven’t been tampered with can have a serious impact on community trust.
Furthermore, not every PRNG is suitable for every possible application. Some are designed for certain Web3 features. These are not universally applicable.
True random number generators (TRNGs) compared to pseudo RNGs (PRNGs). Source: Level Up Coding
The search for true randomness
However, these systems also have shortcomings. They are often highly centralized, which again can lead to manipulation by anyone with access to the machine. True randomness often comes at a much higher price than services from a quality PRNG. Finally, the centralization these devices rely on means that if something goes wrong, there will be system-wide downtime.
Decentralization and the need for reliability
Using an RNG that does not meet the decentralization, authentication, or security needs of your application can be disastrous. As the collapse of Axie Infinity due to a security breach showed, a technical glitch can have major consequences for even the best applications with the strongest user base. Given how important RNGs are to the applications that use them, the best RNG for the task at hand should be used.
The perfect RNG would be unpredictable, tamper-proof, verifiable, decentralized, and continuously available. If you select an RNG, ask:
- Does it provide enough randomness?
- Can the outputs be verified?
- Is it protected against tampering?
- Is it decentralized to avoid single point errors?
As blockchain developers continue to expand their vision, push the boundaries of their applications, and provide the public with more and more ways to interact with the technology, it is imperative that the best possible support is made available for their applications.
Felix Xu Crypto nerd, early adopter and NFT collector. Felix graduated from NYU Stern and founded two crypto projects, ARPA and Bella Protocol, which are among the global top 500 in terms of market capitalization. Felix previously worked at Fosun Investment, 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 and should not be construed 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.