SIP-347: Collateral Delegation Cooldown

Author
StatusRejected
TypeGovernance
NetworkEthereum, Optimism & Base
ImplementorTBD
ReleaseTBD
Created2023-10-25

Simple Summary

This SIP proposes the implementation of a cooldown mechanism for accounts wishing to exit or decrease their delegated collateral in a given market. It introduces a configurable cooldown duration (cooldownDuration), that a user must await after signaling his intent to decrease his delegated liquidity to a given market. The undelegation action can only be executed when the block time is within a configurable cooldown window cooldownWindow (after the cooldownDuration lapses). Failure to execute the action within the window, results in the expiration of the intent, requiring users to run a new intent of undelegation.

An account who signaled his intent to decrease his delegation on a given market cannot increase his delegated liquidity to that market during the cooldownDuration period. However, the account can signal multiple decreases of staked collateral on different markets simultaneously. Once a user signals his intention to reduce his delegated collateral on a specific market, he cannot schedule another reduction on that same market until the previous intent is executed or is expired.

In case a users' collateral is liquidated, all the accounts' cooldown intents are revoked.

The cooldownDuration and cooldownWindow are both configurable per market. Markets that do not require this intent/execute pattern can have this feature disabled by setting cooldownDuration to zero.

Note that a user can signal an intent, but cannot execute that intent, if the minDelegateTime specified in SIP-320 had not lapsed.

Motivation

In Perp V3, differences in the liquidation speeds of margin and positions could lead to deterministic profit/loss impacts. To ensure fair compensation for liquidity providers and prevent taking advantage of these determinisms, a cooldown period is proposed when undelegating liquidity from a market.

Rationale

This functionality aims to introduce friction in removing or decreasing a user's delegated collateral to discourage taking advantage of deterministic changes in profit/loss impact from liquidations.

Technical Specification

  • cooldownDuration: A configurable duration in seconds, representing the minimum time before an intent can be executed.
  • setCooldownDuration(int128): An addition to the IMarketManager interface, allowing markets to associate a cooldown duration.
  • cooldownWindow: A configurable duration in seconds, determining the maximum time an intent can be executed after the cooldownDuration lapses.
  • setCooldownWindow(int128): An addition to the IMarketManager interface, enabling markets to associate a cooldown window.

Test Cases

  • Setting the cooldownDuration to 12 hours, cooldownWindow to 6 hours
    • When a random account, with delegated liquidity to the perp super market attempts to signal an intent to undelegate his liquidity
      • ✅ Then the transaction succeeds
        • After the cooloffDuration and minDelegateTime lapse
          • the user attempts to execute the intent in the cooldownWindow
            • ✅ Then the transaction succeeds and the users' delegated liquidity is reduced
          • the user attempts to execute the intent after the cooldownWindow lapses
            • ❌ Then transaction reverts, as the cooldown intent had expired
        • Before the cooloffDuration lapses
          • the user attempts to execute the intent
            • ❌ Then transaction reverts, as the cooloffDuration had not lapsed
        • The user attempts to delegate more collateral to the perp supermarket
          • ❌ Then transaction reverts, due to a cooldown intent being signalled by the user
        • The user attempts to undelegate more collateral from the perp supermarket
          • ❌ Then transaction reverts, due to a cooldown intent already being signalled by the user
        • The user gets liquidated before the minDelegateTime and cooloffDuration has lapsed
          • ✅ Then the transaction succeeds and the cooloff intent is revoked
        • After the cooloffDuration lapse but before the minDelegateTime has lapsed
          • the user attempts to execute the intent in the cooldownWindow
            • ❌ Then transaction reverts, due to the minDelegateTime not having lapsed

Configurable Values (Via SCCP)

Please refer to technical specification for definitions of the below configurable values:

  • cooldownDuration
  • cooldownWindow

Status changed to rejected, as per the authors' request.

Copyright and related rights waived via CC0.