The contract defines a custom error HH__HawkHighFeesNotPaid() but never actually uses it anywhere in the codebase. This suggests incomplete error handling implementation and could lead to confusion for developers maintaining the code.
The enroll function would be the logical place to use this error when fees aren't properly paid, but it relies solely on the SafeERC20 library's built-in error handling instead:
While SafeERC20's safeTransferFrom does revert on failure, utilizing the custom error would provide more descriptive error information specific to this contract's domain logic.
This issue has low impact because:
The SafeERC20 library appropriately reverts when transfers fail
The contract's functionality is not affected
It represents a minor inconsistency rather than a functional vulnerability
However, it does indicate a lack of attention to detail in error handling implementation and could make the contract harder to maintain or debug.
Either:
Use the defined error in the appropriate context:
Or remove the unused error declaration to avoid confusion:
Maintaining consistency between defined errors and their usage improves code readability and makes the contract easier to maintain over time.
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.