Snowman Merkle Airdrop

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

Unused Storage Variable Increases Deployment Costs in SnowmanAirdrop.sol

Root + Impact

Root: The contract declares address[] private s_claimers; but this array is never used anywhere in the contract code, creating dead storage that serves no functional purpose.

Impact: Unnecessary storage declaration increases deployment gas costs and adds confusion for developers and auditors who may expect the array to be populated with claimer addresses for tracking purposes.

Description

  • Normal Behavior: Storage variables should only be declared when they serve a functional purpose in the contract logic, maintaining clean and efficient code.

  • Specific Issue: The s_claimers array exists with a comment indicating it should store "addresses of claimers" but no code ever pushes addresses to this array or reads from it, making it completely unused dead storage.

Risk

Likelihood: High

  • Every deployment includes this unused storage declaration, making the inefficiency constant

  • The dead storage is permanent once deployed and cannot be removed without redeployment

Impact: Low

  • Increased Deployment Costs: Unnecessary storage slot allocation slightly increases gas costs for contract deployment

  • Code Confusion: Developers and auditors may waste time looking for where this array should be populated

  • Maintenance Issues: Dead storage can mislead future developers about intended functionality

Recommended Mitigation

Remove the unused storage array to clean up dead storage and reduce deployment costs.

// >>> VARIABLES
- //@audit - not using this variable!!!
- address[] private s_claimers; // array to store addresses of claimers
bytes32 private immutable i_merkleRoot; // Merkle root used to validate airdrop claims
Snow private immutable i_snow; // Snow token to be staked for the airdrop
Snowman private immutable i_snowman; // Snowman nft to be claimed
Updates

Lead Judging Commences

yeahchibyke Lead Judge 5 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.