Collapse
Basics

Collapse

The moment the price leaves the band, the Box becomes a real long or a real short.

Trigger

A Box collapses on the first oracle update whose mark is at or beyond either edge of the band. The check runs on chain inside poke(), which anyone can call. Keepers call it within a second of a qualifying price.

mark ≥ E · (1 + b)   →  side = LONG  (1)
mark ≤ E · (1 − b)   →  side = SHORT (2)

A Private Box has no band on chain, so poke() can't see it. It collapses through collapsePrivate, which proves the band from its commitment and applies the same rule. See Private Boxes.

Fill at the oracle mark

The position fills at the oracle mark of the update that triggered the collapse, not at the band edge. If the market jumps through the band between two updates, the fill is the price after the jump.

Entry EBandUpper edgeTrigger markFill
100.005%105.00105.40105.40 (long)

Illustrative arithmetic only. Prices here are not market data.

Gap risk

Gap risk sits with the trader. A fast move can fill a long above the upper edge, or a short below the lower edge. The trailing stop then measures from the fill price, and the vault is not on the hook for the gap.

What changes at collapse

  • The premium stops accruing.
  • Unused premium budget is refunded into the position's margin.
  • A collapse fee of 0.05% of N is charged.
  • The trailing stop starts at t from the fill price.
  • The event BoxCollapsed(id, side, fillE8, ts) is emitted.