Atomic Loop Reverts on Single Bad Entry (Single Failure Blocks Batch Update + DoS-on-Batch Risk)
Description:
Inside StrataxOracle::setPriceFeeds, each iteration calls StrataxOracle::_setPriceFeed() which can revert on invalid inputs or failing decimals check. A single invalid item causes the entire batch to revert, preventing valid updates in the same transaction.
And StrataxOracle::_setPriceFeed contains multiple require() statements that can revert:
Impact:
Batch update becomes “all-or-nothing”: one bad pair blocks all other valid pairs.
Operational DoS risk for batch maintenance (especially when updating many feeds).
Poor resilience: operators must retry with smaller batches or pre-validate off-chain.
Proof of Concept:
If one _priceFeed is address(0) (or returns decimals != 8), the whole transaction reverts and none of the other valid feeds are updated.
Recommended Mitigation:
Option A (preferred): pre-validate all entries first, then apply updates (still atomic but fails early with better guarantees):
Option B: make the batch best-effort (process valid entries, skip invalid), and emit an event for failures:
Note:
try/catchrequires an external call boundary (e.g., a dedicated external function). This increases gas, so choose based on operational needs.
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.