Quantum mechanics tells us that the seemingly highly predictable and orderly universe is built on a world of unpredictable and pure chance. Although the quantum world seems strange, it is understandable and can even be used in technologies such as semiconductors, LEDs, and quantum cryptography. Similar things can be said about randomness in metaverses. A system that looks like it’s built on random values generated by a random number generator (RNG) is actually based on a program, and there’s an understandable methodology behind it – for better or worse.
The key role of random numbers
Random numbers are important in many applications, including games, 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 stale. If your security system relies on easy-to-guess authentication codes, it doesn’t provide much security. If any system that requires diversity cannot achieve this, it won’t be very effective.
Even though these systems do not appear to be random, they rely on randomly generated values to perform important operations. Without randomness, a well-planned system cannot function. However, the random numbers these systems rely on are not always as random as they appear.
In fact, many RNGs are pseudo-RNGs (PRNGs). Rather than producing random output, they provide the result of a fixed equation. The output value is obtained by running this equation on a starting value (often called the “seed”). The output is then used as a new seed and the process starts again. While the result is not random, it will certainly appear random to an outside observer.
For many applications this works. Not every application requires true randomness. For example, in a video game with random encounters, the game may only be able to take a limited number of actions at any given time. PRNGs that provide values outside the given range won’t be of much use. When the stakes are low, technical requirements usually match. However, the quality of PRNGs can vary widely. This can be a problem for riskier applications, many people relying on them, or a variety of use cases.
Some PRNGs rely on simple equations that can be repeated over a short period of time. This repetition creates predictability. Others may be affected by external factors. This can lead to tampering. In addition, many PRNGs do not provide a way to determine whether the provided number is the expected value. The lack of verification opens another door to tampering and could lead to users accusing apps that rely on these numbers of being manipulated with biased output.
While it may seem silly to be able to verify that an apparently random number is the number the RNG intended, it’s not a funny thing. The ethos of many blockchain systems is based on transparency and trustlessness. The inability to confirm that a given number was indeed randomly generated goes to the heart of these ideals. When these numbers serve a purpose, such as providing gaming bonuses or enhancing security, the inability to prove that the numbers have not been tampered with can significantly impact community confidence.
Furthermore, not every PRNG is suitable for every possible application. Some are designed for certain Web3 features. These are not universally applicable.
Pursuing true randomness
However, these systems also have drawbacks. They are often highly centralized, which again can lead to tampering by anyone with access to the machine. True randomness is usually much more expensive than high quality PRNG services. Finally, the centralization these devices rely on means that if anything goes wrong, it can bring down the entire system.
The need for decentralization and reliability
Using an RNG that fails to meet the decentralization, verification, or security needs of an application can have disastrous consequences. As Axie Infinity’s collapse due to a security flaw demonstrated, technical glitches can have a significant impact on even the best apps with the strongest user bases. Given how important RNGs are to the applications that use them, it is imperative to use the RNG that is best suited for the current task.
The perfect RNG should be unpredictable, tamper-proof, verifiable, decentralized and continuously available. If you choose RNG, please ask:
- Does it provide enough randomness?
- Can the output be verified?
- Is it tamper-proof?
- Is it decentralized to avoid single points of failure?
As blockchain developers continue to expand their horizons, push the boundaries of their applications, and provide the public with increasing opportunities to engage with the technology, it is imperative to provide the best possible support for their applications .
Felix Xu Crypto geeks, early adopters and NFT collectors. Felix graduated from New York University’s Stern School of Business and founded two encryption projects, ARPA and Bella Protocol, becoming one of the top 500 companies in the world by market capitalization. Felix previously worked at Fosun Investments, the Sackler Family Office, and Vertical Research in New York and Beijing. Felix loves sailing, 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 only and is not intended to be, and should not be construed 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.
Svlook