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.
In the modifySupportedPool
function, the following check is implemented:
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.
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.
Manual code review.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.