AirDropper

AI First Flight #5
Beginner FriendlyDeFiFoundry
EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Fee Denomination Mismatch — FEE Constant Is 1e9 Wei, Not 1e9 ETH

[HIGH-1] Fee Denomination Mismatch — FEE Constant Is 1e9 Wei, Not 1e9 ETH

File: src/MerkleAirdrop.sol (line 18), script/Deploy.s.sol

Summary

The contract defines FEE = 1e9 with no unit annotation. In Solidity, numeric literals in wei mean FEE = 1 Gwei = 0.000000001 ETH. The README states the fee is required for cost recovery, yet this fee is economically negligible (fractions of a cent), effectively meaning claims are free, and the fee mechanism provides no protection or revenue.

Vulnerability Details

// src/MerkleAirdrop.sol line 18
uint256 private constant FEE = 1e9;

In Solidity, all values are in wei unless explicitly denoted with ether or gwei. 1e9 = 1,000,000,000 wei = 1 Gwei ≈ $0.000000003 at ETH=$3000.

If the intent was 1e9 ETH (i.e., 1e9 * 1e18 wei), the constant is off by 18 orders of magnitude. Alternatively, if the intent is to charge a $0.01 fee, the value should be calibrated against current gas/ETH pricing dynamically.

This also makes the fee mechanism inconsistent on zkSync where gas pricing differs from mainnet.

Impact

  • The fee provides essentially zero economic protection against spam claiming.

  • CRITICAL-1 (unlimited re-claiming) is made even easier because the attacker fee cost is negligible.

  • No meaningful revenue for the protocol owner.

Tools Used

  • Manual analysis

  • Unit analysis

Recommendations

If fee in ETH is intended:

- uint256 private constant FEE = 1e9;
+ uint256 private constant FEE = 0.01 ether; // or desired ETH amount

Alternatively, make the fee configurable by the owner:

+ uint256 private s_fee = 0.01 ether;
+
+ function setFee(uint256 newFee) external onlyOwner {
+ s_fee = newFee;
+ }
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge 6 days 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!