Root: The collectFee function executes transfer operations without checking if there are any fees to collect, performing unnecessary operations when contract balances are zero.
Impact: Collectors waste gas on empty transactions and the function lacks proper event emission, making fee collection tracking difficult and inefficient.
Normal Behavior: The fee collection function should only execute transfers when there are actual fees to collect and should emit events for proper tracking.
Specific Issue: The function blindly transfers WETH and ETH balances without checking if they're greater than zero, and the missing FeeCollected event (despite being declared) prevents proper monitoring of collection activities.
Likelihood: High
Collectors will call collectFee() regularly during periods when no fees have accumulated, such as during protocol launch or low user activity phases
The function lacks any balance validation, making zero-balance collection attempts inevitable during routine fee harvesting operations
Impact: Low
Gas Inefficiency: Unnecessary gas consumption occurs when transferring zero amounts, leading to wasted transaction costs for collectors
Poor Monitoring: Missing FeeCollected event emission prevents proper tracking and auditing of fee collection activities, reducing operational transparency
This fix adds zero balance validation to prevent wasteful gas consumption.
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.