```\n    function shutdownMarket(address asset)\n        external\n        onlyValidAsset(asset)\n        isNotFrozen(asset)\n        nonReentrant\n    {\n      uint256 cRatio = _getAssetCollateralRatio(asset);\n      if (cRatio > LibAsset.minimumCR(asset)) {\n            revert Errors.SufficientCollateral();\n        } else {\n            STypes.Asset storage Asset = s.asset[asset];\n            uint256 vault = Asset.vault;\n            uint88 assetZethCollateral = Asset.zethCollateral;\n            s.vault[vault].zethCollateral -= assetZethCollateral;\n          Asset.frozen = F.Permanent;\n            if (cRatio > 1 ether) {\n                // More than enough collateral to redeem ERC 1:1, send extras to TAPP\n                uint88 excessZeth =\n                    assetZethCollateral - assetZethCollateral.divU88(cRatio);\n                s.vaultUser[vault][address(this)].ethEscrowed += excessZeth;\n                // Reduces c-ratio to 1\n                Asset.zethCollateral -= excessZeth;\n            }\n        }\n        emit Events.ShutdownMarket(asset);\n    }\n\n    // rest of code\n\n    function _getAssetCollateralRatio(address asset)\n        private\n        view\n        returns (uint256 cRatio)\n    {\n        STypes.Asset storage Asset = s.asset[asset];\n      return Asset.zethCollateral.div(LibOracle.getPrice(asset).mul(Asset.ercDebt));\n    }\n```\n