Introducing Random Number Generator API

BORA
BORA
Published in
3 min readMay 2, 2019

Dear BORA community.

‘Probability systems’ is commonly used in various contents these days. Online game is a good example. I’m sure many of you have experienced happy and sad moments with random boxes.

This experience has led everyone to question the possibility of manipulating the odds.

Random number generation (RNG) is the basis of a probability system of those random boxes.

BORA developed an API (Application Programming Interface) that secures fairness, reliability and transparency of a probability system using blockchain technology and it is available to content developers. Today, we will introduce BORA’s random number generator API.

Let’s start with the traditional random number generation method.

There are many different ways to create random numbers. Based on numeric value referred to as ‘seed’, many uses method to generate random numbers using calculation algorithm. The seed is a number that changes fluidly, most often uses the current time to produce the value.

The problem here is that if you use the seed value with predictable values such as ‘Time’, you can manipulate the calculation algorithm to create random numbers for the expected values, or to predict the exact value (number) which can be exploit the system.

To avoid such exploits, BORA created a random number API that uses ‘future numbers’ as a seed value to extracts random numbers.

To help you to understand better, let’s take an example of a ‘Block hash value generated 5 seconds after random number request’ with a future number.

When someone requests for a random number, the BORA’s random number generator brings the block hash (TxHash) inside the BORA network as a seed value, created five seconds after the request is made, and creates a random number based on it. Hash values are continuously generated in random numbers and characters, and future hash values are unknown, which makes it un-predictable. This ensures reliability and fairness of the probability system using BORA’s random number generator API.

It is also transparently disclosed whether the seed value used to generate random numbers is actually based on the future hash value. With BORA Explorer, anyone can see block data of random number generation results including the hash value.

https://lagoon.boraecosystem.com/en

Dice Roller, a program built using BORA’s random number generator API is currently available at BORA Lagoon for all developers and users interested in RNG API.

Displayed information within the Dice roller program, ‘Request Address’ indicates the account information of the random number requestor and ‘Maximum No’ shows the range of the random number (in this case, it’s from 1 to 6).

‘Waiting Block Count (ex. 1)’ is a future number that in this case, it means it will use the first block hash value created upon the random number request. In the previous discussion, we cited future number created five seconds after the request is made as an example. As such, various concepts such as time and order, can be the basis for determining a future number.

‘Request Sequence’ is the number of random requests used within the smart contact to prevent abuses to acquire a specific random number through a simultaneous random number request attack.

In addition to the random number generator API, BORA will continue to develop and provide various APIs that will help content developers to easily integrate blockchain technology into their digital contents.

Sincerely.

BORA Team

--

--

BORA
BORA
Editor for

Store, secure and grow your entertainment crypto assets. Visit https://boraportal.com to learn more about our services and games!