The protocol currently enforces a uniform staleness threshold across all oracles within a pool. This approach neglects the varying update intervals of different oracles. By treating all oracles as if they have the same update frequency, the system risks either prematurely invalidating fresh data or accepting stale information.
getOracleStalenessThreshold
returns the oracleStalenessThreshold
of the pool:
It is used in the _getData function of updateWeightRunner
to check for stale prices of assets:
The issue is that each pool uses a single staleness threshold to determine whether oracle data is valid. But different asset oracles within a pool can have different heartbeats.
It can cause stale data being incorrectly flagged as valid or valid data being rejected as stale, depending on the heartbeat of the oracle.
VSCode
Replace the single threshold with per-oracle configurations.
This is by design, staleness is a strategy aspect: it requires all data to have been updated within n minutes. No more precision needed.
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.