kennedy1030 - Modifying the `_managerFeePIPS` variable within the `ValantisHOTModule` is not possible until the `ValantisHOTModule` has been designated as the `poolManager` of the SovereignPool. #58
Modifying the _managerFeePIPS variable within the ValantisHOTModule is not possible until the ValantisHOTModule has been designated as the poolManager of the SovereignPool.
Summary
Modifying the _managerFeePIPS variable within the ValantisHOTModule triggers the execution of the SovereignPool::setPoolManagerFeeBips function. However, this operation will fail as long as the ValantisHOTModule has not been designated as the poolManager of the SovereignPool, since the SovereignPool::setPoolManagerFeeBips function can only be called by the poolManager.
Vulnerability Detail
If the ValantisHOTModule::setManagerFeePIPS function is invoked to modify the _managerFeePIPS value, it will trigger a call to the SovereignPool::setPoolManagerFeeBips function, even though the alm may not be set yet, as the _oldFee value is still present.
However, the SovereignPool::setPoolManagerFeeBips function is protected by the onlyPoolManager modifier. Therefore, if the ValantisHOTModule has not been designated as the poolManager of the SovereignPool, the transaction attempting to update the manager fee bips will fail.
Modifying the poolManagerFeeBips value of the SovereignPool is not possible until the ValantisHOTModule has been designated as the poolManager of the SovereignPool.
kennedy1030
medium
Modifying the
_managerFeePIPS
variable within theValantisHOTModule
is not possible until theValantisHOTModule
has been designated as thepoolManager
of the SovereignPool.Summary
Modifying the
_managerFeePIPS
variable within theValantisHOTModule
triggers the execution of theSovereignPool::setPoolManagerFeeBips
function. However, this operation will fail as long as theValantisHOTModule
has not been designated as thepoolManager
of theSovereignPool
, since theSovereignPool::setPoolManagerFeeBips
function can only be called by thepoolManager
.Vulnerability Detail
If the
ValantisHOTModule::setManagerFeePIPS
function is invoked to modify the_managerFeePIPS
value, it will trigger a call to theSovereignPool::setPoolManagerFeeBips
function, even though thealm
may not be set yet, as the_oldFee
value is still present.However, the
SovereignPool::setPoolManagerFeeBips
function is protected by theonlyPoolManager
modifier. Therefore, if theValantisHOTModule
has not been designated as thepoolManager
of theSovereignPool
, the transaction attempting to update the manager fee bips will fail.Impact
Modifying the
poolManagerFeeBips
value of theSovereignPool
is not possible until theValantisHOTModule
has been designated as thepoolManager
of theSovereignPool
.Code Snippet
https://github.com/sherlock-audit/2024-03-arrakis/blob/main/arrakis-modular/src/abstracts/ValantisHOTModule.sol#L271-L294
Tool used
Manual Review
Recommendation
The
ValantisHOTModule::setManagerFeePIPS
function should be fixed as follows.