MEDIUM severity: The vulnerability is related to the inability to permissionlessly settle a vault account when using . The vulnerability is related to the inability to permissionlessly settle a vault account when using a blacklisted account. The `settleVaultAccount` function is designed to be permissionless, allowing anyone to settle a vault account without authentication. However, this function relies on the `settl...

Vulnerable code:
```\nfunction settleVaultAccount(address account, address vault) external override nonReentrant {\n    requireValidAccount(account);\n    require(account!= vault);\n\n    VaultConfig memory vaultConfig = VaultConfiguration.getVaultConfigStateful(vault);\n    VaultAccount memory vaultAccount = VaultAccountLib.getVaultAccount(account, vaultConfig);\n\n    (bool didSettle, bool didTransfer) = vaultAccount.settleVaultAccount(vaultConfig);\n    require(didSettle, "No Settle");\n\n    vaultAccount.accruePrimeCashFeesToDebt(vaultConfig);\n\n    vaultAccount.setVaultAccount({vaultConfig: vaultConfig, checkMinBorrow: false});\n\n    if (didTransfer) {\n        IVaultAccountHealth(address(this)).checkVaultAccountCollateralRatio(vault, account);\n    }\n}\n```\n```\nif will first settle the vault account before taking any further actions.\n```\n```\n(bool didSettle, bool didTransfer) = vaultAccount.settleVaultAccount(vaultConfig);\n```\n```\n/// @notice Settles a matured vault account by transforming it from an fCash maturity into\n/// a prime cash account. This method is not authenticated, anyone can settle a vault account\n/// without permission. Generally speaking, this action is economically equivalent no matter\n/// when it is called. In some edge conditions when the vault is holding prime cash, it is\n/// advantageous for the vault account to have this called sooner. All vault account actions\n/// will first settle the vault account before taking any further actions.\n/// @param account the address to settle\n/// @param vault the vault the account is in\nfunction settleVaultAccount(address account, address vault) external override nonReentrant {\n    requireValidAccount(account);\n    require(account!= vault);\n\n    VaultConfig memory vaultConfig = VaultConfiguration.getVaultConfigStateful(vault);\n    VaultAccount memory vaultAccount = VaultAccountLib.getVaultAccount(account, vaultConfig);\n\n    // Require that the account settled, otherwise we may leave the account in an unintended\n    // state in this method because we allow it to skip the min borrow check in the next line.\n    (bool didSettle, bool didTransfer) = vaultAccount.settleVaultAccount(vaultConfig);\n    require(didSettle, "No Settle");\n}\n```\n```\nbool didTransferPrimary;\n(accountPrimeStorageValue, didTransferPrimary) = \n    repayAccountPrimeDebtAtSettlement(\n        vaultConfig.primeRate,\n        primeVaultState,\n        vaultConfig.borrowCurrencyId,\n        vaultConfig.vault,\n        vaultAccount.account,\n        vaultAccount.tempCashBalance,\n        accountPrimeStorageValue\n    );\n```\n```\nfunction repayAccountPrimeDebtAtSettlement(\n    PrimeRate memory pr,\n    VaultStateStorage storage primeVaultState,\n    uint16 currencyId,\n    address vault,\n    address account,\n    int256 accountPrimeCash,\n    int256 accountPrimeStorageValue\n) internal returns (int256 finalPrimeDebtStorageValue, bool didTransfer) {\n    didTransfer = false;\n    finalPrimeDebtStorageValue = accountPrimeStorageValue;\n\n    if (accountPrimeCash > 0) {\n        int256 netPrimeDebtRepaid = pr.convertUnderlyingToDebtStorage(\n            pr.convertToUnderlying(accountPrimeCash).neg()\n        );\n\n        int256 netPrimeDebtChange;\n        if (netPrimeDebtRepaid < accountPrimeStorageValue) {\n            netPrimeDebtChange = accountPrimeStorageValue;\n            finalPrimeDebtStorageValue = 0;\n\n            int256 primeCashRefund = pr.convertFromUnderlying(\n                pr.convertDebtStorageToUnderlying(netPrimeDebtChange.sub(accountPrimeStorageValue))\n            );\n            TokenHandler.withdrawPrimeCash(\n                account, currencyId, primeCashRefund, pr, false\n            );\n            didTransfer = true;\n        } else {\n            netPrimeDebtChange = netPrimeDebtRepaid;\n            finalPrimeDebtStorageValue = accountPrimeStorageValue.sub(netPrimeDebtChange);\n        }\n    }\n}\n```\n```\nTokenHandler.withdrawPrimeCash(\n    account,\n    currencyId,\n    primeCashRefund,\n    pr,\n    false\n);\n```\n```\nfunction withdrawPrimeCash(\n    address account,\n    uint16 currencyId,\n    int256 primeCashToWithdraw,\n    PrimeRate memory primeRate,\n    bool withdrawWrappedNativeToken\n) internal returns (int256 netTransferExternal) {\n    if (primeCashToWithdraw == 0) {\n        return 0;\n    }\n    require(primeCashToWithdraw < 0);\n\n    Token memory underlying = getUnderlyingToken(currencyId);\n    netTransferExternal = convertToExternal(\n        underlying,\n        primeRate.convertToUnderlying(primeCashToWithdraw)\n    );\n\n    uint256 withdrawAmount = uint256(netTransferExternal).neg();\n\n    _redeemMoneyMarketIfRequired(currencyId, underlying, withdrawAmount);\n\n    if (underlying.tokenType == TokenType.Ether) {\n        GenericToken.transferNativeTokenOut(account, withdrawAmount, withdrawWrappedNativeToken);\n    } else {\n        GenericToken.safeTransferOut(underlying.tokenAddress, account, withdrawAmount);\n    }\n\n    _postTransferPrimeCashUpdate(account, currencyId, netTransferExternal, underlying, primeRate);\n}\n```\n```\nif (underlying.tokenType == TokenType.Ether) {\n    GenericToken.transferNativeTokenOut(account, withdrawAmount, withdrawWrappedNativeToken);\n} else {\n    GenericToken.safeTransferOut(underlying.tokenAddress, account, withdrawAmount);\n}\n```\n```\nGenericToken.safeTransferOut(\n    underlying.tokenAddress,\n    account,\n    withdrawAmount\n)\n```\n```\nERC20: \n    Any Non-Rebasing token. \n    ex. USDC, DAI, USDT (future), wstETH, WETH, WBTC, FRAX, CRV, etc.\n```