Snowman Merkle Airdrop

First Flight #42
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

Missing Event Emission for Fee Collection Tracking in Snow.sol::collectFee

Root + Impact

Root: The collectFee function transfers collected fees to the collector but fails to emit the declared FeeCollected event, despite the event being properly defined in the contract.

Impact: Fee collection activities cannot be properly tracked or monitored off-chain, reducing transparency and making it difficult to audit fee collection history or verify collector behavior.

Description

  • Normal Behavior: Fee collection functions should emit events to provide transparency and enable off-chain monitoring of when fees are collected and by whom.

  • Specific Issue: The FeeCollected event is declared but never emitted in the collectFee() function, creating a gap in the contract's event logging and preventing proper tracking of fee collection activities.

Risk

Likelihood: High

  • Every call to collectFee() triggers this issue as the event is never emitted

  • Fee collection is a regular operational activity that will occur frequently throughout the protocol's lifecycle

Impact: Low

  • Poor Transparency: Off-chain monitoring systems cannot track fee collection activities automatically

  • Audit Difficulties: Historical fee collection data cannot be easily retrieved from blockchain events, complicating financial audits

Recommended Mitigation

Add the missing event emission to the collectFee() function to enable proper tracking and transparency of fee collection activities.

function collectFee() external onlyCollector {
uint256 collection = i_weth.balanceOf(address(this));
i_weth.transfer(s_collector, collection);
(bool collected,) = payable(s_collector).call{value: address(this).balance}("");
require(collected, "Fee collection failed!!!");
+
+ emit FeeCollected();
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.