Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce max slippage in protocol #40

Open
gabririgo opened this issue Mar 6, 2024 · 0 comments
Open

Introduce max slippage in protocol #40

gabririgo opened this issue Mar 6, 2024 · 0 comments

Comments

@gabririgo
Copy link
Contributor

gabririgo commented Mar 6, 2024

Summary

Assert that a swap does not get executed beyond a certain delta from a recent price.

Motivation

If a client sets the wrong uint256 minimumAmountOut parameter in a swap call, the call can be MEV-arbitraged. To prevent the wrong parameter set at an interface level, we can accept a swap execution gas increase and add a check of maximum delta against an oracle price, say 9116 ticks (~2.5x oracle price) just as an example.

Specification

TBD.

Rationale

Improve safety.

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

No branches or pull requests

1 participant