Skip to content
Lattice

IStrategyManagerRecovery

Git Source

Title: IStrategyManagerRecovery

Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)

Deposit latch of the StrategyManager facet, set by a force removal and cleared by the admin.

A force removal (removeStrategy on a strategy whose totalAssetsManaged() read fails) drops the strategy's funds from the vault's NAV. Any of those funds that later return to the vault are a plain donation, so a depositor who entered at the lower NAV would capture part of them from the existing holders (#270). The removal therefore latches deposits closed: while depositsLatched is true, VaultCore's deposit/mint revert with IVaultCore.VaultCoreDepositsLatched and its maxDeposit/maxMint return 0. Withdrawals and redemptions stay open, capped at idle as usual. The admin clears the latch once the stranded funds are recovered or written off. Returned funds accrue to whoever still holds shares when they return; a holder who exits while latched is priced on the idle-only NAV and gives up their share of them. The latch lives in this manager, and a fresh manager starts unlatched. So that the vault admin's IVaultCore.setStrategyManager does not reopen deposits, the swap reads depositsLatched (and totalAllocated()) on the outgoing manager and, unless both report nothing stranded, latches the vault itself (IVaultCoreRecovery, cleared by the vault admin, #305). Kept apart from IStrategyManager so that interface's ERC-165 id stays 0xcce4011b.

Functions

depositsLatched

Returns true while a force removal keeps the vault's deposits closed.

function depositsLatched() external view returns (bool);

Returns

NameTypeDescription
<none>bool

clearDepositLatch

Clears the deposit latch, reopening the vault's deposits unless the vault's own manager-swap latch (IVaultCoreRecovery) is also set. Admin-only (DEFAULT_ADMIN_ROLE, the role that gates removeStrategy).

Clear it once the force-removed strategy's funds are back in the vault or written off: deposits then price on a NAV that no longer moves when those funds return. Reverts with StrategyManagerDepositLatchNotSet if the latch is not set.

function clearDepositLatch() external;

Events

DepositLatchSet

Emitted (after StrategyForceRemoved) when a force removal of strategy latches deposits closed. Emitted on every force removal, including one made while the latch is already set.

event DepositLatchSet(address indexed strategy);

Parameters

NameTypeDescription
strategyaddress

DepositLatchCleared

Emitted when account clears the deposit latch, reopening deposits unless the vault's own manager-swap latch (IVaultCoreRecovery) is also set.

event DepositLatchCleared(address indexed account);

Parameters

NameTypeDescription
accountaddress

Errors

StrategyManagerDepositLatchNotSet

Reverts when clearDepositLatch is called while deposits are not latched.

error StrategyManagerDepositLatchNotSet();