Summary
PartyA snapshot liquidation has two execution paths. The standard path spreads the work across several transactions. It starts liquidation, submits the Muon-signed historical funding state, handles pending quotes, liquidates open positions, and settles PartyBs.
The AccountLayer changes in v0.8.5 made the wrapper useful for more accounts. Many accounts now carry positions in a single market, and some hold only one open position. For those accounts, the full snapshot liquidation can often fit in one transaction.
singleStepLiquidatePartyAWithSnapshot is the compact path for accounts where all of that work fits in one
transaction. It uses the same signed snapshot payload, closes the supplied quoteIds, settles the supplied
partyBs, and reverts if anything remains unfinished.
API
singleStepLiquidatePartyAWithSnapshot(
partyA,
liquidationSnapshotSig,
quoteIds,
partyBs
)
The function takes the inputs needed to finish the liquidation:
partyA: the account being liquidated.liquidationSnapshotSig: the Muon-signed historical insolvency and PartyB-symbol snapshot payload.quoteIds: open positions to close in this transaction.partyBs: the PartyB addresses whose liquidation settlement buckets must be cleared in this transaction.
When to use it
This is an alternative start-to-finish entrypoint, not a resume function. Liquidation must be unpaused, the caller must hold
LIQUIDATOR_ROLE, and PartyA must not already be in liquidation. Use the wrapper when those prerequisites hold,
the caller can supply every open quoteId and every involved PartyB, and the complete liquidation fits within one
transaction's gas limit. Use the multi-step snapshot flow for larger accounts or when work must be divided across
transactions.
Atomic completion
The wrapper starts the snapshot liquidation, stores the signed symbol state, removes pending quotes, liquidates the supplied positions, and settles the supplied PartyBs. It then requires that no open or pending quotes remain, no PartyB settlement bucket remains, and the PartyA liquidation status has cleared.