Core Contracts

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

wrong revert statement in updateUserBoost

Details

BoostController::updateUserBoost uses a wrong revert statement. When the user address passes as address zero, it reverts with InvalidPool error. This is clearly wrong as it is not the pool that’s being invalid.

/**
* @notice Updates the boost value for a user in a specific pool
* @param user Address of the user whose boost is being updated
* @param pool Address of the pool for which to update the boost
* @dev Calculates new boost based on current veToken balance and updates pool totals
*/
function updateUserBoost(
address user,
address pool
) external override nonReentrant whenNotPaused {
if (paused()) revert EmergencyPaused();
if (user == address(0)) revert InvalidPool(); //@audit low wrong revert statement

Impact

Low. Doesn’t break the application, but creates confusion.

Recommendation

Give correct revert statements.

Updates

Lead Judging Commences

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