Velocity ProtocolDevelopers

Delisting

A perpetual has no expiry, but a market can still have to be closed: its oracle fails, its liquidity goes, or its unrealized P&L grows past anything the protocol can pay. Velocity gives a perpetual an expiry date on demand and then runs it through the same shape as any dated contract: reduce-only, then a settlement price, then settlement, then the market's pools are wound up. Every step after the first is permissionless.

Perpetual markets

Reduce-only, from the moment an expiry is set

Setting an expiry requires a future timestamp and immediately writes MarketStatus::ReduceOnly alongside it. There is no separate instruction to enter reduce-only; setting the date is entering it.

  • New orders are forced reduce-only.
  • Existing orders that would increase risk are clamped or cancelled at fill time, not at placement.
  • Funding continues. A market funds while its status is Active or ReduceOnly, so positions keep paying and receiving funding right up to expiry.
  • An account with an open base position cannot settle its unrealized P&L, because settlement requires Active when a base position is present. A flat account can still settle, so a trader who closes out during reduce-only is not stuck holding an unsettled claim until expiry.

Reduce-only applies at fill time, not only at placement. An order placed while the market was still Active can no longer add exposure, because the fill path re-derives reduce-only from the live market status for the taker and for every maker in the match. See Guard rails.

Settlement price lock-in

After the expiry timestamp, anyone may lock in an expiry price. The starting point is the market's 5-minute oracle TWAP, adjusted so the resulting price is solvent for every remaining claimant rather than merely being the last honest print.

Expired position settlement

After the expiry timestamp plus the settlement duration, a buffer that leaves room for liquidations, holders settle their expired positions at that locked price. Any insurance-fund draw or socialized loss happens here, through the ordinary bankruptcy waterfall. The taker fee is charged at position closure, so closing during reduce-only is cheaper than waiting to be settled.

Winding up the market's pools

Once the market is in Settlement and everything below has cleared, the remaining P&L pool is swept into the quote asset's revenue pool and the market is done.

What the final step actually requires

The last step is stricter than "the market must be wound down", and the full list matters while waiting on a delisting to complete. All of the following must hold:

  1. Status is Settlement. Not ReduceOnly, not Active.
  2. No user base exposure. No long base, no short base, and no users still holding a base position.
  3. Net user cost basis is zero.
  4. No unresolved bankruptcy claims. The checks above cannot see a latched bad debt, because a bankrupt's settled debt nets against another user's claim and neither holds base. The final sweep reserves nothing, so it would drain the insurance tranche backing that debt.
  5. The AMM holds no base.
  6. A settlement duration is configured. A protocol that never set one cannot complete a delisting.
  7. The escrow period has elapsed. On any meaningfully configured protocol that is at least a day after expiry, so an operator can examine the settlement.
  8. No unsettled revenue share, or the instruction rejects with UnsettledRevenueShareOnDelist. Accrued builder and referrer fees must be paid before the P&L pool moves, otherwise third parties' earned fees would be handed to the revenue pool.

Conditions 4 and 8 are cleared permissionlessly and neither needs the admin. A latched debt is absorbed through the waterfall, or released by P&L settlement once the position's quote reaches zero; a revenue-share row is either paid or written off. The market stays in Settlement while they run.

Spot markets

Setting an expiry on a spot market puts it into reduce-only the same way, again requiring a future timestamp. In that state the market blocks new borrows and blocks any deposit that does not pay down an existing borrow. There is no spot orderbook on Velocity, so there are no spot buys to block.

There is no force-close mode in the deployed program. Earlier documentation described a post-expiry "force close mode" that returns deposits to the holder and liquidates or swaps remaining borrows. No such instruction, status or code path exists on Velocity today, and there is no date for one. A spot market put into reduce-only stays in reduce-only until borrows are repaid or liquidated through the ordinary paths.

What this means in practice

A holder is better off closing early. Funding accrues through reduce-only, the taker fee is charged either way, and settling at expiry pays the solvency-adjusted price rather than a price an early exit could have chosen.

A flat account should settle. It can settle its P&L during reduce-only, so there is no reason to leave a claim outstanding into expiry.

A market maker should watch the status, not the order book. Quotes that would add exposure stop working the moment the status flips, not the moment they are replaced.

Anyone waiting on a delisting should read the counters. A market stuck in Settlement is almost always waiting on an unresolved bankruptcy claim or an unsettled revenue share, and both are cleared by instructions anyone can call.