In the function timeLockERC20 (line 610), the return value of IERC20.transferFrom is unchecked. The return value could be false if the transferred token is not ERC20-compliant, indicating that the transfer fails. In that case, the variable timelockERC20Balances will be inconsistent with the vault's actual balance.
Handle
shw
Vulnerability details
Impact
In the function
timeLockERC20
(line 610), the return value ofIERC20.transferFrom
is unchecked. The return value could befalse
if the transferred token is not ERC20-compliant, indicating that the transfer fails. In that case, the variabletimelockERC20Balances
will be inconsistent with the vault's actual balance.Proof of Concept
Referenced code: Visor.sol#L610
Tools Used
None
Recommended Mitigation Steps
Use
TransferHelper.safeTransfer
instead as in the functiontimeUnlockERC20
(at line 637).