Description:
In the FeeCollector::applyTreasuryUpdate
and FeeCollector::applyRepairFundUpdate
functions, the contract uses a time-based check to ensure that an update can only be applied after a certain effective time. However, if this condition is not met, the contract reverts with UnauthorizedCaller()
, which is misleading since the failure is due to timing rather than unauthorized access.
Impact:
The use of an incorrect error message may confuse developers and users during debugging or audits, potentially leading to misinterpretation of the failure condition. While the issue is of low severity, it is important for maintaining clarity and proper error handling throughout the contract.
Proof of Concept:
The error message UnauthorizedCaller()
does not accurately reflect the condition that the update is not yet effective.
Recommended Mitigation:
Update the revert conditions to use a more appropriate error message that clearly indicates the timing issue. For example, define and use an error like UpdateNotEffective()
:
Ensuring that error messages accurately describe the failure conditions will improve code clarity and help in proper debugging and auditing efforts.
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.