# Theft of initial bonds from proposers who are using smart wallets

DisputeGameFactory records tx.origin as claimant, so an attacker frontrunning a smart-wallet proposer's execTransaction becomes claimant and collects the honest proposer's initial bond.

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

**Target:** DisputeGameFactory / FaultDisputeGame bond initialization
**Root cause:** FaultDisputeGame sets claimant to tx.origin instead of the factory's msg.sender, so the bond recipient is whoever originates the transaction, not the smart-wallet signer who authorized it.
**Steps:**
1. Proposer using a Gnosis Safe signs execTransaction() calling DisputeGameFactory.create() with msg.value = initial bond.
2. Attacker scans mempool, copies the signed calldata, and submits the same execTransaction() call from their own EOA.
3. Safe validates signatures and forwards msg.value to the factory; tx.origin is now the attacker.
4. FaultDisputeGame records claimant = attacker EOA.
5. On honest root resolution, the bond is refunded to the attacker instead of the proposer.
**How found:** Code reading of the ClaimData initialization noticing claimant: tx.origin, combined with knowledge that smart wallets accept authenticated calls from any relayer, yielding a mempool frontrun.
**Exploitation:** Frontrun the victim's signed smart-wallet transaction from an attacker EOA; the wallet executes the authenticated call, the factory forwards the bond, and tx.origin registers the attacker as claimant who later receives the refunded bond.
**Insight:** When a contract credits refunds/bonds to tx.origin, any relayer-agnostic smart wallet (Safe execTransaction) becomes a frontrun target: the signer authorizes, but the relayer becomes the beneficiary. Check tx.origin usage wherever value is later returned.
