The contract relies on Chainlink price feeds for market data validation. If the price feed is compromised, delayed, or manipulated, it could lead to incorrect price validation, resulting in unfair liquidations or suboptimal trades.
PoC:
An attacker manipulates the Chainlink price feed for a token, causing it to report an artificially low or high price.
The _validatePrice function uses the manipulated price to validate market prices, leading to incorrect execution of keeper actions.
Example:
(, int chainLinkPrice, , uint256 updatedAt, ) = AggregatorV2V3Interface(dataFeed[token]).latestRoundData();
require(updatedAt > block.timestamp - maxTimeWindow[token], "stale price feed");
require(
_absDiff(price, chainLinkPrice.toUint256()) * BPS / chainLinkPrice.toUint256() < priceDiffThreshold[token],
"price offset too big"
);
If chainLinkPrice is manipulated, the validation will pass even with incorrect prices.
Incorrect price validation could lead to financial losses, unfair liquidations, and protocol instability.
Chatgpt
Use multiple independent price oracles to validate prices and reduce reliance on a single source.
Implement price deviation checks to detect and respond to anomalies.
Add a grace period for price updates to account for potential delays.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
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.