Snowman Merkle Airdrop

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

[L-4] FeeCollected Event Lacks Amount Parameter + unused event in `collectFee` function.

Root + Impact

  • Root: The FeeCollected event has no parameters to log the collected amount;

  • Impact: Reduces auditability and transparency of fee collections.

Description

  • The collectFee function does not emit FeeCollected event.

  • The FeeCollected event has no parameters, preventing tracking of the WETH amount transferred, which hinders auditing.

// Root cause in the codebase with @> marks to highlight the relevant section// Root cause in the codebase with @> marks to highlight the relevant section
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!!!");
//@audit feeCollected event does not have a parameter for the amount collected
@> ???
}

Risk

Likelihood:

  • During every collectFee call.

  • When auditing fee collections.

Impact:

  • Limits visibility into collected amounts, complicating reconciliation.

  • Low severity due to lack of direct exploit.

Proof of Concept

  • Missing Parameter Demonstration:

  • Call collectFee and observe the empty FeeCollected event.
    Steps:
    Mint WETH to the Snow contract.
    Call collectFee as the collector.
    Check event logs—no amount is recorded.

Recommended Mitigation

event FeeCollected(uint256 amount);
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(collection); // Emit with amount
}
  • Update FeeCollected to include the amount and emit it.

Updates

Lead Judging Commences

yeahchibyke Lead Judge 24 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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