Bitget App
Trade smarter
Buy cryptoMarketsTradeFuturesCopyBotsEarn

Games need decentralized randomness to be fair

CointelegraphCointelegraph2023/10/20 23:06
By:Felix Xu

Quantum mechanics tells us that what looks like a highly predictable and orderly universe is built on a world of unpredictability and mere probability. While the quantum world looks bizarre, it can be understood and even harnessed for technology like 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 them that can be understood — for good or ill.

The pivotal role of random numbers

Random numbers are of great importance in a number of applications, including games, security systems, decentralized autonomous organization (DAO) governance, and nonfungible token (NFT) generation. If your game cannot access randomly generated numbers, your starts will become repetitive and stale. If your security system relies on easily guessed authentication codes, it isn’t providing much security. If any system that needs variety isn’t getting it, it won’t be very effective.

Even if these systems don’t look random, they rely on being supplied with randomly generated values to execute important operations. Without access to randomness, well-planned systems can’t operate. However, the random numbers these systems rely on are not always as random as they may seem.

Many RNGs are, in fact, Pseudo RNGs (PRNGs). Instead of producing random outputs, they are providing the results of a fixed equation. The output value results from 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 isn’t random, it can certainly appear random to an outside observer.

For many applications, this is effective. True randomness is not required in every application. In a video game with random encounters, for example, there may only be a limited number of actions the game can take at any given time. A PRNG that provides values outside a given scope isn’t going to be of much use. When the stakes are low, technical requirements often match. However, the quality of a PRNG can vary dramatically. This can be an issue for applications with higher stakes, many people depending on them, or a variety of use cases.

Some PRNGs rely on simple equations which can repeat themselves after a short period of time. This repetition breeds predictability. Others can be influenced by outside factors. This leads to tampering. Additionally, many PRNGs do not provide a way to determine if the number provided is the intended value. This lack of verification opens another door to tampering and can lead to accusations by users that applications relying on these numbers are being manipulated by biased outputs.

While being able to verify that an apparently random number was the one intended by an RNG may seem silly, it is no laughing matter. The ethos of many blockchain systems is based on transparency and trustlessness. Not being able to confirm that a given number was truly randomly produced strikes at the very heart of these ideals. When the numbers are doing work, such as providing winnings in games or reinforcing security, not being able to prove that the numbers were not tampered with can seriously impact community confidence.

Additionally, not every PRNG is suited to every possible application. Some are designed for certain Web3 functions. These are not universally applicable.

True random number generators (TRNGs) compared to Pseudo RNGs (PRNGs). Source: Level Up Coding

The quest for true randomness

However, these systems also have failings. 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 price than services by a quality PRNG. Lastly, the centralization these devices rely on means that if anything goes wrong, there is 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 for even the best applications with the strongest user base. Given how important RNGs are to the applications that use them, the best one for the task at hand must be used.

The perfect RNG would be unpredictable, tamper-resistant, verifiable, decentralized, and continuously available. If you're 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 point failures?

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

Felix Xu 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 m arket cap. Felix previously worked at Fosun Investment, Sackler family office, and Vertical Research in New York and Beijing. Felix loves sailing, 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.

0

Disclaimer: The content of this article solely reflects the author's opinion and does not represent the platform in any capacity. This article is not intended to serve as a reference for making investment decisions.

You may also like

Bitcoin miner Bitfarms sets vote date on Riot's attempted takeover step

Bitfarms has set Oct. 29 as the date for a special meeting of its shareholders in response to a requisition for a shareholders’ meeting submitted by Riot Platforms.Bitfarms’ shareholders will vote on reconstituting Bitfarms’ board of directors, the latest step in Riot’s attempted takeover of its bitcoin mining rival.

The Block2024/07/12 14:13

US lawmakers push for hostage designation in Binance exec’s detention in Nigeria

Quick Take Two U.S. congressmen, Rich McCormick and French Hill, have submitted a resolution to the House Committee on Foreign Affairs, urging the U.S. government to declare the detention of Binance executive Tigran Gambaryan in Nigeria as a hostage situation. The resolution calls for the Nigerian government to immediately release Gambaryan, a U.S. citizen, citing his deteriorating health in Kuje Prison.

The Block2024/07/12 13:31

SEC allows certain firms to skirt controversial crypto accounting bulletin

Quick Take Some firms have proposed business practices that the SEC agrees could exempt them from controversial crypto accounting guidance, according to an SEC source. Firms have consulted with the SEC on crypto policies since SAB 121 was released. The SEC allows exemptions with proven procedures and technology for customer crypto recovery in bankruptcies.

The Block2024/07/12 13:31

Institutions want more crypto asset diversity, says Talos CEO

Quick Take Talos co-founder and CEO Anton Katz says many large institutions are making crypto plans, but a lack of asset diversity is keeping others sidelined.

The Block2024/07/12 13:31

‌Spot copy trading

More
AIOnline
AIOnline
insight1000/1000
10048.2%
ROI
Total profit $51245.84
WhaleGo_YouTube
WhaleGo_YouTube
insight500/500
1338.92%
ROI
Total profit $3887.72

Bot copy trading

More
Morgee
Morgee
insight80/150
$17427.36
Total profit
Total subscriber profits $-223.07
GoldenEgg
GoldenEgg
insight149/150
$3416.37
Total profit
Total subscriber profits $-284.87