Summary
Track the two remaining MultiSwapper regressions introduced by #158 that are intentionally not fixed in #167.
Remaining Regressions
-
swap(nil, ...) / swapBack(nil, ...) can become inconsistent with quoteOut(...).
Example:
- caller provides
10 TokenA
- selected inner capped route reports
quoteOut(10) = { inAmount: 4, outAmount: 4 }
MultiSwapper._swap(...) still falls back to quoteOut(from.balance) and forwards the full 10 TokenA vault to the selected inner swapper
- strict inner swappers can reject the call because execution forwarded more input than
quote.inAmount
-
SwapSource.withdrawAvailable(maxAmount) can return more than maxAmount.
Example:
- caller asks for
withdrawAvailable(maxAmount: 10)
- selected route returns
quoteIn(10) = { inAmount: 10, outAmount: 11 }
SwapSource forwards that quote into swap(...)
- caller receives more than the requested maximum amount
Notes
#167 intentionally fixes only the partial-route quoteIn(...) tie-break regression.
- This follow-up issue keeps the larger
quoteOut/execution-contract discussion and the SwapSource max-amount behavior together in one place.
Summary
Track the two remaining
MultiSwapperregressions introduced by#158that are intentionally not fixed in#167.Remaining Regressions
swap(nil, ...)/swapBack(nil, ...)can become inconsistent withquoteOut(...).Example:
10 TokenAquoteOut(10) = { inAmount: 4, outAmount: 4 }MultiSwapper._swap(...)still falls back toquoteOut(from.balance)and forwards the full10 TokenAvault to the selected inner swapperquote.inAmountSwapSource.withdrawAvailable(maxAmount)can return more thanmaxAmount.Example:
withdrawAvailable(maxAmount: 10)quoteIn(10) = { inAmount: 10, outAmount: 11 }SwapSourceforwards that quote intoswap(...)Notes
#167intentionally fixes only the partial-routequoteIn(...)tie-break regression.quoteOut/execution-contract discussion and theSwapSourcemax-amount behavior together in one place.