The Standard

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

If a user makes so many `decreasePosition` requests the `position` function becomes unusable permanently

Vulnerability Details

If a user makes so many decreasePosition requests in 1 day, the length of pendingStakes becomes so large and this may cause to exceed block gas limit. This pendingStakes is used in a for loop in the holderPendingStakes function, which is then used in the position function.

Impact

Holder cannot see its position.

Tools Used

Manual Review

Recommendations

Add a requirement to decreasePosition function that checks minimum stake amount and add pendingStake limit for each user.

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.