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

0 stars 0 forks source link

Zero transfers #91

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Checking non-zero transfer values can avoid an external call to save gas. Checking if amount > 0 before making the external call to erc20 transfer can save gas by avoiding the external call in such situations, e.g. in function claim you could check that the amount is not zero. function drip should also check toDrip_ before doing the transfer.

GalloDaSballo commented 2 years ago

Agree with the finding, will save a tx where the target ends up getting nothing