# Inconsistent sequencer unexpected delay in DelayBuffer may harm users calling forceInclusion()

DelayBuffer depletion in Arbitrum SequencerInbox is non-deterministic: force-including the newest delayed message directly skips buffer decrease, delaying later forceInclusion by ~3x.

- Payout: Audit contest
- Severity: medium
- Program: Arbitrum Foundation
- Found by: 0x73696d616f
- Disclosed: 2024-06-17
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-05-arbitrum-foundation-findings/issues/55
- Library page: https://bugbountylibrary.com/r/c4%3A2024-05-arbitrum-foundation%3AM-01
- Tags: area:web3 domain:web3 impact:dos impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:dos

**Target:** SequencerInbox/DelayBuffer Solidity contracts
**Root cause:** Buffer decrease subtracts prevSequencedBlockNumber minus prevBlockNumber, so when multiple delayed messages are force-included at once (newest id), prevBlockNumber equals prevSequencedBlockNumber and no delay is accounted, leaving the buffer inflated.
**Steps:**
1. Deploy rollup with BufferConfig threshold=600, max=14400, replenishRateInBasis=714 and delayBlocks=2000.
2. Enqueue delayed message m1, roll +1100 blocks, enqueue m2, roll +2001 blocks.
3. Call `seqInbox.forceInclusion(delayedMessagesRead, ...)` directly on the newest message id; observe buffer stays at 14400 instead of depleting.
4. Repeat over 7 iterations; buffer remains 7320 vs 600 when including sequentially.
5. Enqueue another message, roll +601, call forceInclusion; it reverts with `ForceIncludeBlockTooSoon` because buffer not depleted.
**How found:** Code reading of DelayBuffer.update and SequencerInbox.forceInclusion; noticed buffer decrease uses prevSequencedBlockNumber - prevBlockNumber which is zero when newest message included directly, then wrote Foundry PoC comparing sequential vs direct inclusion.
**Exploitation:** Not an attack; a user force-including the newest delayed message directly (rather than sequentially including older ones first) leaves the delay buffer inflated, so subsequent forceInclusion calls revert with ForceIncludeBlockTooSoon until ~2000 blocks pass instead of 600, locking funds longer during sequencer outage.
**Escalation:** Repeated non-sequential force inclusions compound the un-depleted buffer, multiplying wait time (2000/600 ≈ 3.3x) for later users.
**Insight:** When auditing delay/censorship-budget accounting, check whether the delta used to decrement the buffer is computed from the same message id being included; including the newest id skips intermediate deltas, so test both sequential and direct inclusion paths for divergent state.

