_prepareWithdraw emits a FundsWithdrawn event even when the amount withdrawn is 0. This is contradictory to the comment
@dev It emits a FundsWithdrawn event if the amount of withdrawn ether is greater than 0.
Risk Rating
Low
Vulnerability Details
BasicFDT.sol
Line 60: emit FundsWithdrawn(msg.sender, _withdrawableDividend, withdrawnFunds[msg.sender]);
prepareWithdraw
Impact
Congestion of events
Tools Used
Manual code review
Recommended Mitigation Steps
Wrap line 60 in BasicFDT.sol in an if statement requiring the withdrawn funds to be greater than 0
e.g.
if(_withdrawableDividend > 0) emit FundsWithdrawn(msg.sender, _withdrawableDividend, withdrawnFunds[msg.sender]);
Handle
janbro
Vulnerability details
Summary
_prepareWithdraw emits a FundsWithdrawn event even when the amount withdrawn is 0. This is contradictory to the comment @dev It emits a
FundsWithdrawn
event if the amount of withdrawn ether is greater than 0.Risk Rating
Low
Vulnerability Details
BasicFDT.sol Line 60: emit FundsWithdrawn(msg.sender, _withdrawableDividend, withdrawnFunds[msg.sender]); prepareWithdraw
Impact
Congestion of events
Tools Used
Manual code review
Recommended Mitigation Steps
Wrap line 60 in BasicFDT.sol in an if statement requiring the withdrawn funds to be greater than 0 e.g. if(_withdrawableDividend > 0) emit FundsWithdrawn(msg.sender, _withdrawableDividend, withdrawnFunds[msg.sender]);