Expanding EIP 4399 PREVRANDAO with RANDAO(n)

Using blockhash opcode, we have implemented a library to look up a historical RANDAO here

An application of this to verify an off-chain random sampling with RANDAO as the random seed (see here)

Note that for L2s, using L2 RANDAO for randomness is broken as the sequencer can easily forge any RANDAO number. A way to address the issue is to look up L1 RANDAO from L2. An RIP is proposing to support reading L1 blockhash and thus L1 RANDAO (see RIP Idea: L1 Blockhash Precompile · Issue #16 · ethereum/RIPs · GitHub).

2 Likes