To the layperson, randomness may not be as obviously useful as predictability. After all, the human tendency is to create order from chaos. However, in some contexts, randomness is not just desirable, it’s essential. There are plenty of everyday situations where random selection is a factor for success. Examples include medical trials, jury selection, or market research surveys, to name a few.

Gambling is another case in point. Whether physical gaming or online, gambling depends on a roll of the dice or a shuffled card deck to introduce the element of randomness. If there is any bias in favor of a particular throw or card selection, the game is rigged.

Perhaps a more critical example is in online security. Passwords and secure communication channels depend on encryption, in which random numbers replace the data itself. If a hacker can determine the real input from any given encrypted output, your password, email, or other communication are no longer private.

Why Randomness and Blockchains Don’t Mix Well

The requirement of randomness in encryption and even gambling presents a real problem for blockchain developers. Some of the most popular blockchain apps, including Endless Dice and EOS Bet, are gambling games. Hashing and key encryption are central to blockchain technology — they literally put the “crypto” into cryptocurrency.

The challenge comes from the conflict between deterministic and probabilistic events. By its nature, blockchain depends on deterministic events. Even though a block producer or miner could be anyone in the network, game theory sets the conditions. So, in Bitcoin’s proof of work protocol, the miner that uses the most computational power to find the correct hashing solution will be the next block miner. Therefore, predictability is based on the fulfillment of particular conditions.

Random number generation is the opposite. The entire point of a random number generator is that the outcome is random and unpredictable regardless of any conditions.

Solving the Conflict

Due to the deterministic vs. probabilistic conflict, nobody has so far come up with a way to incorporate a genuinely random number generator (RNG) into a blockchain environment. Several workarounds are used instead.

One is to use an external RNG from a trusted source. This is the premise of Provable, which provides oracle services including an RNG for blockchain developers. However, the nodes on the network are required to trust the source and have no real way of knowing whether or not an outside source is colluding with any of the other node operators.

Furthermore, using an external RNG service is a centralized solution, which presents a conflict with the decentralized, consensus-driven nature of public blockchains.

LiquidApps Web Oracles

LiquidApps is dedicated to removing barriers for developers and users of distributed applications (dApps) with a view to increasing adoption. The DAPP Network operates on a network of Dapp Service Providers (DSPs) who can offer tailored packages of services to users and developers on EOS. The company has recently rolled out a host of new features that DSPs can include in their service packages.

One of these newer services on the DAPP Network is Web Oracles. Web Oracles allows a DSP to offer oracle services or random number generation from any external source, and the decentralized DAPP Network of DSPs has a mechanism for verifying the authenticity of the incoming information.

Let’s examine how this works in practice. Any DSP can serve up a requested piece of data, such as a random number, to a user or developer. At the same time, the rest of the DSP network serves as watchdogs, obtaining the same information from the oracle and comparing the results on-chain. If a DSP serves up information that appears to be suspect, then they start to lose trust. If multiple DSPs serve up the same suspect information, then it’s evident that there is collusion happening.

While this solution doesn’t directly address the challenge of requiring an RNG to be decentralized, it’s closer to a fully decentralized solution than requiring a network to trust in an external, centralized oracle than anything else that exists today.

In the meantime, the developer community continues to work on the incorporation of a fully decentralized RNG into a blockchain environment. Each time a new development occurs, it raises the trust that can be placed in randomness on the blockchain. Whether for a dice roll or for encrypting communications and other transactions, blockchain technology will ultimately need to embrace randomness.