```\nFile: VaultLiquidationAction.sol\n    function deleverageAccount(\n        address account,\n        address vault,\n        address liquidator,\n        uint16 currencyIndex,\n        int256 depositUnderlyingInternal\n    ) external payable nonReentrant override returns (\n        uint256 vaultSharesToLiquidator,\n        int256 depositAmountPrimeCash\n    ) {\n        require(currencyIndex < 3);\n        (\n            VaultConfig memory vaultConfig,\n            VaultAccount memory vaultAccount,\n            VaultState memory vaultState\n        ) = _authenticateDeleverage(account, vault, liquidator);\n\n        PrimeRate memory pr;\n        // Currency Index is validated in this method\n        (\n            depositUnderlyingInternal,\n            vaultSharesToLiquidator,\n            pr\n        ) = IVaultAccountHealth(address(this)).calculateDepositAmountInDeleverage(\n            currencyIndex, vaultAccount, vaultConfig, vaultState, depositUnderlyingInternal\n        );\n\n        uint16 currencyId = vaultConfig.borrowCurrencyId;\n        if (currencyIndex == 1) currencyId = vaultConfig.secondaryBorrowCurrencies[0];\n        else if (currencyIndex == 2) currencyId = vaultConfig.secondaryBorrowCurrencies[1];\n\n        Token memory token = TokenHandler.getUnderlyingToken(currencyId);\n        // Excess ETH is returned to the liquidator natively\n        (/* */, depositAmountPrimeCash) = TokenHandler.depositUnderlyingExternal(\n            liquidator, currencyId, token.convertToExternal(depositUnderlyingInternal), pr, false \n        );\n\n        // Do not skip the min borrow check here\n        vaultAccount.vaultShares = vaultAccount.vaultShares.sub(vaultSharesToLiquidator);\n        if (vaultAccount.maturity == Constants.PRIME_CASH_VAULT_MATURITY) {\n            // Vault account will not incur a cash balance if they are in the prime cash maturity, their debts\n            // will be paid down directly.\n            _reduceAccountDebt(\n                vaultConfig, vaultState, vaultAccount, pr, currencyIndex, depositUnderlyingInternal, true\n            );\n            depositAmountPrimeCash = 0;\n        }\n\n        // Check min borrow in this liquidation method, the deleverage calculation should adhere to the min borrow\n        vaultAccount.setVaultAccountForLiquidation(vaultConfig, currencyIndex, depositAmountPrimeCash, true);\n\n        emit VaultDeleverageAccount(vault, account, currencyId, vaultSharesToLiquidator, depositAmountPrimeCash);\n        emit VaultLiquidatorProfit(vault, account, liquidator, vaultSharesToLiquidator, true);\n\n        _transferVaultSharesToLiquidator(\n            liquidator, vaultConfig, vaultSharesToLiquidator, vaultAccount.maturity\n        );\n\n        Emitter.emitVaultDeleverage(\n            liquidator, account, vault, currencyId, vaultState.maturity,\n            depositAmountPrimeCash, vaultSharesToLiquidator\n        );\n    }\n```\n