Beatland Festival

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

The `FundsWithdrawn` event is declared but **never emitted** in the `withdraw` function.

Root + Impact

Root Cause

The FundsWithdrawn event is declared but never emitted in the withdraw function.

event FundsWithdrawn(address indexed organizer, uint256 amount);
function withdraw(address target) external onlyOwner {
payable(target).transfer(address(this).balance);
// @> Missing emit FundsWithdrawn(...)
}

Impact

  • Lack of transparency for fund movements
    Off-chain systems cannot track withdrawals

  • Broken accounting for indexers / analytics
    Systems relying on events will not detect fund transfers

  • Reduced auditability
    No on-chain log of critical financial actions


Description

  • Under normal behavior, critical financial operations such as withdrawals should emit events to provide an auditable and trackable record of fund movements.

  • In the current implementation, although the FundsWithdrawn event is defined, it is never emitted when funds are withdrawn. This results in missing logs for off-chain systems and reduces transparency of contract activity.


Risk

Likelihood:

  • Occurs on every invocation of the withdraw function

  • Affects all off-chain systems relying on event logs


Impact:

  • Off-chain accounting becomes incomplete

  • Monitoring and analytics tools cannot track withdrawals


Recommended Mitigation

Emit the event in the withdraw function to ensure off-chain accounting is up to date with chain data.

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

Lead Judging Commences

ai-first-flight-judge Lead Judge about 3 hours 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!