Snowman Merkle Airdrop

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

Event `Snow::FeeCollected` not used on collect fees.

Description:
The FeeCollected event is declared in the Snow contract but is never emitted during the fee collection process.

// >>> EVENTS
event SnowBought(address indexed buyer, uint256 indexed amount);
event SnowEarned(address indexed earner, uint256 indexed amount);
@> event FeeCollected();
event NewCollector(address indexed newCollector);

Impact:
Lack of event emission reduces transparency and makes it harder for off-chain systems or users to track when fees are collected.

Recommended Mitigation:
Emit the FeeCollected event inside the collectFees function:

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

Lead Judging Commences

yeahchibyke Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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