Skip to main content
POST
Builds the setVaultLiquidity transaction that turns just-in-time vault liquidity on or off. While it is on, a borrow the pool cannot fund draws the shortfall from the market’s registered vaults inside the borrower’s transaction. The market admin, the wallet holding DEFAULT_ADMIN_ROLE, signs it. A draw needs no decision per loan. Within the caps each vault operator set for this market, vault money moves into the pool whenever a borrower needs it. From then on, the vault’s exit from this market depends on the market’s utilization. Off is the default. Turning the switch on draws on nobody until a vault is registered with Register Vault and its operator has set a draw cap for this market. Get Vault Liquidity shows every leg and explains the draw. Turning it off makes every registered vault inert, and every borrow is bounded by the pool alone again. Nothing already drawn moves. A vault’s position stays ordinary pool liquidity and leaves the way any provider’s does.

Path Parameters

string
required
Market ID.

Body Parameters

boolean
required
true lets the market draw on its registered vaults, false stops it. The current setting is not checked, so sending the value the market already has still builds a transaction.

Check the result

This API has no confirm call for the switch. A txHash in the body is ignored and the call answers with calldata again, so sending one confirms nothing. Once the transaction is mined, read useVaultLiquidity from Get Vault Liquidity.

Response Fields

object
A market still seeking a lender of record has no admin, so this call is refused with MARKET_PENDING_CURATOR before any calldata is built. When heldByThisInstance is false, a transaction signed by an instance wallet reverts on-chain. Hand the calldata to the wallet the lender of record placed DEFAULT_ADMIN_ROLE with.

Error Codes