sherlock-audit / 2023-07-blueberry-judging

2 stars 1 forks source link

sweven - Missing Explicit Reverts for Enhanced User Clarity" #111

Closed sherlock-admin2 closed 1 year ago

sherlock-admin2 commented 1 year ago

sweven

false

Missing Explicit Reverts for Enhanced User Clarity"

Summary

The codebase utilizes "revert" statements without providing clear error messages, causing confusion for users and developers during transaction failures.

Vulnerability Detail

Tool used

Manual Review

Recommendation

Instead of using revert Errors.ZERO_ADDRESS();, provide an explicit error message to help developers and users understand why the transaction is reverting., like -

if (address(config_) == address(0)) {
emit Errors.ZERO_ADDRESS("Config address cannot be zero");
revert("Config address cannot be zero");
}
config = config_;
sherlock-admin2 commented 1 year ago

3 comment(s) were left on this issue during the judging contest.

darkart commented:

Low/Invalid

0xJohnnyLaw commented:

invalid low informational revert

Kral01 commented:

low severity