Trigger Condition
Liquidation is triggered when both conditions are met: Where is reserve-adjusted portfolio maintenance margin and closeout equity is: is collateral. values each position at an adverse estimated closeout price rather than assuming the full position can exit at the mark.Closeout Impact
For each position, BULK measures the current cost of sweeping its closing side of the book and the additional impact of nearby liquidation cascades: is the configured cascade factor. If a current sweep observation is unavailable, the full cascade-impact estimate is used. Thin books, larger positions, and concentrated liquidation levels therefore reduce closeout equity before an account reaches bad debt.Reserve-Adjusted Maintenance Margin
Maintenance margin also reserves for liquidation cost not already represented by impacted PnL. This calculation uses the full cascade-impact estimate: Where is the market-specific reserve floor and is its impact reserve factor. Only the residual is added to maintenance margin: This is a deterministic risk reserve, not a separate liquidation fee.Liquidation Lifecycle
Step 1: Cancel Open Orders
All resting orders belonging to the account are cancelled before its positions are changed. This prevents open orders from increasing exposure during liquidation.Step 2: Compute the Recovery Target
The optimizer computes how much maintenance margin must be removed: The buffer leaves the account below its available closeout equity after the planned reduction.Step 3: Size Candidate Reductions
The optimizer tests incremental reductions for every non-zero position. The step size increases with the severity of the margin gap:
Each reduction is capped by the position’s remaining size.
Step 4: Measure Portfolio Change
For every candidate, BULK recomputes:- The position’s lambda at its hypothetical smaller size
- The change in correlation-adjusted portfolio margin
- The change in its size-dependent liquidation reserve
- The expected cost of executing the reduction through current depth
Step 5: Rank by Efficiency
Candidates are ranked by signed maintenance-margin change per dollar of expected execution cost: Greater estimated margin relief ranks first. The optimizer applies the highest-ranked reduction, recomputes the account, and repeats. Near-zero margin changes are skipped.Step 6: Stop When Margin Is Restored
The optimizer runs for up to 100 iterations. If selective reductions cannot restore the target within that limit, it falls back to closing all remaining positions.Protected Execution
The account’s selected position reduction is applied during the liquidation tick at a reserve-adjusted price. Protected market execution begins after that state change; it does not delay or condition the account’s liquidation. From the next executor tick, BULK may use available opposing liquidity within deterministic price limits. More aggressive execution is allowed only after an execution window has completed with a remaining shortfall, and only up to the largest quantity supported by calibrated depth. Every aggressive order has a limit independently anchored to both fair price and oracle price. If depth or either reference is unavailable or outside the configured limits, execution is postponed rather than crossing an unbounded price. Protected execution applies to quantity already accepted by the protocol. Price or depth constraints postpone that execution; they do not create a new ADL underfill.Shortfall and ADL
ADL is evaluated for two distinct conditions:- Shortfall: liquidation losses exceed the account’s collateral.
- Underfill: part of the planned reduction cannot be accepted within protocol capacity.