Skip to main content
POST
Writes off a liquidation the operator was unable to settle. The market clears the outstanding debt, draws on the insurance fund to cover it, and reconciles the pool’s liquidity. The record moves to WRITTEN_OFF. This is a loss-recognition step, not a recovery step. Use it when collateral proved unsellable within the window, or when a sale realised nothing.
Write-off does not touch the liquidation router. Whatever collateral the router still holds stays there, and the backend will refuse further action on the record because WRITTEN_OFF is terminal. Dispose of or return the collateral before calling this, otherwise it is stranded.

Path Parameters

string
required
Global router liquidation ID. The market-local ID needed on-chain is resolved automatically.

Body Parameters

None.
string
Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.

Response Fields

object

The 7 Day Window

The clock starts when the router receives the collateral, which is onChainData.timestamp on Get Pending Liquidations. Calling before 7 days have elapsed reverts with Not timed out under TIMEOUT_PREFLIGHT_FAILED.

What the Write-Off Does

1

Close the pending liquidation

The market marks its pending liquidation settled so the debt stops counting against pendingLiquidationDebt.
2

Draw on the insurance fund

The outstanding debt is presented to the market’s insurance fund, which covers as much as its balance allows.
3

Reconcile the pool

Any shortfall between the covered amount and the principal is deducted from pool liquidity. Liquidity providers absorb what the insurance fund could not.
This call requires the registered wallet to hold DEFAULT_ADMIN_ROLE on the market contract, which is a higher privilege than the LIQUIDATOR_ROLE and router OPERATOR_ROLE the other liquidation endpoints need. Unlike those endpoints, a missing role is not detected in advance. It surfaces as a generic TIMEOUT_PREFLIGHT_FAILED with no remediation calldata. Confirm the registered wallet holds market admin before relying on this path.

Errors