The identified vulnerability revolves around the inconsistency in managing oracles within the UpdateWeightRunner
contract. Specifically, the removeOracle
function allows the removal of oracles from the approved list, but once oracles are set in the setRuleForPool
function using the poolOracles
mapping for a given pool, the oracles are permanently fixed.
The UpdateWeightRunner
contract offers a removeOracle
function to remove oracles from the pool:
However, in setRuleForPool
function, it checks poolOracles[msg.sender].length == 0
, which means the pool oracles can not be changed once the rule for a pool is set:
This inconsistency means that even if an oracle becomes untrusted or invalidated through the removeOracle
function, there is no means to replace or update the oracles previously set for a pool.
This oversight can lead to significant issues, as the system may end up relying on oracles that have been removed from the approved list, resulting in potential data inaccuracies and financial repercussions for the users relying on these oracles.
The impact is HIGH and the likelihood is LOW, so the severity is MEDIUM
Manual Review
To patch this vulnerability, a function should be introduced to update or replace the oracles associated with a pool after its creation. For example, the implementation of a new function like updateOraclesForPool
could allow the authorized entities to set new or replace existing oracles, thus ensuring the correct management and functionality of the pool in response to the dynamic nature of oracle availability and reliability:
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.