Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

Unsafe External Calls Inside Loops

Summary

The contract performs external calls within loops without proper safeguards, creating potential for denial of service and transaction failures.

Vulnerability Details

The contract makes external calls inside a loop without implementing proper safeguards. If an external call fails or takes too long to execute, it may disrupt the entire function execution.

Affected code:

for (uint256 i = 0; i < recipients.length; i++) {
(bool success, ) = recipients[i].call{value: amounts[i]}("");
require(success, "Transfer failed");
}

Impact

  • A failed external call may revert the entire loop, affecting all iterations

  • The contract may become unusable if a single recipient's address is problematic

Tools Used

  • Slither

  • Manual Review

Recommendations

  • Implement pull-over-push pattern

  • Batch process transactions to minimize failures

Updates

Lead Judging Commences

0xtimefliez Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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