Beatland Festival

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

Event `FundsWithdrawn` was not emitted in `withdraw` function

Summary

When organizer withdraws fund via the withdraw function, there's a corresponding event in the IFestivalPass that associates to this transaction. However, this event FundsWithdrawn was found not included in the withdraw function.

Description

In the withdraw function, an associated event FundsWithdrawn that is availble via IFestivalPass is not emitted after the transfer.

function withdraw(address target) external onlyOwner {
payable(target).transfer(address(this).balance);
}

In /interfaces/IFestivalPass.sol , an event related to fund withdraw is found:

...
/**
* @notice Emitted when the organizer withdraws collected funds
* @param organizer Address of the organizer
* @param amount Amount of ETH withdrawn
*/
event FundsWithdrawn(address indexed organizer, uint256 amount);
...

Since the event FundsWithdrawn is availble via IFestivalPass , this could be needed for the front-end downstreaming processing or notification handling.

Risk

Likelihood:

  • Potential use of event emitted upon withdraw function is called in front-end downstream processes

Impact:

  • The omission on this event could affect the front-end downstream processes with missing info or unclear status.

Recommended Mitigation

To add an event emission after the transfer in the withdraw function.

function withdraw(address target) external onlyOwner {
payable(target).transfer(address(this).balance);
+ emit FundsWithdrawn(target, address(this).balance);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Missing events / Events not properly configured

Informational. This protocol doesn't rely on events to function, they are just nice to have, but not mandatory.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.