Core Contracts

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

Incorrect Boost Multiplier Calculation in `BoostController::getBoostMultiplier`

Summary

The BoostController::getBoostMultiplier function incorrectly calculates the boost multiplier for a user in a pool. The variable userBoost.amount is used in both the numerator and denominator in a way that cancels itself out, causing the function to always return a constant value. This renders the function ineffective for determining user-specific boosts.

Vulnerability Details

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/governance/boost/BoostController.sol#L291-L292

The calculation in the function is as follows:

uint256 baseAmount = userBoost.amount * 10000 / MAX_BOOST;
return userBoost.amount * 10000 / baseAmount;

Since baseAmount is derived from userBoost.amount, it returns `MAX_BOOST`.

Impact

  • The function does not accurately compute a user’s boost multiplier.

  • The boost mechanism may not work as intended, potentially undermining the protocol’s incentive structure.

Tools Used

Manula review

Recommendations

Correct the formula to ensure userBoost.amount properly influences the result

Updates

Lead Judging Commences

inallhonesty Lead Judge 2 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.