Skip to content

Introduce max slippage in protocol #40

@gabririgo

Description

@gabririgo

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.

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