D
D
DoThisBet2021-05-26 12:26:03
random numbers
DoThisBet, 2021-05-26 12:26:03

RNG based on the price of a pair on a crypto exchange?

Hello, I’m interested in how suitable the BTC rate to USDT in cents on the same binance (as the most volatile) to use as the basis of a random number generator if you need to choose between two numbers (for example, when the rate in cents is even - it is 0, when the rate in cents odd is 1)? And if you need to choose from 5-10-100-1000 values?

The mechanism with even-odd for two possible values ​​is clear how it works, but other values ​​(for example, generation from 365 possible values) are no longer so clear. The option here is the simplest (which came to my mind) - divide the price of bitcoin in cents by the desired number, and the remainder after the division will be the generated number. That is, we take the rate of 3791962 cents for bitcoin, divide by 365, we get 10388 integers (we are not interested in integers) and 342 in the remainder. These 342 from the remainder will be the generated number (more on the problem of this method below).

As far as I understand, there are several restrictions:
1. Technical restrictions of the exchange on receiving the rate more than a certain number of times per second (in practice, when analyzing the order book, the price changed about 50-80 times per second, sometimes more often). Generating large keys will take a long time at this generation rate.
2. With values ​​​​more than 100+, in my opinion, the cent may no longer be a frequently changed unit for short-term prospects and a certain range of values ​​​​can be predicted based on the current price of bitcoin with a certain accuracy.
3. At the time of a technical failure (or update), information from the exchange may stop coming, thereby stopping the generation of numbers.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question