Skip to content

Emergency Flow

This document details the emergency and disaster recovery mechanisms within King's Vault V2.

Pause And Unpause

The Guardian can halt normal operations instantly.

Function Effect
vault.pause() Blocks all deposit and withdrawal flows.
vault.unpause() Reopens deposit and withdrawal flows if the vault is not permanently shutdown.

Shutdown

In severe scenarios, the Guardian can permanently disable the vault. This action is irreversible.

  1. The Guardian calls vault.shutdown().
  2. The Vault sets _shutdownTime = block.timestamp.
  3. The Vault calls Controller.fundExitOnlyForVault(address(this)).
  4. The Controller exits all registered strategies with the force = true flag.
  5. Normal deposit/withdraw flows are disabled permanently.
  6. Investors can now only call emergencyRedeem(receiver).

Emergency Redemption

Emergency redemption uses only idle vault assets. It burns all caller shares and transfers a pro-rata share of the currently held idle assets:

userAssets = userShares * idleAssets / totalSupply

In KingsVaultV2Async, emergencyRedeem() first handles any existing async requests:

Request State Behavior
Executed request Claims reserved assets first.
Pending request Returns the escrowed shares to the user.
No request Continues to the base emergency redeem logic.

Harvest Lock

The harvestOnlyForController(token, recipient) function prevents harvesting the native vault asset or the vault share token while the vault is active, or within 7 days after shutdown.

After 7 days from the shutdown() call, even native asset harvesting is allowed to recover remaining dust or trapped funds.