Core Contracts

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

Misleading Error Message in modifySupportedPool Function

Summary

The modifySupportedPool function reverts with the error PoolNotSupported when the new support status matches the current status of the pool. This error message is misleading because the pool is already in the desired state, rather than being unsupported.

Vulnerability Details

In the modifySupportedPool function, the following check is implemented:

if (supportedPools[pool] == isSupported) revert PoolNotSupported();

The error PoolNotSupported() is defined as "when pool is not in supported pools list." However, if supportedPools[pool] is already equal to isSupported, the condition indicates that the pool’s status is already set to the desired state—not that it is unsupported. This misuse of the error message could confuse developers and users during debugging, as it does not accurately reflect the underlying issue.

Impact

  • Developer Confusion: The misleading error message can cause uncertainty during troubleshooting. Developers might incorrectly assume that the pool is not supported, even though it is already in the intended state.

  • User Experience: Users interacting with the contract may be misled by the error, complicating the process of verifying pool status changes.

Tools Used

  • Manual code review.

Recommended Mitigation

  • Clarify the Error Message: Replace the PoolNotSupported error in this context with a more appropriate error message (e.g., PoolStatusUnchanged) to indicate that the requested support status is already set.

  • Alternative Approach: Consider allowing the function to succeed without changing state if the pool’s current status matches the desired status. This change could reduce unnecessary reverts and simplify the user experience.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 4 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.