0

Say a number guessing game allows users to submit their guess before block N and reveals the winning number N + 100 games later, which is random number based on the block hashes of block N until block N + 100. Is it still susceptible to any randomness attack?

2 Answers 2

1

It's most likely fine, but theoretically the block hashes are controlled by the miner, so in the case of a 51% attack, you could be at risk. Adding things not controlled by a miner (like a nonce, a seed, a counter in your own contract, etc.) can make it better.

0

Well, here is one scenario that can affect the outcome. Say the winner will receive 20ETH. Alice, who wants to win the auction, can offer a bribe to a miner saying that if the block hash you have is not making me win, don't start the PoW. Assuming this miner doesn't have the majority of the hash rate, the chances of this attack going through are low.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.