Fee-on-transfer tokens are not supported
The protocol intends to support all ERC20 tokens but does not support fee-on-transfer tokens. The protocol utilizes the functions `TransferUtils::_transferERC20()` and `TransferUtils::_transferFromERC20()` to transfer ERC20 tokens.\\n```\\nTransferUtils.sol\\n    function _transferERC20(address token, address to, uint256 amount) internal {\\n        IERC20 erc20 = IERC20(token);\\n        require(erc20 != IERC20(address(0)), "Token Address is not an ERC20");\\n        uint256 initialBalance = erc20.balanceOf(to);\\n        require(erc20.transfer(to, amount), "ERC20 Transfer failed");\\n        uint256 balance = erc20.balanceOf(to);\\n        require(balance >= (initialBalance + amount), "ERC20 Balance check failed");//@audit-issue reverts for fee on transfer token\\n    }\\n```\\n\\nThe implementation verifies that the transfer was successful by checking that the balance of the recipient is greater than or equal to the initial balance plus the amount transferred. This check will fail for fee-on-transfer tokens because the actual received amount will be less than the input amount. (Read here about fee-on-transfer tokens)\\nAlthough there are very few fee-on-transfer tokens, the protocol can't say it supports all ERC20 tokens if it doesn't support these weird ERC20 tokens.
The transfer utility functions can be updated to return the actually received amount. Or clearly document that only standard ERC20 tokens are supported.
Fee-on-transfer tokens can not be used for the protocol. Because of the rarity of these tokens, we evaluate this finding as a Medium risk.
```\\nTransferUtils.sol\\n    function _transferERC20(address token, address to, uint256 amount) internal {\\n        IERC20 erc20 = IERC20(token);\\n        require(erc20 != IERC20(address(0)), "Token Address is not an ERC20");\\n        uint256 initialBalance = erc20.balanceOf(to);\\n        require(erc20.transfer(to, amount), "ERC20 Transfer failed");\\n        uint256 balance = erc20.balanceOf(to);\\n        require(balance >= (initialBalance + amount), "ERC20 Balance check failed");//@audit-issue reverts for fee on transfer token\\n    }\\n```\\n