The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: high
Valid

The functions which call `consolidatePendingStakes` and `deletePendingStake` could get DOS-ed if `pendingStakes` ends up having many items in the array.

Vulnerability Details

The function consolidatePendingStakes iterates twice through the pendingStakes array one in the function itself and later in deletePendingStake in the flow. If there are lot of items in the array, the function could run out of gas, and all functions which call consolidatePendingStakes would become inaccessible for the protocol users.

Impact

Functions which call consolidatePendingStakes becomes inaccessible.

Tools Used

Manual

Recommendations

Improve logic, or gain control over pendingStakes similar to other arrays.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

pendingstake-dos

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

pendingstake-high

Support

FAQs

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