F-2024-0002·missing-event

Emit events for transparency in main function

Acknowledgedvaultyieldbtc
TL;DR

The sweep function handles unauthorized donations and extra tokens but does not emit an event, leaving off-chain indexers and integrators with no on-chain trace of the transfer.

Severity
LOW
Impact
LOW
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description

Description

The sweep function, which handles unauthorized donations and extra tokens, doesn't emit an event. Consider adding an event emission for better transparency and easier off-chain tracking.

03Section · Impact

Impact

  • Decreased transparency for users and auditors
  • Hindered historical auditing of contract actions
  • Potential difficulties in integrating with external systems
04Section · Recommendation

Recommendation

Add an event emission at the end of the sweep function. For example:

solidity
event Swept(address indexed token, uint256 amount);
function sweep(address token) external requiresAuth {
// ... existing function body ...
emit Swept(token, sweptAmount);
}
F-2024-0002

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx