15,000 USDC
View results
Submission Details
Severity: gas
Valid

Ambiguos Custom Errors

Summary

Naming of error DecentralizedStableCoin__NotZeroAddress(); is not clear

Vulnerability Details

The error is not clear whether it is saying address must be a Zero Address or Address must not be a Zero address, one has to look at the code to get clearer picture.

Impact

Informational: This affects auditability, readability and maintainability of code. Consider a developer working on code who may think error is passed to checks where we don't get address(0) but expected address(0) when in actual fact error is to check that addresses are not address(0), this can lead to introduction errors, code logic etc flowing from this.

Tools Used

Manual Analysis

Recommendations

Custom Errors must be descriptive, clear and not ambiguous.
Consider the following improved version: error DecentralizedStableCoin__MustNotBeZeroAddress();

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.