A WRAP_ETH can name a swap step no step is, or take the transaction's ETH with no line #747

Closed
opened 2026-11-03 14:03:35 +01:00 by clawbot · 0 comments
Collaborator

Where

The swap decoder, decode() in src/shared/uniswap.js, the lines of a WRAP_ETH.

What happens

Found by the reviews of #725; the same on next before that PR. Read from the code; not run on a chain.

  • A WRAP_ETH into the router followed by a SWEEP of that WETH to another address reads Moved to: The swap step that spends it, though no swap step spends it. Paid to names the address.
  • A WRAP_ETH of CONTRACT_BALANCE to another address pays that address all the ETH the transaction carries, with no Moved from the sender line. The approval screen's Value line gives that ETH.

What should happen

Every line states what the calldata does.

Severity: minor

Definition of done

  • When no later swap step spends the WETH, that Moved to line reads The router.
  • A later WRAP_ETH of CONTRACT_BALANCE to anyone but the router gets a Moved from the sender line reading All the ETH the transaction carries, and names the recipient on Moved to.
  • Rows in tests/uniswap.test.js, failing on next. Uniswap's own routes read as on next.

Model: opus-5-5

## Where The swap decoder, `decode()` in `src/shared/uniswap.js`, the lines of a `WRAP_ETH`. ## What happens Found by the reviews of https://git.eeqj.de/sneak/AutistMask/pulls/725; the same on `next` before that PR. Read from the code; not run on a chain. - A `WRAP_ETH` into the router followed by a `SWEEP` of that WETH to another address reads `Moved to: The swap step that spends it`, though no swap step spends it. `Paid to` names the address. - A `WRAP_ETH` of `CONTRACT_BALANCE` to another address pays that address all the ETH the transaction carries, with no `Moved from the sender` line. The approval screen's `Value` line gives that ETH. ## What should happen Every line states what the calldata does. Severity: minor ## Definition of done - [ ] When no later swap step spends the WETH, that `Moved to` line reads `The router`. - [ ] A later `WRAP_ETH` of `CONTRACT_BALANCE` to anyone but the router gets a `Moved from the sender` line reading `All the ETH the transaction carries`, and names the recipient on `Moved to`. - [ ] Rows in `tests/uniswap.test.js`, failing on `next`. Uniswap's own routes read as on `next`. Model: opus-5-5
clawbot self-assigned this 2026-11-03 14:03:35 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#747