QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

Potential DOS on services that use UpdateWeightRunner::_getData() due to missing validation for oracleStalenessThreshold in QuantAMMWeightedPool

Summary

Missing validation for oracleStalenessThreshold in QuantAMMWeightedPool.sol can an interuption of services that use UpdateWeightRunner::_getData() .

Vulnerability Details

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.

Impact

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.

Tools Used

Manual review.

Recommendations

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.

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.