This question here Why aren't block hashes a reliable source of randomness? explains why it is not a good idea to use an ethereum block hash as a source of randomness (SoR) for a contract C; the reason being that a miner with an interest in the outcome of C could "redraw" that hash as many times as needed to drive C to the miner's preferred outcome.

Of course re-drawing is costly (it costs the miner the reward of the block thrown to the bin) and one can use a block hash as a SoR safely if the expected value derived from redrawing is way below that of re-drawing in the first place.

Here are the two questions I have:

  • how is the ethereum transition to PoS going to change this?
  • one way to set the re-drawing cost higher is to use a block hash on a chain where rewards are higher eg bitcoin's - is that a good idea?
  • here I am assuming it is actually possible to read another chain's hash within an ethereum contract which I realise I am not sure about either! – 34363705L Jun 24 '18 at 10:31

Your Answer

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

Browse other questions tagged or ask your own question.