Core Contracts

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

[M-01] Erroneous calculation in getBoostMultiplier() (BoostController.sol)

Summary

The function always returns MAX_BOOSTno matter what the actual boost of the user is.

Vulnerability Details

The computations performed do not match the intended usage of the function.

The result mathematically simplifies to MAX_BOOST .

Location

Currently unused, but any external call to this function will always result in erroneous results, making relying on its results potentially dangerous depending on the usage.

Tools Used

Manual review.

Recommendations

Use the internal function _calculateBoost(address user,address pool,uint256 amount) to calculate the correct user's boost by using it as the numerator of the ratio.

Something like:

function getBoostMultiplier(
address user,
address pool
) external view override returns (uint256) {
if (!supportedPools[pool]) revert PoolNotSupported();
UserBoost storage userBoost = userBoosts[user][pool];
if (userBoost.amount == 0) return MIN_BOOST;
// Calculate actual boost multiplier in basis points
return _calculateBoost(user, pool, 10000) / 10000;
}
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!