The codebase defines an ErrorCode::UnauthorizedAccess
in the error enumeration, but no actual usage occurs. This creates confusion and potentially missed security checks.
The error code is declared, but the contract logic never invokes it.
Typically, an UnauthorizedAccess
error is used in permission checks or role checks (e.g., only the creator can withdraw
), but the code is either relying on other mechanisms or missing the check entirely.
Misleading Code: Auditors or maintainers might assume there is an active check for unauthorized access where none exists.
Possible Future Oversight: Developers might add new features or rely on a nonexistent pattern, leading to real vulnerabilities.
Manually view all calls and checks in functions. Recommendations
Either integrate the use of ErrorCode::Unauthorized Access where explicit verification of rights is required (for example, when withdrawing funds if the success condition is not met), or remove it from the list for clarity.
To refactor the code so that all the defined ErrorCode have a practical application.
This is informational finding, there is no impact for the protocol.
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.