A WRAP_ETH that does not set the input side gets no Moved from the sender line #721

Closed
opened 2026-11-03 03:02:19 +01:00 by clawbot · 1 comment
Collaborator

Where

The swap decoder, decode() in src/shared/uniswap.js, the WRAP_ETH branch and the Moved from the sender lines.

What happens

Found by the review of #679; the same on next before that PR. A WRAP_ETH that does not set the input side gets no Moved from the sender line. A V3 exact-in of 600 USDT, then a WRAP_ETH of 1 ETH to another address, gives no ETH figure among the decoded lines, though 1 ETH leaves the wallet. Read from the code; not run on a chain.

What should happen

Every amount the calldata takes from the sender has a line. A later WRAP_ETH that wraps a stated amount and pays anyone but the router reads Moved from the sender, with that amount and the recipient on Moved to.

Severity: minor

Definition of done

  • The route above shows a Moved from the sender line of 1 ETH naming the recipient.
  • A Jest test, 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 `WRAP_ETH` branch and the `Moved from the sender` lines. ## What happens Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/679; the same on `next` before that PR. A `WRAP_ETH` that does not set the input side gets no `Moved from the sender` line. A V3 exact-in of 600 USDT, then a `WRAP_ETH` of 1 ETH to another address, gives no ETH figure among the decoded lines, though 1 ETH leaves the wallet. Read from the code; not run on a chain. ## What should happen Every amount the calldata takes from the sender has a line. A later `WRAP_ETH` that wraps a stated amount and pays anyone but the router reads `Moved from the sender`, with that amount and the recipient on `Moved to`. Severity: minor ## Definition of done - [ ] The route above shows a `Moved from the sender` line of 1 ETH naming the recipient. - [ ] A Jest test, failing on `next`. - [ ] Uniswap's own routes read as on `next`. Model: opus-5-5
clawbot self-assigned this 2026-11-03 03:02:19 +01:00
Author
Collaborator

Plan: one PR to next, in the WRAP_ETH branch of decode() in src/shared/uniswap.js. A WRAP_ETH of a stated amount that does not set the input side takes that ETH from the transaction's value, so it joins userPaid with its recipient. Moved to names that recipient, reads The sender for address(1), and reads The swap step that spends it for the router. When the router may hold ETH (routerHeldEth), the amount reads Up to, as a V4 step's ETH does. A CONTRACT_BALANCE wrap takes nothing from the sender and stays as it is. Rows in tests/uniswap.test.js, failing on next; Uniswap's own routes read as on next. README's sentence on these lines says so.

Model: opus-5-5

Plan: one PR to `next`, in the `WRAP_ETH` branch of `decode()` in `src/shared/uniswap.js`. A `WRAP_ETH` of a stated amount that does not set the input side takes that ETH from the transaction's value, so it joins `userPaid` with its recipient. `Moved to` names that recipient, reads `The sender` for `address(1)`, and reads `The swap step that spends it` for the router. When the router may hold ETH (`routerHeldEth`), the amount reads `Up to`, as a V4 step's ETH does. A `CONTRACT_BALANCE` wrap takes nothing from the sender and stays as it is. Rows in `tests/uniswap.test.js`, failing on `next`; Uniswap's own routes read as on `next`. README's sentence on these lines says so. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#721