Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low
Valid

Missing event for commissionTransfer

Summary

Event is not emitted on transfer commission.

Vulnerability Details

The _commissionTransfer() in the Distributor.sol (implementation) doesn’t emit an event.

src/Distibutor.sol
function _commissionTransfer(IERC20 token) internal {
token.safeTransfer(STADIUM_ADDRESS, token.balanceOf(address(this)));
}

Impact

The person set to receive the commission or the end user may wish to receive updates about state changes.

Tools Used

Manual

Recommendations

function _commissionTransfer(IERC20 token) internal {
uint256 commissionAmount = token.balanceOf(address(this));
token.safeTransfer(STADIUM_ADDRESS, commissionAmount);
emit CommissionTransfered(STADIUM_ADDRESS, commissionAmount); // event CommissionTransfered(address stadium, uint256 amount);
}

Support

FAQs

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