InvalidVeToken
Instead of InvalidPool
Issue:
In the constructor, the contract checks if the _veToken
address is the zero address. However, if this condition is met, it incorrectly reverts with the error InvalidPool
instead of the more appropriate InvalidVeToken
. This misleads developers and users about the source of the error.
Impact:
Misleading Error Messages: The wrong error message can confuse developers during debugging, as the error does not accurately reflect that the issue is with the veToken address.
Faulty Troubleshooting: With an incorrect error message, diagnosing and resolving the problem becomes more challenging.
Potential Security Concerns: Inaccurate error reporting can obscure the true nature of the issue, potentially affecting the contract's reliability and security.
Fix:
Define a new error InvalidVeToken
and use it in the constructor. For example:
This change ensures that if an invalid veToken address is provided, the correct error is thrown, thereby improving clarity during debugging and ensuring proper contract initialization.
Conclusion:
By replacing InvalidPool
with InvalidVeToken
in the constructor, the error message more accurately reflects the issue, facilitating better debugging and maintaining the integrity of the contract setup.
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.