contract DebaseOracle is Ownable, ExampleOracleSimple, IDebaseOracle {
    IDebase debase;
    uint256 constant SCALE = 10**18;
    address constant uniFactory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;

    constructor(IDebase debase_, address sUsd_)
        public
        ExampleOracleSimple(uniFactory, address(debase_), sUsd_)
    {
        debase = debase_;
    }

    /**
     * @notice Function that must be called before the very first rebase of debase protocol to get an accurate price.
     */
    function updateBeforeRebase() public onlyOwner {
        update();
    }

    /**
     * @notice Get a price data sample from the oralce. Can only be called by the debase policy.
     * @return The price and if the price if valid
     */
    function getData() external override returns (uint256, bool) {
        require(
            msg.sender == debase.debasePolicy(),
            "Can only be called by the debase policy"
        );
        update();
        uint256 price = consult(address(debase), SCALE); // will return 1 BASED in sUSD

        if (price == 0) {
            return (0, false);
        }

        return (price, true);
    }
}
function getData() external override returns (uint256, bool) {
    require(
        msg.sender == debase.debasePolicy(),
        "Can only be called by the debase policy"
    );
    update();
    uint256 price = consult(address(debase), SCALE); // will return 1 BASED in sUSD

    if (price == 0) {
        return (0, false);
    }

    return (price, true);
}

/**
 * @notice Get a price data sample from the oralce. Can only be called by the debase policy.
 * @return The price and if the price if valid
 */