HardhatDeFi
15,000 USDC
View results
Submission Details
Severity: medium
Invalid

Large Batches

Summary

Large Batches can be costy

Vulnerability Details

If _collateralTokens contains a large number of addresses, the function could hit the block gas limit, causing the entire transaction to fail.

Impact

GLarge batches can exceed the block gas limit and cause reverts.

Tools Used

Manual Review

Recommendations

Enforce a limit on the maximum batch size:

require(_length <= MAX_BATCH_SIZE, "Batch size too large");

You can set MAX_BATCH_SIZE as a constant, e.g., uint256 constant MAX_BATCH_SIZE = 50;.

Updates

Lead Judging Commences

bube Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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