DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Lack of Price Feed Fallback Mechanism

Summary

The KeeperProxy contract does not include a fallback mechanism for when the price feed fails or returns invalid values, such as 0, negative values, or values too far from the market price. This could lead to reliance on inaccurate or outdated price information for decision-making, potentially causing financial losses or invalid state changes.

Vulnerability Details

  • The function _validatePrice in KeeperProxy.sol is responsible for validating price data against a trusted price feed (Chainlink).

  • The code assumes that the price returned by the feed is always valid and does not have a fallback mechanism for scenarios where the feed fails or returns erroneous values, such as 0 or a value outside acceptable thresholds.

  • If the price feed fails or returns inconsistent data, this can lead to incorrect pricing decisions.

Impact

  • Financial Loss: Using invalid price data can cause incorrect decisions, such as triggering orders at incorrect prices or invalid price-based logic, which could lead to unexpected financial losses.

  • State Corruption: The contract could enter an invalid state where future actions are based on faulty price data.

  • Reputation Damage: If the price feed fails and there is no fallback, users may lose trust in the system, which could affect adoption and usage.

Tools Used

  • Manual code review

Recommendations

  • Implement a fallback mechanism to handle price feed failures, such as checking if the returned price is within an acceptable range before proceeding with critical actions.

  • Use fallback values or alternative oracles when the primary price feed fails.

  • Implement custom exception handling to revert transactions if the price feed is invalid.

Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

Suppositions

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.

Support

FAQs

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

Give us feedback!