Missing validation for oracleStalenessThreshold
in QuantAMMWeightedPool.sol
can an interuption of services that use UpdateWeightRunner::_getData()
.
oracleStalenessThreshold
is the maximum amount of time after that an oracle price can be stale. This variable is set in the initialize
function of the contract but there is no check to ensure the correctness of the value being assigned.
As a result, the oracleStalenessThreshold
is allowed to be zero, which would make the sanity checks in UpdateWeightRunner::_getData()
always fail, and the transaction will revert even if the prices the oracles give are not stale.
Manual review.
Check for oracleStalenessThreshold
to be not zeroed in the QuantAMMWeightedPool::initialize
function
It is recommended to set MIN_THRESHOLD
(greater than zero) and MAX_THRESHOLD
constants and check oracleStalenessThreshold
on them.
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.