Snowman Merkle Airdrop

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

MIssing event in fee collection

Root + Impact

Description

  • When calling collectFeean event FeeCollectedis emitted

  • There is no such emission of the event, but the event is declared in the contract

event FeeCollected();
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 LOW Emitting an event to notify the fee collection
}

Risk

Likelihood:

  • High as it will happen always

Impact:

  • Low as probably is information that can be extracted from the WETH/ETH transfer anyway

Proof of Concept

Not neccessary

--

Recommended Mitigation

Include the event emission in the function

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 3 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.