Unbiasable Randomness on Nexty Blockchain

You probably heard it a lot, now you have some ideas

Louis Nguyen
NextyPlatform
3 min readOct 10, 2019

--

Random number generator (RNG) is nothing strange to us, even though it sounds exquisite. RNG was invented to randomly determine the outcome of many recreational activities i.e flipping a coin, rolling a dice, shuffling a deck of cards, etc. It’s supposed to be unbiased and unpredictable. Today RNG is applied to many security practices, especially cryptography in blockchain.

“True” randomness vs. Pseudo randomness

Initially, there are two methods of RNG applied: true randomness and pseudo-random-number generator. True randomness is generated by measuring natural entropy like radioactive decay and cosmic background radiation. It’s able to produce a random number by compensating for the measurement biases. On the other hand, Pseudo-random-number-generator (PRNG) creates a long sequence of numbers seemingly random from a seed. It can be reproduced if the seed is known.

However, true randomness on blockchain is impractical. Producing a true random number takes a long duration of measurement, and is not always readily available on the network, especially with 2-second block time of Nexty. For the latter, the seed of a PRNG is predictable. PRNG on blockchain could be efficiently calculated based on the seed, especially with a parallel computation extensive unit like the ASIC or GPU. when sealers are given incentive to manipulate the result, they could withhold the input or collude with others to damage the integrity of the blockchain. The faster the sealer finished the calculation for a random number, the more time it has to exploit the PRNG.

In the case of Nexty consensus, DCCS is similar to PoS with some minor improvements over miner selection. Miners of Nexty, who has enough NTF will be selected randomly for a queue to mine NTY. However, the random order seems to be predictable, because it is a value acquirable on-chain. Then miners with sufficient calculation power can manipulate the result by simply calculate the random value of the next block, and they can choose to keep it or discard it in their favor, which will increase the probability of their coins generating a valid block. The idea is placing a function that would delay the calculation rate of all the miners, which has the following properties:

  • Non-parallelable: anyone can calculate the result of the function in a specific steps, but no miners can compute it in significantly fewer steps.
  • Easily Verifiable: Given the result of the function, anyone could verify that y = f(x) in a much shorter time than the calculation time.

Applied to Nexty Consensus

For the most part, Nexty consensus use VDF to generate random numbers, so the result is not predictable by any adversaries. It minimizes the risks of malicious sealers and protects the network. From now on, every time a VDF output is found, the sealing round will have a new random set of sealers. Moreover, honest sealers who commit a reliable result will be rewarded by the consensus. VDF is not only a random sealer selector, but also a backbone for many future dApps that requires verifiable randomness on Nexty blockchain.

--

--