Reproduced Exploit

Bebop Router: exactIn settle pays the relayer instead of the user

The user signs a router order for 1000 USDC in and a 0.5 WETH quote, with limitAmount 0. The hash does not include the PMM calldata. The relayer submits a PMM order whose receiver is the relayer. The router pulls the user's USDC, the maker sends 0.5 WETH to the relayer, and the exactIn minimum chec…

Jun 2026•Ethereum•logic•4 min read

Loss

User pays 1000 USDC and receives 0 WETH. Relayer receives 0.5 WETH

Chain

Ethereum

Category

logic

Date

Jun 2026

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 66835-beboproutersettle-lets-relayers-steal-exactin-user-input-by. Standalone Foundry PoC and full write-up: 66835-beboproutersettle-lets-relayers-steal-exactin-user-input-by_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/missing-check

Key info#

FieldValue
LossUser pays 1000 USDC and receives 0 WETH. Relayer receives 0.5 WETH
Vulnerable contractBebopRouter.settle
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit
Attack txExploit.run()
Chain / block / dateEthereum model · local · 2026-06
Compilersolc 0.8.27, cancun
Bug classPMM calldata omitted from the signed hash, and exactIn has no output floor

TL;DR#

The user signs a router order for 1000 USDC in and a 0.5 WETH quote, with limitAmount 0. The hash does not include the PMM calldata. The relayer submits a PMM order whose receiver is the relayer. The router pulls the user's USDC, the maker sends 0.5 WETH to the relayer, and the exactIn minimum check is skipped because limitAmount is not negative.

Background#

Cyfrin's 12 June 2026 Bebop Router review. The report's redirect proof expects the user to spend 1000 USDC, receive 0 WETH, and the attacker to receive 0.5 WETH. Bebop fixed it in commit 9db95bc.

The vulnerable code#

SOLIDITY
return keccak256(abi.encode(o.fromAmount, o.toAmount, o.limitAmount, o.fromToken, o.toToken, o.tokensOwner, o.receiver, o.routerNonce));
// ...
require(ERC20(order.toToken).transferFrom(pmm.maker, pmm.receiver, pmm.makerAmount), "maker");
require(!isExactOut || receiverAmount >= toAmountAfterFeeSlippage, "LimitAmountViolation"); // @> VULN: exactIn skips the quote floor
DIFF
- require(!isExactOut || receiverAmount >= toAmountAfterFeeSlippage, "LimitAmountViolation");
+ require(receiverAmount >= toAmountAfterFeeSlippage, "LimitAmountViolation");

The report also requires the decoded PMM receiver to be the router.

Root cause#

Two checks that would have stopped the redirect are both absent. The signature does not bind the PMM receiver, and an exactIn order with limitAmount == 0 treats a zero router balance as acceptable.

Preconditions#

  • The user has signed an exactIn order with limitAmount 0 and has approved the router for 1000 USDC.
  • A maker can pay 0.5 WETH and the relayer sets the PMM receiver to the relayer.
  • The router signer and the user both accept the same order hash. This reduction checks the user hash only.

Attack walkthrough#

  1. The user commits the hash of the router fields. The PMM bytes are not in it.
  2. The relayer calls settle with receiver = relayer and makerAmount = 0.5 ether.
  3. The hash check passes.
  4. The router pulls 1000 USDC from the user.
  5. The maker's 0.5 WETH is transferred to the relayer.
  6. The router's WETH balance is 0. The exactIn floor is skipped. The user receives nothing.

Diagrams#

flowchart TD A["User signs 1000 USDC for a 0.5 WETH quote"] --> B["Hash omits the PMM calldata"] B --> C["Relayer sets the PMM receiver to themselves"] C --> D["Router pulls 1000 USDC"] D --> E["Maker WETH is sent to the relayer"] E --> F["VULN exactIn floor is skipped"] F --> G["User WETH is 0 and relayer holds 0.5 WETH"]

Impact#

The user loses the 1000 USDC they authorized and receives 0 WETH. The relayer receives the 0.5 WETH the quote described. The router's USDC balance is 1000e6.

Remediation#

Require the delivered output to meet toAmountAfterFeeSlippage for exactIn as well as exactOut, and require the PMM receiver to be the router before the external settlement.

How to reproduce#

BASH
cd 66835-beboproutersettle-lets-relayers-steal-exactin-user-input-by_exp
forge test -vv

test_exploit_relayer_takes_half_weth_user_gets_zero asserts the user at 0 USDC and 0 WETH, and the relayer at 0.5 WETH. Captured output is output.txt.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.