Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Invalid

Incorrect Boost Calculation Condition

Summary

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.

Vulnerability Details

if (boostedAmount < amount) {
return amount;
}

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.

Impact

  • Users may not receive the intended boost calculation when the boost factor is exactly 1x.

  • Incorrect incentive calculations could lead to unfair reward distribution.

Tools Used

  • Manual Code Review

  • Static Analysis

Recommendations

Modify the condition to use <= instead of <:

if (boostedAmount <= amount) {
return amount;
}

This update ensures that users receive the correct boost calculation and prevents unnecessary overrides in the function’s logic.

Updates

Lead Judging Commences

inallhonesty Lead Judge
7 months ago
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!