Core mechanisms
Non-custodial guarantees in Vault V2 are built on two fundamental features:- In-kind redemptions - Users can exit the vault even when underlying markets are illiquid
- Curator timelocks - Configuration changes require time delays, allowing users to exit before changes take effect
When the right timelocks are properly configured (not zero), users are guaranteed the ability to withdraw their assets before any critical configuration change becomes effective.
In-kind redemptions with forceDeallocate
The forceDeallocate function enables users to perform in-kind redemptions, converting their vault position into underlying market positions without requiring liquidity from the vault.
How it works
- Anyone can call
forceDeallocateto move assets from an adapter to the vault’s idle assets - Users can combine this with flashloans to exit the vault:
- Flashloan liquidity
- Supply it to an adapter’s market
- Withdraw via
forceDeallocate - Repay the flashloan
Penalty mechanism
A penalty of up to 2% can be set per adapter to disincentivize allocation manipulation and prevent abuse of relative caps. The penalty is paid by burning shares from the user.
Exit strategy
If a user hasA assets in the vault and the vault is fully illiquid, the optimal amount to force deallocate is:
Curator timelocks
Timelocks provide a time delay between when a configuration change is submitted and when it can be executed, giving users time to react.Timelocked operations
All curator configuration changes are timelockable except:decreaseAbsoluteCap(not timelocked)decreaseRelativeCap(not timelocked)
Timelock workflow
- Submit - Curator submits a configuration change via
submit(bytes calldata data) - Wait - The change must wait for the timelock duration to pass
- Execute - Anyone can execute the change after the timelock expires
Timelock management
Increasing timelocks Timelocks can be increased viaincreaseTimelock(bytes4 selector, uint256 newDuration):
- Must be greater than or equal to current timelock
- Existing pending operations can still execute at their original
executableAttime - Cannot be used on
decreaseTimelockselector itself
decreaseTimelock(bytes4 selector, uint256 newDuration):
- The timelock for this operation is the current timelock of the function being modified
- For example, decreasing the timelock of
addAdapteris timelocked bytimelock[addAdapter] - Cannot be used on
decreaseTimelockselector itself
Abdication
Functions can be permanently disabled by callingabdicate(bytes4 selector):
- The function can never be called again, regardless of timelock settings
- Useful for committing to immutability of specific configurations
- Cannot be reversed
When a function is abdicated, it’s still possible to submit data for it or change its timelock, but these actions will have no effect as the function remains unexecutable.
Sentinel powers
Sentinels can quickly derisk a vault by:- Revoking pending timelocked actions via
revoke(bytes calldata data) - Deallocating funds to idle
- Decreasing absolute and relative caps (not timelocked)
Security guarantees
The combination of timelocks and in-kind redemptions ensures:- Exit before harm - Users can always exit before configuration changes that might negatively impact them
- Permissionless exits -
forceDeallocateis callable by anyone, ensuring users can exit even when allocators don’t cooperate - Predictable changes - All critical configuration changes are announced via timelocks
- Emergency override - Sentinels can quickly reduce risk without going through timelocks
The vault itself is immutable. All configuration is managed through these timelocked mechanisms, ensuring transparency and predictability for depositors.
Best practices
For vault curators:- Set appropriate timelocks based on the liquidity profile of underlying markets
- Consider longer timelocks for critical functions like
addAdapterand gate changes - Use
abdicateto commit to certain configurations permanently - Keep force deallocate penalties reasonable (typically 0-2%)
- Monitor pending timelocked operations via events
- Understand the timelock settings for critical functions
- Know how to use
forceDeallocatefor emergency exits - Factor in force deallocate penalties when evaluating exit options