Skip to main content
POST
Builds the two transactions that add capital to the market’s insurance fund: an approval for the fund to pull the settlement token (stablecoin), then the fund’s topUp call.
A top-up is a one-way transfer. The wallet that sends it receives no shares and holds no claim on the fund, and nothing is owed back to it. Money leaves the fund only as coverage paid to a market it authorizes, or through a withdrawal by the fund owner.
Any wallet may top up, whether the operator funding its own reserve or a third party standing behind the pool. The fund books a top-up as a deposit with the sending wallet recorded as its source. That is what makes the capital count in the fund’s lifetime deposits. An earlier fund implementation cannot book one, so the API refuses it rather than offer a plain transfer.

Top up and record it

1

Build the calldata

Call this endpoint with amount and the fromAddress that will sign. The API checks that the wallet holds enough of the borrow asset before offering anything.
2

Sign both steps from fromAddress

Broadcast the approval, then topUp, in order. The fund pulls from the wallet that sends topUp, and records that wallet as the source, so both steps must come from fromAddress.
3

Record the top-up

Send the topUp step’s hash to Record Insurance Top-Up, with the amount and fromAddress that confirmWith.body carries. This route has no confirm call of its own.

Path Parameters

string
required
Market ID.

Body Parameters

string
required
Amount to add as a decimal string, for example "5000". Must be greater than zero. Denominated in the market’s borrow asset and parsed at its decimals.
string
required
The wallet that will sign both steps, as a 0x-prefixed 20-byte address. The API checks its balance against amount, and the fund records it as the top-up’s source.

Response Fields

object

Error Codes