AirDropper

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

Unused Event Declaration

Root + Impact

Description

  • The contract declares a `MerkleRootUpdated` event that is never emitted. Since the merkle root is immutable, this event serves no purpose and is dead code.

    ### Root + Impact

    An event is declared but never used, indicating incomplete implementation or leftover code.

    ```solidity

    // src/MerkleAirdrop.sol:20

    event MerkleRootUpdated(bytes32 newMerkleRoot);

    ```

    The merkle root is stored as an immutable variable, so it can never be updated. This event declaration is dead code that should be removed for code clarity.


Risk

Likelihood:

  • * Event is declared but never emitted

    * Merkle root is immutable, so it can never be updated

    * This is a code quality issue, not a security issue

Impact:

  • * Code confusion - suggests merkle root can be updated when it cannot

    * Unnecessary gas cost for event declaration (minimal)

    * Dead code that should be cleaned up

    * No functional impact

Proof of Concept

1. Search codebase for `MerkleRootUpdated`
2. Event is declared on line 20
3. Event is never emitted anywhere in the contract
4. `i_merkleRoot` is immutable, so it cannot be updated

Recommended Mitigation

```diff
// src/MerkleAirdrop.sol:19-20
event Claimed(address account, uint256 amount);
- event MerkleRootUpdated(bytes32 newMerkleRoot);
```
Updates

Lead Judging Commences

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