Skip to content

Caveats regarding the clamp #226

@xenide

Description

@xenide

Say on an L2 (e.g. Arbitrum), if the sequencer goes down for a few hours, no swap would be able to take place. As such, the first swap that happens can swing the instant clamped (and of course raw) price a lot. In other words, the clamp becomes quite useless if there are no swaps for an extended period of time, or put it inversely, the clamp works best when there are frequent swaps.

e.g. with a 1bp/s rate of change, if there are no swaps for 2 hours (7200 s), the swap can move the price by 72% and it would not exceed the clamp.

Potential mitigations:

  1. New borrows use the instant price in the case where there has been no oracle observation for X period
  2. Liquidations use a longer TWAP (e.g. 1-hr TWAP) instead of the normal TWAP (10-15 mins)
  3. Clamp the max change within one trade
  • 5% ?

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