DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

`unstakeAll` function can't handle the current epoch

Summary

The unstakeAll function is intended to allow users to unstake all eligible deposits across multiple epochs. However, it lacks explicit handling for immediate unstaking of deposits from the current epoch.

Vulnerability Details

The function does not contain specific logic to allow immediate unstaking of deposits from the current epoch. It applies the same lock cycle checks to all epochs, potentially restricting users from unstaking their current epoch deposits immediately.
The function iterates over all active deposits and applies the lock cycle check uniformly, without distinguishing between the current and past epochs.

Impact

Users may expect to unstake deposits upto the current epoch immediately, but the function's current logic does not support this, leading to potential dissatisfaction.

Tools Used

Manual Review

Recommendations

Introduce specific logic within the unstakeAll function to allow immediate unstaking of deposits from the current epoch. This can be achieved by adding a condition to bypass the lock cycle check for the current epoch.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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