Vault account might not be able to exit after liquidation
The vault exit might fail after a liquidation event, leading to users being unable to main their positions.\\nAssume that a large portion of the vault account gets liquidated which results in a large amount of cash deposited into the vault account's cash balance. In addition, interest will also start accruing within the vault account's cash balance.\\nLet $x$ be the `primaryCash` of a vault account after a liquidation event and interest accrual.\\nThe owner of the vault account decided to exit the vault by calling `exitVault`. Within the `exitVault` function, the `vaultAccount.tempCashBalance` will be set to $x$.\\nNext, the `lendToExitVault` function is called. Assume that the cost in prime cash terms to lend an offsetting fCash position is $-y$ (primeCashCostToLend). The `updateAccountDebt` function will be called, and the `vaultAccount.tempCashBalance` will be updated to $x + (-y) \\Rightarrow x - y$. If $x > y$, then the new `vaultAccount.tempCashBalance` will be more than zero.\\nSubsequently, the `redeemWithDebtRepayment` function will be called. However, since `vaultAccount.tempCashBalance` is larger than zero, the transaction will revert, and the owner cannot exit the vault.\\n```\\nFile: VaultConfiguration.sol\\n            if (vaultAccount.tempCashBalance < 0) {\\n                int256 x = vaultConfig.primeRate.convertToUnderlying(vaultAccount.tempCashBalance).neg();\\n                underlyingExternalToRepay = underlyingToken.convertToUnderlyingExternalWithAdjustment(x).toUint();\\n            } else {\\n                // Otherwise require that cash balance is zero. Cannot have a positive cash balance in this method\\n                require(vaultAccount.tempCashBalance == 0);\\n            }\\n```\\n
Consider refunding the excess positive `vaultAccount.tempCashBalance` to the users so that `vaultAccount.tempCashBalance` will be cleared (set to zero) before calling the `redeemWithDebtRepayment` function.
The owner of the vault account would not be able to exit the vault to main their position. As such, their assets are stuck within the protocol.
```\\nFile: VaultConfiguration.sol\\n            if (vaultAccount.tempCashBalance < 0) {\\n                int256 x = vaultConfig.primeRate.convertToUnderlying(vaultAccount.tempCashBalance).neg();\\n                underlyingExternalToRepay = underlyingToken.convertToUnderlyingExternalWithAdjustment(x).toUint();\\n            } else {\\n                // Otherwise require that cash balance is zero. Cannot have a positive cash balance in this method\\n                require(vaultAccount.tempCashBalance == 0);\\n            }\\n```\\n