QuantAMM

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

There is no stale price check in the `ChainlinkOracle` contract or the `MultiHopOracle` contract, which means the oracle may send outdated data.

Summary

The ChainlinkOracle contract and MultiHopOracle contract do not have any stale price check implemented.

Vulnerability Details

The ChainlinkOracle and MultiHopOracle contracts can provide outdated data or price feeds because the _getData funciton in them do not implementation to check for stale prices.

https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/ChainlinkOracle.sol#L27

https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/MultiHopOracle.sol#L28

Impact

The calculation will be done with outdated data, causing both the user and the protocol to lose value.

Tools Used

Manual review

Recommendations

Make a MAX_DATA_AGE variable and implemet the following in both contract.

+ require(block.timestamp - timestamp <= MAX_DATA_AGE, "Stale oracle data");
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

invalid_chainlink_staled_data_updateAt_roundId_known_issue

LightChaser: ## [Medium-4] Insufficient oracle validation

Support

FAQs

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

Give us feedback!