Snowman Merkle Airdrop

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

No Event Emit on `Snow::collectFee`

No Event Emit on Snow::collectFee

Description

  • The Snow::collectFee function does not emit any events.

    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!!!");
    @> // not emit the event
    }

Risk

Impact:

  • No event is emitted, making it difficult to track the fee collection.

Proof of Concept

Recommended Mitigation

Emit an event when the fee is collected to track the progress of the protocol.

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);
}
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 15 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!