Snowman Merkle Airdrop

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

L-3 — `collectFee` reverts if the collector cannot receive ETH

Root + Impact

collectFee pushes all ETH to s_collector and requires success. If the collector is a contract without a payable receive/fallback, fee collection is permanently blocked until changeCollector is called.

Description

// src/Snow.sol
101: function collectFee() external onlyCollector {
...
@>105: (bool collected,) = payable(s_collector).call{value: address(this).balance}("");
@>106: require(collected, "Fee collection failed!!!");

Risk

Likelihood: Low — only if the collector role is a non-payable contract.

Impact: Low — temporary denial of fee collection; recoverable via changeCollector.

Proof of Concept

contract RejectEth {
// no receive()/fallback()
}
// Set collector = address(new RejectEth()); buySnow{value:...}; collectFee() reverts.

Recommended Mitigation

Prefer a pull-payment pattern, or do not revert on a failed push.

- (bool collected,) = payable(s_collector).call{value: address(this).balance}("");
- require(collected, "Fee collection failed!!!");
+ (bool collected,) = payable(s_collector).call{value: address(this).balance}("");
+ if (!collected) {
+ // credit s_collector for later withdrawal (pull payment)
+ }

Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 8 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!