DeFiHardhatOracleProxyUpdates
100,000 USDC
View results
Submission Details
Severity: medium
Valid

Missing Return Statement in defaultGaugePointFunction

Summary

The defaultGaugePointFunction in the GaugePointFacet contract is intended to calculate and return the new gauge points based on the percentage of deposited BDV relative to an optimal percentage. The function correctly handles cases where the percentage is above or below certain thresholds, adjusting the gauge points accordingly. However, it lacks a return statement for the scenario where the percentage of deposited BDV is within the optimal range (between the UPPER_THRESHOLD and LOWER_THRESHOLD).

Impact

Without a return statement, the function will not return the expected currentGaugePoints when the deposited BDV percentage is within the optimal range. This could lead to unexpected behavior in the contract, potentially affecting the incentives mechanism and user rewards.

Tools Used

Manual Review

Recommendations

Add a return statement to handle the case where the percentage of deposited BDV is within the optimal range.

Updates

Lead Judging Commences

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

Optimal GP calculation

Support

FAQs

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