QuantAMMWeightedPool
defines the oracleStalenessThreshold
as the maximum amount of time that an oracle can be stale.
This means, when the threshold is set to say 5, a result generated by the oracle at block.timestamp - 5
is allowed (it can be 5 seconds old) like the natspec says.
However, in QuantAMMWeightedPool::_getData()
we see that in the below snippet due to the strict inequality data that is allowed by the threshold would not pass the check and therefore it would end up reverting.
Recommended Mitigations:
Do a non strict inequality check in both places
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.