Moonwell

Moonwell
DeFiFoundry
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing event emission in `MErc20DelegateMadFixer::sweepAll` function

Summary

The MErc20DelegateMadFixer contract extends the MErc20Delegate contract, introducing a sweepAll function that allows an admin to transfer all underlying tokens to a specified address.

Vulnerability Details

The sweepAll function does not emit event when the execution of sweeping is successful. In Solidity, events provide an efficient way of logging transaction outcomes, which can be crucial for off-chain monitoring and verification.

function sweepAll(address sweeper) external {
/// @dev checks
require(msg.sender == admin, "only admin may sweep all");
EIP20Interface token = EIP20Interface(underlying);
/// @dev take it, take it all
bool success = token.transfer(sweeper, token.balanceOf(address(this)));
require(success, "token sweep failed");
}

Impact

Without event emission, the MERC20DelegateMadFixer contract lacks a straightforward way for users and external systems to be notified when the sweeping occurs.

Recommendations

Emit an event by successful sweeping.

Updates

Lead Judging Commences

0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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