# Attacker can continuously create games for not yet safe l2 blocks to prevent the update of anchor state

Attacker pre-creates dispute games for unsafe L2 blocks, occupying unique UUIDs so honest proposals for the same root revert, blocking anchor-state updates and withdrawals.

- Payout: Audit contest
- Severity: medium
- Program: Optimism
- Found by: xuwinnie
- Disclosed: 2024-08-16
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-07-optimism-findings/issues/6
- Library page: https://bugbountylibrary.com/r/c4%3A2024-07-optimism%3AM-11
- Tags: area:web3 domain:web3 impact:dos impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm vuln:business-logic vuln:dos

**Target:** DisputeGameFactory.create / FaultDisputeGame proposal flow
**Root cause:** Game UUID is derived only from gameType, rootClaim and extraData, not parentHash, so a game created for an unsafe block's root occupies the UUID and blocks the later honest proposal of the same root once the block is safe.
**Steps:**
1. Attacker observes unsafe L2 block and its output root before it becomes safe.
2. Attacker calls `create(gameType, rootClaim, extraData)` for that root, then in the same tx makes an attack move to avoid losing the bond (`0.08 + 0.08 = 0.16 ETH`).
3. When the block becomes safe, honest party calls `create` with the same rootClaim; `getGameUUID` returns the same hash and `GameAlreadyExists` reverts.
4. Repeat for every unsafe block to keep all UUIDs occupied; honest root can never be defended, anchor state never updates, L2 funds frozen.
**How found:** Reading `create` and noticing the UUID uniqueness check uses only gameType/rootClaim/extraData; realized the same root can be proposed while unsafe and again when safe, colliding on UUID.
**Exploitation:** Attacker front-runs the batcher/proposer by creating a game for each unsafe block's output root and immediately countering it in the same transaction to preserve the bond; capital locked ~10.5 days per game (game clock 3.5d + WETH delay 7d). Estimated ~72,576 ETH capital to sustain at 2s blocks, or a few txs per hour against the hourly proposer.
**Escalation:** Scaling to every unsafe block (or front-running batcher txs via mempool) to sustain the block indefinitely; attacker could also short $OP on the resulting panic.
**Insight:** When a uniqueness key gates a permissionless action, check whether the key omits context (like parentHash) that distinguishes a premature vs. valid submission — an attacker can squat the key before the legitimate state exists.

## Proof of concept (copied exactly from the original report)

**create() reverts on duplicate UUID**

```
// Compute the unique identifier for the dispute game.
        Hash uuid = getGameUUID(_gameType, _rootClaim, _extraData);

        // If a dispute game with the same UUID already exists, revert.
        if (GameId.unwrap(_disputeGames[uuid]) != bytes32(0)) revert GameAlreadyExists(uuid);
```

