# Griefing attacks on handleOps and multiSend logic

EntryPoint.handleOps and MultiSend revert the whole batch if one op fails, letting an attacker front-run a relayer to grief gas fees.

- Payout: Contest reward
- Severity: medium
- Program: Biconomy
- Credited: V\_B
- Disclosed: 2023-03-03
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-01-biconomy-findings/issues/499
- Library page: https://bugbountylibrary.com/r/c4%3A2023-01-biconomy%3AM-01
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:race-window technique:source-review vuln:business-logic vuln:dos

**Target:** ERC-4337 EntryPoint handleOps and MultiSend library
**Root cause:** handleOps and multiSend execute arrays atomically; a single failing UserOperation or sub-transaction reverts the entire batch, so a front-runner can invalidate a relayer's whole bundle.
**Steps:**
1. Relayer offchain-verifies a batch of UserOperations and submits `handleOps(ops, beneficiary)` to mempool.
2. Attacker observes the pending tx and front-runs with `handleOps` containing only the last UserOperation from the relayer's batch.
3. Attacker's tx executes that op and collects its fee.
4. Relayer's tx now reverts on the already-consumed op, wasting gas for all other ops in the batch.
**How found:** Code reading of handleOps and multiSend revealed atomic all-or-nothing execution; reasoned that a front-runner could invalidate a relayer bundle by pre-executing one op.
**Exploitation:** Attacker front-runs the relayer's handleOps with a single-op handleOps reusing the last op, capturing that op's fee while the relayer's full-batch tx reverts after consuming gas.
**Insight:** In batch/atomic AA entrypoints, check whether an attacker can pre-execute a single element of a pending bundle to force the rest to revert; the last op is the cheapest to replay.
