KeeperProxy.sol -> Line 155
In the KeeperProxy contract, the _validatePrice function is supposed to check that market prices are within acceptable limits before any keeper actions take place. However, there's a mistake: it verifies the price for the long token using the index token’s price feed (prices.indexTokenPrice) instead of the dedicated long token price feed (prices.longTokenPrice).
Current Assumption:
Right now, the system assumes that the index token and the long token are the same, so this bug might not cause issues immediately. But if this assumption ever changes, orders could be executed based on manipulated prices, potentially resulting in losses—especially in leveraged trading environments.
Future Risk:
If the protocol expands to support markets where the index and long tokens differ, this misconfiguration could allow an attacker to manipulate price validations by influencing the index token’s price, leading to erroneous order execution.
Financial Impact:
This error could have a financial impact and significant reputational loss and losses for users
Here is the code now:
Order Execution Risk: Orders involving long tokens could be executed based on manipulated or incorrect price data, leading to potential financial losses in leveraged trading scenarios.
Exploitation Potential: An attacker with influence over the index token’s price feed might cause valid orders to be rejected or processed under adverse pricing conditions.
Future Vulnerability: As the protocol scales or supports a broader range of markets, the misconfiguration could expose the system to significant risk.
Forge/Foundry
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.