Skip to main content
POST
Builds the fund’s emergencyWithdraw transaction, which pays an amount out of the market’s insurance fund to a recipient. Only the fund owner can sign it: the admin the lender of record named when it took the role.
Every unit withdrawn is a unit the reserve can no longer pay toward this market’s losses. Whatever the reserve cannot cover lands on the liquidity providers. Get Insurance Status shows the balance, when the reserve is drawn on this market, and the losses it has absorbed so far.
The API checks the amount against the fund’s balance when it builds the calldata, but it does not check who will sign. A transaction from any wallet other than fundOwner reverts. So does one whose amount exceeds the balance by the time it mines, for example after a draw in between. Before a lender of record takes the market, the market itself or the deploying factory owns the fund. Neither can call a withdrawal, so no wallet can sign one until adoption.

Path Parameters

string
required
Market ID.

Body Parameters

string
required
Amount to withdraw as a positive decimal string, in the market’s borrow asset. It may carry at most as many decimal places as the borrow asset supports, and must not exceed the fund’s balance.
string
required
The wallet that receives the withdrawal, as a 0x-prefixed 20-byte address. The fund reverts on the zero address.

Response Fields

object
The response has no action field and the route has no confirm step. The API does not record the withdrawal. Once it mines, stats.totalWithdrawn and stats.currentBalance on Get Insurance Status reflect it.

Error Codes