fix: a WRAP_ETH says where its ETH goes when no swap step spends it (closes #747)
The `Moved to` line of a WRAP_ETH into the router now reads `The router`, unless a later swap step pays from that WETH. A later WRAP_ETH of CONTRACT_BALANCE to anyone but the router now gets a `Moved from the sender` line reading `All the ETH the transaction carries`, and `Moved to` names the recipient. It gets no lines after an earlier step paid ETH to the router, because Uniswap's routes pay back unspent ETH this way. README states the new rule. Model: opus-5-5
This commit is contained in:
@@ -1416,8 +1416,10 @@ when both tokens are known. The lines are:
|
||||
after the step that sets `Token In` takes the amount it states from the
|
||||
sender. When it pays anyone but the router, that amount gets these lines. When
|
||||
it pays the router, that amount joins the `Amount` line if `Token In` is ETH,
|
||||
and gets these lines if not. A later `WRAP_ETH` of `CONTRACT_BALANCE` states
|
||||
no amount, so it gets no lines. ETH that the sender pays a V4 step or a
|
||||
and gets these lines if not. A later `WRAP_ETH` of `CONTRACT_BALANCE` to
|
||||
anyone but the router gets these lines, unless an earlier step paid ETH to the
|
||||
router. Its `Moved from the sender` line reads
|
||||
`All the ETH the transaction carries`. ETH that the sender pays a V4 step or a
|
||||
`WRAP_ETH` of a stated amount can get these three lines when the router may
|
||||
hold ETH from an earlier step. When the decoder knows the amount, its
|
||||
`Moved from the sender` line reads `Up to` and the amount.
|
||||
|
||||
Reference in New Issue
Block a user