UpdateWeightRunner
- Logical flaw in permission logic on quantammAdmin
If both MASK_POOL_OWNER_UPDATES
and MASK_POOL_QUANTAMM_ADMIN_UPDATES
are enabled for a pool, a logical flaw in the implementation prevents the quantammAdmin
from accessing key functions as the checks prioritize the pool manager and inadvertently exclude the admin.
MASK_POOL_OWNER_UPDATES
represents the allowance for pool owners to update weights, while MASK_POOL_QUANTAMM_ADMIN_UPDATES
represents the allowance for the QuantAMM admin the ability to perform administrative updates.
However, if both flags are enabled for a pool, the quantammAdmin
will be unable to call the main functions including InitialisePoolLastRunTime
, setIntermediateValuesManually
, and setWeightsManually
.
This is caused by a logical flaw in the implementation of these functions, which fails to correctly handle scenarios where both flags are active.
Let's take a look at setWeightsManually
function:
As seen above, it prioritizes checking for the pool manager, which can inadvertently exclude the quantammAdmin
from accessing the function. As a result, the quantammAdmin is unable to execute the function.
The logical flaw prevents the quantammAdmin
from executing critical functions like InitialisePoolLastRunTime, setIntermediateValuesManually, and setWeightsManually when both MASK_POOL_OWNER_UPDATES and MASK_POOL_QUANTAMM_ADMIN_UPDATES are enabled.
This can result in the admin being unable to perform necessary updates or corrections to the pool, potentially leaving the pool in an incorrect or vulnerable state. It also undermines the intended permissions structure, which could disrupt the protocol's operations and create inefficiencies in managing the pool.
Manual Review
Modify the permission checks in the affected functions to ensure that both MASK_POOL_OWNER_UPDATES
and MASK_POOL_QUANTAMM_ADMIN_UPDATES
are properly handled.
Specifically, adjust the logic to allow the quantammAdmin
to access these functions.
Design choice confirmed by the sponsor.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.