`wfCashERC4626`
The `wfCash` vault is credited less prime cash than the `wfCash` it mints to the depositor when its underlying asset is a fee-on-transfer token. This leads to the vault being insolvent because it has issued more shares than can be redeemed.\\n```\\n    if (maxFCash < fCashAmount) {\\n        // NOTE: lending at zero\\n        uint256 fCashAmountExternal = fCashAmount * precision / uint256(Constants.INTERNAL_TOKEN_PRECISION);\\n        require(fCashAmountExternal <= depositAmountExternal);\\n\\n        // NOTE: Residual (depositAmountExternal - fCashAmountExternal) will be transferred\\n        // back to the account\\n        NotionalV2.depositUnderlyingToken{value: msgValue}(address(this), currencyId, fCashAmountExternal);\\n    } else if (isETH || hasTransferFee || getCashBalance() > 0) {\\n```\\n\\n```\\n        } else {\\n            // In the case of deposits, we use a balance before and after check\\n            // to ensure that we record the proper balance change.\\n            actualTransferExternal = GenericToken.safeTransferIn(\\n                underlying.tokenAddress, account, underlyingExternalDeposit\\n            ).toInt();\\n        }\\n\\n        netPrimeSupplyChange = _postTransferPrimeCashUpdate(\\n            account, currencyId, actualTransferExternal, underlying, primeRate\\n        );\\n```\\n\\n```\\n    // Mints ERC20 tokens for the receiver\\n    _mint(receiver, fCashAmount);\\n```\\n\\nIn the case of lending at 0% interest, `fCashAmount` is equal to `depositAmount` but at 1e8 precision.\\nTo simplify the example, let us assume that there are no other depositors. When the sole depositor redeems all their `wfCash` shares at maturity, they will be unable to redeem all their shares because the `wfCash` vault does not hold enough prime cash.
Consider adding the following:\\nA flag in `wfCashERC4626` that signals that the vault's asset is a fee-on-transfer token.\\nIn `wfCashERC4626._previewMint()` and `wfCashERC46262._previewDeposit`, all calculations related to `assets` should account for the transfer fee of the token.
Although the example used to display the vulnerability is for the case of lending at 0% interest, the issue exists for minting any amount of shares.\\nThe `wfCashERC4626` vault will become insolvent and unable to buy back all shares. The larger the total amount deposited, the larger the deficit. The deficit is equal to the transfer fee. Given a total deposit amount of 100M USDT and a transfer fee of 2% (assuming a transfer fee was set and enabled for USDT), 2M USDT will be the deficit.\\nThe last depositors to redeem their shares will be shouldering the loss.
```\\n    if (maxFCash < fCashAmount) {\\n        // NOTE: lending at zero\\n        uint256 fCashAmountExternal = fCashAmount * precision / uint256(Constants.INTERNAL_TOKEN_PRECISION);\\n        require(fCashAmountExternal <= depositAmountExternal);\\n\\n        // NOTE: Residual (depositAmountExternal - fCashAmountExternal) will be transferred\\n        // back to the account\\n        NotionalV2.depositUnderlyingToken{value: msgValue}(address(this), currencyId, fCashAmountExternal);\\n    } else if (isETH || hasTransferFee || getCashBalance() > 0) {\\n```\\n