Delisting Process

Delisting a perpetuals market can occur in a tail risk event, but the protocol has an on-chain procedure in place similar to the expiry of any derivatives contract (futures, options).

The process is as follows:

Perpetual Markets

1

Market enters reduce only mode once an expiry date is set

  • All new orders are forced to have the reduce only flag.

  • All current orders that would increase risk will get cancelled on fill attempts.

  • No new funding rate updates.

  • Users cannot settle unrealized P&L prior to expiry.

2

After the expiry date, the market can lock in a settlement price

  • Must call the instruction: settle_expired_market.

    • The target price is the AMM's calculated 1-hour oracle TWAP but is altered such that it allows for full solvency across all users.

3

After expiry + optional time buffer, users can settle expired positions

  • Users can settle their "expired positions" at the settlement price, which are closed.

  • The optional time buffer is the settlement duration, which acts as a buffer for liquidations.

  • Any necessary insurance fund draws and/or social loss can occur.

  • At position closure, the taker fee is applied (to encourage close during reduce only mode).

4

Once no users remain, settle remaining PnL Pool

  • When the number of users in the market reaches zero, the remaining balance PnL Pool can be settled into the quote asset's Revenue Pool.

Spot Markets

1

Market enters reduce only mode once an expiry date is set

  • This blocks new borrows, new deposits, and new buys in the market.

2

After the expiry date, the market is set into force close mode [TODO]

  • Deposits are sent back to the user's associated token address up to an amount that still satisfies their margin requirement.

  • Opens the possibility for liquidation of borrows and/or swaps of deposits to other accepted collateral.