contract CompoundOpenOracle is Oracle {
    using SafeMath for uint;

    uint private constant SCALE_FACTOR = 10 ** 12;  // Since Compound has 6 dec places, and latestPrice() needs 18

    UniswapAnchoredView private anchoredView;

    constructor(UniswapAnchoredView anchoredView_) public
    {
        anchoredView = anchoredView_;
    }

    /**
     * @notice Retrieve the latest price of the price oracle.
     * @return price
     */
    function latestPrice() public virtual override view returns (uint price) {
        price = latestCompoundPrice();
    }

    function latestCompoundPrice() public view returns (uint price) {
        price = anchoredView.price("ETH").mul(SCALE_FACTOR);
    }
}
/**
 * @title CompoundOpenOracle
 */
function latestPrice() public virtual override view returns (uint price) {
    price = latestCompoundPrice();
}

/**
 * @notice Retrieve the latest price of the price oracle.
 * @return price
 */