Beatland Festival

AI First Flight #4
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: medium
Likelihood: high
Invalid

Missing Event Emission in `withdraw()` Function

Root + Impact

Description

  • The `withdraw()` function does not emit the `FundsWithdrawn` event that is defined in the `IFestivalPass` interface. This breaks the expected event pattern and prevents off-chain monitoring systems from tracking withdrawals.

    The normal behavior should emit events for all state-changing operations, especially those involving fund transfers. The interface defines `FundsWithdrawn` event but the implementation does not emit it.

    ```solidity

    // Interface defines the event

    event FundsWithdrawn(address indexed organizer, uint256 amount);

    function withdraw(address target) external onlyOwner {

    payable(target).transfer(address(this).balance); // @> No event emitted

    }

    ```


Risk

Likelihood:

  • * The function is called whenever owner withdraws funds

    * Event is always missing on every withdrawal

    * Interface inconsistency is guaranteed

Impact:

  • * Off-chain monitoring systems cannot track withdrawals

    * Interface contract is not properly implemented

    * Users and integrators cannot monitor fund movements

    * Breaks expected event emission pattern

Proof of Concept

```solidity
// Owner withdraws funds
festivalPass.withdraw(owner);
// No FundsWithdrawn event is emitted
// Off-chain indexers cannot track the withdrawal
// Interface contract mismatch
```

Recommended Mitigation

```diff
function withdraw(address target) external onlyOwner {
+ uint256 amount = address(this).balance;
payable(target).transfer(address(this).balance);
+ emit FundsWithdrawn(target, amount);
}
```
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!