News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

in-contract RNG for BSC

Started by FrancescaWeber, Jul 27, 2023, 12:16 PM

Previous topic - Next topic

FrancescaWeber

I'm trying to develop a weighted probability selection algorithm on BSC, and I think for that I need an algorithm that can generate a random number in a given range.

What would be a "good enough" way to achieve this? I know there are a lot of problems with RNG in smart contracts, but is there a solution that is practically secure enough for BSC? For example, if I'm not mistaken, all the miners there belong to Binance, so as long as you trust Binance , there should be no mining attacks.

Abdelziz

As I remember, Binance has some problems nowadays. CZ got some questions from SEC, so it's a small chance of instability of BSC in the future.

unavaughan

Developing a weighted probability selection algorithm on BSC sounds like a cool project!

One way you could generate random numbers in a given range is by combining block data (like the block hash) with a nonce value. It's not perfectly secure, but it should be good enough for most applications on BSC, especially if you trust Binance miners.

I recently read an article about RNG uses in the crypto world, and it's fascinating to see how it's being integrated into various aspects of the technology.