code-423n4 / 2021-10-tally-findings

0 stars 0 forks source link

Do the external call only when the amount is not 0 #55

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Similarly, as you do with the tokens, consider only transferring the balance if it is not 0: feeRecipient.transfer(address(this).balance); or here: payable(msg.sender).transfer(boughtETHAmount);

Recommended Mitigation Steps

Only do the external call if the amount is above zero.

Shadowfiend commented 2 years ago

Duplicate of #31.