The KeeperProxy contract contains a critical issue in its price validation logic, where the longToken price is validated against the indexToken price, not the corresponding longToken price. This mismatch in price validation can lead to invalid trades.
The issue exists in the _validatePrice function where price validation for longToken incorrectly uses indexTokenPrice instead of longTokenPrice:
The problem stems from using indexTokenPrice to validate longToken, This can lead to inaccurate price validation. Using prices.indexTokenPrice instead of prices.longTokenPrice to validate long token prices, thus breaking the integrity of the price validation mechanism.
Positions may be opened/closed at incorrect prices
Unfair liquidations due to incorrect price validation
Manual review
Correct price validation.
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.