3 ms·
It's a thing. As with all blockchain things, it's not an efficent thing, but it exists: https://ethereum.stackexchange.com/questions/191/how-can-i-securely-gene
by er4hn 4y ago
It's a thing. As with all blockchain things, it's not an efficent thing, but it exists: https://ethereum.stackexchange.com/questions/191/how-can-i-securely-generate-a-random-number-in-my-smart-contract https://ethereum.stackexchange.com/questions/191/how-can-i-s... .
The TL;DR is that:
- Everyone playing comes up with a random number X, which is kept local for now
- X is hashed, such that HASH(X) = Y, where Y is then sent to a server where everyone can view it (aka some blockchain smart contract). Some other stuff around preventing impersonators happens as well, but the hash being sent is the important bit. This is your commitment to the game.
- When everyone has submitted their Y values, they all send in their original X values as well
- Every X values is verified such that HASH(X) = Y.
- All the X values are combined, and used as a seed to an RNG (i.e. something like concatenation, run a KDF over the concatenation, use that output as a seed to an RNG)
- Now everyone knows which player run virtual coins, without a central decision point.
- benj111 4y agoYes but how are they getting that random number X? Is it from some rng generator or is it from nuclear decay of a Cesium atom? This is what my product provides. Truly random (TM) numbers!