20,000 USDC
View results
Submission Details
Severity: low

[L-10] The `update` and `update For` functions must be declared as internal/private

Vulnerability Details

The purpose of these functions is to update the global index of earned rewards in the deposit, withdraw, claim functions.

However, this function is being made available to any user.

Impact

They can activate the functions when it is not due.

Tools Used

Manual code review

Recommendations

Change the visibility of both functions depending on whether you want this contract to be used in the future in some inheritance. You could change it to internal to have access to the same functions or private if you only want this contract to have access.

Support

FAQs

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