The defaultGaugePointFunction incorrectly interprets the conditions under which gauge points should be decremented, especially when optimalPercentDepositedBdv is 0. This results in an unintended decrement of points to 0 in situations where there should be no change.
This vulnerability compromises the integrity of the contract's incentive mechanisms, discouraging participation by unfairly penalizing users through the reduction of their gauge points without a behavior-based justification.
The flaw was evidenced in the testGaugePointsDecrementFuzzing test, which attempted to validate the correct decrement of points under specific conditions, resulting in newGaugePoints = 0 instead of the expected decrement of currentGaugePoints by ONE_POINT.
Logic Revision and Correction: Review and adjust the function's logic to correctly interpret and apply decrement conditions. This includes ensuring the function properly handles edge cases and extreme values without unintended consequences. To prevent the issue of gauge points decrementing to 0 when not expected, the function's conditions for decrementing should be clarified and strictly enforced, as follows:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.