A WRAP_ETH paying another address, and the router's own ETH settled in V4, are described wrongly #665

Open
opened 2026-10-21 05:15:35 +02:00 by clawbot · 0 comments
Collaborator

Seen by the review of #662.

Where

The swap decoder, decode() in src/shared/uniswap.js, the Moved from the sender lines of a WRAP_ETH and of a V4 SETTLE of native ETH.

What happens

  • A WRAP_ETH that pays another address, followed by an EXECUTE_SUB_PLAN, reads Moved to: The swap step that spends it, though the WETH goes to that address (its Paid to line does name it). The same wording appears when a permit's amount stands.
  • ETH the router holds from an earlier UNWRAP_WETH, then settled in a V4 step as "paid by the user", is shown as moved from the sender, though the router pays native ETH from its own balance and nothing more leaves the wallet.

What should happen

Every line states what the calldata does: a WRAP_ETH paying another address names that address as where it moves, and ETH the router already holds is never shown as leaving the wallet.

Severity: minor

Definition of done

  • A WRAP_ETH paying another address names it on its Moved to line.
  • A V4 settle of native ETH after an UNWRAP_WETH into the router is not shown as moved from the sender.
  • A test for each, failing on next.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/662. ## Where The swap decoder, `decode()` in `src/shared/uniswap.js`, the `Moved from the sender` lines of a `WRAP_ETH` and of a V4 `SETTLE` of native ETH. ## What happens - A `WRAP_ETH` that pays another address, followed by an `EXECUTE_SUB_PLAN`, reads `Moved to: The swap step that spends it`, though the WETH goes to that address (its `Paid to` line does name it). The same wording appears when a permit's amount stands. - ETH the router holds from an earlier `UNWRAP_WETH`, then settled in a V4 step as "paid by the user", is shown as moved from the sender, though the router pays native ETH from its own balance and nothing more leaves the wallet. ## What should happen Every line states what the calldata does: a `WRAP_ETH` paying another address names that address as where it moves, and ETH the router already holds is never shown as leaving the wallet. Severity: minor ## Definition of done - [ ] A `WRAP_ETH` paying another address names it on its `Moved to` line. - [ ] A V4 settle of native ETH after an `UNWRAP_WETH` into the router is not shown as moved from the sender. - [ ] A test for each, failing on `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-21 05:15:35 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#665