Skip to content
Anyperp
DocsHalts and settlementAppData
Open the app

Using Anyperp

Getting startedTradingFees, funding and the borrow feeProviding liquidityClaim balancesListing a marketHow prices are madeHalts and settlementAPITokenFAQ

Papers

LitepaperWhitepaper

Halts and settlement

A market halts when its source stops producing prints, or when its listing fails probation. A halted market settles at the time-weighted average of its last 24 hours of valid prints, and every open position closes at that price into its owner's claim balance.

When a market halts

CauseWho halts it
The market has gone a set number of consecutive rounds without a print (each market's halt threshold)the guardian, or the curators
The market's listing fails probationthe curators' slashing path, in the same transaction that slashes the bond

Consecutive rounds without a print are disputed, failed or out_of_band_pending rounds in a row, for example when the source stops publishing the count or changes its format and the roots can no longer read it. Any print resets the count. The halt is recorded on the metric in anyperp_oracle with halt_metric, and the program refuses it until the count reaches the threshold.

The guardian is a separate key with bounded powers. It can pause opens on a market for at most 24 hours, and halt a market once the threshold is met. It cannot sign a price or move funds. Only the curators can keep a market paused beyond the guardian's 24 hours.

Failed roundsno valid printGuardian halttrading stops24 h TWAPlast valid roundsSettle positionsat the TWAPClaim balancespayouts credited
Failed rounds lead to a guardian halt; the settlement price is the TWAP of the last 24 h of valid closes; positions settle into claim balances.

How the settlement price is made

The settlement price is the time-weighted average of the market's hourly closes over the 24 hours before the halt:

Isettle=124 h∑kIk⋅ΔtkI_{settle} = \frac{1}{24\,\text{h}} \sum_k I_k \cdot \Delta t_kIsettle​=24h1​k∑​Ik​⋅Δtk​

Each close IkI_kIk​ counts for the time Δtk\Delta t_kΔtk​ it stood within the window. Only valid prints become closes; through a stretch of rounds without a print, the last close keeps counting. The oracle records the price once with settle_metric and never changes it.

For example, a market whose index stood at 600.00 for the first 18 hours of the window and at 612.00 for the last 6 settles at (600×18+612×6)/24(600 \times 18 + 612 \times 6) / 24(600×18+612×6)/24 = 603.00.

What happens to positions

Once the settlement price is recorded, keepers settle the market with halt_market and settle_market, then settle each open position with settle_position:

  • the position closes at the settlement price;
  • no trading fee is charged; the keeper fee is;
  • funding and borrow stop at the last valid print before the halt;
  • the payout, margin plus PnL less funding, borrow and the keeper fee, lands in the owner's claim balance.

The position then shows settled, and its payout appears in your history. Claim to wallet moves it to your wallet. You don't need to act for the settlement itself.

What happens to orders

When a market halts, keepers cancel its pending orders and return their margin to their owners' claim balances. Cancel order is also available on each of them as soon as the market halts.

What you can do during a halt

ActionDuring a halt
Open orderrefused
Close at the next printnot needed: positions settle at the settlement price
Add marginavailable until the position settles
Remove marginrefused
Cancel orderavailable
Claim to walletavailable

Market states

StateMeaning
haltedthe metric is halted; no new prints, no opens; settlement under way
settledthe settlement price is recorded and the market's positions are closed at it

A settled market stays readable: its rounds, its hourly closes and its settlement price, with the number of valid rounds it used, remain in the market's API response. The vault values it at the settlement price.

PreviousHow prices are madeNextAPI

On this page

When a market haltsHow the settlement price is madeWhat happens to positionsWhat happens to ordersWhat you can do during a haltMarket states
Anyperp
AppDataDocsLitepaperWhitepaperToken
Perpetual futures on artists’ monthly listeners, on Solana.Not offered to US persons.