```\nint256 settledVaultValue = settlementRate.convertToUnderlying(residualAssetCashBalance)\n    .add(totalStrategyTokenValueAtSettlement);\n\n// If the vault is insolvent (meaning residualAssetCashBalance < 0), it is necessarily\n// true that totalStrategyTokens == 0 (meaning all tokens were sold in an attempt to\n// repay the debt). That means settledVaultValue == residualAssetCashBalance, strategyTokenClaim == 0\n// and assetCashClaim == totalAccountValue. Accounts that are still solvent will be paid from the\n// reserve, accounts that are insolvent will have a totalAccountValue == 0.\nstrategyTokenClaim = totalAccountValue.mul(vaultState.totalStrategyTokens.toInt())\n    .div(settledVaultValue).toUint();\n\nassetCashClaim = totalAccountValue.mul(residualAssetCashBalance)\n    .div(settledVaultValue);\n```\n