UpdateWeightRunner contract has a functionality to disapprove an Oracle from being used . It would cause issues , if removed oracle was the only backup oracle of the Pool and the optimized oracle is giving a stale value . In such situations important operations like performing updates in UpdateWeightRunner & operations like adding liquidity , removing liquidity & even transferring of lpNft in UpliftOnlyExample.sol get's paused temporarily till the Optimized Oracle returns an updated value .
UpdateWeightRunner contract has this removeOracle function where approvedOracles mapping can be set to false :
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/UpdateWeightRunner.sol#L217-L223
The private scoped _getOracleData uses it before returning any data from oracle & skips the execution by returning empty struct if it's turned off as can be seen here :
This is the function that is used in _getData function to get the data of different tokens of a pool as can be seen here :
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/UpdateWeightRunner.sol#L338-L383
The problem is that the public getData function and private _getData function are used in a lot of important operations and reverts in the function causes temporary outage for such operations :
here
& here :
& here :
The main reason why this causes an issue is because there is no way add another approved Oracle to the poolBackupOracles mapping for Pool Owner or UpdateWeightRunner owner to resolve this issue . This issue can also happen in the case where an optimisedOracles of the pool has been removed and the only backup Oracle is returning stale values .
Protocol is supposed to deployed on L2's also . So if optimisedOracles of the Pool is Chainlink and if the sequencer outage happens , then it increases the chance of such issues happening.
Temporary Outage of important operations in UpdateWeightRunner & UpliftOnlyExample.sol .
The performUpdate is the one of the important functions in UpdateWeightRunner and the function could be out of use temporarily in such situations .
The getData function is also used in the addLiquidityProportional , onAfterRemoveLiquidity & afterUpdate functions of UpliftOnlyExample contract .
Manual Review
Add an access controlled function in UpdateWeightRunner to allow addition of new oracles to the Pool in case of emergencies .
Likelihood: Low, when an oracle is removed. Impact: High, Pools using the removed oracle will corrupt the gradient and moving average calculation.
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.