Closed sherlock-admin2 closed 3 months ago
this is not a dupe of #25
the public vault owner sets _init0
and _init1
upon initialisation of the new module
however the submission states that the executor can incorrectly set the init values to cause a DoS
hence, the submission is invalid and not related to #25
BiasedMerc
medium
When Vault Executors set one _init to 0, deposit() will be broken
Summary
When a vault executor calls
ArrakisStandardManager::setModule()
to set a new module and also initialize a new module, the passedpayloads_
can contain 1_init
that is 0 which is intended to be a valid setup, however this breaks integration with SovereignPools. This can cause a Vault Executor to set a new module that can be initialised incorrectly, leading to broken deposit functionality.Vulnerability Detail
ArrakisStandardManager::setModule()
Vault Executor passes
payloads_
to be utilised when Initializing a new module. ArrakisMetaVault::setModule()After setting the new module for the vault, the new vault is initialised by directly calling it using a low-level call. ValantisHOTModule::initialize()
When Initlilizing the Module, it is ensures that BOTH init values are not equal to 0, if both are 0 then the call revert. However one Init can be set to 0.
ValantisHOTModulePublic:deposit()
When the first
deposit()
is called on a Module, the 2Init
values are used from the Initialization. If either is set to 0, then one amount passed toalm.depositLiquidity()
will be 0.HOT::depositLiquidity()
0 amounts easily pass through the
depositLiquidity()
function and are passed to the SovereignPool intodepositLiquidity()
SovereignPool::depositLiquidity()However at this point the
SovereignPool
will revert as if either passed amount is 0, then it will revert. This means that if an Executor passes one 0 init, then this will cause the module to be bricked as each first deposit will break.Impact
Any module Initialized with one init value being 0, will have it's core functionality of depositing liquidity to be broken.
Code Snippet
Tool used
Manual Review
Recommendation
Ensure that neither init value is 0.