Skip to content

Fix: Prevent extreme zero-output swaps (CWE-382)#11

Open
Sigmabrogz wants to merge 1 commit intosolidquant:mainfrom
Sigmabrogz:fix/prevent-extreme-slippage
Open

Fix: Prevent extreme zero-output swaps (CWE-382)#11
Sigmabrogz wants to merge 1 commit intosolidquant:mainfrom
Sigmabrogz:fix/prevent-extreme-slippage

Conversation

@Sigmabrogz
Copy link

This patch adds a basic amountOutMin >= 1 slippage protection to prevent manipulative attacks from sandwiching swaps to output exactly zero tokens. While a dynamic slippage parameter parsed from the payload is recommended for production use, this acts as an initial guard against edge case exploits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant