Since not all ERC-20 tokens adhere to the standard, it is recommended to use SafeERC20 functions such that interactions with a broader range of tokens are possible. Especially, this is important since interactions with some tokens, e.g. USDT, require safeApprove.
Handle
pauliax
Vulnerability details
Impact
Since not all ERC-20 tokens adhere to the standard, it is recommended to use SafeERC20 functions such that interactions with a broader range of tokens are possible. Especially, this is important since interactions with some tokens, e.g. USDT, require safeApprove.
Similarly with approve -> safeApprove:
Recommended Mitigation Steps
Consider using https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol