# Is block.prevrandao random on Ronin, Base and Robinhood?

No. On Robinhood `block.prevrandao` is the constant 1. On Ronin and Base, both OP Stack chains, it is the RANDAO value of an Ethereum block that was already public when the block was built: about one minute earlier on Ronin and three minutes earlier on Base in our measurements. Anyone who reads Ethereum knows the value before the block exists, so a roll that hashes `prevrandao` can be computed in advance by every player.

## What prevrandao returns on each chain

We read opcode `0x44` (`block.prevrandao`, formerly `block.difficulty`) with `eth_call` at every block in a recent range on each mainnet on 2026-11-25, and compared it with the block header and with Ethereum.

| | Ronin | Base | Robinhood |
| --- | --- | --- | --- |
| Chain type | OP Stack L2 since 2026-05-12 | OP Stack L2 | Arbitrum Nitro chain |
| `block.prevrandao` is | The RANDAO (`mixHash`) of the block's Ethereum L1 origin | The RANDAO (`mixHash`) of the block's Ethereum L1 origin | The constant 1 |
| Blocks read | 60, from 64,060,876 to 64,060,935 | 150, from 62,001,820 to 62,001,969 | 150, from 122,863,495 to 122,863,644 |
| Distinct values | 11 | 3 | 1 |
| Consecutive blocks with the same value | 6 (12 seconds of 2-second blocks) | 60 (12 seconds of 0.2-second blocks) | every block |
| Age of the Ethereum value when the block was built | 62 to 72 s, median 68 s | 173 to 184 s, median 179 s | not applicable |
| Values matching the L1 origin's `mixHash` | 60 of 60 | 150 of 150 | not applicable |

One value served both chains. Ethereum block 26,490,612 was produced at 07:09:47 UTC with RANDAO `0xf80d0874…16fed77`. Ronin blocks 64,060,931 to 64,060,936 returned it as `block.prevrandao` from 07:10:49, and Base returned it around block 62,001,969 at 07:12:49.

## Why: where each chain takes the value from

**Ronin and Base.** An OP Stack block's `prevrandao` is copied from its L1 origin, the Ethereum block the sequencer attaches it to: the spec sets `random` to the L1 origin's `prev_randao` attribute ([OP Stack derivation spec](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/derivation.md)). Each Ethereum block lasts 12 seconds, so every L2 block in that window gets the same value. The L1 origin can only stay the same or move forward by one block from one L2 block to the next ("the L1 origin cannot change by more than one L1 block per L2 block", same spec), and it trails Ethereum's head by design. Ronin moved from a sovereign L1 to the OP Stack on 2026-05-12, with Conduit running the migration ([Ronin blog, 2026-05-13](https://blog.roninchain.com/p/ronin-is-home)). Code written before that for Ronin's old chain, and articles about it, no longer describe what `prevrandao` returns there. Both RPCs report an OP Stack execution client: `conduit-op-reth` on Ronin and Base's `reth` build.

**Robinhood.** Robinhood runs Arbitrum Nitro. Arbitrum's docs list `block.prevrandao` and `block.difficulty` as "Returns the constant 1" ([Arbitrum Solidity support](https://docs.arbitrum.io/build-decentralized-apps/arbitrum-vs-ethereum/solidity-support)), and Robinhood's own docs say both "return a constant value on Robinhood Chain and are not a source of randomness" ([Differences from Ethereum](https://docs.robinhood.com/chain/differences-from-ethereum)). Every block we read returned 1. `block.number` there is Ethereum's height and `blockhash` returns Robinhood hashes, some of them 51 minutes old ([block.number on Robinhood](/docs/block-number)).

**Ethereum itself.** On Ethereum, `prevrandao` is the beacon chain's RANDAO mix. A block's proposer knows it before building the block and can skip the slot to throw away an outcome it does not like, which [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399) describes as roughly one bit of influence. That is the value Ronin and Base then reuse a minute or more later.

## What a player can do with it

Take a coin flip that hashes `prevrandao` with the player's address:

```solidity
function flip(bool heads) external payable {
    bool result = uint256(keccak256(abi.encode(block.prevrandao, msg.sender))) % 2 == 0;
    if (result == heads) payable(msg.sender).transfer(msg.value * 2);
}
```

On Robinhood every player knows the outcome forever. On Ronin and Base the next block's `prevrandao` is the RANDAO of the current L1 origin or of the Ethereum block after it, and both are already on Ethereum. This script reads both candidates and prints the flip each one gives:

```ts
import { createPublicClient, encodeAbiParameters, getAddress, http, keccak256, parseAbi } from "viem";
import { mainnet, ronin } from "viem/chains";

const player = getAddress(process.argv[2]); // the address that would call flip()
const l2 = createPublicClient({ chain: ronin, transport: http("https://api.roninchain.com/rpc") });
const l1 = createPublicClient({ chain: mainnet, transport: http("https://ethereum-rpc.publicnode.com") });

// The L1 origin of the latest block. The next block uses this one or the one after it.
const origin = await l2.readContract({
  address: "0x4200000000000000000000000000000000000015",
  abi: parseAbi(["function number() view returns (uint64)"]),
  functionName: "number",
});
for (const blockNumber of [origin, origin + 1n]) {
  const { mixHash } = await l1.getBlock({ blockNumber });
  const roll = BigInt(keccak256(encodeAbiParameters([{ type: "uint256" }, { type: "address" }], [BigInt(mixHash), player]))) % 2n;
  console.log(blockNumber, mixHash, roll === 0n ? "heads" : "tails");
}
```

We ran this check 25 times on each chain on 2026-11-25, with viem 2.57, and compared the prediction with the next block. The next block's `prevrandao` was one of the two candidates 25 of 25 times on Ronin (18 times the current origin, 7 times the next one) and 25 of 25 times on Base (always the current origin). When both candidates give the same flip, the player knows the result outright. When they differ, the player waits: the same value holds for 6 Ronin blocks or 60 Base blocks, and the coming values are public a minute or more ahead.

Mixing in `block.timestamp`, `block.number` or a nonce changes nothing, since those are known too. Hashing in a value from the player only lets the player choose it.

## Committing to a future block's prevrandao

A common fix on Ethereum is to record a bet now and settle it with the `prevrandao` of a block several blocks later. It does not carry over to these chains:

- On Robinhood the later value is still 1.
- On Ronin and Base the later value is the RANDAO of an Ethereum block. The sequencer chooses which Ethereum block is the L1 origin, within the spec's limits, from values that are already public, so the single operator that builds the blocks can steer which value a given block gets.
- Every block in the same 12-second window gets the same value, so two bets settled a few blocks apart can share one "random" number.

## What to use instead

Use a VRF. The game asks an oracle for a random number in one transaction, and the number arrives with a proof in a later one, so nobody can read it while the bet is open and the oracle cannot pick a different one. On Randoo the seed is bound to the request block's hash, the request ID, your contract's address and the oracle's key hash, and the coordinator checks the proof on chain before it calls your contract. Randoo runs at `0xC66eB2e7EE91145875000Ad46B55600000000001` on Ronin, Base and Robinhood.

| You have | Read |
| --- | --- |
| A game rolling with `prevrandao` or `blockhash` | [Quickstart](/docs/quickstart) |
| A game on Robinhood | [VRF on Robinhood](/docs/robinhood) |
| A game on Base | [VRF on Base](/docs/base) |
| A game on Ronin using native Ronin VRF | [Migrate from Ronin VRF](/docs/ronin) |
| A loot box, raffle, dice game or NFT reveal | [Loot box](/docs/loot-box), [Raffle](/docs/raffle), [Dice game](/docs/dice), [NFT reveal](/docs/nft-reveal) |

## Check it yourself

Each line reads one value. Run it against any block, on Ronin or Base, and the first and last lines print the same hash:

```bash
RPC=https://api.roninchain.com/rpc   # or https://base-rpc.publicnode.com
B=$(cast block-number --rpc-url $RPC)
cast call --rpc-url $RPC --block $B --create 0x4460005260206000f3   # block.prevrandao at block B
L1=$(cast call 0x4200000000000000000000000000000000000015 "number()(uint64)" --rpc-url $RPC --block $B | cut -d' ' -f1)
cast block $L1 -f mixHash --rpc-url https://ethereum-rpc.publicnode.com   # RANDAO of the L1 origin
```

The init code `0x4460005260206000f3` runs `PREVRANDAO`, stores the result and returns it. On Robinhood (`https://rpc.mainnet.chain.robinhood.com`) the same `cast call` returns `0x…01`.

_Updated 2026-11-26._
