Core Contracts

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

Misleading Error Message : The PoolNotSupported() in BoostController.sol

Summary

The error message PoolNotSupported() is misleading

Vulnerability Details

function modifySupportedPool(address pool, bool isSupported) external onlyRole(MANAGER_ROLE) {
if (pool == address(0)) revert InvalidPool();
if (supportedPools[pool] == isSupported) revert PoolNotSupported(); //@audit misleading err message
supportedPools[pool] = isSupported;
if (isSupported) {
emit PoolAdded(pool);
} else {
emit PoolRemoved(pool);
}
}

The error message PoolNotSupported() is misleading because the condition actually checks if the state of the pool is already what the caller is trying to set. A more appropriate error message would be something like PoolStateAlreadySet() or NoChangeNeeded(). This could confuse users or integrators who expect the error to indicate that the pool is invalid.

Impact

The misleading error message (PoolNotSupported) does not directly affect the contract's functionality but could confuse users or integrators.

Tools Used

Manual review

Recommendations

The PoolNotSupported() error message is misleading. It should be renamed to something like PoolStateAlreadySet() or NoChangeNeeded().

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.