Submitted by Ruhum, also found by harleythedog, Tomio, and WatchPug
Some ERC20 tokens charge a fee for every transfer. If the underlying token of a vault is such a token any deposit to the protocol will fail.
Some tokens have the possibility of adding fees later on, e.g. USDT. So those have to be covered too.
Generally, the user would also receive fewer tokens on withdrawing in such a scenario but thats not the protocols fault.
I rated the issue as medium since part of the protocol become unavailable in such a situation.
https://github.com/code-423n4/2022-01-sandclock/blob/main/sandclock/contracts/Vault.sol#L583-L585
_transferAndCheckUnderlying() is used to deposit and sponsor the vault. It checks that after a safeTransferFrom() the same exact amount is sent to the balance of the vault. But, if fees are enabled the values wont match, causing the function to revert. Thus, it wont be able to deposit or sponsor the vault in any way.
One possibility would be to simply not use ERC20 tokens with fees.
ryuheimat (Sandclock) disputed:
naps62 (Sandclock) commented:
dmvt (judge) commented:
