Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 927 Bytes

weak-sources-randomness.md

File metadata and controls

12 lines (8 loc) · 927 Bytes

Weak Sources of Randomness from Chain Attributes

Using chain attributes for randomness, e.g.: block.timestamp, blockhash, and block.difficulty can seem like a good idea since they often produce pseudo-random values. The problem however, is that Ethereum is entirely deterministic and all available on-chain data is public. Chain attributes can either be predicted or manipulated, and should thus never be used for random number generation.

A common solution is to use an oracle solution such as Chainlink VRF.

Sources