Skip to main content
POST
Closes a liquidation by forwarding the cumulative proceeds from the router to the lending market. This repays the pool, pays any surplus to the borrower, and marks the record SETTLED. This is the final step of the manual settlement workflow. Until it is called, the liquidated debt remains outstanding on the market and counts against pendingLiquidationDebt.

Path Parameters

string
required
Global router liquidation ID.

Body Parameters

string
required
Final proceeds to deposit before settling, in the market’s borrow asset. Must be zero or greater.Send the full sale proceeds when settling in one step. Send "0" when the proceeds were already deposited through Report Partial Sale, and the router forwards what it already holds.
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.
The signing wallet must hold OPERATOR_ROLE on the router. If it does not, the calldata is not returned: the response carries ROUTER_OPERATOR_ROLE_MISSING along with the calldata that grants the role. When usdcProceeds is greater than zero that wallet must also hold the proceeds, since settlement pulls them from it.

Response Fields

object

Proceeds Distribution

The market keeps at most the liquidated debt plus the market’s liquidationPenalty. Anything above that is surplus and belongs to the borrower. Surplus is pushed directly to the borrower’s wallet. If the settlement token rejects that transfer on compliance grounds, the amount is escrowed on the market contract against the borrower’s address instead of reverting the settlement, and the borrower claims it later. Settlement therefore always completes, whether or not the borrower can currently receive funds. When proceeds fall short of the debt, the shortfall is recorded as slippage on the settlement event. The pool absorbs the loss. It is not automatically covered by the insurance fund, which only steps in on a timeout write-off.
Settling with zero proceeds is rejected with NO_PROCEEDS_COLLECTED unless the router already holds proceeds from a reported partial sale. This prevents accidentally closing a liquidation that recovered nothing, which would silently write off the debt against the pool.

Errors