contract P1InverseFundingOracle is
    P1FundingOracle
{
    // ============ Constructor ============

    constructor(
        address fundingRateProvider
    )
        P1FundingOracle(fundingRateProvider)
        public
    {
    }

    // ============ External Functions ============

    /**
     * @notice Calculates the signed funding amount that has accumulated over a period of time.
     *
     * @param  timeDelta  Number of seconds over which to calculate the accumulated funding amount.
     * @return            True if the funding rate is positive, and false otherwise.
     * @return            The funding amount as a unitless rate, represented as a fixed-point number
     *                    with 18 decimals.
     */
    function getFunding(
        uint256 timeDelta
    )
        public
        view
        returns (bool, uint256)
    {
        (bool isPositive, uint256 fundingAmount) = super.getFunding(timeDelta);
        return (!isPositive, fundingAmount);
    }
}
/**
 * @title P1InverseFundingOracle
 * @author dYdX
 *
 * @notice P1FundingOracle that uses the inverted rate (i.e. flips base and quote currencies)
 *  when getting the funding amount.
 */
function getFunding(
    uint256 timeDelta
)
    public
    view
    returns (bool, uint256)
{
    (bool isPositive, uint256 fundingAmount) = super.getFunding(timeDelta);
    return (!isPositive, fundingAmount);
}

/**
 * @notice Calculates the signed funding amount that has accumulated over a period of time.
 *
 * @param  timeDelta  Number of seconds over which to calculate the accumulated funding amount.
 * @return            True if the funding rate is positive, and false otherwise.
 * @return            The funding amount as a unitless rate, represented as a fixed-point number
 *                    with 18 decimals.
 */