Skip to content

FLOW-11 Unexpected Slippage Protection #106

@nialexsan

Description

@nialexsan

File(s) affected: UniswapV3SwapConnectors.cdc
Description: The Swapper._swapExactIn() function further changes the amountOutMin by introducting additional tolerance of
1%. However, this additional slippage protection is unexpected and potentially superfluous for the user. The swap can originate from
two scenarios: Either, the caller already provided a quote which should be taken as the strict slippage limitations, or the quote is
generated in the same transaction as the swap. Since the ledger data cannot have changed between the quote and execution, no
slippage protection can be possible in this case. Generally, slippage protection is intended to protect the user against price changes
while the transaction is already submitted, but not yet executed. Therefore, effective slippage protection values need to be set as a
parameter, or calculated with one.
Recommendation: Remove this slippage protection mechanism and rely on values provided in the quote provided by the caller.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions