# Loss of bond amounts on re-org attacks

Optimism dispute game move()/attack()/defend() identify claims only by parentIndex, so a block reorg can swap the challenged claim and let an attacker steal honest challengers' bonds.

- Payout: Contest reward
- Severity: medium
- Program: Optimism 2024
- Credited: MiloTruck
- Disclosed: 2024-02-08
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-02-optimism-2024-judging/issues/201
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-02-optimism-2024%3AM-4
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:evm technique:race-window technique:source-review vuln:business-logic

**Target:** Fault dispute game contract
**Root cause:** Moves reference the challenged claim only by parentIndex, not by claim hash/position, so a reorg that replaces the claim at that index makes the submitted commitment target a different claim.
**Steps:**
1. Attacker submits an invalid claim hash at some index.
2. Honest defenders rush to call attack()/defend()/move() with that parentIndex and their commitment (only first defender wins the bond, so they don't wait for finality).
3. A block reorg occurs before defender TXs are finalized.
4. Attacker replaces the invalid claim at that index with a valid claim hash.
5. Defender TXs land on the now-valid claim, making their commitment wrong; attacker collects the defenders' bonds.
**How found:** Code reading of the dispute game's move/attack/defend functions revealed they identify the target claim only by parentIndex rather than by claim hash and position, making the commitment ambiguous across reorgs.
**Exploitation:** Attacker posts a honeypot invalid claim, waits for defenders to submit challenge TXs referencing its index, then reorgs the chain to substitute a valid claim at that index so defenders' moves are misapplied and their bonds are forfeited to the attacker.
**Escalation:** Bond size grows with game depth, so losses scale; repeated honeypot claims can harvest many defenders' bonds.
**Insight:** When a function references on-chain state by index rather than by content hash, ask what happens if that index's content changes between signing and inclusion (reorg, front-run, state mutation); bind the commitment to the exact hash and position.
