EIP-7998 Replacing the RANDAO reveal with a VRF (Turn `randao_reveal` into a VRF)
No call decision · Consensus & staking · EIP status Draft · created 2025-08-03
Replaces the randao_reveal signed by the block proposer with a verifiable random function (VRF) that cannot be precomputed, by including the previous epoch's RANDAO mix and the current slot number in the signed message.
Why it is needed
Ethereum needs randomness throughout the protocol, for example to select block proposers, and produces that randomness through a mechanism called RANDAO. Each proposer publishes a signature called randao_reveal, and these are mixed together to produce randomness. However, the current randao_reveal is a signature over the current epoch number. Since the epoch number is known to everyone in advance, a proposer with only their own private key can precompute reveals for epochs far in the future. This predictability underlies RANDAO bias attacks, where a proposer skews the randomness in their own favor, and also blocks designs such as single secret leader election (SSLE) that require verifiable randomness. This proposal includes a value in the signed message that is only finalized once the immediately preceding epoch ends, so that even the proposer themselves cannot precompute reveals beyond the current epoch.
What changes
Today
- randao_reveal is a BLS signature over the current epoch number, so it can be precomputed
- A validator that proposes multiple times in the same epoch produces the same reveal
- Predictable randomness makes it difficult to build designs such as single secret leader election
After EIP-7998
- Signing the previous epoch's RANDAO mix together with the current slot makes it impossible, even for the proposer, to predict beyond the epoch boundary
- Including the slot number produces a different reveal for every slot
- Produces a per-proposer, per-slot VRF output, which becomes the basis for proposals such as SSLE and EIP-7956
Who is affected
- Validators: The structure of the message being signed changes, but the act of signing itself stays the same, a single signature made with the private key as before. Blocks built the old way after the fork become invalid.
- Client teams: Requires implementing the process_randao verification logic in the beacon chain state transition and a new SSZ container, RandaoRevealSeed. Since this is a consensus rule change, it is applied via a hard fork.
- Protocol designers and researchers: Produces verifiable per-slot randomness, enabling the design of proposals that depend on randomness, such as single secret leader election (SSLE) or EIP-7956.
- Ordinary users: There is no directly perceptible change, but over the long term it reduces the scope for RANDAO bias attacks and opens a path toward MEV mitigation.
In depth
The new SSZ container RandaoRevealSeed
Defines a new SSZ container to serve as the message for the randao_reveal signature after the fork. It has two fields. previous_mix (Bytes32) is the previous epoch's final RANDAO mix, and slot (Slot) is the current slot number. randao_reveal effectively becomes VRF(sk, message), where message is the SSZ serialization of this container.
Changes to process_randao
The target of signature verification changes in process_randao within the beacon state transition. If epoch < FORK_EPOCH, it verifies against compute_signing_root of epoch under the DOMAIN_RANDAO domain, as before. After the fork, it obtains the previous epoch via get_previous_epoch(state), fetches that mix with get_randao_mix, builds RandaoRevealSeed(previous_mix, state.slot), and verifies its signing root with bls.Verify(proposer.pubkey, signing_root, body.randao_reveal). After verification, the mix is updated via mix = xor(get_randao_mix(state, epoch), hash(body.randao_reveal)), the same as before.
Why these inputs were chosen for the VRF
previous_mix is the core of this proposal. Since the previous epoch's final mix is only finalized once that epoch ends, a proposer cannot precompute the randao_reveal for a future epoch. slot ensures the reveal is unique per slot and unpredictable to other validators. Without slot, a validator selected to propose multiple times within one epoch would repeat the same reveal, which is undesirable for protocols like SSLE that require randomness unique to each instance.
Alternative considered: using the latest mix
Using the most recent RANDAO mix instead of the previous epoch's mix was considered, since it would also provide per-slot unpredictability, but it was not adopted because it could cause fork ambiguity if randao_reveal is later used to implement SSLE.
Security: the CDH assumption, no grinding
The security of using BLS signatures as a VRF relies on the computational Diffie-Hellman (CDH) assumption holding in the target group. This is a standard cryptographic assumption, and the signature output (a uniformly distributed G2 point in compressed form) can be treated as pseudorandom. The randao_reveal value is deterministic and cannot be manipulated, and since it is verified against the validator's public BLS key, it can only be computed with the corresponding private key. There is no element that can be ground. However, including the slot number does not currently give the signer per-slot unpredictability with respect to themselves, only with respect to other validators, so for now it is redundant, but it becomes essential once single secret leader election or EIP-7956 is implemented.
Backwards compatibility and status
Since this changes consensus rules, it is a backwards-incompatible change that must be activated via a scheduled network upgrade, that is, a hard fork. Blocks built after FORK_EPOCH without using the new RandaoRevealSeed structure are considered invalid, while blocks before the fork remain valid under the old rules. This EIP is currently in Draft status, so the specification may still change, and no decision on fork inclusion has been made so far.