interface ICoreUtils {
    function d(uint256 id) external view returns (address);

    function bondData(uint256 id) external view returns (IBondData);

    //principal + interest = principal * (1 + couponRate);
    function calcPrincipalAndInterest(uint256 principal, uint256 couponRate)
        external
        pure
        returns (uint256);

    //可转出金额,募集到的总资金减去给所有投票人的手续费
    function transferableAmount(uint256 id) external view returns (uint256);

    //总的募集资金量
    function debt(uint256 id) external view returns (uint256);

    //总的募集资金量
    function totalInterest(uint256 id) external view returns (uint256);

    function debtPlusTotalInterest(uint256 id) external view returns (uint256);

    //可投资的剩余份数
    function remainInvestAmount(uint256 id) external view returns (uint256);

        function calcMinCollateralTokenAmount(uint256 id)
        external
        view
        returns (uint256);
    function pawnBalanceInUsd(uint256 id) external view returns (uint256);

    function disCountPawnBalanceInUsd(uint256 id)
        external
        view
        returns (uint256);

    function crowdBalanceInUsd(uint256 id) external view returns (uint256);

    //资不抵债判断，资不抵债时，为true，否则为false
    function isInsolvency(uint256 id) external view returns (bool);

    //获取质押的代币价格
    function pawnPrice(uint256 id) external view returns (uint256);

    //获取募资的代币价格
    function crowdPrice(uint256 id) external view returns (uint256);

    //要清算的质押物数量
    //X = (AC*price - PCR*PD)/(price*(1-PCR*Discount))
    //X = (PCR*PD - AC*price)/(price*(PCR*Discount-1))
    function X(uint256 id) external view returns (uint256 res);
    //清算额，减少的债务
    //X*price(collater)*Discount/price(crowd)
    function Y(uint256 id) external view returns (uint256 res);

    //到期后，由系统债务算出需要清算的抵押物数量
    function calcLiquidatePawnAmount(uint256 id) external view returns (uint256);
    function calcLiquidatePawnAmount(uint256 id, uint256 liability) external view returns (uint256);

    function investPrincipalWithInterest(uint256 id, address who)
        external
        view
        returns (uint256);

        //bond:
    function convert2BondAmount(address b, address t, uint256 amount)
        external
        view
        returns (uint256);

    //bond:
    function convert2GiveAmount(uint256 id, uint256 bondAmount)
        external
        view
        returns (uint256);
    
    function isUnsafe(uint256 id) external view returns (bool unsafe);
    function isDepositMultipleUnsafe(uint256 id) external view returns (bool unsafe);
    function getLiquidateAmount(uint id, uint y1) external view returns (uint256, uint256);
    function precision(uint256 id) external view returns (uint256);
    function isDebtOpen(uint256 id) external view returns (bool);
    function isMinIssuanceCheckOK(uint256 id) external view returns (bool ok);
}
/*
 * Copyright (c) The Force Protocol Development Team
 */
function debt(uint256 id) external view returns (uint256);

//总的募集资金量