Core Contracts

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

Incorrect Error Message in `updateUserBoost`

Summary

In updateUserBoost BoostController.sol#L179, the following line is present:

if (user == address(0)) revert InvalidPool();

However, this check is intended to validate the user address rather than the pool, making the error message misleading.

Vulnerability Details

The function updateUserBoost includes a validation check to ensure that the user address is not zero. However, the error message InvalidPool() suggests that the issue pertains to the pool rather than the user. This can cause confusion during debugging and may mislead developers when identifying the root cause of failures.

Impact

  • Misleading error messages can lead to incorrect debugging and extended troubleshooting time.

  • Developers may misinterpret the nature of the failure, possibly overlooking the real issue.

Tools Used

Manual code review.

Recommendations

  • Modify the revert statement to provide a more accurate error message, such as:

if (user == address(0)) revert InvalidUser();
  • Ensure that error messages accurately describe the condition being checked to improve code clarity and maintainability.

Updates

Lead Judging Commences

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

Give us feedback!