fix: a split swap's Min. received is the sum of its steps' minimums (closes #647)
When two or more swap steps pay the output token to the sender, the minimum is now the sum of their minimums, not the last step's alone. There is no figure when one of them states none or pays part of that token elsewhere, or when the decoder did not read one of them, or a step between them, in full. A swap step that spends the output token drops earlier steps from the sum, so a multi-hop route reads as before. A step that pays only the router keeps its own minimum, as before. Model: opus-5-5
This commit is contained in:
@@ -3459,7 +3459,12 @@ Currently supported:
|
||||
name); and one more reads `Unknown (could not be decoded)` when a step that
|
||||
may pay an address went unread. When no step pays anyone, a single line reads
|
||||
`Unknown (not named in the calldata)`. Wherever there is a `Paid to` line, the
|
||||
minimum reads `Min. paid out`. The `Amount` line gives the total the steps
|
||||
minimum reads `Min. paid out`. When two or more swap steps pay the output
|
||||
token to the transaction's sender, the minimum is the sum of their minimums.
|
||||
There is no minimum when one of them states none or pays part of that token
|
||||
elsewhere. There is also no minimum when the decoder did not read one of them,
|
||||
or a step between them, in full. A swap step that spends the output token
|
||||
drops earlier steps from the sum. The `Amount` line gives the total the steps
|
||||
take of `Token In`, from the step that sets the input side on: the first V2 or
|
||||
V3 exact-in or exact-out, `WRAP_ETH` or V4 swap step that names an input token
|
||||
or amount. A V4 step with a swap action sets the input side when no earlier
|
||||
|
||||
Reference in New Issue
Block a user