The UpdateWeightRunner implements oracle staleness checks using a strict greater than operator (>) instead of greater than or equal to (>=). This causes the contract to reject oracle data that is exactly at the staleness threshold age, leading to unnecessary fallbacks to backup oracles.
Current implementation:
Example scenario:
Unnecessarily rejects valid oracle data
Increases gas costs through avoidable fallback oracle usage
Creates inconsistent behavior at threshold boundary
Low severity as it only affects edge cases and has fallback mechanism
Manual code review
Change the comparison operator to greater than or equal to:
This ensures that data exactly at the threshold age is considered fresh, which is the expected behavior for oracle staleness checks.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.