# The LPP proposer may not be reimbursed their gas costs by the bonds at MAX_GAME_DEPTH because step() does not check if the LPP proposer is the one that called it

Permissionless step() grants the FDG bond to msg.sender, letting an attacker squeeze an honest LPP proposer's preimage and steal their gas reimbursement.

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

**Target:** FaultDisputeGame.step() / PreimageOracle LPP
**Root cause:** step() assigns parent.counteredBy = msg.sender without checking who proposed/loaded the preimage data it consumes, so the bond goes to whoever calls step() first rather than the LPP proposer.
**Steps:**
1. Alice at MAX_GAME_DEPTH needs to counter Bob's false claim; she calls initLPP/addLeavesLPP on PreimageOracle, spending ~150M gas.
2. After the LPP challenge period, Bob calls `squeezeLPP()` to finalize Alice's LPP.
3. Bob immediately calls `step(_claimIndex,_isAttack,_stateData,_proof)` using Alice's preimage data.
4. step() succeeds, sets `parent.counteredBy = msg.sender` (Bob), paying the large MAX_GAME_DEPTH bond to Bob.
5. Alice is not reimbursed her LPP gas costs.
**How found:** Read the Optimism bond-incentive specs (FDG bonds sized to cover max-size LPP gas) and noticed step() is permissionless and pays msg.sender, while the LPP proposer is a different party.
**Exploitation:** Attacker monitors for a finalized LPP, calls squeezeLPP() then step() with the proposer's preimage proof to capture the FDG bond before the honest proposer does.
**Insight:** When a bond/reward is meant to reimburse a costly off-chain/on-chain setup (like LPP proposal), check whether the payout function credits msg.sender or the actual data provider; front-runnable permissionless finalizers can steal the reimbursement.

