Vaults 1.5 Risks
This page shows some risks that as a developer and as a user you need to be aware of
Potential Risks - Mitigated by a timelock
Sudden changing of Strategy (Increased risk / Risk of Rug)
It is crucial that each Vault has it's governance
field set to a timelock.
This is because the Vault can change strategy, while there are checks to enforce that funds are migrated, changing the strategy can force depositors to take on more risk than expected.
As such any form of changing of strategy MUST happen under timelock
Before depositing, make sure that the governance is a timelock and that the timelock has at last 2 days before being executable
Slippage when moving funds during Pause
Pausing is a security precaution set in place to mitigate exploits or to reduce their impact.
To ensure that funds can be moved to a safe place, the function withdrawToVault
can be executed even when the strategy is paused, this allows to move the funds from the Strategy to the Vault. This function could be subject to slippage (for example in a leveraged strategy) and suddenly moving funds could cause a loss of funds.
This is something that can happen during a rescue operation.
The risk of loss is mitigated by the fact that in a situation of pause withdrawToVault
can be executed only once.
You should review the Strategy.sol function _withdrawAll
and understand what it does in order to understand if the strategy could be subject to slippage.
Additional Findings from the Quantstamp Audit
Description: Smart contracts will often have owner variables to designate the person with special privileges to make modifications to the smart contract. The governance role, as setup during
initialization of the Vault contract, may perform the following privileged actions:
Appoint a new governance, by calling Vault.setGovernance() with the new address, or renounce this role, by setting it to an uncontrolled address, i.e. address(0)
and thereby block all followingly listed actions for the future.
Appoint a new strategist or unset it, by calling Vault.setStrategist().
Appoint a new keeper or unset it, by calling Vault.setKeeper().
Appoint a new treasury or unset it, by calling Vault.setTreasury().
Change the strategy address or unset it, by calling Vault.setStrategy().
Modify the min state variable, by calling Vault.setMin().
Modify the maxWithdrawalFee state variable, by calling Vault.setMaxWithdrawalFee().
Modify the maxPerformanceFee state variable, by calling Vault.setMaxPerformanceFee().
Modify the maxManagementFee state variable, by calling Vault.setMaxManagementFee().
Change the guardian address or unset it, by calling Vault.setGuardian().
Change or unset the guestList, by calling Vault.setGuestList().
Change or unset the withdrawalFee, by calling Vault.setWithdrawalFee().
Change or unset the performanceFeeStrategist, by calling Vault.setPerformanceFeeStrategist().
Change or unset the performanceFeeGovernance, by calling Vault.setPerformanceFeeGovernance().
Change or unset the managementFee, by calling Vault.setManagementFee().
Withdraw all funds from the strategy to the vault, by calling Vault.withdrawToVault().
Withdraw all funds of a specific non-protected token from the strategy to himself. by calling Vault.sweepExtraToken().
Initiate the pause state, freezing most operations, by calling Vault.pause().
Transition into unpaused state, unfreezing most operations from the paused state, by calling Vault.unpause().
Freeze or unfreeze the ability to perform deposits, by calling Vault.pauseDeposits() or Vault.unpauseDeposits().
Send all available underlying tokens to the strategy, by calling Vault.earn().
Last updated
Was this helpful?