3 ms·
You can just use the last x bits of hashes for the last y blocks to generate a random number.
by gibybo 9y ago
You can just use the last x bits of hashes for the last y blocks to generate a random number.
- fgonzag 9y agoIf you have the seed and the algorithm for the PRNG before the random number is drawn, then anyone can calculate it and pick the number. The seed would have to be picked as the number is drawn if the system is public.
- gibybo 9y agoYou would commit your guess in a block prior to the random bits being determined. This is actually a popular scheme used by a lot of 'provably fair' gambling sites/smart contracts.