The collectFee function in Snow.sol uses a low-level call to transfer native ETH to the s_collector address. If the collector address is a smart contract that rejects ETH (e.g., lacks a receive() function), the transfer fails and reverts the entire transaction. This causes a Denial of Service (DoS) on fee collection, trapping all accumulated fees (both WETH and native ETH) in the contract permanently.
The collectFee function is designed to allow the collector to withdraw accumulated WETH and native ETH fees. However, the native ETH transfer relies on a low-level call without checking if the recipient is a contract that can accept ETH. If the collector address is changed to a contract that rejects ETH, or if the original collector is a contract without a receive fallback, the fee collection will permanently fail.
File: src/Snow.sol (lines 83-90)
Severity: Low
Likelihood: Low
Impact: Medium
❌ Fee collection can be permanently blocked (DoS)
❌ Accumulated WETH and ETH fees become trapped in the contract
❌ Project loses access to its revenue
✅ Requires the collector address to be a contract that rejects ETH
Scenario: The owner changes the collector to a smart contract that does not accept ETH, or the collector is inherently a contract without a receive() function.
Expected Behavior: The contract should handle ETH transfers safely or reject the collector address if it cannot receive ETH.
Actual Behavior: The collectFee transaction reverts, and all fees remain trapped in the Snow contract forever.
Test Output:
What This Proves:
✅ Low-level call fails if recipient rejects ETH
✅ Transaction reverts, rolling back WETH transfer too
✅ All accumulated fees become permanently trapped
Use OpenZeppelin's Address.sendValue which safely handles ETH transfers to contracts, or validate that the collector can receive ETH before setting it.
Why This Fixes It:
✅ Address.sendValue checks if the transfer succeeded
✅ Provides a clear, standardized revert message if it fails
✅ Prevents silent failures or ambiguous reverts
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.