Protocol

Maturity and frozen markets

How a market ends, normally or when its funding source stops.

  1. TradeA quote is taken. Both sides' collateral moves to the vault; both legs start at the next record.
  2. Every hourPhoenix records funding; a checkpoint lands; the position settles.
  3. MaturityFriday 08:00 UTC. New trades closed at 07:00.
  4. Final recordThe record that starts at maturity settles the last stretch.
  5. WithdrawEach side takes its balance back, when it likes.
A position can also end early: below maintenance at a checkpoint, or at the last verified checkpoint if Phoenix's funding stops. Either way, each side withdraws what its balance holds.

The final checkpoint

Quotes and fills on a market stop when its last funding interval begins, an hour before maturity (Friday 07:00 UTC on the maturities Tack lists, which mature at 08:00): a swap filled then would start at maturity. Every maturity sits on Phoenix's hourly grid, so the record that closes the last hour before it is the interval that starts at maturity. That record becomes the final checkpoint: the market is marked finalized, and both legs stop exactly at maturity.

Nothing is interpolated. The final total is the one Phoenix itself recorded at 08:00, the same total every Phoenix position is paid from.

Once finalized, a market no longer reads Phoenix at all. Every open position settles through the final checkpoint and closes as Matured (1), whenever that settlement is sent, even if Phoenix has since stopped.

Frozen markets

If the funding source fails before a market reaches its final checkpoint, positions cannot be settled further and nothing new can trade. After the market's freeze grace, one day on Tack's maturities, measured from the last record it published, anyone can call finalize_frozen when one of these is true:

  • Phoenix's SOL slot no longer reads as the reviewed layout or units, or the SOL market was removed;
  • Phoenix's funding accumulator or index oracle has not updated for the whole freeze grace;
  • Phoenix has not started a new funding interval for the whole freeze grace after its current one ended;
  • Phoenix is more than one interval past the market's last checkpoint, including the interval at maturity;
  • the funding interval, period or clamp changed, records went backwards or changed in place, or a timestamp is in the future.

The market is then frozen at its last verified checkpoint. Both legs stop there. Open positions replay every stored checkpoint, including maintenance checks, and close as Closed on a frozen source (4); each side withdraws its balance.

Statuses

CodePositionQuote
0OpenOpen
1MaturedFilled
2Closed at maintenanceCancelled
3Collateral exhausted
4Closed on a frozen source