Inadequet Loop Logic in Backup Oracles - Single Failure Disrupt Whole Process
_getData
function in UpdateWeightRunner
contract is used to update asset weights in a pool using oracle data.
However, it has a critical flaw in its looping backup oracles: if any single asset's oracle fails, the whole update process would fail.
Here's the implementation of _getData
function in UpdateWeightRunner
contract:
As seen above, the UpdateWeightRunner
contract relies on multiple oracles (primary and backups) to fetch data for each asset. If any asset's oracles fail to provide fresh data, the contract reverts the entire weight update process.
This means that one problematic asset oracle can prevent updates for all assets in the pool, even if other oracles are functioning correctly. The design does not allow for partial updates or fallback mechanisms, creating a systemic point of failure.
Stale updates occur when a single failing oracle blocks weight updates for all assets, leading to outdated pool data and reduced efficiency.
This creates an exploitation risk, where attackers can manipulate predictable price discrepancies for profit, harming liquidity providers and the protocol.
Manual Review
Implement fallback mechanisms like using the last successful values or allowing partial updates based on risk thresholds to ensure the pool remains operational during oracle failures.
Likelihood: Low, price feed should revert. Impact: High, DoS of the protocol
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.