Core Contracts

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

Boost Multiplier Always Returns Maximum Boost

Summary

The getBoostMultiplier function in the BoostController contract is intended to calculate a user’s boost multiplier based on their boost amount relative to the maximum boost. However, due to the current implementation, the function always returns the maximum boost multiplier (MAX_BOOST), regardless of the user’s actual boost value.

Vulnerability Details

The issue is found in the following code snippet:

if (userBoost.amount == 0) return MIN_BOOST;
// Calculate actual boost multiplier in basis points
uint256 baseAmount = userBoost.amount * 10000 / MAX_BOOST;
return userBoost.amount * 10000 / baseAmount;

Issue Explanation:

Calculation Error: The variable baseAmount is computed as a scaled value of userBoost.amount relative to MAX_BOOST. However, when used in the return statement, the expression userBoost.amount * 10000 / baseAmount simplifies to always yield MAX_BOOST.

Result: As a result, regardless of the actual boost calculation, any non-zero boost value results in the maximum boost multiplier being returned.

Impact

Incorrect Boost Representation: Users always receive the maximum boost multiplier, which does not accurately reflect their individual boost levels.

Distorted Reward Calculations: This miscalculation may lead to improper reward distributions or other downstream effects in the protocol’s economic model.

Tools Used

Manual

Recommendations

Revise the Calculation: Update the boost multiplier calculation logic to accurately reflect the intended boost value. Consider recalculating the multiplier based on the proper proportion of the user’s boost amount relative to the total expected range.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

BoostController::getBoostMultiplier always returns MAX_BOOST for any non-zero boost due to mathematical calculation error, defeating the incentive mechanism

Support

FAQs

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

Give us feedback!