Don’t Play Blindly: Educate Yourself on RNG for GameFi and NFTs

ARPA Official
5 min readSep 21, 2023

--

Have you ever questioned the fairness of the distribution of the GameFi items you play with or the NFTs you collect? Well, you should. Or, at least you should be cautious and check the RNGs they employ first.

RNGs, or Random Number Generators, are tools that attempt to do exactly what their name would make you think they do- generate numbers randomly. While the world of technology can seem based on exact calculations and well-fitting lines of code, some of the most exciting tech there is depends on the generation of random values. That is where RNGs come in.

What is an RNG?

An RNG is either a piece of hardware or a software algorithm that generates a number and then provides it to another program. The value of the number can be limited to a range, be from a set, or be left unlimited. RNGs tend to come in one of two basic forms- pseudo-random number generators (PRNGs) and true random number generators (TRNGs).

PRNGs look like they’re producing a random number, but they aren’t. They often rely on algorithms that can be deterministic and sometimes highly predictable to decide what number to output. Exactly how close to random the output of a given PRNG is can vary with the quality of the generator. That is why they get the adjective pseudo in their name.

For example, some PRNGs will generate their numbers through a simple equation. The numbers plugged into that equation, called a seed, will be selected in advance and then altered as the PRNG operates according to a predetermined function- such as replacing the seed with the previous output. While this can work well for many operations, it opens the door to predictability and repetition.

TRNGs, on the other hand, tend to be hardware rather than software based. These can be based on things like the random odds that a radiation source emits a particle, if a photon travels through a particular part of a mirror, or changes in the background noise picked up by a radio. In principle, since an outside observer can’t know what’s going on where this hardware is, they can’t predict what the machine will base its calculation on and the outcome is both safe from tampering and unlikely to be picked up before it’s made public. Because these changes are as close to truly random as possible, they have that adjective in their name.

RNGs matter because of fairness

RNGs are used in a number of applications. For example, they are used when you mint an NFT, to scramble queues and befuddle bots, to decide who wins a contest, and to provide security for need-to-know information. To dive a little deeper, we’ll look at how they’re used in GameFi.

Plenty of famous video games use random numbers to help enhance the experience. In the Pokémon games, you have certain odds of encountering a given pokémon in a given location. Which one you run into, if you run into one at all, is determined by comparing a random number to in-game factors. In GameFi, the idea of using random numbers to help build a living world is taken even further.

When you start a new game, an RNG may determine what stats your character has, what equipment they have on hand, and even what your avatar looks like. The map of the world you’re playing in might be randomly generated or populated with items determined and placed by randomness. If you play a chance-based minigame, an RNG will be behind if you win or lose. If you want to play against another person in a one-on-one match, who you face is often the result of the outputs of RNGs.

Doing any of these activities without randomness, or even just high levels of predictability, will make for a less exciting game.

What makes an RNG a good RNG?

There are many traits you want in an RNG. Here, we consider three of the most important traits:

Verifiability: In many cases, it is possible to have an RNG that provides evidence that its output was randomly produced, often in the form of a hash output. Anyone with the public key can verify this hash as correct, certifying that the random number is valid.

Low cost: Some RNGs cost a fair amount of money to run. This is especially the case for TRNGs, which have to have physical systems set up to monitor and translate into numerical values. However, it is possible to find an effective RNG that doesn’t break the bank. This is particularly important for an RNG that is expected to provide outputs frequently.

Tamper-proofing: It is possible for many RNGs to be tampered with and their outcome to be influenced by bad actors. A TRNG based on hardware has to be operated by humans who could attempt to affect the machine. A PRNG based on software might have an exploitable weakness hackers can use to turn it into their own private rigged roulette wheel. When looking for an RNG, be sure to check the level of security around it, review the code it relies on, and check any certification the provider has.

Haven’t we perfected randomness?

True randomness is very difficult to create. Even TRNGs can sometimes be less than perfect, as the input has to be translated into a meaningful output through an imperfect system. Even when TRNGs work well, they can be expensive; that’s why pseudo-random number generators are often used. And this is exactly where blockchain can help. Being decentralized, transparent, auditable, tamper-proof, and immutable, blockchain offers a promising solution to enhance fairness and verifiability in RNG, which in return may bring more disruptive innovations.

About ARPA

ARPA Network (ARPA) is a decentralized secure computation network built to improve the fairness, security, and privacy of blockchains. ARPA threshold BLS signature network serves as the infrastructure of verifiable Random Number Generator (RNG), secure wallet, cross-chain bridge, and decentralized custody across multiple blockchains.

ARPA was previously known as ARPA Chain, a privacy-preserving Multi-party Computation (MPC) network founded in 2018. ARPA Mainnet has completed over 224,000 computation tasks in the past years. Our experience in MPC and other cryptography laid the foundation for our innovative threshold BLS signature schemes (TSS-BLS) system design and led us to today’s ARPA Network.

Randcast, a verifiable Random Number Generator (RNG), is the first application that leverages ARPA as infrastructure. Randcast offers a cryptographically generated random source with superior security and low cost compared to other solutions. Metaverse, game, lottery, NFT minting and whitelisting, key generation, and blockchain validator task distribution can benefit from Randcast’s tamper-proof randomness.

For more information about ARPA or to join our team, please contact us at contact@arpanetwork.io.

Learn about ARPA’s recent official news:

Twitter: @arpaofficial

Medium: https://medium.com/@arpa

Discord: https://dsc.gg/arpa-network

Telegram (English): https://t.me/arpa_community

Telegram (Turkish): https://t.me/Arpa_Turkey

Telegram (Việt Nam): https://t.me/ARPAVietnam

Telegram (Russian): https://t.me/arpa_community_ru

Telegram (Indonesian): https://t.me/Arpa_Indonesia

Telegram(Sri Lanka):https://t.me/arpa_srilanka

Telegram(Africa):https://t.me/arpaafrica

Reddit: https://www.reddit.com/r/arpachain/

--

--

ARPA Official

ARPA is a privacy-preserving blockchain infrastructure enabled by MPC. Learn more at arpachain.io