Contract 0x0E0d5e5F7411737AD598ad1553B7b811485822e5

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xad1f632ebfaba9ecf83be45b9266bc8a307d82c3fd9cde7a7098b2a21ab70c70Update378463482022-05-08 16:21:16275 days 4 hrs ago0x596a96301bfe95d59e3d0f93c2d1baf02d0f2d45 IN  Rubik Finance: Oracle0 FTM0.01951017772
0x69e3fdc9ccd035696132fae8fce4d9ba7240ee4418335f3bc7c5c43c139ec8d3Update373981122022-05-02 15:34:36281 days 5 hrs ago0x48d347c421d22198e2e6873fab58456c25b4cce3 IN  Rubik Finance: Oracle0 FTM0.038627435379
0x02e61f53a85a84f8cf79c40250fcc44c1c48d14888e5e16fc7fa6a305cb1c379Update373331492022-05-01 13:34:28282 days 7 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.025925490846
0x260be2b631974c65b79d72d49830b29e60dcfe7d58adf5fd3c38d28e9861b630Update372540062022-04-30 4:00:38283 days 16 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.050001398658
0x3ba8888ac9aa0e4e50eea706630671a13fb3e9ac64e1191feff1a226a57881d3Update371048672022-04-27 23:23:32285 days 21 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.02246685742
0xaed0c6724649c511e5ca9e51d3edd19cd39704e61eec2b5c384d40273ca9f509Update370450612022-04-27 4:18:59286 days 16 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.01684180849
0x537d52c7cd7fdcd8e98157556fab1aff7927c5a618cd103f0d2897f4d65eeb64Update370447522022-04-27 4:13:42286 days 16 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.01943717822
0x70753d5c4a86636cb7da2c1a9dac7cf28b59814fd9bcdb6ef126f63b2ab9c10cUpdate370444342022-04-27 4:05:10286 days 16 hrs ago0xfa1dcf8369ff71afe0fc2b57e1d103ab931766c7 IN  Rubik Finance: Oracle0 FTM0.020118143224
0xf7281bc52b643685d3cafc7f1e67c684c9fc787e30091a9db9cee665e82dde56Update370266482022-04-26 22:08:47286 days 22 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.026950454339
0x836db514cc5ed833bbf50c495829c7666f41c389ac904c98fbd4167d1e2bdfc7Update370263832022-04-26 22:03:33286 days 22 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.025828231913
0x88d193f18d1c5421bd3c2b3c42c09ea8a5afc59b9e81b9a6b40a63edc15c9cc2Update370232372022-04-26 21:03:03286 days 23 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.111950150188
0xd72fa3fe6ac2079ded727a7a35bfb5b34bde5f79c63eea3191258aee5742cd04Update369640642022-04-26 0:22:44287 days 20 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.016487177071
0xc2eaec50f614880877d1a5b1b38c3d64f21b0d363af8ad67bc0b3a1c6aafc26dUpdate369638482022-04-26 0:18:44287 days 20 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.018026134394
0xf5f76561c1978cb737f32e105e809df9c11dffd19cf440e65fff960634d7f10bUpdate369540232022-04-25 21:07:25287 days 23 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.017645509049
0x4f4157f60d16fd6ad30ef62cea94a172f94c91445c0496fa37b545402612a298Update369507512022-04-25 20:04:36288 days 32 mins agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.024399157379
0xb5849d412bbc04a9e10c09a424491196b37c2e5cbad38b96f661a77b376a0520Update369458492022-04-25 18:20:03288 days 2 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.018189826499
0x41622ecdde1e9c1101d21121145267de280d1aacb97696a2bdbaf6032f90a195Update369411792022-04-25 16:50:59288 days 3 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.020534390089
0xde405756c7f0ddb7eeb0c15408e8bd10d9cadbc1c06642a625837704b133e13eUpdate368188182022-04-24 0:34:27289 days 20 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.014460709855
0x681a95e50952250ae48eaba01a39100630dc57edd7dc5b14f251e7a0417d65f3Update367928142022-04-23 16:37:25290 days 3 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.014101849265
0x45d63a298fe496863edf6fa1b798c1a3fad011e79403b5cfa694cc648fd617dcUpdate367790412022-04-23 12:15:33290 days 8 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.013239511085
0x492edd9762126ec6eff09e5cbe20adf9d2ec391cf9a5fc1f76187037fdbd5b19Update367294142022-04-22 21:36:19290 days 23 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.022765150309
0x36787e41fe3271627a96fc4e66a215d3c992ef150ed1209e0128851654738dc4Update367090782022-04-22 15:13:25291 days 5 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.015129250013
0x8afcc92212e39db5dd6f102a6a58a92512bf0a464f8d73ef630aa502007dd4eaUpdate367089912022-04-22 15:11:30291 days 5 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.015166761274
0x3f0fa5038493e112375590eb0c0e7fae010ba5bf111fe5a82be991b296d06038Update367088732022-04-22 15:09:23291 days 5 hrs agoRubik Finance: Deployer IN  Rubik Finance: Oracle0 FTM0.022363972801
0xe0a88dfdb3f106a35a3d13d8adb5233566b84b8f1eb7e039cfb1fa3f498815e90x60806040366355632022-04-21 17:12:52292 days 3 hrs agoRubik Finance: Deployer IN  Create: Oracle0 FTM0.375428432267
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xe0a88dfdb3f106a35a3d13d8adb5233566b84b8f1eb7e039cfb1fa3f498815e9366355632022-04-21 17:12:52292 days 3 hrs ago Rubik Finance: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Oracle

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at FtmScan.com on 2022-04-21
*/

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}


// File contracts/lib/Babylonian.sol



pragma solidity ^0.6.0;

library Babylonian {
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0
    }
}


// File contracts/lib/FixedPoint.sol



pragma solidity ^0.6.0;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
    // range: [0, 2**112 - 1]
    // resolution: 1 / 2**112
    struct uq112x112 {
        uint224 _x;
    }

    // range: [0, 2**144 - 1]
    // resolution: 1 / 2**112
    struct uq144x112 {
        uint256 _x;
    }

    uint8 private constant RESOLUTION = 112;
    uint256 private constant Q112 = uint256(1) << RESOLUTION;
    uint256 private constant Q224 = Q112 << RESOLUTION;

    // encode a uint112 as a UQ112x112
    function encode(uint112 x) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(x) << RESOLUTION);
    }

    // encodes a uint144 as a UQ144x112
    function encode144(uint144 x) internal pure returns (uq144x112 memory) {
        return uq144x112(uint256(x) << RESOLUTION);
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) {
        require(x != 0, "FixedPoint: DIV_BY_ZERO");
        return uq112x112(self._x / uint224(x));
    }

    // multiply a UQ112x112 by a uint, returning a UQ144x112
    // reverts on overflow
    function mul(uq112x112 memory self, uint256 y) internal pure returns (uq144x112 memory) {
        uint256 z;
        require(y == 0 || (z = uint256(self._x) * y) / y == uint256(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW");
        return uq144x112(z);
    }

    // returns a UQ112x112 which represents the ratio of the numerator to the denominator
    // equivalent to encode(numerator).div(denominator)
    function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {
        require(denominator > 0, "FixedPoint: DIV_BY_ZERO");
        return uq112x112((uint224(numerator) << RESOLUTION) / denominator);
    }

    // decode a UQ112x112 into a uint112 by truncating after the radix point
    function decode(uq112x112 memory self) internal pure returns (uint112) {
        return uint112(self._x >> RESOLUTION);
    }

    // decode a UQ144x112 into a uint144 by truncating after the radix point
    function decode144(uq144x112 memory self) internal pure returns (uint144) {
        return uint144(self._x >> RESOLUTION);
    }

    // take the reciprocal of a UQ112x112
    function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) {
        require(self._x != 0, "FixedPoint: ZERO_RECIPROCAL");
        return uq112x112(uint224(Q224 / self._x));
    }

    // square root of a UQ112x112
    function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(Babylonian.sqrt(uint256(self._x)) << 56));
    }
}


// File contracts/interfaces/IUniswapV2Pair.sol



pragma solidity ^0.6.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to);
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}


// File contracts/lib/UniswapV2OracleLibrary.sol



pragma solidity ^0.6.0;


// library with helper methods for oracles that are concerned with computing average prices
library UniswapV2OracleLibrary {
    using FixedPoint for *;

    // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
    function currentBlockTimestamp() internal view returns (uint32) {
        return uint32(block.timestamp % 2**32);
    }

    // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
    function currentCumulativePrices(address pair)
        internal
        view
        returns (
            uint256 price0Cumulative,
            uint256 price1Cumulative,
            uint32 blockTimestamp
        )
    {
        blockTimestamp = currentBlockTimestamp();
        price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
        price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();

        // if time has elapsed since the last update on the pair, mock the accumulated price values
        (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();
        if (blockTimestampLast != blockTimestamp) {
            // subtraction overflow is desired
            uint32 timeElapsed = blockTimestamp - blockTimestampLast;
            // addition overflow is desired
            // counterfactual
            price0Cumulative += uint256(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
            // counterfactual
            price1Cumulative += uint256(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
        }
    }
}


// File @openzeppelin/contracts/utils/[email protected]



pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}




// File @openzeppelin/contracts/access/[email protected]


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


// File contracts/owner/Operator.sol



pragma solidity 0.6.12;


contract Operator is Context, Ownable {
    address private _operator;

    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);

    constructor() internal {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);
    }

    function operator() public view returns (address) {
        return _operator;
    }

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    function isOperator() public view returns (bool) {
        return _msgSender() == _operator;
    }

    function transferOperator(address newOperator_) public onlyOwner {
        _transferOperator(newOperator_);
    }

    function _transferOperator(address newOperator_) internal {
        require(newOperator_ != address(0), "operator: zero address given for new operator");
        emit OperatorTransferred(address(0), newOperator_);
        _operator = newOperator_;
    }
}


// File contracts/utils/Epoch.sol



pragma solidity ^0.6.0;

contract Epoch is Operator {
    using SafeMath for uint256;

    uint256 private period;
    uint256 private startTime;
    uint256 private lastEpochTime;
    uint256 private epoch;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        uint256 _period,
        uint256 _startTime,
        uint256 _startEpoch
    ) public {
        period = _period;
        startTime = _startTime;
        epoch = _startEpoch;
        lastEpochTime = startTime.sub(period);
    }

    /* ========== Modifier ========== */

    modifier checkStartTime {
        require(now >= startTime, 'Epoch: not started yet');

        _;
    }

    modifier checkEpoch {
        uint256 _nextEpochPoint = nextEpochPoint();
        if (now < _nextEpochPoint) {
            require(msg.sender == operator(), 'Epoch: only operator allowed for pre-epoch');
            _;
        } else {
            _;

            for (;;) {
                lastEpochTime = _nextEpochPoint;
                ++epoch;
                _nextEpochPoint = nextEpochPoint();
                if (now < _nextEpochPoint) break;
            }
        }
    }

    /* ========== VIEW FUNCTIONS ========== */

    function getCurrentEpoch() public view returns (uint256) {
        return epoch;
    }

    function getPeriod() public view returns (uint256) {
        return period;
    }

    function getStartTime() public view returns (uint256) {
        return startTime;
    }

    function getLastEpochTime() public view returns (uint256) {
        return lastEpochTime;
    }

    function nextEpochPoint() public view returns (uint256) {
        return lastEpochTime.add(period);
    }

    /* ========== GOVERNANCE ========== */

    function setPeriod(uint256 _period) external onlyOperator {
        require(_period >= 1 hours && _period <= 48 hours, '_period: out of range');
        period = _period;
    }

    function setEpoch(uint256 _epoch) external onlyOperator {
        epoch = _epoch;
    }
}


// File contracts/Oracle.sol



pragma solidity 0.6.12;


// fixed window oracle that recomputes the average price for the entire period once every period
// note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period
contract Oracle is Epoch {
    using FixedPoint for *;
    using SafeMath for uint256;

    /* ========== STATE VARIABLES ========== */

    // uniswap
    address public token0;
    address public token1;
    IUniswapV2Pair public pair;

    // oracle
    uint32 public blockTimestampLast;
    uint256 public price0CumulativeLast;
    uint256 public price1CumulativeLast;
    FixedPoint.uq112x112 public price0Average;
    FixedPoint.uq112x112 public price1Average;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        IUniswapV2Pair _pair,
        uint256 _period,
        uint256 _startTime
    ) public Epoch(_period, _startTime, 0) {
        pair = _pair;
        token0 = pair.token0();
        token1 = pair.token1();
        price0CumulativeLast = pair.price0CumulativeLast(); // fetch the current accumulated price value (1 / 0)
        price1CumulativeLast = pair.price1CumulativeLast(); // fetch the current accumulated price value (0 / 1)
        uint112 reserve0;
        uint112 reserve1;
        (reserve0, reserve1, blockTimestampLast) = pair.getReserves();
        require(reserve0 != 0 && reserve1 != 0, "Oracle: NO_RESERVES"); // ensure that there's liquidity in the pair
    }

    /* ========== MUTABLE FUNCTIONS ========== */

    /** @dev Updates 1-day EMA price from Uniswap.  */
    function update() external checkEpoch {
        (uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired

        if (timeElapsed == 0) {
            // prevent divided by zero
            return;
        }

        // overflow is desired, casting never truncates
        // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed
        price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - price0CumulativeLast) / timeElapsed));
        price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - price1CumulativeLast) / timeElapsed));

        price0CumulativeLast = price0Cumulative;
        price1CumulativeLast = price1Cumulative;
        blockTimestampLast = blockTimestamp;

        emit Updated(price0Cumulative, price1Cumulative);
    }

    // note this will always return 0 before update has been called successfully for the first time.
    function consult(address _token, uint256 _amountIn) external view returns (uint144 amountOut) {
        if (_token == token0) {
            _amountIn = _amountIn.mul(10e11);
            amountOut = price0Average.mul(_amountIn).decode144();
        } else {
            require(_token == token1, "Oracle: INVALID_TOKEN");
            _amountIn = _amountIn.mul(10e11);
            amountOut = price1Average.mul(_amountIn).decode144();
        }
    }

    function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut) {
        (uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (_token == token0) {
            _amountIn = _amountIn.mul(10e11);
            _amountOut = FixedPoint.uq112x112(uint224((price0Cumulative - price0CumulativeLast) / timeElapsed)).mul(_amountIn).decode144();
        } else if (_token == token1) {
            _amountIn = _amountIn.mul(10e11);
            _amountOut = FixedPoint.uq112x112(uint224((price1Cumulative - price1CumulativeLast) / timeElapsed)).mul(_amountIn).decode144();
            
        }
    }

    event Updated(uint256 price0CumulativeLast, uint256 price1CumulativeLast);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUniswapV2Pair","name":"_pair","type":"address"},{"internalType":"uint256","name":"_period","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price0CumulativeLast","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price1CumulativeLast","type":"uint256"}],"name":"Updated","type":"event"},{"inputs":[],"name":"blockTimestampLast","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"consult","outputs":[{"internalType":"uint144","name":"amountOut","type":"uint144"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastEpochTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price0Average","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1Average","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"setEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"twap","outputs":[{"internalType":"uint144","name":"_amountOut","type":"uint144"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200177038038062001770833981810160405260608110156200003757600080fd5b508051602082015160409092015190919081816000806200005762000462565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000ab62000462565b600180546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a36002839055600382905560058190556200011e828462000466602090811b62000c9d17901c565b6004908155600880546001600160a01b0319166001600160a01b03898116919091179182905560408051630dfe168160e01b81529051929091169550630dfe16819450808301935060209290829003018186803b1580156200017f57600080fd5b505afa15801562000194573d6000803e3d6000fd5b505050506040513d6020811015620001ab57600080fd5b5051600680546001600160a01b0319166001600160a01b039283161790556008546040805163d21220a760e01b81529051919092169163d21220a7916004808301926020929190829003018186803b1580156200020757600080fd5b505afa1580156200021c573d6000803e3d6000fd5b505050506040513d60208110156200023357600080fd5b5051600780546001600160a01b0319166001600160a01b0392831617905560085460408051635909c0d560e01b815290519190921691635909c0d5916004808301926020929190829003018186803b1580156200028f57600080fd5b505afa158015620002a4573d6000803e3d6000fd5b505050506040513d6020811015620002bb57600080fd5b505160095560085460408051635a3d549360e01b815290516001600160a01b0390921691635a3d549391600480820192602092909190829003018186803b1580156200030657600080fd5b505afa1580156200031b573d6000803e3d6000fd5b505050506040513d60208110156200033257600080fd5b5051600a5560085460408051630240bc6b60e21b8152905160009283926001600160a01b0390911691630902f1ac91600480820192606092909190829003018186803b1580156200038257600080fd5b505afa15801562000397573d6000803e3d6000fd5b505050506040513d6060811015620003ae57600080fd5b50805160208201516040909201516008805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055925090506001600160701b038216158015906200040557506001600160701b03811615155b62000457576040805162461bcd60e51b815260206004820152601360248201527f4f7261636c653a204e4f5f524553455256455300000000000000000000000000604482015290519081900360640190fd5b5050505050620004c4565b3390565b600082821115620004be576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b61129c80620004d46000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063715018a6116100c3578063ba5224581161007c578063ba52245814610304578063c5700a021461030c578063c5967c261461032d578063c828371e14610335578063d21220a71461033d578063f2fde38b1461034557610158565b8063715018a6146102d45780638da5cb5b146102dc578063a2e62045146102e4578063a6bb4539146102ec578063a8aa1b31146102f4578063b97dd9e2146102fc57610158565b80634456eda2116101155780634456eda214610250578063570ca7351461026c5780635909c0d5146102745780635a3d54931461027c5780635e6aaf2c146102845780636808a128146102a857610158565b80630ceb2cef1461015d5780630dfe16811461017c5780630f3a9f65146101a05780631ed24195146101bd57806329605e77146101d75780633ddac953146101fd575b600080fd5b61017a6004803603602081101561017357600080fd5b503561036b565b005b6101846103b9565b604080516001600160a01b039092168252519081900360200190f35b61017a600480360360208110156101b657600080fd5b50356103c8565b6101c5610474565b60408051918252519081900360200190f35b61017a600480360360208110156101ed57600080fd5b50356001600160a01b031661047a565b6102296004803603604081101561021357600080fd5b506001600160a01b0381351690602001356104fa565b6040805171ffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102586105f4565b604080519115158252519081900360200190f35b61018461061a565b6101c5610629565b6101c561062f565b61028c610635565b604080516001600160e01b039092168252519081900360200190f35b610229600480360360408110156102be57600080fd5b506001600160a01b038135169060200135610644565b61017a61073c565b6101846107fa565b61017a610809565b61028c610b19565b610184610b28565b6101c5610b37565b6101c5610b3d565b610314610b43565b6040805163ffffffff9092168252519081900360200190f35b6101c5610b56565b6101c5610b74565b610184610b7a565b61017a6004803603602081101561035b57600080fd5b50356001600160a01b0316610b89565b6001546001600160a01b031633146103b45760405162461bcd60e51b81526004018080602001828103825260248152602001806112206024913960400191505060405180910390fd5b600555565b6006546001600160a01b031681565b6001546001600160a01b031633146104115760405162461bcd60e51b81526004018080602001828103825260248152602001806112206024913960400191505060405180910390fd5b610e10811015801561042657506202a3008111155b61046f576040805162461bcd60e51b81526020600482015260156024820152745f706572696f643a206f7574206f662072616e676560581b604482015290519081900360640190fd5b600255565b60025490565b610482610cfa565b6001600160a01b03166104936107fa565b6001600160a01b0316146104ee576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104f781610cfe565b50565b6006546000906001600160a01b0384811691161415610558576105228264e8d4a51000610d9b565b6040805160208101909152600b546001600160e01b031681529092506105519061054c9084610df4565b610e72565b90506105ee565b6007546001600160a01b038481169116146105b2576040805162461bcd60e51b815260206004820152601560248201527427b930b1b6329d1024a72b20a624a22faa27a5a2a760591b604482015290519081900360640190fd5b6105c18264e8d4a51000610d9b565b6040805160208101909152600c546001600160e01b031681529092506105eb9061054c9084610df4565b90505b92915050565b6001546000906001600160a01b031661060b610cfa565b6001600160a01b031614905090565b6001546001600160a01b031690565b60095481565b600a5481565b600c546001600160e01b031681565b600854600090819081908190610662906001600160a01b0316610e79565b600854600654939650919450925063ffffffff600160a01b909104168203906001600160a01b03888116911614156106e3576106a38664e8d4a51000610d9b565b95506106dc61054c8760405180602001604052808563ffffffff166009548a03816106ca57fe5b046001600160e01b0316905290610df4565b9450610732565b6007546001600160a01b0388811691161415610732576107088664e8d4a51000610d9b565b955061072f61054c8760405180602001604052808563ffffffff16600a548903816106ca57fe5b94505b5050505092915050565b610744610cfa565b6001600160a01b03166107556107fa565b6001600160a01b0316146107b0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000610813610b56565b9050804210156109b45761082561061a565b6001600160a01b0316336001600160a01b0316146108745760405162461bcd60e51b815260040180806020018281038252602a8152602001806111a8602a913960400191505060405180910390fd5b60085460009081908190610890906001600160a01b0316610e79565b600854929550909350915063ffffffff600160a01b909104811682039081166108bc57505050506109af565b60405180602001604052808263ffffffff166009548703816108da57fe5b046001600160e01b039081169091529051600b80546001600160e01b031916919092161790556040805160208101909152600a54819063ffffffff84169086038161092157fe5b046001600160e01b039081169091529051600c80546001600160e01b031916919092161790556009849055600a8390556008805463ffffffff60a01b1916600160a01b63ffffffff851602179055604080518581526020810185905281517fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902929181900390910190a1505050505b6104f7565b600854600090819081906109d0906001600160a01b0316610e79565b600854929550909350915063ffffffff600160a01b909104811682039081166109fc5750505050610aef565b60405180602001604052808263ffffffff16600954870381610a1a57fe5b046001600160e01b039081169091529051600b80546001600160e01b031916919092161790556040805160208101909152600a54819063ffffffff841690860381610a6157fe5b046001600160e01b039081169091529051600c80546001600160e01b031916919092161790556009849055600a8390556008805463ffffffff60a01b1916600160a01b63ffffffff851602179055604080518581526020810185905281517fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902929181900390910190a1505050505b6004819055600580546001019055610b05610b56565b905080421015610b14576104f7565b610aef565b600b546001600160e01b031681565b6008546001600160a01b031681565b60055490565b60045490565b600854600160a01b900463ffffffff1681565b6000610b6f60025460045461104890919063ffffffff16565b905090565b60035490565b6007546001600160a01b031681565b610b91610cfa565b6001600160a01b0316610ba26107fa565b6001600160a01b031614610bfd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610c425760405162461bcd60e51b81526004018080602001828103825260268152602001806111826026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082821115610cf4576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3390565b6001600160a01b038116610d435760405162461bcd60e51b815260040180806020018281038252602d8152602001806111d2602d913960400191505060405180910390fd5b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600082610daa575060006105ee565b82820282848281610db757fe5b04146105eb5760405162461bcd60e51b81526004018080602001828103825260218152602001806111ff6021913960400191505060405180910390fd5b610dfc61115c565b6000821580610e2257505082516001600160e01b031682810290838281610e1f57fe5b04145b610e5d5760405162461bcd60e51b81526004018080602001828103825260238152602001806112446023913960400191505060405180910390fd5b60408051602081019091529081529392505050565b5160701c90565b6000806000610e866110a2565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b158015610f3157600080fd5b505afa158015610f45573d6000803e3d6000fd5b505050506040513d6020811015610f5b57600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b158015610fa757600080fd5b505afa158015610fbb573d6000803e3d6000fd5b505050506040513d6060811015610fd157600080fd5b5080516020820151604090920151909450909250905063ffffffff8082169085161461103e5780840363ffffffff811661100b84866110ac565b516001600160e01b031602969096019563ffffffff811661102c85856110ac565b516001600160e01b0316029590950194505b5050509193909250565b6000828201838110156105eb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b63ffffffff421690565b6110b461116f565b6000826001600160701b031611611112576040805162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b168161114757fe5b046001600160e01b0316815250905092915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345706f63683a206f6e6c79206f70657261746f7220616c6c6f77656420666f72207072652d65706f63686f70657261746f723a207a65726f206164647265737320676976656e20666f72206e6577206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657261746f724669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a2646970667358221220d816076203010941bf8dfe2f7c542dece044a3d97f52199a6a4dc729fb40f68e64736f6c634300060c00330000000000000000000000009f4cbfa5b43252f3ed06f35c3f1a1d14c36bcef000000000000000000000000000000000000000000000000000000000000054600000000000000000000000000000000000000000000000000000000062686b60

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000009f4cbfa5b43252f3ed06f35c3f1a1d14c36bcef000000000000000000000000000000000000000000000000000000000000054600000000000000000000000000000000000000000000000000000000062686b60

-----Decoded View---------------
Arg [0] : _pair (address): 0x9f4cbfa5b43252f3ed06f35c3f1a1d14c36bcef0
Arg [1] : _period (uint256): 21600
Arg [2] : _startTime (uint256): 1651010400

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000009f4cbfa5b43252f3ed06f35c3f1a1d14c36bcef0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000005460
Arg [2] : 0000000000000000000000000000000000000000000000000000000062686b60


Deployed ByteCode Sourcemap

22154:3847:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21780:89;;;;;;;;;;;;;;;;-1:-1:-1;21780:89:0;;:::i;:::-;;22317:21;;;:::i;:::-;;;;-1:-1:-1;;;;;22317:21:0;;;;;;;;;;;;;;21593:179;;;;;;;;;;;;;;;;-1:-1:-1;21593:179:0;;:::i;21139:83::-;;;:::i;:::-;;;;;;;;;;;;;;;;19365:115;;;;;;;;;;;;;;;;-1:-1:-1;19365:115:0;-1:-1:-1;;;;;19365:115:0;;:::i;24637:457::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24637:457:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;19257:100;;;:::i;:::-;;;;;;;;;;;;;;;;;;19029:85;;;:::i;22462:35::-;;;:::i;22504:::-;;;:::i;22594:41::-;;;:::i;:::-;;;;-1:-1:-1;;;;;22594:41:0;;;;;;;;;;;;;;25102:814;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;25102:814:0;;;;;;;;:::i;18092:148::-;;;:::i;17441:87::-;;;:::i;23519:1008::-;;;:::i;22546:41::-;;;:::i;22373:26::-;;;:::i;21043:88::-;;;:::i;21327:97::-;;;:::i;22423:32::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21432:107;;;:::i;21230:89::-;;;:::i;22345:21::-;;;:::i;18395:244::-;;;;;;;;;;;;;;;;-1:-1:-1;18395:244:0;-1:-1:-1;;;;;18395:244:0;;:::i;21780:89::-;19165:9;;-1:-1:-1;;;;;19165:9:0;19178:10;19165:23;19157:72;;;;-1:-1:-1;;;19157:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21847:5:::1;:14:::0;21780:89::o;22317:21::-;;;-1:-1:-1;;;;;22317:21:0;;:::o;21593:179::-;19165:9;;-1:-1:-1;;;;;19165:9:0;19178:10;19165:23;19157:72;;;;-1:-1:-1;;;19157:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21681:7:::1;21670;:18;;:41;;;;;21703:8;21692:7;:19;;21670:41;21662:75;;;::::0;;-1:-1:-1;;;21662:75:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;21662:75:0;;;;;;;;;;;;;::::1;;21748:6;:16:::0;21593:179::o;21139:83::-;21208:6;;21139:83;:::o;19365:115::-;17672:12;:10;:12::i;:::-;-1:-1:-1;;;;;17661:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;17661:23:0;;17653:68;;;;;-1:-1:-1;;;17653:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19441:31:::1;19459:12;19441:17;:31::i;:::-;19365:115:::0;:::o;24637:457::-;24756:6;;24712:17;;-1:-1:-1;;;;;24746:16:0;;;24756:6;;24746:16;24742:345;;;24791:20;:9;24805:5;24791:13;:20::i;:::-;24838:17;;;;;;;;;:13;:17;-1:-1:-1;;;;;24838:17:0;;;24779:32;;-1:-1:-1;24838:40:0;;:28;;24779:32;24838:17;:28::i;:::-;:38;:40::i;:::-;24826:52;;24742:345;;;24929:6;;-1:-1:-1;;;;;24919:16:0;;;24929:6;;24919:16;24911:50;;;;;-1:-1:-1;;;24911:50:0;;;;;;;;;;;;-1:-1:-1;;;24911:50:0;;;;;;;;;;;;;;;24988:20;:9;25002:5;24988:13;:20::i;:::-;25035:17;;;;;;;;;:13;:17;-1:-1:-1;;;;;25035:17:0;;;24976:32;;-1:-1:-1;25035:40:0;;:28;;24976:32;25035:17;:28::i;:40::-;25023:52;;24742:345;24637:457;;;;:::o;19257:100::-;19340:9;;19300:4;;-1:-1:-1;;;;;19340:9:0;19324:12;:10;:12::i;:::-;-1:-1:-1;;;;;19324:25:0;;19317:32;;19257:100;:::o;19029:85::-;19097:9;;-1:-1:-1;;;;;19097:9:0;19029:85;:::o;22462:35::-;;;;:::o;22504:::-;;;;:::o;22594:41::-;;;-1:-1:-1;;;;;22594:41:0;;:::o;25102:814::-;25338:4;;25174:18;;;;;;;;25283:61;;-1:-1:-1;;;;;25338:4:0;25283:46;:61::i;:::-;25393:18;;25459:6;;25205:139;;-1:-1:-1;25205:139:0;;-1:-1:-1;25205:139:0;-1:-1:-1;25393:18:0;-1:-1:-1;;;25393:18:0;;;;25376:35;;;-1:-1:-1;;;;;25449:16:0;;;25459:6;;25449:16;25445:464;;;25494:20;:9;25508:5;25494:13;:20::i;:::-;25482:32;;25542:113;:101;25633:9;25542:86;;;;;;;;25615:11;25571:55;;25591:20;;25572:16;:39;25571:55;;;;;;-1:-1:-1;;;;;25542:86:0;;;:90;;:101::i;:113::-;25529:126;;25445:464;;;25687:6;;-1:-1:-1;;;;;25677:16:0;;;25687:6;;25677:16;25673:236;;;25722:20;:9;25736:5;25722:13;:20::i;:::-;25710:32;;25770:113;:101;25861:9;25770:86;;;;;;;;25843:11;25799:55;;25819:20;;25800:16;:39;25799:55;;;;25770:113;25757:126;;25673:236;25102:814;;;;;;;;:::o;18092:148::-;17672:12;:10;:12::i;:::-;-1:-1:-1;;;;;17661:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;17661:23:0;;17653:68;;;;;-1:-1:-1;;;17653:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18199:1:::1;18183:6:::0;;18162:40:::1;::::0;-1:-1:-1;;;;;18183:6:0;;::::1;::::0;18162:40:::1;::::0;18199:1;;18162:40:::1;18230:1;18213:19:::0;;-1:-1:-1;;;;;;18213:19:0::1;::::0;;18092:148::o;17441:87::-;17487:7;17514:6;-1:-1:-1;;;;;17514:6:0;17441:87;:::o;23519:1008::-;20521:23;20547:16;:14;:16::i;:::-;20521:42;;20584:15;20578:3;:21;20574:404;;;20638:10;:8;:10::i;:::-;-1:-1:-1;;;;;20624:24:0;:10;-1:-1:-1;;;;;20624:24:0;;20616:79;;;;-1:-1:-1;;;20616:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23701:4:::1;::::0;23569:24:::1;::::0;;;;;23646:61:::1;::::0;-1:-1:-1;;;;;23701:4:0::1;23646:46;:61::i;:::-;23756:18;::::0;23568:139;;-1:-1:-1;23568:139:0;;-1:-1:-1;23568:139:0;-1:-1:-1;23756:18:0::1;-1:-1:-1::0;;;23756:18:0;;::::1;::::0;::::1;23739:35:::0;::::1;::::0;23814:16;::::1;23810:95;;23887:7;;;;;;23810:95;24111:86;;;;;;;;24184:11;24140:55;;24160:20;;24141:16;:39;24140:55;;;;;;-1:-1:-1::0;;;;;24111:86:0;;::::1;::::0;;;24095:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;24095:102:0::1;::::0;;;::::1;;::::0;;24224:86:::1;::::0;;::::1;::::0;::::1;::::0;;;24273:20:::1;::::0;24224:86;;24253:55:::1;::::0;::::1;::::0;24254:39;::::1;24253:55:::0;::::1;;;;;-1:-1:-1::0;;;;;24224:86:0;;::::1;::::0;;;24208:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;24208:102:0::1;::::0;;;::::1;;::::0;;24323:20:::1;:39:::0;;;24373:20:::1;:39:::0;;;24423:18:::1;:35:::0;;-1:-1:-1;;;;24423:35:0::1;-1:-1:-1::0;;;24423:35:0::1;::::0;::::1;;;::::0;;24476:43:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;20710:1;;;;;20574:404:::0;;;23701:4:::1;::::0;23569:24:::1;::::0;;;;;23646:61:::1;::::0;-1:-1:-1;;;;;23701:4:0::1;23646:46;:61::i;:::-;23756:18;::::0;23568:139;;-1:-1:-1;23568:139:0;;-1:-1:-1;23568:139:0;-1:-1:-1;23756:18:0::1;-1:-1:-1::0;;;23756:18:0;;::::1;::::0;::::1;23739:35:::0;::::1;::::0;23814:16;::::1;23810:95;;23887:7;;;;;;23810:95;24111:86;;;;;;;;24184:11;24140:55;;24160:20;;24141:16;:39;24140:55;;;;;;-1:-1:-1::0;;;;;24111:86:0;;::::1;::::0;;;24095:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;24095:102:0::1;::::0;;;::::1;;::::0;;24224:86:::1;::::0;;::::1;::::0;::::1;::::0;;;24273:20:::1;::::0;24224:86;;24253:55:::1;::::0;::::1;::::0;24254:39;::::1;24253:55:::0;::::1;;;;;-1:-1:-1::0;;;;;24224:86:0;;::::1;::::0;;;24208:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;24208:102:0::1;::::0;;;::::1;;::::0;;24323:20:::1;:39:::0;;;24373:20:::1;:39:::0;;;24423:18:::1;:35:::0;;-1:-1:-1;;;;24423:35:0::1;-1:-1:-1::0;;;24423:35:0::1;::::0;::::1;;;::::0;;24476:43:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;20744:1;;;;;20790:13:::0;:31;;;20842:5;20840:7;;;;;;20884:16;:14;:16::i;:::-;20866:34;;20929:15;20923:3;:21;20919:32;;;20946:5;;20919:32;20762:205;;22546:41;;;-1:-1:-1;;;;;22546:41:0;;:::o;22373:26::-;;;-1:-1:-1;;;;;22373:26:0;;:::o;21043:88::-;21118:5;;21043:88;:::o;21327:97::-;21403:13;;21327:97;:::o;22423:32::-;;;-1:-1:-1;;;22423:32:0;;;;;:::o;21432:107::-;21479:7;21506:25;21524:6;;21506:13;;:17;;:25;;;;:::i;:::-;21499:32;;21432:107;:::o;21230:89::-;21302:9;;21230:89;:::o;22345:21::-;;;-1:-1:-1;;;;;22345:21:0;;:::o;18395:244::-;17672:12;:10;:12::i;:::-;-1:-1:-1;;;;;17661:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;17661:23:0;;17653:68;;;;;-1:-1:-1;;;17653:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18484:22:0;::::1;18476:73;;;;-1:-1:-1::0;;;18476:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18586:6;::::0;;18565:38:::1;::::0;-1:-1:-1;;;;;18565:38:0;;::::1;::::0;18586:6;::::1;::::0;18565:38:::1;::::0;::::1;18614:6;:17:::0;;-1:-1:-1;;;;;;18614:17:0::1;-1:-1:-1::0;;;;;18614:17:0;;;::::1;::::0;;;::::1;::::0;;18395:244::o;3236:158::-;3294:7;3327:1;3322;:6;;3314:49;;;;;-1:-1:-1;;;3314:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3381:5:0;;;3236:158::o;15966:106::-;16054:10;15966:106;:::o;19488:257::-;-1:-1:-1;;;;;19565:26:0;;19557:84;;;;-1:-1:-1;;;19557:84:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19657:45;;-1:-1:-1;;;;;19657:45:0;;;19685:1;;19657:45;;19685:1;;19657:45;19713:9;:24;;-1:-1:-1;;;;;;19713:24:0;-1:-1:-1;;;;;19713:24:0;;;;;;;;;;19488:257::o;3653:220::-;3711:7;3735:6;3731:20;;-1:-1:-1;3750:1:0;3743:8;;3731:20;3774:5;;;3778:1;3774;:5;:1;3798:5;;;;;:10;3790:56;;;;-1:-1:-1;;;3790:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9202:265;9272:16;;:::i;:::-;9301:9;9329:6;;;:60;;-1:-1:-1;;9381:7:0;;-1:-1:-1;;;;;9373:16:0;9344:20;;;;9368:1;9344:20;9368:1;9339:30;;;;;:50;9329:60;9321:108;;;;-1:-1:-1;;;9321:108:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9447:12;;;;;;;;;;;;;9202:265;-1:-1:-1;;;9202:265:0:o;10168:130::-;10268:7;8353:3;10268:21;;10168:130::o;14179:1136::-;14290:24;14329;14368:21;14434:23;:21;:23::i;:::-;14417:40;;14502:4;-1:-1:-1;;;;;14487:41:0;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14487:43:0;14560;;;-1:-1:-1;;;14560:43:0;;;;14487;;-1:-1:-1;;;;;;14560:41:0;;;;;:43;;;;;14487;;14560;;;;;;;;:41;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14560:43:0;14783:34;;;-1:-1:-1;;;14783:34:0;;;;14560:43;;-1:-1:-1;14718:16:0;;;;;;-1:-1:-1;;;;;14783:32:0;;;;;:34;;;;;;;;;;;;;;:32;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14783:34:0;;;;;;;;;;;;;-1:-1:-1;14783:34:0;;-1:-1:-1;14783:34:0;-1:-1:-1;14832:36:0;;;;;;;;14828:480;;14954:35;;;15100:65;;;15108:39;15128:8;15138;15108:19;:39::i;:::-;:42;-1:-1:-1;;;;;15100:51:0;:65;15080:85;;;;;15231:65;;;15239:39;15259:8;15269;15239:19;:39::i;:::-;:42;-1:-1:-1;;;;;15231:51:0;:65;15211:85;;;;;-1:-1:-1;14828:480:0;14179:1136;;;;;;;;:::o;2774:179::-;2832:7;2864:5;;;2888:6;;;;2880:46;;;;;-1:-1:-1;;;2880:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;13952:121;14041:23;:15;:23;;13952:121::o;9623:246::-;9704:16;;:::i;:::-;9755:1;9741:11;-1:-1:-1;;;;;9741:15:0;;9733:51;;;;;-1:-1:-1;;;9733:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;9802:59;;;;;;;;;;-1:-1:-1;;;;;9812:48:0;;-1:-1:-1;;;8353:3:0;9813:32;;;;9812:48;;;;;;-1:-1:-1;;;;;9802:59:0;;;;9795:66;;9623:246;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://d816076203010941bf8dfe2f7c542dece044a3d97f52199a6a4dc729fb40f68e
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.