The Standard

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

Possible DoS Attack in `deleteHolder()` Function

Summary

Possible DoS Attack in deleteHolder() Function

Vulnerability Details and Impact

The deleteHolder() function iterates over the entire holders array until it finds the holder to be deleted. This operation has a time complexity of O(n), where n is the number of holders. This means that as the number of holders increases, the time taken to execute the function also increases.
If an attacker were able to add a large number of holders to the holders array, they could potentially cause the function to take an excessively long time to complete, effectively blocking other transactions from being processed.
Moreover, the deleteHolder() function also shifts all elements after the deleted one down to fill the gap left by the deleted element. This operation has a time complexity of O(n) as well, further exacerbating the problem.

Therefore, if the holders array becomes too large, the deleteHolder() function could become a significant bottleneck, leading to a potential DoS attack.

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.