1. Check for zero tokenBalance before depositTokens()
-In MerkleDropFactory.sol#L59, tokenBalance can be check with require(tokenBalance) > 0 to stop zero depoist.
2. ERC20 transfer return value not checked
In MerkleVesting.sol#L173, return value of the erc20 transfer should be checked for boolean value to revert on false returned by some tokens.
# Before
IERC20(tree.tokenAddress).transfer(destination, currentWithdrawal);
# After
require(IERC20(tree.tokenAddress).transfer(destination, currentWithdrawal), "fail message");
Note on 2. Not all ERC20 tokens return a boolean. It's safer to perform a low level call and assert that it passed. And even safer to use a battle tested library to do this for you.
1. Check for zero
tokenBalance
beforedepositTokens()
-In MerkleDropFactory.sol#L59,
tokenBalance
can be check withrequire(tokenBalance) > 0
to stop zero depoist.2. ERC20 transfer return value not checked