StrataxOracle::getPrice does not check for stale Chainlink dataStrataxOracle::getPrice calls latestRoundData but doesn't check the updatedAt timestamp, performing no staleness check:
If the Chainlink feed becomes stale (e.g., the feed hasn't been updated due to network congestion, sequencer downtime), the oracle will return the last known price — which could be arbitrarily outdated — without any indication that the data is stale.
This affects every price-dependent calculation throughout Stratax:
calculateOpenParams (lines 402, 410) — Stale prices produce incorrect flashLoanAmount and borrowAmount, opening positions with wrong leverage or insufficient collateral:
calculateUnwindParams (lines 472-473) — Stale prices miscalculate collateralToWithdraw, causing the unwind to withdraw too much or too little collateral. These calls also have no zero-price validation:
_executeUnwindOperation (lines 585-586) — Stale prices during the actual flash loan callback produce an incorrect collateralToWithdraw, directly affecting how much collateral is withdrawn from Aave mid-execution:
Likelihood:
The ETH/USD Chainlink feed on Ethereum mainnet has a 1-hour heartbeat and a 0.5% deviation threshold (data.chain.link). If the price moves less than 0.5%, the on-chain answer is only refreshed once per hour. Since getPrice doesn't check the updatedAt return value, the contract cannot distinguish a 5-second-old price from a 59-minute-old one.
True staleness beyond the heartbeat (i.e., no update at all for multiple hours) occurs during feed deprecations or infrastructure issues. Chainlink has an ongoing feed deprecation process (docs), and missing staleness checks have been exploited or flagged in multiple real-world audits.
Impact:
calculateOpenParams computes flashLoanAmount and borrowAmount from the stale price, so a user opening a leveraged position receives incorrect leverage — either over-borrowing (creating an immediately liquidatable position on Aave) or under-borrowing (wasting user collateral on less leverage than intended).
calculateUnwindParams and _executeUnwindOperation derive collateralToWithdraw from the stale price. If the stale price overstates collateral value, too little collateral is withdrawn to fully repay the flash loan, causing the unwind transaction to revert or leaving residual debt. If it understates collateral value, excess collateral is withdrawn, and the surplus is effectively lost to the position owner.
Add a staleness check in StrataxOracle::getPrice using the updatedAt timestamp and a configurable heartbeat threshold:
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.