Skip to content

Track remaining MultiSwapper quoteOut and SwapSource regressions #168

@liobrasil

Description

@liobrasil

Summary

Track the two remaining MultiSwapper regressions introduced by #158 that are intentionally not fixed in #167.

Remaining Regressions

  1. 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
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions