Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 1.11 KB

weak-sources-randomness.md

File metadata and controls

12 lines (8 loc) · 1.11 KB

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