# block.number on Robinhood: Ethereum's height, not Robinhood's

Inside a Robinhood contract, `block.number` returns an Ethereum block number, not Robinhood's. In 6,000 Robinhood mainnet blocks we read on 2026-11-26 it changed every 14 to 16 seconds while Robinhood made a block every 0.16 seconds, so about 90 Robinhood blocks share each value. Robinhood's own height comes from `ArbSys(address(100)).arbBlockNumber()`. It is also the `blockNumber` in receipts, explorers and `eth_blockNumber`, and it is what Randoo, Chainlink's Arbitrum coordinator and D20DAO record as a VRF request's block.

## Three numbers for one block

Robinhood runs Arbitrum Nitro. Robinhood's [Differences from Ethereum](https://docs.robinhood.com/chain/differences-from-ethereum) page says `block.number` "returns an estimate of the L1 (Ethereum) block number" that "updates only periodically", and that contracts should not use it "as a per-block counter". Here is one Robinhood block read all three ways:

| Value | Where a contract or a script reads it | At Robinhood block 123,507,024 |
| --- | --- | --- |
| Robinhood's block number | `ArbSys.arbBlockNumber()`; `blockNumber` in receipts and on the explorer; `eth_blockNumber` | 123,507,024 |
| `block.number` | Solidity; the block header's `l1BlockNumber` field over RPC | 26,497,754 |
| Ethereum's latest block at that moment | an Ethereum RPC | 26,497,755 |
| `block.timestamp` | Solidity; the header's `timestamp` | 1,795,676,644 (2026-11-26 07:04:04 UTC) |

At 10 blocks spread across the range, we ran `block.number`, `block.timestamp` and `arbBlockNumber()` in an `eth_call` and compared them with the header. All 10 matched: `block.number` is the header's `l1BlockNumber`.

## How block.number moves: measured on mainnet

We read every header from Robinhood block 123,504,147 to 123,510,146 (06:56:18 to 07:12:40 UTC on 2026-11-26) and Ethereum blocks 26,497,690 to 26,497,811 over the same minutes.

| | Measured |
| --- | --- |
| Robinhood block time | 0.164 s on average; 3 to 10 blocks in each second |
| Distinct `block.number` values in 982 seconds | 66 |
| Time between updates | 14 to 16 s, median 15 s |
| Robinhood blocks with the same `block.number` | 82 to 103, median 91 |
| Size of each update | +1 at 49 updates, +2 at 16 |
| Ethereum block numbers never returned | 16 of 81 (Ethereum missed no slot in the window) |
| Age of the Ethereum block `block.number` named | 4 to 33 s, median 18 s |
| Newer Ethereum blocks already out | none in 15% of Robinhood blocks, one in 67%, two in 18% |

The value moves about every 15 seconds while Ethereum makes a block every 12. It drifts behind and then catches up by skipping a number. Arbitrum's own [block numbers and time](https://docs.arbitrum.io/time) page says it syncs "every 13 to 15 seconds (occasionally longer)", which matches what we saw.

## blockhash on Robinhood is not Ethereum's

`blockhash(n)` takes the Ethereum-sized numbers that `block.number` returns, but the hashes it returns belong to Robinhood blocks. Ethereum block 26,497,844 has hash `0xfaffa922…`. Robinhood's `blockhash(26497844)`, read one Ethereum block later, returned `0x5ad9df3c…`. We read `blockhash(n)` 80 times, at the same 10 blocks, for `n` from `block.number - 1` to `block.number - 60`:

| Result | Reads |
| --- | --- |
| The hash of the last Robinhood block whose `block.number` was `n` | 62 |
| `n` was a skipped number; the hash of a Robinhood block from 256 Ethereum numbers earlier, about 51 minutes before | 18 |
| Ethereum's hash for `n` | 0 |

The second row comes from how Nitro stores these hashes: a ring of 256 slots, written once each time `block.number` moves ([`arbos/blockhash/blockhash.go`](https://github.com/OffchainLabs/nitro/blob/master/arbos/blockhash/blockhash.go)). A jump of 2 writes the new number's slot and leaves the skipped one alone, so the skipped slot still holds the hash written 256 numbers earlier. We checked 8 of those reads against the headers of the older blocks, and all 8 matched.

`ArbSys.arbBlockHash(n)` takes Robinhood block numbers instead, and only the last 256 of them: about 42 seconds at the measured block time. Asking for block 257 back reverts with `InvalidBlockNumber`.

For randomness this rules out the usual commit-reveal shortcut: commit now and roll from `blockhash(block.number + 1)` later. On Robinhood that hash comes from a block the sequencer built. In our window, one Ethereum number in five returned a hash that had been public for 51 minutes. Robinhood's docs already say not to use `blockhash` "as a randomness source", and `block.prevrandao` is the constant 1 there ([Is block.prevrandao random?](/docs/prevrandao)).

## What VRF coordinators count on Robinhood

**Randoo.** On Robinhood the coordinator takes the request block, the confirmations and the oracle rotation window from `arbBlockNumber()`, and the block hash bound into the seed from `arbBlockHash`. On-chain, request 12 has `requests(12).requestBlock` 122,962,049, the same as its transaction receipt's `blockNumber`. The receipt's `l1BlockNumber` was 26,491,498. It was fulfilled 8 Robinhood blocks later, in the same second. Counted in `block.number`, both transactions would have had the same number. The Chainlink wrapper interface accepts 1 to 200 `requestConfirmations`. On Robinhood that is 1 to 200 Robinhood blocks, at most about 33 seconds, not 200 Ethereum blocks (40 minutes) ([how many to use](/docs/request-confirmations)). Ronin-interface requests wait one block.

**Chainlink VRF.** Chainlink does not deploy VRF on Robinhood ([VRF on Robinhood](/docs/robinhood)), but code ported from it does run there. In `@chainlink/contracts` 1.5.0, `VRFCoordinatorV2_5_Arbitrum` overrides `_getBlockNumber` with `ARBSYS.arbBlockNumber()` and `_getBlockhash` with `ARBSYS.arbBlockHash`. The `ChainSpecificUtil` library makes the same switch only when `block.chainid` is 42161, 421613 or 421614 (Arbitrum One and its two testnets). `VRFCoordinatorV2` and the blockhash stores (`BlockhashStore`, `BatchBlockhashStore`, `TrustedBlockhashStore`) read block numbers and hashes through that library. On Robinhood, chain ID 4663, the check fails, and they fall back to `block.number` and `blockhash`.

**D20DAO.** Its post of 2026-11-23, [Which Block Number Does a Robinhood Chain VRF Request Use?](https://d20dao.org/blog/robinhood-vrf-block-number-clocks), says its Robinhood coordinator stores the ArbSys height as the request block and reverts rather than falling back to `block.number` if ArbSys fails. It also says the request deadline comes from `block.timestamp`, in seconds.

## Deadlines: count seconds

A betting window written as `block.number + 300` by someone who expects Robinhood's 0.16-second blocks lasts 300 Ethereum blocks: about an hour. It can only end at one of the 15-second updates. Written as `arbBlockNumber() + 300`, it lasted about 49 seconds at the rate we measured, but Robinhood makes blocks as traffic arrives (3 to 10 a second in our window), so the length varies.

`block.timestamp` is in seconds, which is what players see. The sequencer sets it from its own clock. Arbitrum's docs say it never goes below the previous block's timestamp and stays within 24 hours before and 1 hour after the current time. Several Robinhood blocks share each second, so use it for windows measured in seconds or more, not to order transactions within a second.

## A round that closes by time, tested

`TimedRound` takes entries until a deadline in seconds, then anyone can draw. It requests one Randoo seed and records the draw's block height for indexers. `ChainHeight` returns Robinhood's block number on Nitro chains and `block.number` elsewhere. It detects Nitro by code at address `100`, not by chain ID, so it cannot miss a chain the way `ChainSpecificUtil` misses Robinhood. Nitro puts one byte, `0xfe`, at its precompiles. We read `0xfe` at that address on Robinhood mainnet and testnet, and no code there on Ronin and Base mainnet.

Put the two files from the [quickstart](/docs/quickstart) at `src/RandooConsumerRonin.sol` and `src/interfaces/IRoninVRFCoordinatorForConsumers.sol`, then add this one. Deploy it with `0xC66eB2e7EE91145875000Ad46B55600000000001` on any network.

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {RandooConsumerRonin} from "./RandooConsumerRonin.sol";

interface IArbSys {
    function arbBlockNumber() external view returns (uint256);
}

/// @notice This chain's own block height. On Arbitrum Nitro chains such as Robinhood,
///         `block.number` is an estimate of Ethereum's height; ArbSys at 0x64 has the chain's own.
abstract contract ChainHeight {
    IArbSys private constant ARB_SYS = IArbSys(address(100));
    /// @dev Nitro puts one byte of code (0xfe) at its precompiles. Ronin, Base and Ethereum have none at 0x64.
    bool private immutable NITRO = address(ARB_SYS).code.length != 0;

    function _height() internal view returns (uint256) {
        return NITRO ? ARB_SYS.arbBlockNumber() : block.number;
    }
}

/// @notice A round that closes at a time, not a block, then draws one winner from a VRF seed.
contract TimedRound is RandooConsumerRonin, ChainHeight {
    uint256 public constant CALLBACK_GAS = 50_000;

    uint256 public immutable closesAt; // unix seconds
    address[] public players;
    bytes32 public reqHash;
    uint256 public drawHeight; // this chain's block number of the draw request
    address public winner;

    error Closed();
    error StillOpen();
    error AlreadyDrawn();
    error NoPlayers();
    error UnknownRequest();

    event DrawRequested(bytes32 indexed reqHash, uint256 height);
    event Won(address indexed player);

    constructor(address coordinator, uint256 openForSeconds) RandooConsumerRonin(coordinator) {
        closesAt = block.timestamp + openForSeconds;
    }

    function enter() external {
        if (block.timestamp >= closesAt) revert Closed();
        players.push(msg.sender);
    }

    /// @notice Anyone can draw once the round has closed. Send the quoted fee.
    function draw() external payable {
        if (block.timestamp < closesAt) revert StillOpen();
        if (reqHash != 0) revert AlreadyDrawn();
        if (players.length == 0) revert NoPlayers();
        drawHeight = _height();
        reqHash = _requestRandomness(msg.value, CALLBACK_GAS, tx.gasprice, msg.sender);
        emit DrawRequested(reqHash, drawHeight);
    }

    function _fulfillRandomSeed(bytes32 h, uint256 seed) internal override {
        if (h != reqHash || winner != address(0)) revert UnknownRequest();
        winner = players[seed % players.length];
        emit Won(winner);
    }
}
```

Quote the fee with `estimateRequestRandomFee(50000, gasPrice)` and send it with `draw()`. The callback needs at most 33,229 gas with solc 0.8.30 and 32,377 with 0.8.38 via-IR, measured with the binary search from [How to set a VRF callback gas limit](/docs/callback-gas). That holds whatever the number of players, so `CALLBACK_GAS` is the coordinator's minimum, 50,000. If the callback ever fails, the seed stays readable with `seedOf(reqHash)` ([When a VRF callback reverts](/docs/failed-callback)).

A plain `forge test` has no ArbSys, so the code above takes the `block.number` branch. To test the Robinhood branch, put a byte of code at address `100` before deploying and mock the call. On a Robinhood fork, the mock is the part that counts:

```solidity
function _nitro(uint256 l2Height) internal {
    vm.etch(address(100), hex"fe");
    vm.mockCall(address(100), abi.encodeCall(IArbSys.arbBlockNumber, ()), abi.encode(l2Height));
}

function test_closesOnTimeWhileBlockNumberStandsStill() public {
    vm.warp(1_795_676_644);
    vm.roll(26_497_754); // what block.number returns on Robinhood
    _nitro(123_507_024);
    TimedRound r = _round(30); // three players enter
    uint256 fee = _fee();

    vm.warp(block.timestamp + 29); // block.number has not moved; the round is still open
    vm.prank(address(0xD4));
    r.enter();
    vm.expectRevert(TimedRound.StillOpen.selector);
    r.draw{value: fee}();

    vm.warp(block.timestamp + 1); // closed at 30 seconds, whatever block.number says
    vm.prank(address(0xE5));
    vm.expectRevert(TimedRound.Closed.selector);
    r.enter();
    r.draw{value: fee}();
    assertEq(r.drawHeight(), 123_507_024); // Robinhood's block, as the coordinator records it
}
```

The full suite has 8 tests against the quickstart's mock coordinator: draw height with and without ArbSys, the time-based close, the winner from the seed, one draw only, no draw without players, only the coordinator fulfills, and no second seed. All 8 pass with solc 0.8.30 and 0.8.38.

## Check it yourself

Each command reads one value from the latest Robinhood block. The second and third commands print the same Ethereum-sized number:

```bash
RPC=https://rpc.mainnet.chain.robinhood.com
B=$(cast block-number --rpc-url $RPC)                        # Robinhood's block number
cast call --rpc-url $RPC --block $B --create 0x436000524260205260406000f3   # block.number, block.timestamp
cast rpc eth_getBlockByNumber $(cast to-hex $B) false --rpc-url $RPC | jq -r .l1BlockNumber | cast to-dec
cast call 0x0000000000000000000000000000000000000064 "arbBlockNumber()(uint256)" --rpc-url $RPC --block $B
cast call 0x0000000000000000000000000000000000000064 "arbBlockHash(uint256)(bytes32)" $((B - 1)) --rpc-url $RPC --block $B
```

The init code `0x436000524260205260406000f3` runs `NUMBER` and `TIMESTAMP` and returns both. To read `blockhash(n)` the same way, use `0x63` + `n` as 8 hex digits + `4060005260206000f3`. Compare the result with `cast block <n> -f hash` on an Ethereum RPC: the two will differ.

| If you have | Read |
| --- | --- |
| A Robinhood game that rolls with `blockhash` or `prevrandao` | [VRF on Robinhood](/docs/robinhood), then the [quickstart](/docs/quickstart) |
| A consumer written for Chainlink VRF v2.5 | [Migrate from Chainlink VRF v2.5](/docs/chainlink-wrapper) |
| A D20DAO consumer | [Migrate from D20DAO](/docs/d20dao) |
| Several draws open at once | [Several VRF requests at once](/docs/concurrent-requests) |

_Updated 2026-11-27._
