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

onlyBeneficiaryWithIsInherited doe snot support a big number of beneficiaries

Summary:

modifier needs to be redesigned with gas efficiency and security in mind. it will fail for big number of beneficiaries, say 200, which may exceed block gas limits.

Vulnerability Details

  1. DOS Vulnerability: An owner could intentionally or unintentionally add so many beneficiaries that certain functions become unusable due to gas limits.

  2. Poor Design Pattern: Using array iteration that could reach out-of-bounds is an inherently risky pattern.

  3. Scalability Issue: The contract doesn't handle a scenario with many beneficiaries efficiently.

Impact

  1. For very large beneficiary arrays, transactions will fail with "out of gas" errors

  2. Linear or worse growth in gas consumption as the array size increases

  3. Concrete gas usage numbers that can be compared against block gas limits

Tools Used

Recommendations

redesign and replace the loop

Updates

Lead Judging Commences

0xtimefliez Lead Judge 3 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.