Skip to main content
POST
Liquidates a loan whose health factor is below 1.0. What the transaction produces depends on the market’s useDutchAuction setting. With Dutch auctions disabled, collateral is seized and transferred to the market’s liquidation router, and a pending liquidation is created. The response carries liquidationId and collateralSeized, and settlement becomes a manual operator workflow. With Dutch auctions enabled, an auction is opened instead. The response carries auctionId and borrower, while liquidationId, collateralSeized, and debtRepaid are all null. No pending liquidation exists yet. One is created only if the auction expires unsold and is settled with Settle Expired Auction.
The signing wallet must hold LIQUIDATOR_ROLE on the market. Role state is reported in readiness but never blocks the calldata. You sign in your own environment, so the wallet this API knows about is not necessarily the one that will call. A wallet without the role has its transaction reverted on-chain rather than rejected here. Pass signerAddress to have readiness answer for the wallet you intend to use.

Path Parameters

string
required
Market ID.
integer
required
On-chain loan ID. Must be a positive integer.

Body Parameters

object
EIP-712 signed price from Sign Price, applied atomically with the liquidation. Omit to price against the stored oracle value. Nothing is signed on your behalf. A stale stored price is refused with PRICE_STALE. Either push a NAV with Sync Oracle Price, or supply a signedPrice here.
string
Wallet you intend to liquidate with. Used to resolve readiness against that address rather than against your instance’s registered wallet. It does not appear in the transaction and does not gate it.
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

Without txHash the response is the unsigned liquidate call, alongside a readiness object describing every gate the contract passes through.
object

Seizure Bounds

A liquidation does not close the whole loan. The amount seized is bounded by closeFactor, capping how much of the debt one call can repay, and marked up by liquidationPenalty. A deeply underwater loan therefore needs several liquidations to clear, or resolves through the auction path. There is no auto-sell for external securities. Once collateral reaches the router it stays there until an operator sells it and settles the proceeds. See Settle Liquidation.

Error Codes

Errors raised while building calldata carry the full readiness object alongside code and message, so the failing gate can be inspected without a second call.
A missing LIQUIDATOR_ROLE shows as liquidatorRoleReady: false in readiness rather than as an error. Resolve it through Set Liquidator Role when the market admin drives the grant.