My intended contract scenario:

The player makes bets. The contract remembers its block number. Then player again makes a request to the contract with the next transaction and receives the result of his bet based on the hash of his bet block

Is there a vulnerability in this scenario? (not considering miner attacks and a limit of 256 blocks)?


If you ignore miner attacks, then there shouldn't be a problem. The people submitting transactions will not be able to knowingly influence the block or block hash that gets generated with their transaction.

However, this is absolutely something that can be influenced by a miner, so simply ignoring it does not make it less of an attack vector.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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