In the StrataxOracle.sol contract, the price feeds are directly fetched from Chainlink without verifying whether the price data is up-to-date. The contract uses the latest price from Chainlink's latestRoundData() without ensuring that the data isn't stale.
The specific issue is that the contract assumes the price data is fresh, but it doesn't validate if the feed has been updated recently, potentially leading to the usage of outdated prices. This can result in incorrect collateral values, over-leveraging, or wrong liquidation calculations.
Likelihood:
The issue occurs every time the contract fetches a price from Chainlink without checking if the data is up-to-date.
This is especially problematic in cases of delays in price feed updates (e.g., network issues, downtime, or halts in the oracle feed).
Impact:
Incorrect collateral valuations: Using outdated prices may allow users to over-borrow, over-leverage, or undervalue collateral.
Risk of liquidation or insolvency: If the contract miscalculates collateral or loan-to-value ratios due to stale data, it can result in the liquidation of users' positions or system insolvency.
An example of how this could be exploited:
The oracle feed stops updating after a market crash.
The contract uses outdated price data, allowing a malicious user to over-borrow or manipulate their position.
As a result, the user may withdraw more than they should or borrow against stale collateral values.
Add stale price validation to ensure the price data is not outdated before it’s used for calculations.
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.
The contest is complete and the rewards are being distributed.