The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

External calls in an un-bounded `for-`loop may revert transaction

Summary

Executing external calls within unbounded for-loops poses a significant risk of transaction revert.

Vulnerability Details

Excessive iterations may consume an exorbitant amount of gas, potentially reaching the block gas limit, causing the transaction to fail.

File: contracts/LiquidationPool.sol
/// @audit 2 external calls in unbounded for-loop -> 211: for (uint256 j = 0; j < holders.length; j++) {
218: (,int256 assetPriceUsd,,,) = Chainlink.AggregatorV3Interface(asset.token.clAddr).latestRoundData();
232: IERC20(asset.token.addr).safeTransferFrom(manager, address(this), _portion);

Tools Used

Recommendations

Consider limiting the number of iterations in such loops, and implement robust error-handling mechanisms for potential failures in the looped external calls.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

informational/invalid

Support

FAQs

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