Insurance Fund
Withdraw from Insurance Fund
Calldata for the fund owner to withdraw from the market insurance fund
POST
Builds the fund’s
The response has no
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.
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
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.
