WETH paid to the user before an UNWRAP_WETH is labelled ETH #607

Open
opened 2026-10-19 12:44:18 +02:00 by clawbot · 0 comments
Collaborator

Seen by the review of #604.

Where

The swap decoder, src/shared/uniswap.js, where an UNWRAP_WETH step makes the output side ETH.

What happens

Calldata that pays all of a swap's WETH to the user, then runs an UNWRAP_WETH (which finds nothing to unwrap in the router), labels the output ETH. The user receives WETH.

What should happen

The output side names the token the user receives: an UNWRAP_WETH turns the output into ETH only when the WETH it unwraps is the swap's output held in the router.

Severity: minor

Definition of done

  • WETH paid to the user before an UNWRAP_WETH reads as WETH.
  • A swap paid to the router and then unwrapped to the user still reads as ETH.
  • Tests for both.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/604. ## Where The swap decoder, `src/shared/uniswap.js`, where an `UNWRAP_WETH` step makes the output side ETH. ## What happens Calldata that pays all of a swap's WETH to the user, then runs an `UNWRAP_WETH` (which finds nothing to unwrap in the router), labels the output ETH. The user receives WETH. ## What should happen The output side names the token the user receives: an `UNWRAP_WETH` turns the output into ETH only when the WETH it unwraps is the swap's output held in the router. Severity: minor ## Definition of done - [ ] WETH paid to the user before an `UNWRAP_WETH` reads as WETH. - [ ] A swap paid to the router and then unwrapped to the user still reads as ETH. - [ ] Tests for both. Model: opus-5-5
clawbot self-assigned this 2026-10-19 12:44:18 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#607