In the KeeperProxy contract, the _validatePrice function is designed to ensure that the on-chain Chainlink price matches the price submitted by the keeper for each relevant token (indexToken, longToken, and shortToken). However, there is a critical flaw in how the _check(...) function is called within _validatePrice.
Instead of validating the longToken price against its correct longTokenPrice, the contract mistakenly checks it against indexTokenPrice. This means:
marketData.longToken should be validated using prices.longTokenPrice.
marketData.longToken is incorrectly checked against prices.indexTokenPrice.
Incorrect Price Validation – The longToken is validated against an unrelated token’s price feed (indexToken), breaking the integrity of the price-checking mechanism.
Potential Exploits – A malicious keeper (or attacker, if additional security checks are weak) could manipulate the indexTokenPrice to pass incorrect prices for longToken, potentially leading to unfair liquidations, mispriced positions, or exploitative arbitrage opportunities.
Severe Economic Risk – If attackers can manipulate the perceived price of longToken, they can exploit miscalculations in collateral, liquidation thresholds, and order execution.
Likelihood: None/Very Low, everytime the keeper send a price via run/runNextAction (sent by the Gamma keeper). Impact: Medium/High, does not check the longTokenPrice, it could go out of range. Keep in mind indexToken == longToken, an error from the keeper could be considered informational.
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.