ETH Price: $3,202.99 (-1.60%)
Gas: 1 Gwei

Contract

0x89714d3AC9149426219a3568543200D1964101C4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
121257112021-03-28 5:24:461217 days ago1616909086  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BondingCurveOracle

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-03-30
*/

// hevm: flattened sources of ./contracts/oracle/BondingCurveOracle.sol
pragma solidity >=0.6.0 <0.7.0 >=0.6.0 <0.8.0 >=0.6.2 <0.7.0 >=0.6.2 <0.8.0;
pragma experimental ABIEncoderV2;

////// ./contracts/external/SafeMathCopy.sol
// SPDX-License-Identifier: MIT

/* pragma solidity ^0.6.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 SafeMathCopy { // To avoid namespace collision between openzeppelin safemath and uniswap safemath
    /**
     * @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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

////// ./contracts/external/Decimal.sol
/*
    Copyright 2019 dYdX Trading Inc.
    Copyright 2020 Empty Set Squad <[email protected]>
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "./SafeMathCopy.sol"; */

/**
 * @title Decimal
 * @author dYdX
 *
 * Library that defines a fixed-point number with 18 decimal places.
 */
library Decimal {
    using SafeMathCopy for uint256;

    // ============ Constants ============

    uint256 private constant BASE = 10**18;

    // ============ Structs ============


    struct D256 {
        uint256 value;
    }

    // ============ Static Functions ============

    function zero()
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: 0 });
    }

    function one()
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: BASE });
    }

    function from(
        uint256 a
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: a.mul(BASE) });
    }

    function ratio(
        uint256 a,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: getPartial(a, BASE, b) });
    }

    // ============ Self Functions ============

    function add(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.add(b.mul(BASE)) });
    }

    function sub(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.mul(BASE)) });
    }

    function sub(
        D256 memory self,
        uint256 b,
        string memory reason
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.mul(BASE), reason) });
    }

    function mul(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.mul(b) });
    }

    function div(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.div(b) });
    }

    function pow(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        if (b == 0) {
            return from(1);
        }

        D256 memory temp = D256({ value: self.value });
        for (uint256 i = 1; i < b; i++) {
            temp = mul(temp, self);
        }

        return temp;
    }

    function add(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.add(b.value) });
    }

    function sub(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.value) });
    }

    function sub(
        D256 memory self,
        D256 memory b,
        string memory reason
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.value, reason) });
    }

    function mul(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: getPartial(self.value, b.value, BASE) });
    }

    function div(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: getPartial(self.value, BASE, b.value) });
    }

    function equals(D256 memory self, D256 memory b) internal pure returns (bool) {
        return self.value == b.value;
    }

    function greaterThan(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) == 2;
    }

    function lessThan(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) == 0;
    }

    function greaterThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) > 0;
    }

    function lessThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) < 2;
    }

    function isZero(D256 memory self) internal pure returns (bool) {
        return self.value == 0;
    }

    function asUint256(D256 memory self) internal pure returns (uint256) {
        return self.value.div(BASE);
    }

    // ============ Core Methods ============

    function getPartial(
        uint256 target,
        uint256 numerator,
        uint256 denominator
    )
    private
    pure
    returns (uint256)
    {
        return target.mul(numerator).div(denominator);
    }

    function compareTo(
        D256 memory a,
        D256 memory b
    )
    private
    pure
    returns (uint256)
    {
        if (a.value == b.value) {
            return 1;
        }
        return a.value > b.value ? 2 : 0;
    }
}
////// ./contracts/bondingcurve/IBondingCurve.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "../external/Decimal.sol"; */

interface IBondingCurve {
    // ----------- Events -----------

    event ScaleUpdate(uint256 _scale);

    event BufferUpdate(uint256 _buffer);

    event IncentiveAmountUpdate(uint256 _incentiveAmount);

    event Purchase(address indexed _to, uint256 _amountIn, uint256 _amountOut);

    event Allocate(address indexed _caller, uint256 _amount);

    // ----------- State changing Api -----------

    function purchase(address to, uint256 amountIn)
        external
        payable
        returns (uint256 amountOut);

    function allocate() external;

    // ----------- Governor only state changing api -----------

    function setBuffer(uint256 _buffer) external;

    function setScale(uint256 _scale) external;

    function setAllocation(
        address[] calldata pcvDeposits,
        uint256[] calldata ratios
    ) external;

    function setIncentiveAmount(uint256 _incentiveAmount) external;

    function setIncentiveFrequency(uint256 _frequency) external;

    // ----------- Getters -----------

    function getCurrentPrice() external view returns (Decimal.D256 memory);

    function getAverageUSDPrice(uint256 amountIn)
        external
        view
        returns (Decimal.D256 memory);

    function getAmountOut(uint256 amountIn)
        external
        view
        returns (uint256 amountOut);

    function scale() external view returns (uint256);

    function atScale() external view returns (bool);

    function buffer() external view returns (uint256);

    function totalPurchased() external view returns (uint256);

    function getTotalPCVHeld() external view returns (uint256);

    function incentiveAmount() external view returns (uint256);
}

////// ./contracts/core/IPermissions.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/// @title Permissions interface
/// @author Fei Protocol
interface IPermissions {
    // ----------- Governor only state changing api -----------

    function createRole(bytes32 role, bytes32 adminRole) external;

    function grantMinter(address minter) external;

    function grantBurner(address burner) external;

    function grantPCVController(address pcvController) external;

    function grantGovernor(address governor) external;

    function grantGuardian(address guardian) external;

    function revokeMinter(address minter) external;

    function revokeBurner(address burner) external;

    function revokePCVController(address pcvController) external;

    function revokeGovernor(address governor) external;

    function revokeGuardian(address guardian) external;

    // ----------- Revoker only state changing api -----------

    function revokeOverride(bytes32 role, address account) external;

    // ----------- Getters -----------

    function isBurner(address _address) external view returns (bool);

    function isMinter(address _address) external view returns (bool);

    function isGovernor(address _address) external view returns (bool);

    function isGuardian(address _address) external view returns (bool);

    function isPCVController(address _address) external view returns (bool);
}

////// ./contracts/openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT

/* pragma solidity >=0.6.0 <0.8.0; */

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20_5 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

////// ./contracts/token/IFei.sol
/* pragma solidity ^0.6.2; */

/* import "./contracts/openzeppelin/contracts/token/ERC20/IERC20.sol"; */

/// @title FEI stablecoin interface
/// @author Fei Protocol
interface IFei is IERC20_5 {
    // ----------- Events -----------

    event Minting(
        address indexed _to,
        address indexed _minter,
        uint256 _amount
    );

    event Burning(
        address indexed _to,
        address indexed _burner,
        uint256 _amount
    );

    event IncentiveContractUpdate(
        address indexed _incentivized,
        address indexed _incentiveContract
    );

    // ----------- State changing api -----------

    function burn(uint256 amount) external;

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

    // ----------- Burner only state changing api -----------

    function burnFrom(address account, uint256 amount) external;

    // ----------- Minter only state changing api -----------

    function mint(address account, uint256 amount) external;

    // ----------- Governor only state changing api -----------

    function setIncentiveContract(address account, address incentive) external;

    // ----------- Getters -----------

    function incentiveContract(address account) external view returns (address);
}

////// ./contracts/core/ICore.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "./IPermissions.sol"; */
/* import "../token/IFei.sol"; */

/// @title Core Interface
/// @author Fei Protocol
interface ICore is IPermissions {
    // ----------- Events -----------

    event FeiUpdate(address indexed _fei);
    event TribeUpdate(address indexed _tribe);
    event GenesisGroupUpdate(address indexed _genesisGroup);
    event TribeAllocation(address indexed _to, uint256 _amount);
    event GenesisPeriodComplete(uint256 _timestamp);

    // ----------- Governor only state changing api -----------

    function init() external;

    // ----------- Governor only state changing api -----------

    function setFei(address token) external;

    function setTribe(address token) external;

    function setGenesisGroup(address _genesisGroup) external;

    function allocateTribe(address to, uint256 amount) external;

    // ----------- Genesis Group only state changing api -----------

    function completeGenesisGroup() external;

    // ----------- Getters -----------

    function fei() external view returns (IFei);

    function tribe() external view returns (IERC20_5);

    function genesisGroup() external view returns (address);

    function hasGenesisGroupCompleted() external view returns (bool);
}

////// ./contracts/oracle/IOracle.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "../external/Decimal.sol"; */

/// @title generic oracle interface for Fei Protocol
/// @author Fei Protocol
interface IOracle {
    // ----------- Events -----------

    event Update(uint256 _peg);

    // ----------- State changing API -----------

    function update() external returns (bool);

    // ----------- Getters -----------

    function read() external view returns (Decimal.D256 memory, bool);

    function isOutdated() external view returns (bool);

}

////// ./contracts/oracle/IBondingCurveOracle.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "./IOracle.sol"; */
/* import "../bondingcurve/IBondingCurve.sol"; */

/// @title bonding curve oracle interface for Fei Protocol
/// @author Fei Protocol
interface IBondingCurveOracle is IOracle {
    // ----------- Genesis Group only state changing API -----------

    function init(Decimal.D256 calldata initialUSDPrice) external;

    // ----------- Getters -----------

    function uniswapOracle() external view returns (IOracle);

    function bondingCurve() external view returns (IBondingCurve);

    function initialUSDPrice() external view returns (Decimal.D256 memory);
}

////// ./contracts/refs/ICoreRef.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "../core/ICore.sol"; */

/// @title CoreRef interface
/// @author Fei Protocol
interface ICoreRef {
    // ----------- Events -----------

    event CoreUpdate(address indexed _core);

    // ----------- Governor only state changing api -----------

    function setCore(address core) external;

    function pause() external;

    function unpause() external;

    // ----------- Getters -----------

    function core() external view returns (ICore);

    function fei() external view returns (IFei);

    function tribe() external view returns (IERC20_5);

    function feiBalance() external view returns (uint256);

    function tribeBalance() external view returns (uint256);
}

////// ./contracts/openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT

/* pragma solidity >=0.6.2 <0.8.0; */

/**
 * @dev Collection of functions related to the address type
 */
library Address_2 {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

////// ./contracts/openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT

/* 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_2 {
    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;
    }
}

////// ./contracts/openzeppelin/contracts/utils/Pausable.sol
// SPDX-License-Identifier: MIT

/* pragma solidity >=0.6.0 <0.8.0; */

/* import "./Context.sol"; */

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable_2 is Context_2 {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

////// ./contracts/refs/CoreRef.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "./ICoreRef.sol"; */
/* import "./contracts/openzeppelin/contracts/utils/Pausable.sol"; */
/* import "./contracts/openzeppelin/contracts/utils/Address.sol"; */

/// @title A Reference to Core
/// @author Fei Protocol
/// @notice defines some modifiers and utilities around interacting with Core
abstract contract CoreRef is ICoreRef, Pausable_2 {
    ICore private _core;

    /// @notice CoreRef constructor
    /// @param core Fei Core to reference
    constructor(address core) public {
        _core = ICore(core);
    }

    modifier ifMinterSelf() {
        if (_core.isMinter(address(this))) {
            _;
        }
    }

    modifier ifBurnerSelf() {
        if (_core.isBurner(address(this))) {
            _;
        }
    }

    modifier onlyMinter() {
        require(_core.isMinter(msg.sender), "CoreRef: Caller is not a minter");
        _;
    }

    modifier onlyBurner() {
        require(_core.isBurner(msg.sender), "CoreRef: Caller is not a burner");
        _;
    }

    modifier onlyPCVController() {
        require(
            _core.isPCVController(msg.sender),
            "CoreRef: Caller is not a PCV controller"
        );
        _;
    }

    modifier onlyGovernor() {
        require(
            _core.isGovernor(msg.sender),
            "CoreRef: Caller is not a governor"
        );
        _;
    }

    modifier onlyGuardianOrGovernor() {
        require(
            _core.isGovernor(msg.sender) ||
            _core.isGuardian(msg.sender),
            "CoreRef: Caller is not a guardian or governor"
        );
        _;
    }

    modifier onlyFei() {
        require(msg.sender == address(fei()), "CoreRef: Caller is not FEI");
        _;
    }

    modifier onlyGenesisGroup() {
        require(
            msg.sender == _core.genesisGroup(),
            "CoreRef: Caller is not GenesisGroup"
        );
        _;
    }

    modifier postGenesis() {
        require(
            _core.hasGenesisGroupCompleted(),
            "CoreRef: Still in Genesis Period"
        );
        _;
    }

    modifier nonContract() {
        require(!Address_2.isContract(msg.sender), "CoreRef: Caller is a contract");
        _;
    }

    /// @notice set new Core reference address
    /// @param core the new core address
    function setCore(address core) external override onlyGovernor {
        _core = ICore(core);
        emit CoreUpdate(core);
    }

    /// @notice set pausable methods to paused
    function pause() public override onlyGuardianOrGovernor {
        _pause();
    }

    /// @notice set pausable methods to unpaused
    function unpause() public override onlyGuardianOrGovernor {
        _unpause();
    }

    /// @notice address of the Core contract referenced
    /// @return ICore implementation address
    function core() public view override returns (ICore) {
        return _core;
    }

    /// @notice address of the Fei contract referenced by Core
    /// @return IFei implementation address
    function fei() public view override returns (IFei) {
        return _core.fei();
    }

    /// @notice address of the Tribe contract referenced by Core
    /// @return IERC20 implementation address
    function tribe() public view override returns (IERC20_5) {
        return _core.tribe();
    }

    /// @notice fei balance of contract
    /// @return fei amount held
    function feiBalance() public view override returns (uint256) {
        return fei().balanceOf(address(this));
    }

    /// @notice tribe balance of contract
    /// @return tribe amount held
    function tribeBalance() public view override returns (uint256) {
        return tribe().balanceOf(address(this));
    }

    function _burnFeiHeld() internal {
        fei().burn(feiBalance());
    }

    function _mintFei(uint256 amount) internal {
        fei().mint(address(this), amount);
    }
}

////// ./contracts/openzeppelin/contracts/utils/SafeCast.sol
// SPDX-License-Identifier: MIT

/* pragma solidity >=0.6.0 <0.8.0; */


/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such 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.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast_2 {

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value < 2**128, "SafeCast: value doesn\'t fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value < 2**64, "SafeCast: value doesn\'t fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value < 2**32, "SafeCast: value doesn\'t fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value < 2**16, "SafeCast: value doesn\'t fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value < 2**8, "SafeCast: value doesn\'t fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= -2**127 && value < 2**127, "SafeCast: value doesn\'t fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= -2**63 && value < 2**63, "SafeCast: value doesn\'t fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= -2**31 && value < 2**31, "SafeCast: value doesn\'t fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= -2**15 && value < 2**15, "SafeCast: value doesn\'t fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= -2**7 && value < 2**7, "SafeCast: value doesn\'t fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        require(value < 2**255, "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

////// ./contracts/utils/Timed.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "./contracts/openzeppelin/contracts/utils/SafeCast.sol"; */

/// @title an abstract contract for timed events
/// @author Fei Protocol
abstract contract Timed {
    using SafeCast_2 for uint256;

    /// @notice the start timestamp of the timed period
    uint256 public startTime;

    /// @notice the duration of the timed period
    uint256 public duration;

    event DurationUpdate(uint256 _duration);

    event TimerReset(uint256 _startTime);

    constructor(uint256 _duration) public {
        _setDuration(_duration);
    }

    modifier duringTime() {
        require(isTimeStarted(), "Timed: time not started");
        require(!isTimeEnded(), "Timed: time ended");
        _;
    }

    modifier afterTime() {
        require(isTimeEnded(), "Timed: time not ended");
        _;
    }

    /// @notice return true if time period has ended
    function isTimeEnded() public view returns (bool) {
        return remainingTime() == 0;
    }

    /// @notice number of seconds remaining until time is up
    /// @return remaining
    function remainingTime() public view returns (uint256) {
        return duration - timeSinceStart(); // duration always >= timeSinceStart which is on [0,d]
    }

    /// @notice number of seconds since contract was initialized
    /// @return timestamp
    /// @dev will be less than or equal to duration
    function timeSinceStart() public view returns (uint256) {
        if (!isTimeStarted()) {
            return 0; // uninitialized
        }
        uint256 _duration = duration;
        // solhint-disable-next-line not-rely-on-time
        uint256 timePassed = block.timestamp - startTime; // block timestamp always >= startTime
        return timePassed > _duration ? _duration : timePassed;
    }

    function isTimeStarted() public view returns (bool) {
        return startTime != 0;
    }

    function _initTimed() internal {
        // solhint-disable-next-line not-rely-on-time
        startTime = block.timestamp;

        // solhint-disable-next-line not-rely-on-time
        emit TimerReset(block.timestamp);
    }

    function _setDuration(uint _duration) internal {
        duration = _duration;
        emit DurationUpdate(_duration);
    }
}

////// ./contracts/oracle/BondingCurveOracle.sol
/* pragma solidity ^0.6.0; */
/* pragma experimental ABIEncoderV2; */

/* import "./IBondingCurveOracle.sol"; */
/* import "../refs/CoreRef.sol"; */
/* import "../utils/Timed.sol"; */

/// @title Bonding curve oracle
/// @author Fei Protocol
/// @notice peg is to be the current bonding curve price if pre-Scale
/// @notice includes "thawing" on the initial purchase price at genesis. Time weights price from initial to true peg over a window.
contract BondingCurveOracle is IBondingCurveOracle, CoreRef, Timed {
    using Decimal for Decimal.D256;

    /// @notice the referenced uniswap oracle price
    IOracle public override uniswapOracle;

    /// @notice the referenced bonding curve
    IBondingCurve public override bondingCurve;

    Decimal.D256 internal _initialUSDPrice;

    /// @notice BondingCurveOracle constructor
    /// @param _core Fei Core to reference
    /// @param _oracle Uniswap Oracle to report from
    /// @param _bondingCurve Bonding curve to report from
    /// @param _duration price thawing duration
    constructor(
        address _core,
        address _oracle,
        address _bondingCurve,
        uint256 _duration
    ) public CoreRef(_core) Timed(_duration) {
        uniswapOracle = IOracle(_oracle);
        bondingCurve = IBondingCurve(_bondingCurve);
        _pause();
    }

    /// @notice updates the oracle price
    /// @return true if oracle is updated and false if unchanged
    function update() external override returns (bool) {
        return uniswapOracle.update();
    }

    /// @notice determine if read value is stale
    /// @return true if read value is stale
    function isOutdated() external view override returns (bool) {
        return uniswapOracle.isOutdated();
    }

    /// @notice read the oracle price
    /// @return oracle price
    /// @return true if price is valid
    /// @dev price is to be denominated in USD per X where X can be ETH, etc.
    /// @dev Can be innacurate if outdated, need to call `isOutdated()` to check
    function read() external view override returns (Decimal.D256 memory, bool) {
        if (paused()) {
            return (Decimal.zero(), false);
        }
        (Decimal.D256 memory peg, bool valid) = _getOracleValue();
        return (_thaw(peg), valid);
    }

    /// @notice the initial price denominated in USD per FEI to thaw from
    function initialUSDPrice() external view override returns (Decimal.D256 memory) {
        return _initialUSDPrice;
    }

    /// @notice initializes the oracle with an initial peg price
    /// @param initPrice a price denominated in USD per FEI
    /// @dev divides the initial peg by the uniswap oracle price to get initialUSDPrice. And kicks off thawing period
    function init(Decimal.D256 memory initPrice)
        public
        override
        onlyGenesisGroup
    {
        _unpause();

        if (initPrice.greaterThan(Decimal.one())) {
            initPrice = Decimal.one();
        }
        _initialUSDPrice = initPrice;

        _initTimed();
    }

    function _thaw(Decimal.D256 memory peg)
        internal
        view
        returns (Decimal.D256 memory)
    {
        if (isTimeEnded()) {
            return peg;
        }
        uint256 elapsed = timeSinceStart();
        uint256 remaining = remainingTime();

        (Decimal.D256 memory uniswapPeg, ) = uniswapOracle.read();
        Decimal.D256 memory price = uniswapPeg.div(peg);

        // average price time weighted from initial to target
        Decimal.D256 memory weightedPrice =
            _initialUSDPrice.mul(remaining).add(price.mul(elapsed)).div(duration);

        // divide from peg to return a peg FEI per X instead of a price USD per FEI
        return uniswapPeg.div(weightedPrice);
    }

    function _getOracleValue()
        internal
        view
        returns (Decimal.D256 memory, bool)
    {
        if (bondingCurve.atScale()) {
            return uniswapOracle.read();
        }
        return (bondingCurve.getCurrentPrice(), true);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_core","type":"address"},{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_bondingCurve","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_core","type":"address"}],"name":"CoreUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"DurationUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"TimerReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_peg","type":"uint256"}],"name":"Update","type":"event"},{"inputs":[],"name":"bondingCurve","outputs":[{"internalType":"contract IBondingCurve","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"contract ICore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fei","outputs":[{"internalType":"contract IFei","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feiBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"initPrice","type":"tuple"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialUSDPrice","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOutdated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTimeEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTimeStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"read","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"core","type":"address"}],"name":"setCore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeSinceStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tribe","outputs":[{"internalType":"contract IERC20_5","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tribeBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001649380380620016498339810160408190526200003491620001b0565b600080546001600160a81b0319166101006001600160a01b03871602179055806200005f81620000ad565b50600380546001600160a01b038086166001600160a01b0319928316179092556004805492851692909116919091179055620000a36001600160e01b03620000ef16565b505050506200024b565b60028190556040517fef01a748b5b8a4f1d48b88861f6d361d7391ad2bbed27ff97d762889ca80d73790620000e490839062000242565b60405180910390a150565b620001026001600160e01b036200018516565b156200012b5760405162461bcd60e51b8152600401620001229062000218565b60405180910390fd5b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586200016c6001600160e01b036200018e16565b6040516200017b919062000204565b60405180910390a1565b60005460ff1690565b3390565b80516001600160a01b0381168114620001aa57600080fd5b92915050565b60008060008060808587031215620001c6578384fd5b620001d2868662000192565b9350620001e3866020870162000192565b9250620001f4866040870162000192565b6060959095015193969295505050565b6001600160a01b0391909116815260200190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b90815260200190565b6113ee806200025b6000396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c806380009630116100b8578063acc4bd081161007c578063acc4bd0814610229578063ae951b2e14610231578063b490589714610239578063b86677fe14610241578063eff1d50e14610249578063f2f4eb261461025157610141565b806380009630146101e95780638456cb59146101fc5780639a9ba4da146102045780639d2e227d1461020c578063a2e620451461022157610141565b806357de26a41161010a57806357de26a4146101ab5780635c975abb146101c157806367fc6dea146101c95780636b6dff0a146101d157806374d3bae5146101d957806378e97925146101e157610141565b8062d89b33146101465780630550ca4c146101645780630fb5a6b414610179578063120c6c5b1461018e5780633f4ba83a146101a3575b600080fd5b61014e610259565b60405161015b9190611159565b60405180910390f35b6101776101723660046110b2565b610262565b005b610181610361565b60405161015b9190611373565b610196610367565b60405161015b9190611145565b610177610376565b6101b36104aa565b60405161015b929190611362565b61014e6104fd565b610181610506565b61018161053a565b61014e6105c4565b610181610641565b6101776101f736600461105a565b610647565b610177610737565b610196610869565b6102146108f0565b60405161015b9190611358565b61014e61090c565b610181610966565b61014e610979565b610181610989565b610196610993565b6101966109e2565b6101966109f1565b60015415155b90565b600060019054906101000a90046001600160a01b03166001600160a01b03166384bb0a6b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102b057600080fd5b505afa1580156102c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e89190611076565b6001600160a01b0316336001600160a01b0316146103215760405162461bcd60e51b815260040161031890611269565b60405180910390fd5b610329610a05565b610341610334610a73565b829063ffffffff610a9516565b156103515761034e610a73565b90505b805160055561035e610aad565b50565b60025481565b6003546001600160a01b031681565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b8906103aa903390600401611145565b60206040518083038186803b1580156103c257600080fd5b505afa1580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa9190611092565b806104845750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190610434903390600401611145565b60206040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611092565b6104a05760405162461bcd60e51b8152600401610318906111e5565b6104a8610a05565b565b6104b2611022565b60006104bc6104fd565b156104d4576104c9610ae1565b6000915091506104f9565b6104dc611022565b60006104e6610afc565b915091506104f382610c97565b93509150505b9091565b60005460ff1690565b6000610510610259565b61051c5750600061025f565b60025460015442038181116105315780610533565b815b9250505090565b6000610544610993565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161056f9190611145565b60206040518083038186803b15801561058757600080fd5b505afa15801561059b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bf919061112d565b905090565b600354604080516374d3bae560e01b815290516000926001600160a01b0316916374d3bae5916004808301926020929190829003018186803b15801561060957600080fd5b505afa15801561061d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bf9190611092565b60015481565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061067b903390600401611145565b60206040518083038186803b15801561069357600080fd5b505afa1580156106a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106cb9190611092565b6106e75760405162461bcd60e51b815260040161031890611317565b60008054610100600160a81b0319166101006001600160a01b03841690810291909117825560405190917fad9400e618eb1344fde53db22397a1b82c765527ecbba3a5c86bcac15090828b91a250565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061076b903390600401611145565b60206040518083038186803b15801561078357600080fd5b505afa158015610797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bb9190611092565b806108455750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba21906107f5903390600401611145565b60206040518083038186803b15801561080d57600080fd5b505afa158015610821573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108459190611092565b6108615760405162461bcd60e51b8152600401610318906111e5565b6104a8610de3565b60008060019054906101000a90046001600160a01b03166001600160a01b0316639a9ba4da6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bf9190611076565b6108f8611022565b506040805160208101909152600554815290565b6003546040805163a2e6204560e01b815290516000926001600160a01b03169163a2e6204591600480830192602092919082900301818787803b15801561095257600080fd5b505af115801561061d573d6000803e3d6000fd5b6000610970610506565b60025403905090565b6000610983610966565b15905090565b6000610544610869565b60008060019054906101000a90046001600160a01b03166001600160a01b031663b86677fe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108b857600080fd5b6004546001600160a01b031681565b60005461010090046001600160a01b031690565b610a0d6104fd565b610a295760405162461bcd60e51b8152600401610318906111b7565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610a5c610e3a565b604051610a699190611145565b60405180910390a1565b610a7b611022565b506040805160208101909152670de0b6b3a7640000815290565b6000610aa18383610e3e565b60021490505b92915050565b4260018190556040517fd1dbb2ce8081405078443ef34dae718285114121a39370b14ef01b9d2b0a208391610a6991611373565b610ae9611022565b5060408051602081019091526000815290565b610b04611022565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663a36832a56040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5457600080fd5b505afa158015610b68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8c9190611092565b15610c1457600354604080516315f789a960e21b815281516001600160a01b03909316926357de26a492600480840193919291829003018186803b158015610bd357600080fd5b505afa158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b91906110f2565b915091506104f9565b60048054604080516375c8e9bf60e11b815290516001600160a01b039092169263eb91d37e928282019260209290829003018186803b158015610c5657600080fd5b505afa158015610c6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8e91906110d7565b92600192509050565b610c9f611022565b610ca7610979565b15610cb3575080610dde565b6000610cbd610506565b90506000610cc9610966565b9050610cd3611022565b600354604080516315f789a960e21b815281516001600160a01b03909316926357de26a492600480840193919291829003018186803b158015610d1557600080fd5b505afa158015610d29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4d91906110f2565b509050610d58611022565b610d68828763ffffffff610e7016565b9050610d72611022565b600254610dc490610db8610d8c858963ffffffff610ea716565b60408051602081019091526005548152610dac908963ffffffff610ea716565b9063ffffffff610ece16565b9063ffffffff610ef716565b9050610dd6838263ffffffff610e7016565b955050505050505b919050565b610deb6104fd565b15610e085760405162461bcd60e51b8152600401610318906112ac565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a5c5b3390565b805182516000911415610e5357506001610aa7565b8151835111610e63576000610e66565b60025b60ff169392505050565b610e78611022565b6040518060200160405280610e9e8560000151670de0b6b3a76400008660000151610f1e565b90529392505050565b610eaf611022565b604080516020810190915283518190610e9e908563ffffffff610f4816565b610ed6611022565b6040805160208101909152825184518291610e9e919063ffffffff610f8916565b610eff611022565b604080516020810190915283518190610e9e908563ffffffff610fae16565b6000610f4082610f34868663ffffffff610f4816565b9063ffffffff610fae16565b949350505050565b600082610f5757506000610aa7565b82820282848281610f6457fe5b0414610f825760405162461bcd60e51b8152600401610318906112d6565b9392505050565b600082820183811015610f825760405162461bcd60e51b815260040161031890611232565b6000610f8283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506000818361100c5760405162461bcd60e51b81526004016103189190611164565b50600083858161101857fe5b0495945050505050565b6040518060200160405280600081525090565b600060208284031215611046578081fd5b611050602061137c565b9151825250919050565b60006020828403121561106b578081fd5b8135610f82816113a3565b600060208284031215611087578081fd5b8151610f82816113a3565b6000602082840312156110a3578081fd5b81518015158114610f82578182fd5b6000602082840312156110c3578081fd5b6110cd602061137c565b9135825250919050565b6000602082840312156110e8578081fd5b610f828383611035565b60008060408385031215611104578081fd5b61110e8484611035565b915060208301518015158114611122578182fd5b809150509250929050565b60006020828403121561113e578081fd5b5051919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b8181101561119057858101830151858201604001528201611174565b818111156111a15783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252602d908201527f436f72655265663a2043616c6c6572206973206e6f742061206775617264696160408201526c371037b91033b7bb32b93737b960991b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526023908201527f436f72655265663a2043616c6c6572206973206e6f742047656e65736973477260408201526206f75760ec1b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f6040820152603960f91b606082015260800190565b9051815260200190565b915182521515602082015260400190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561139b57600080fd5b604052919050565b6001600160a01b038116811461035e57600080fdfea264697066735822122029e1f26b52038a4059047d1fc29124450190bad7f621c996f41872cab9f32df664736f6c634300060600330000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9000000000000000000000000087f35bd241e41fc28e43f0e8c58d283dd55bd65000000000000000000000000e1578b4a32eaefcd563a9e6d0dc02a4213f673b70000000000000000000000000000000000000000000000000000000000127500

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101415760003560e01c806380009630116100b8578063acc4bd081161007c578063acc4bd0814610229578063ae951b2e14610231578063b490589714610239578063b86677fe14610241578063eff1d50e14610249578063f2f4eb261461025157610141565b806380009630146101e95780638456cb59146101fc5780639a9ba4da146102045780639d2e227d1461020c578063a2e620451461022157610141565b806357de26a41161010a57806357de26a4146101ab5780635c975abb146101c157806367fc6dea146101c95780636b6dff0a146101d157806374d3bae5146101d957806378e97925146101e157610141565b8062d89b33146101465780630550ca4c146101645780630fb5a6b414610179578063120c6c5b1461018e5780633f4ba83a146101a3575b600080fd5b61014e610259565b60405161015b9190611159565b60405180910390f35b6101776101723660046110b2565b610262565b005b610181610361565b60405161015b9190611373565b610196610367565b60405161015b9190611145565b610177610376565b6101b36104aa565b60405161015b929190611362565b61014e6104fd565b610181610506565b61018161053a565b61014e6105c4565b610181610641565b6101776101f736600461105a565b610647565b610177610737565b610196610869565b6102146108f0565b60405161015b9190611358565b61014e61090c565b610181610966565b61014e610979565b610181610989565b610196610993565b6101966109e2565b6101966109f1565b60015415155b90565b600060019054906101000a90046001600160a01b03166001600160a01b03166384bb0a6b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102b057600080fd5b505afa1580156102c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e89190611076565b6001600160a01b0316336001600160a01b0316146103215760405162461bcd60e51b815260040161031890611269565b60405180910390fd5b610329610a05565b610341610334610a73565b829063ffffffff610a9516565b156103515761034e610a73565b90505b805160055561035e610aad565b50565b60025481565b6003546001600160a01b031681565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b8906103aa903390600401611145565b60206040518083038186803b1580156103c257600080fd5b505afa1580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa9190611092565b806104845750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190610434903390600401611145565b60206040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190611092565b6104a05760405162461bcd60e51b8152600401610318906111e5565b6104a8610a05565b565b6104b2611022565b60006104bc6104fd565b156104d4576104c9610ae1565b6000915091506104f9565b6104dc611022565b60006104e6610afc565b915091506104f382610c97565b93509150505b9091565b60005460ff1690565b6000610510610259565b61051c5750600061025f565b60025460015442038181116105315780610533565b815b9250505090565b6000610544610993565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161056f9190611145565b60206040518083038186803b15801561058757600080fd5b505afa15801561059b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bf919061112d565b905090565b600354604080516374d3bae560e01b815290516000926001600160a01b0316916374d3bae5916004808301926020929190829003018186803b15801561060957600080fd5b505afa15801561061d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bf9190611092565b60015481565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061067b903390600401611145565b60206040518083038186803b15801561069357600080fd5b505afa1580156106a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106cb9190611092565b6106e75760405162461bcd60e51b815260040161031890611317565b60008054610100600160a81b0319166101006001600160a01b03841690810291909117825560405190917fad9400e618eb1344fde53db22397a1b82c765527ecbba3a5c86bcac15090828b91a250565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061076b903390600401611145565b60206040518083038186803b15801561078357600080fd5b505afa158015610797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bb9190611092565b806108455750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba21906107f5903390600401611145565b60206040518083038186803b15801561080d57600080fd5b505afa158015610821573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108459190611092565b6108615760405162461bcd60e51b8152600401610318906111e5565b6104a8610de3565b60008060019054906101000a90046001600160a01b03166001600160a01b0316639a9ba4da6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bf9190611076565b6108f8611022565b506040805160208101909152600554815290565b6003546040805163a2e6204560e01b815290516000926001600160a01b03169163a2e6204591600480830192602092919082900301818787803b15801561095257600080fd5b505af115801561061d573d6000803e3d6000fd5b6000610970610506565b60025403905090565b6000610983610966565b15905090565b6000610544610869565b60008060019054906101000a90046001600160a01b03166001600160a01b031663b86677fe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108b857600080fd5b6004546001600160a01b031681565b60005461010090046001600160a01b031690565b610a0d6104fd565b610a295760405162461bcd60e51b8152600401610318906111b7565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610a5c610e3a565b604051610a699190611145565b60405180910390a1565b610a7b611022565b506040805160208101909152670de0b6b3a7640000815290565b6000610aa18383610e3e565b60021490505b92915050565b4260018190556040517fd1dbb2ce8081405078443ef34dae718285114121a39370b14ef01b9d2b0a208391610a6991611373565b610ae9611022565b5060408051602081019091526000815290565b610b04611022565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663a36832a56040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5457600080fd5b505afa158015610b68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8c9190611092565b15610c1457600354604080516315f789a960e21b815281516001600160a01b03909316926357de26a492600480840193919291829003018186803b158015610bd357600080fd5b505afa158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b91906110f2565b915091506104f9565b60048054604080516375c8e9bf60e11b815290516001600160a01b039092169263eb91d37e928282019260209290829003018186803b158015610c5657600080fd5b505afa158015610c6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8e91906110d7565b92600192509050565b610c9f611022565b610ca7610979565b15610cb3575080610dde565b6000610cbd610506565b90506000610cc9610966565b9050610cd3611022565b600354604080516315f789a960e21b815281516001600160a01b03909316926357de26a492600480840193919291829003018186803b158015610d1557600080fd5b505afa158015610d29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4d91906110f2565b509050610d58611022565b610d68828763ffffffff610e7016565b9050610d72611022565b600254610dc490610db8610d8c858963ffffffff610ea716565b60408051602081019091526005548152610dac908963ffffffff610ea716565b9063ffffffff610ece16565b9063ffffffff610ef716565b9050610dd6838263ffffffff610e7016565b955050505050505b919050565b610deb6104fd565b15610e085760405162461bcd60e51b8152600401610318906112ac565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610a5c5b3390565b805182516000911415610e5357506001610aa7565b8151835111610e63576000610e66565b60025b60ff169392505050565b610e78611022565b6040518060200160405280610e9e8560000151670de0b6b3a76400008660000151610f1e565b90529392505050565b610eaf611022565b604080516020810190915283518190610e9e908563ffffffff610f4816565b610ed6611022565b6040805160208101909152825184518291610e9e919063ffffffff610f8916565b610eff611022565b604080516020810190915283518190610e9e908563ffffffff610fae16565b6000610f4082610f34868663ffffffff610f4816565b9063ffffffff610fae16565b949350505050565b600082610f5757506000610aa7565b82820282848281610f6457fe5b0414610f825760405162461bcd60e51b8152600401610318906112d6565b9392505050565b600082820183811015610f825760405162461bcd60e51b815260040161031890611232565b6000610f8283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506000818361100c5760405162461bcd60e51b81526004016103189190611164565b50600083858161101857fe5b0495945050505050565b6040518060200160405280600081525090565b600060208284031215611046578081fd5b611050602061137c565b9151825250919050565b60006020828403121561106b578081fd5b8135610f82816113a3565b600060208284031215611087578081fd5b8151610f82816113a3565b6000602082840312156110a3578081fd5b81518015158114610f82578182fd5b6000602082840312156110c3578081fd5b6110cd602061137c565b9135825250919050565b6000602082840312156110e8578081fd5b610f828383611035565b60008060408385031215611104578081fd5b61110e8484611035565b915060208301518015158114611122578182fd5b809150509250929050565b60006020828403121561113e578081fd5b5051919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b8181101561119057858101830151858201604001528201611174565b818111156111a15783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252602d908201527f436f72655265663a2043616c6c6572206973206e6f742061206775617264696160408201526c371037b91033b7bb32b93737b960991b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526023908201527f436f72655265663a2043616c6c6572206973206e6f742047656e65736973477260408201526206f75760ec1b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f6040820152603960f91b606082015260800190565b9051815260200190565b915182521515602082015260400190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561139b57600080fd5b604052919050565b6001600160a01b038116811461035e57600080fdfea264697066735822122029e1f26b52038a4059047d1fc29124450190bad7f621c996f41872cab9f32df664736f6c63430006060033

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

0000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9000000000000000000000000087f35bd241e41fc28e43f0e8c58d283dd55bd65000000000000000000000000e1578b4a32eaefcd563a9e6d0dc02a4213f673b70000000000000000000000000000000000000000000000000000000000127500

-----Decoded View---------------
Arg [0] : _core (address): 0x8d5ED43dCa8C2F7dFB20CF7b53CC7E593635d7b9
Arg [1] : _oracle (address): 0x087F35bd241e41Fc28E43f0E8C58d283DD55bD65
Arg [2] : _bondingCurve (address): 0xe1578B4a32Eaefcd563a9E6d0dc02a4213f673B7
Arg [3] : _duration (uint256): 1209600

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9
Arg [1] : 000000000000000000000000087f35bd241e41fc28e43f0e8c58d283dd55bd65
Arg [2] : 000000000000000000000000e1578b4a32eaefcd563a9e6d0dc02a4213f673b7
Arg [3] : 0000000000000000000000000000000000000000000000000000000000127500


Deployed Bytecode Sourcemap

48193:3668:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;48193:3668:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;47214:92:0;;;:::i;:::-;;;;;;;;;;;;;;;;50531:309;;;;;;;;;:::i;:::-;;45750:23;;;:::i;:::-;;;;;;;;48359:37;;;:::i;:::-;;;;;;;;37153:87;;;:::i;49803:269::-;;;:::i;:::-;;;;;;;;;33164:86;;;:::i;46801:405::-;;;:::i;38142:121::-;;;:::i;49413:112::-;;;:::i;45667:24::-;;;:::i;36824:132::-;;;;;;;;;:::i;37012:83::-;;;:::i;37552:88::-;;;:::i;50155:122::-;;;:::i;:::-;;;;;;;;49211:99;;;:::i;46484:163::-;;;:::i;46291:96::-;;;:::i;37939:117::-;;;:::i;37761:96::-;;;:::i;48451:42::-;;;:::i;37351:84::-;;;:::i;47214:92::-;47284:9;;:14;;47214:92;;:::o;50531:309::-;36310:5;;;;;;;;;-1:-1:-1;;;;;36310:5:0;-1:-1:-1;;;;;36310:18:0;;:20;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;36310:20:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;36310:20:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;36310:20:0;;;;;;;;;-1:-1:-1;;;;;36296:34:0;:10;-1:-1:-1;;;;;36296:34:0;;36274:119;;;;-1:-1:-1;;;36274:119:0;;;;;;;;;;;;;;;;;50652:10:::1;:8;:10::i;:::-;50679:36;50701:13;:11;:13::i;:::-;50679:9:::0;;:36:::1;:21;:36;:::i;:::-;50675:94;;;50744:13;:11;:13::i;:::-;50732:25;;50675:94;50779:28:::0;;:16:::1;:28:::0;50820:12:::1;:10;:12::i;:::-;50531:309:::0;:::o;45750:23::-;;;;:::o;48359:37::-;;;-1:-1:-1;;;;;48359:37:0;;:::o;37153:87::-;35936:5;;:28;;-1:-1:-1;;;35936:28:0;;:5;;;;-1:-1:-1;;;;;35936:5:0;;:16;;:28;;35953:10;;35936:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;35936:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35936:28:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;35936:28:0;;;;;;;;;:73;;;-1:-1:-1;35981:5:0;;:28;;-1:-1:-1;;;35981:28:0;;:5;;;;-1:-1:-1;;;;;35981:5:0;;:16;;:28;;35998:10;;35981:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;35981:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35981:28:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;35981:28:0;;;;;;;;;35914:168;;;;-1:-1:-1;;;35914:168:0;;;;;;;;;37222:10:::1;:8;:10::i;:::-;37153:87::o:0;49803:269::-;49851:19;;:::i;:::-;49872:4;49893:8;:6;:8::i;:::-;49889:71;;;49926:14;:12;:14::i;:::-;49942:5;49918:30;;;;;;49889:71;49971:23;;:::i;:::-;49996:10;50010:17;:15;:17::i;:::-;49970:57;;;;50046:10;50052:3;50046:5;:10::i;:::-;50038:26;-1:-1:-1;50058:5:0;-1:-1:-1;;49803:269:0;;;:::o;33164:86::-;33211:4;33235:7;;;33164:86;:::o;46801:405::-;46848:7;46873:15;:13;:15::i;:::-;46868:74;;-1:-1:-1;46912:1:0;46905:8;;46868:74;46972:8;;47085:9;;47067:15;:27;47151:22;;;:47;;47188:10;47151:47;;;47176:9;47151:47;47144:54;;;;46801:405;:::o;38142:121::-;38196:7;38223;:5;:7::i;:::-;-1:-1:-1;;;;;38223:17:0;;38249:4;38223:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;38223:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;38223:32:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;38223:32:0;;;;;;;;;38216:39;;38142:121;:::o;49413:112::-;49491:13;;:26;;;-1:-1:-1;;;49491:26:0;;;;49467:4;;-1:-1:-1;;;;;49491:13:0;;:24;;:26;;;;;;;;;;;;;;:13;:26;;;2:2:-1;;;;27:1;24;17:12;2:2;49491:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49491:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;49491:26:0;;;;;;;;45667:24;;;;:::o;36824:132::-;35752:5;;:28;;-1:-1:-1;;;35752:28:0;;:5;;;;-1:-1:-1;;;;;35752:5:0;;:16;;:28;;35769:10;;35752:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;35752:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35752:28:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;35752:28:0;;;;;;;;;35730:111;;;;-1:-1:-1;;;35730:111:0;;;;;;;;;36897:5:::1;:19:::0;;-1:-1:-1;;;;;;36897:19:0::1;;-1:-1:-1::0;;;;;36897:19:0;::::1;::::0;;::::1;::::0;;;::::1;::::0;;36932:16:::1;::::0;36897:19;;36932:16:::1;::::0;::::1;36824:132:::0;:::o;37012:83::-;35936:5;;:28;;-1:-1:-1;;;35936:28:0;;:5;;;;-1:-1:-1;;;;;35936:5:0;;:16;;:28;;35953:10;;35936:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;35936:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35936:28:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;35936:28:0;;;;;;;;;:73;;;-1:-1:-1;35981:5:0;;:28;;-1:-1:-1;;;35981:28:0;;:5;;;;-1:-1:-1;;;;;35981:5:0;;:16;;:28;;35998:10;;35981:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;35981:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35981:28:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;35981:28:0;;;;;;;;;35914:168;;;;-1:-1:-1;;;35914:168:0;;;;;;;;;37079:8:::1;:6;:8::i;37552:88::-:0;37597:4;37621:5;;;;;;;;;-1:-1:-1;;;;;37621:5:0;-1:-1:-1;;;;;37621:9:0;;:11;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;37621:11:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;37621:11:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;37621:11:0;;;;;;;;50155:122;50214:19;;:::i;:::-;-1:-1:-1;50246:23:0;;;;;;;;;50253:16;50246:23;;;50155:122;:::o;49211:99::-;49280:13;;:22;;;-1:-1:-1;;;49280:22:0;;;;49256:4;;-1:-1:-1;;;;;49280:13:0;;:20;;:22;;;;;;;;;;;;;;49256:4;49280:13;:22;;;2:2:-1;;;;27:1;24;17:12;2:2;49280:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;46484:163:0;46530:7;46568:16;:14;:16::i;:::-;46557:8;;:27;46550:34;;46484:163;:::o;46291:96::-;46335:4;46359:15;:13;:15::i;:::-;:20;;-1:-1:-1;46291:96:0;:::o;37939:117::-;37991:7;38018:5;:3;:5::i;37761:96::-;37808:8;37836:5;;;;;;;;;-1:-1:-1;;;;;37836:5:0;-1:-1:-1;;;;;37836:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;48451:42:0;;;-1:-1:-1;;;;;48451:42:0;;:::o;37351:84::-;37397:5;37422;;;;-1:-1:-1;;;;;37422:5:0;;37351:84::o;34223:120::-;33767:8;:6;:8::i;:::-;33759:41;;;;-1:-1:-1;;;33759:41:0;;;;;;;;;34292:5:::1;34282:15:::0;;-1:-1:-1;;34282:15:0::1;::::0;;34313:22:::1;34322:12;:10;:12::i;:::-;34313:22;;;;;;;;;;;;;;;34223:120::o:0;7070:118::-;7123:11;;:::i;:::-;-1:-1:-1;7159:21:0;;;;;;;;;6780:6;7159:21;;7070:118;:::o;10202:132::-;10279:4;10303:18;10313:4;10319:1;10303:9;:18::i;:::-;10325:1;10303:23;10296:30;;10202:132;;;;;:::o;47314:232::-;47423:15;47411:9;:27;;;47511;;;;;;;;6946:116;7000:11;;:::i;:::-;-1:-1:-1;7036:18:0;;;;;;;;;-1:-1:-1;7036:18:0;;6946:116;:::o;51593:265::-;51670:19;;:::i;:::-;51691:4;51717:12;;;;;;;;;-1:-1:-1;;;;;51717:12:0;-1:-1:-1;;;;;51717:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;51717:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51717:22:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;51717:22:0;;;;;;;;;51713:82;;;51763:13;;:20;;;-1:-1:-1;;;51763:20:0;;;;-1:-1:-1;;;;;51763:13:0;;;;:18;;:20;;;;;;;;;;;;;:13;:20;;;2:2:-1;;;;27:1;24;17:12;2:2;51763:20:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51763:20:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;51763:20:0;;;;;;;;;51756:27;;;;;;51713:82;51813:12;;;:30;;;-1:-1:-1;;;51813:30:0;;;;-1:-1:-1;;;;;51813:12:0;;;;:28;;:30;;;;;;;;;;;;:12;:30;;;2:2:-1;;;;27:1;24;17:12;2:2;51813:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51813:30:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;51813:30:0;;;;;;;;;51805:45;51845:4;;-1:-1:-1;51593:265:0;-1:-1:-1;51593:265:0:o;50848:737::-;50938:19;;:::i;:::-;50979:13;:11;:13::i;:::-;50975:56;;;-1:-1:-1;51016:3:0;51009:10;;50975:56;51041:15;51059:16;:14;:16::i;:::-;51041:34;;51086:17;51106:15;:13;:15::i;:::-;51086:35;;51135:30;;:::i;:::-;51171:13;;:20;;;-1:-1:-1;;;51171:20:0;;;;-1:-1:-1;;;;;51171:13:0;;;;:18;;:20;;;;;;;;;;;;;:13;:20;;;2:2:-1;;;;27:1;24;17:12;2:2;51171:20:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51171:20:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;51171:20:0;;;;;;;;;51134:57;;;51202:25;;:::i;:::-;51230:19;:10;51245:3;51230:19;:14;:19;:::i;:::-;51202:47;;51325:33;;:::i;:::-;51434:8;;51374:69;;:55;51410:18;:5;51420:7;51410:18;:9;:18;:::i;:::-;51374:20;;;;;;;;;:16;:20;;;:31;;51395:9;51374:31;:20;:31;:::i;:::-;:35;:55;:35;:55;:::i;:::-;:59;:69;:59;:69;:::i;:::-;51325:118;-1:-1:-1;51548:29:0;:10;51325:118;51548:29;:14;:29;:::i;:::-;51541:36;;;;;;;50848:737;;;;:::o;33964:118::-;33490:8;:6;:8::i;:::-;33489:9;33481:38;;;;-1:-1:-1;;;33481:38:0;;;;;;;;;34024:7:::1;:14:::0;;-1:-1:-1;;34024:14:0::1;34034:4;34024:14;::::0;;34054:20:::1;34061:12;31642:106:::0;31730:10;31642:106;:::o;11289:245::-;11440:7;;11429;;11400;;11429:18;11425:59;;;-1:-1:-1;11471:1:0;11464:8;;11425:59;11511:7;;11501;;:17;:25;;11525:1;11501:25;;;11521:1;11501:25;11494:32;;;11289:245;-1:-1:-1;;;11289:245:0:o;9854:207::-;9963:11;;:::i;:::-;9999:54;;;;;;;;10013:37;10024:4;:10;;;6780:6;10042:1;:7;;;10013:10;:37::i;:::-;9999:54;;9992:61;9854:207;-1:-1:-1;;;9854:207:0:o;8239:183::-;8344:11;;:::i;:::-;8380:34;;;;;;;;;8394:10;;8380:34;;8394:17;;8409:1;8394:17;:14;:17;:::i;8997:193::-;9106:11;;:::i;:::-;9142:40;;;;;;;;;9171:7;;9156:10;;9142:40;;9156:23;;:10;:23;:14;:23;:::i;8430:183::-;8535:11;;:::i;:::-;8571:34;;;;;;;;;8585:10;;8571:34;;8585:17;;8600:1;8585:17;:14;:17;:::i;11056:225::-;11203:7;11235:38;11261:11;11235:21;:6;11246:9;11235:21;:10;:21;:::i;:::-;:25;:38;:25;:38;:::i;:::-;11228:45;11056:225;-1:-1:-1;;;;11056:225:0:o;2583:471::-;2641:7;2886:6;2882:47;;-1:-1:-1;2916:1:0;2909:8;;2882:47;2953:5;;;2957:1;2953;:5;:1;2977:5;;;;;:10;2969:56;;;;-1:-1:-1;;;2969:56:0;;;;;;;;;3045:1;2583:471;-1:-1:-1;;;2583:471:0:o;1229:181::-;1287:7;1319:5;;;1343:6;;;;1335:46;;;;-1:-1:-1;;;1335:46:0;;;;;;;;3530:132;3588:7;3615:39;3619:1;3622;3615:39;;;;;;;;;;;;;;;;;4244:7;4279:12;4272:5;4264:28;;;;-1:-1:-1;;;4264:28:0;;;;;;;;;;;4303:9;4319:1;4315;:5;;;;;;;4158:278;-1:-1:-1;;;;;4158:278:0:o;48193:3668::-;;;;;;;;;;;;;;:::o;1137:342:-1:-;;1258:4;1246:9;1241:3;1237:19;1233:30;1230:2;;;-1:-1;;1266:12;1230:2;1294:20;1258:4;1294:20;;;1701:13;;1372:86;;-1:-1;1285:29;1224:255;-1:-1;1224:255;1764:241;;1868:2;1856:9;1847:7;1843:23;1839:32;1836:2;;;-1:-1;;1874:12;1836:2;85:6;72:20;97:33;124:5;97:33;;2012:263;;2127:2;2115:9;2106:7;2102:23;2098:32;2095:2;;;-1:-1;;2133:12;2095:2;226:6;220:13;238:33;265:5;238:33;;2282:257;;2394:2;2382:9;2373:7;2369:23;2365:32;2362:2;;;-1:-1;;2400:12;2362:2;364:6;358:13;18802:5;15923:13;15916:21;18780:5;18777:32;18767:2;;-1:-1;;18813:12;3144:283;;3269:2;3257:9;3248:7;3244:23;3240:32;3237:2;;;-1:-1;;3275:12;3237:2;930:20;3269:2;930:20;;;1553;;1008:75;;-1:-1;1015:16;3231:196;-1:-1;3231:196;3434:305;;3570:2;3558:9;3549:7;3545:23;3541:32;3538:2;;;-1:-1;;3576:12;3538:2;3638:85;3715:7;3691:22;3638:85;;3746:435;;;3896:2;3884:9;3875:7;3871:23;3867:32;3864:2;;;-1:-1;;3902:12;3864:2;3964:85;4041:7;4017:22;3964:85;;;3954:95;;4086:2;4137:9;4133:22;358:13;18802:5;15923:13;15916:21;18780:5;18777:32;18767:2;;-1:-1;;18813:12;18767:2;4094:71;;;;3858:323;;;;;;4188:263;;4303:2;4291:9;4282:7;4278:23;4274:32;4271:2;;;-1:-1;;4309:12;4271:2;-1:-1;1701:13;;4265:186;-1:-1;4265:186;9138:213;-1:-1;;;;;16236:54;;;;4678:37;;9256:2;9241:18;;9227:124;9594:201;15923:13;;15916:21;4792:34;;9706:2;9691:18;;9677:118;11062:301;;11200:2;;11221:17;11214:47;5808:5;15546:12;15703:6;11200:2;11189:9;11185:18;15691:19;-1:-1;18288:101;18302:6;18299:1;18296:13;18288:101;;;18369:11;;;;;18363:18;18350:11;;;15731:14;18350:11;18343:39;18317:10;;18288:101;;;18404:6;18401:1;18398:13;18395:2;;;-1:-1;15731:14;18460:6;11189:9;18451:16;;18444:27;18395:2;-1:-1;18576:7;18560:14;-1:-1;;18556:28;5966:39;;;;15731:14;5966:39;;11171:192;-1:-1;;;11171:192;11370:407;11561:2;11575:47;;;6242:2;11546:18;;;15691:19;-1:-1;;;15731:14;;;6258:43;6320:12;;;11532:245;11784:407;11975:2;11989:47;;;6571:2;11960:18;;;15691:19;6607:34;15731:14;;;6587:55;-1:-1;;;6662:12;;;6655:37;6711:12;;;11946:245;12198:407;12389:2;12403:47;;;6962:2;12374:18;;;15691:19;6998:29;15731:14;;;6978:50;7047:12;;;12360:245;12612:407;12803:2;12817:47;;;7298:2;12788:18;;;15691:19;7334:34;15731:14;;;7314:55;-1:-1;;;7389:12;;;7382:27;7428:12;;;12774:245;13026:407;13217:2;13231:47;;;7679:2;13202:18;;;15691:19;-1:-1;;;15731:14;;;7695:39;7753:12;;;13188:245;13440:407;13631:2;13645:47;;;8004:2;13616:18;;;15691:19;8040:34;15731:14;;;8020:55;-1:-1;;;8095:12;;;8088:25;8132:12;;;13602:245;13854:407;14045:2;14059:47;;;8383:2;14030:18;;;15691:19;8419:34;15731:14;;;8399:55;-1:-1;;;8474:12;;;8467:25;8511:12;;;14016:245;14268:297;8788:23;;8969:37;;14428:2;14413:18;;14399:166;14572:396;8788:23;;8969:37;;15923:13;15916:21;14954:2;14939:18;;4792:34;14754:2;14739:18;;14725:243;14975:213;8969:37;;;15093:2;15078:18;;15064:124;15195:256;15257:2;15251:9;15283:17;;;15358:18;15343:34;;15379:22;;;15340:62;15337:2;;;15415:1;;15405:12;15337:2;15257;15424:22;15235:216;;-1:-1;15235:216;18597:117;-1:-1;;;;;16236:54;;18656:35;;18646:2;;18705:1;;18695:12

Swarm Source

ipfs://29e1f26b52038a4059047d1fc29124450190bad7f621c996f41872cab9f32df6

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.