An issue was identified in the _calculateBoost function where the condition if (boostedAmount < amount) should instead be if (boostedAmount <= amount). This ensures that if the calculated boost is exactly equal to the base amount, it does not unnecessarily override the return value.
The current logic checks if boostedAmount is strictly less than amount, but it should also account for cases where boostedAmount == amount. If boostedAmount equals amount, returning amount is correct because the minimum boost factor (1x) should not modify the base amount.
Users may not receive the intended boost calculation when the boost factor is exactly 1x.
Incorrect incentive calculations could lead to unfair reward distribution.
Manual Code Review
Static Analysis
Modify the condition to use <= instead of <:
This update ensures that users receive the correct boost calculation and prevents unnecessary overrides in the function’s logic.
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.