Submitted by shw
The functions timeLockERC20 and timeUnlockERC20 do not consider deflationary tokens, which burn a percentage of the transferred amount during transfers. In that case, time-locked deflationary ERC20 tokens cannot be unlocked (by timeUnlockERC20) nor transferred out of the vault (by transferERC20), since the transferred amount exceeds the vaults balance.
Recommend that in function timeLockERC20, after the function transferFrom, the vault should get the actual received amount by token.balanceOf(address(this)).sub(tokenAmountBeforeTransfer).
xyz-ctrl (Visor) acknowledged:
