The function withdrawPredictionFees
is designed to allow only the organizer to withdraw prediction fees. However, it returns the error message ThePredicter__NotEligibleForWithdraw()
instead of the more appropriate ThePredicter__UnauthorizedAccess()
when an unauthorized user attempts to withdraw funds.
Confusion and Miscommunication: Users or developers interacting with the contract might be misled by the incorrect error message. They may not understand that the failure is due to unauthorized access rather than eligibility for withdrawal.
Debugging Difficulty: Incorrect error messages complicate debugging and troubleshooting, leading to potential delays in resolving issues.
Security Implications: Although the primary function and security of the contract are not directly compromised by this issue, clear and precise error handling is a best practice in contract development, which ensures better security and maintainability.
Modify the error message to accurately reflect the reason for the failure. Replace ThePredicter__NotEligibleForWithdraw()
with ThePredicter__UnauthorizedAccess()
to provide clear and precise feedback.
}
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.