DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Method withdrawFees missing event emission

Summary

Method withdrawFees doesn't emit event on the action of smart contract owner withdrawing the current collected fees.

Recommendations

It is recommended to add events for all important admin operations to help monitor the contract, as a monitoring system that tracks relevant events would allow the timely detection of compromised system components. Detecting issues in early stage could prevent for even bigger issues to appear.

function withdrawFees() external onlyOwner {
require(totalFees > 0, "No fees to withdraw");
uint256 totalFeesToWithdraw = totalFees;
totalFees = 0;
(bool success, ) = payable(owner()).call{value: totalFeesToWithdraw}("");
require(success, "Transfer failed");
emit WithdrawFees(totalFeesToWithdraw); // ADD THIS LINE
}
Updates

Appeal created

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

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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