The GovernanceFeeCollected event is emitted outside the if (fee > 0) block, leading to a scenario where the event is emitted even if no fee was collected. This could mislead observers into thinking a fee was always collected.
False or misleading event logs, making it harder to track governance fee collections accurately.
Potential confusion for off-chain monitoring systems relying on event emissions.
Recommendation:
Move the emit GovernanceFeeCollected statement inside the if (fee > 0) block to ensure the event is only emitted when a fee is actually collected.
This change ensures event emissions are accurate and aligned with actual governance fee transfers.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.