The oracle_lib._stale_check_latest_round_data() function validates staleness but does not check if the returned price is positive.
Chainlink oracles return int256 for price, which could be zero or negative during extreme market conditions or oracle malfunctions.
A zero or negative price would cause division by zero errors or allow users to mint unlimited DSC against minimal collateral.
Likelihood: Low
Reason 1 // Requires oracle malfunction or extreme market conditions
Reason 2 // Chainlink has safeguards but edge cases exist
Impact: Critical
Impact 1 // Zero price causes division by zero in _get_token_amount_from_usd
Impact 2 // Negative price converts to huge uint256, breaking all calculations
Impact 3 // Users could mint unlimited DSC with minimal collateral
Impact 4 // Complete protocol insolvency
The following demonstrates how a zero or negative oracle price breaks the protocol's core functionality. When the price converts from negative int256 to uint256, it becomes an astronomically large number, allowing users to mint massive amounts of DSC with tiny collateral deposits.
Add a check to ensure the oracle price is strictly positive before returning. This protects against oracle malfunctions and ensures all downstream calculations remain valid and bounded.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.