Core Contracts

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

In updateUserBoost() from BoostController.sol it updates the newboost of the user, but sets the workingSupply = user newBoost

Summary

In updateUserBoost() from BoostController.sol it updates the newboost of the user, but sets the workingSupply = user newBoost

Vulnerability Details

When updating the user boost it also updates the workingSupply of the pool, however it shouldn't newBoost of the user to be equal to the workingSupply of the pool, it should accumulate instead of being directly assigned:

function updateUserBoost(address user, address pool) external override nonReentrant whenNotPaused {
//code
uint256 newBoost = _calculateBoost(user, pool, 10000); // Base amount
userBoost.amount = newBoost;
userBoost.lastUpdateTime = block.timestamp;
// Update pool totals safely
if (newBoost >= oldBoost) {
poolBoost.totalBoost = poolBoost.totalBoost + (newBoost - oldBoost);
} else {
poolBoost.totalBoost = poolBoost.totalBoost - (oldBoost - newBoost);
}
poolBoost.workingSupply = newBoost; // Set working supply directly to new boost
//code
}

Impact

workignSupply is not working correctly and can revert in RemoveBoostDelegation, because of this

Tools Used

Recommendations

poolBoost.workingSupply += (newBoost - oldBoost); // Accumulate instead of replacing
Updates

Lead Judging Commences

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

BoostController::updateUserBoost overwrites workingSupply with single user's boost value instead of accumulating, breaking reward multipliers and allowing last updater to capture all benefits

Support

FAQs

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