ETH Price: $2,472.31 (+0.72%)
 

Overview

Max Total Supply

0 StrategystETHCurve

Holders

0

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Strategy

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

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

// SPDX-License-Identifier: AGPL-3.0

pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

// Global Enums and Structs



struct StrategyParams {
    uint256 performanceFee;
    uint256 activation;
    uint256 debtRatio;
    uint256 rateLimit;
    uint256 lastReport;
    uint256 totalDebt;
    uint256 totalGain;
    uint256 totalLoss;
}

// Part: Gauge

interface Gauge {
    function deposit(uint256) external;

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

    function claim_rewards() external;

    function claimable_reward(address, address) external view returns (uint256);

    function withdraw(uint256) external;
}

// Part: ICurveFi

interface ICurveFi {
    function get_virtual_price() external view returns (uint256);

    function add_liquidity(
        // sBTC pool
        uint256[3] calldata amounts,
        uint256 min_mint_amount
    ) external;

    function add_liquidity(
        // bUSD pool
        uint256[4] calldata amounts,
        uint256 min_mint_amount
    ) external;

    function add_liquidity(
        // stETH pool
        uint256[2] calldata amounts,
        uint256 min_mint_amount
    ) external payable;

    function remove_liquidity_imbalance(uint256[4] calldata amounts, uint256 max_burn_amount) external;

    function remove_liquidity(uint256 _amount, uint256[4] calldata amounts) external;

    function remove_liquidity_one_coin(
        uint256 _token_amount,
        int128 i,
        uint256 min_amount
    ) external;

    function exchange(
        int128 from,
        int128 to,
        uint256 _from_amount,
        uint256 _min_to_amount
    ) external payable;

    function balances(int128) external view returns (uint256);

    function get_dy(
        int128 from,
        int128 to,
        uint256 _from_amount
    ) external view returns (uint256);

    function calc_token_amount( uint256[2] calldata amounts, bool is_deposit) external view returns (uint256);
}

// Part: IMinter

interface IMinter {
    function mint(address) external;

}

// Part: IMooniswap

interface IMooniswap {
    function swap(address src, address dst, uint256 amount, uint256 minReturn, address referral) external payable returns(uint256 result);
}

// Part: IUniswapV2Router01

interface IUniswapV2Router01 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);
}

// Part: OpenZeppelin/[email protected]/Address

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}

// Part: OpenZeppelin/[email protected]/IERC20

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);
}

// Part: OpenZeppelin/[email protected]/Math

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

// Part: OpenZeppelin/[email protected]/SafeMath

/**
 * @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, 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;
    }
}

// Part: ICrvV3

interface ICrvV3 is IERC20 {
    function minter() external view returns (address);

}

// Part: ISteth

interface ISteth is IERC20 {
    function submit(address) external payable returns (uint256);

}

// Part: IUniswapV2Router02

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

// Part: OpenZeppelin/[email protected]/SafeERC20

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// Part: iearn-finance/[email protected]/VaultAPI

interface VaultAPI is IERC20 {
    function apiVersion() external view returns (string memory);

    function withdraw(uint256 shares, address recipient) external;

    function token() external view returns (address);

    function strategies(address _strategy) external view returns (StrategyParams memory);

    /**
     * View how much the Vault would increase this Strategy's borrow limit,
     * based on its present performance (since its last report). Can be used to
     * determine expectedReturn in your Strategy.
     */
    function creditAvailable() external view returns (uint256);

    /**
     * View how much the Vault would like to pull back from the Strategy,
     * based on its present performance (since its last report). Can be used to
     * determine expectedReturn in your Strategy.
     */
    function debtOutstanding() external view returns (uint256);

    /**
     * View how much the Vault expect this Strategy to return at the current
     * block, based on its present performance (since its last report). Can be
     * used to determine expectedReturn in your Strategy.
     */
    function expectedReturn() external view returns (uint256);

    /**
     * This is the main contact point where the Strategy interacts with the
     * Vault. It is critical that this call is handled as intended by the
     * Strategy. Therefore, this function will be called by BaseStrategy to
     * make sure the integration is correct.
     */
    function report(
        uint256 _gain,
        uint256 _loss,
        uint256 _debtPayment
    ) external returns (uint256);

    /**
     * This function should only be used in the scenario where the Strategy is
     * being retired but no migration of the positions are possible, or in the
     * extreme scenario that the Strategy needs to be put into "Emergency Exit"
     * mode in order for it to exit as quickly as possible. The latter scenario
     * could be for any reason that is considered "critical" that the Strategy
     * exits its position as fast as possible, such as a sudden change in
     * market conditions leading to losses, or an imminent failure in an
     * external dependency.
     */
    function revokeStrategy() external;

    /**
     * View the governance address of the Vault to assert privileged functions
     * can only be called by governance. The Strategy serves the Vault, so it
     * is subject to governance defined by the Vault.
     */
    function governance() external view returns (address);
}

// Part: iearn-finance/[email protected]/BaseStrategy

/**
 * @title Yearn Base Strategy
 * @author yearn.finance
 * @notice
 *  BaseStrategy implements all of the required functionality to interoperate
 *  closely with the Vault contract. This contract should be inherited and the
 *  abstract methods implemented to adapt the Strategy to the particular needs
 *  it has to create a return.
 *
 *  Of special interest is the relationship between `harvest()` and
 *  `vault.report()'. `harvest()` may be called simply because enough time has
 *  elapsed since the last report, and not because any funds need to be moved
 *  or positions adjusted. This is critical so that the Vault may maintain an
 *  accurate picture of the Strategy's performance. See  `vault.report()`,
 *  `harvest()`, and `harvestTrigger()` for further details.
 */
abstract contract BaseStrategy {
    using SafeMath for uint256;

    /**
     * @notice
     *  Used to track which version of `StrategyAPI` this Strategy
     *  implements.
     * @dev The Strategy's version must match the Vault's `API_VERSION`.
     * @return A string which holds the current API version of this contract.
     */
    function apiVersion() public pure returns (string memory) {
        return "0.3.0";
    }

    /**
     * @notice This Strategy's name.
     * @dev
     *  You can use this field to manage the "version" of this Strategy, e.g.
     *  `StrategySomethingOrOtherV1`. However, "API Version" is managed by
     *  `apiVersion()` function above.
     * @return This Strategy's name.
     */
    function name() external virtual view returns (string memory);

    /**
     * @notice
     *  The amount (priced in want) of the total assets managed by this strategy should not count
     *  towards Yearn's TVL calculations.
     * @dev
     *  You can override this field to set it to a non-zero value if some of the assets of this
     *  Strategy is somehow delegated inside another part of of Yearn's ecosystem e.g. another Vault.
     *  Note that this value must be strictly less than or equal to the amount provided by
     *  `estimatedTotalAssets()` below, as the TVL calc will be total assets minus delegated assets.
     * @return
     *  The amount of assets this strategy manages that should not be included in Yearn's Total Value
     *  Locked (TVL) calculation across it's ecosystem.
     */
    function delegatedAssets() external virtual view returns (uint256) {
        return 0;
    }

    VaultAPI public vault;
    address public strategist;
    address public rewards;
    address public keeper;

    IERC20 public want;

    // So indexers can keep track of this
    event Harvested(uint256 profit, uint256 loss, uint256 debtPayment, uint256 debtOutstanding);

    event UpdatedStrategist(address newStrategist);

    event UpdatedKeeper(address newKeeper);

    event UpdatedRewards(address rewards);

    event UpdatedReportDelay(uint256 delay);

    event UpdatedProfitFactor(uint256 profitFactor);

    event UpdatedDebtThreshold(uint256 debtThreshold);

    event EmergencyExitEnabled();

    // The maximum number of seconds between harvest calls. See
    // `setMaxReportDelay()` for more details.
    uint256 public maxReportDelay = 86400; // ~ once a day

    // The minimum multiple that `callCost` must be above the credit/profit to
    // be "justifiable". See `setProfitFactor()` for more details.
    uint256 public profitFactor = 100;

    // Use this to adjust the threshold at which running a debt causes a
    // harvest trigger. See `setDebtThreshold()` for more details.
    uint256 public debtThreshold = 0;

    // See note on `setEmergencyExit()`.
    bool public emergencyExit;

    // modifiers
    modifier onlyAuthorized() {
        require(msg.sender == strategist || msg.sender == governance(), "!authorized");
        _;
    }

    modifier onlyStrategist() {
        require(msg.sender == strategist, "!strategist");
        _;
    }

    modifier onlyGovernance() {
        require(msg.sender == governance(), "!authorized");
        _;
    }

    modifier onlyKeepers() {
        require(msg.sender == keeper || msg.sender == strategist || msg.sender == governance(), "!authorized");
        _;
    }

    /**
     * @notice
     *  Initializes the Strategy, this is called only once, when the
     *  contract is deployed.
     * @dev `_vault` should implement `VaultAPI`.
     * @param _vault The address of the Vault responsible for this Strategy.
     */
    constructor(address _vault) public {
        vault = VaultAPI(_vault);
        want = IERC20(vault.token());
        want.approve(_vault, uint256(-1)); // Give Vault unlimited access (might save gas)
        strategist = msg.sender;
        rewards = msg.sender;
        keeper = msg.sender;
    }

    /**
     * @notice
     *  Used to change `strategist`.
     *
     *  This may only be called by governance or the existing strategist.
     * @param _strategist The new address to assign as `strategist`.
     */
    function setStrategist(address _strategist) external onlyAuthorized {
        require(_strategist != address(0));
        strategist = _strategist;
        emit UpdatedStrategist(_strategist);
    }

    /**
     * @notice
     *  Used to change `keeper`.
     *
     *  `keeper` is the only address that may call `tend()` or `harvest()`,
     *  other than `governance()` or `strategist`. However, unlike
     *  `governance()` or `strategist`, `keeper` may *only* call `tend()`
     *  and `harvest()`, and no other authorized functions, following the
     *  principle of least privilege.
     *
     *  This may only be called by governance or the strategist.
     * @param _keeper The new address to assign as `keeper`.
     */
    function setKeeper(address _keeper) external onlyAuthorized {
        require(_keeper != address(0));
        keeper = _keeper;
        emit UpdatedKeeper(_keeper);
    }

    /**
     * @notice
     *  Used to change `rewards`. Any distributed rewards will cease flowing
     *  to the old address and begin flowing to this address once the change
     *  is in effect.
     *
     *  This may only be called by the strategist.
     * @param _rewards The address to use for collecting rewards.
     */
    function setRewards(address _rewards) external onlyStrategist {
        require(_rewards != address(0));
        rewards = _rewards;
        emit UpdatedRewards(_rewards);
    }

    /**
     * @notice
     *  Used to change `maxReportDelay`. `maxReportDelay` is the maximum number
     *  of blocks that should pass for `harvest()` to be called.
     *
     *  For external keepers (such as the Keep3r network), this is the maximum
     *  time between jobs to wait. (see `harvestTrigger()`
     *  for more details.)
     *
     *  This may only be called by governance or the strategist.
     * @param _delay The maximum number of seconds to wait between harvests.
     */
    function setMaxReportDelay(uint256 _delay) external onlyAuthorized {
        maxReportDelay = _delay;
        emit UpdatedReportDelay(_delay);
    }

    /**
     * @notice
     *  Used to change `profitFactor`. `profitFactor` is used to determine
     *  if it's worthwhile to harvest, given gas costs. (See `harvestTrigger()`
     *  for more details.)
     *
     *  This may only be called by governance or the strategist.
     * @param _profitFactor A ratio to multiply anticipated
     * `harvest()` gas cost against.
     */
    function setProfitFactor(uint256 _profitFactor) external onlyAuthorized {
        profitFactor = _profitFactor;
        emit UpdatedProfitFactor(_profitFactor);
    }

    /**
     * @notice
     *  Sets how far the Strategy can go into loss without a harvest and report
     *  being required.
     *
     *  By default this is 0, meaning any losses would cause a harvest which
     *  will subsequently report the loss to the Vault for tracking. (See
     *  `harvestTrigger()` for more details.)
     *
     *  This may only be called by governance or the strategist.
     * @param _debtThreshold How big of a loss this Strategy may carry without
     * being required to report to the Vault.
     */
    function setDebtThreshold(uint256 _debtThreshold) external onlyAuthorized {
        debtThreshold = _debtThreshold;
        emit UpdatedDebtThreshold(_debtThreshold);
    }

    /**
     * Resolve governance address from Vault contract, used to make assertions
     * on protected functions in the Strategy.
     */
    function governance() internal view returns (address) {
        return vault.governance();
    }

    /**
     * @notice
     *  Provide an accurate estimate for the total amount of assets
     *  (principle + return) that this Strategy is currently managing,
     *  denominated in terms of `want` tokens.
     *
     *  This total should be "realizable" e.g. the total value that could
     *  *actually* be obtained from this Strategy if it were to divest its
     *  entire position based on current on-chain conditions.
     * @dev
     *  Care must be taken in using this function, since it relies on external
     *  systems, which could be manipulated by the attacker to give an inflated
     *  (or reduced) value produced by this function, based on current on-chain
     *  conditions (e.g. this function is possible to influence through
     *  flashloan attacks, oracle manipulations, or other DeFi attack
     *  mechanisms).
     *
     *  It is up to governance to use this function to correctly order this
     *  Strategy relative to its peers in the withdrawal queue to minimize
     *  losses for the Vault based on sudden withdrawals. This value should be
     *  higher than the total debt of the Strategy and higher than its expected
     *  value to be "safe".
     * @return The estimated total assets in this Strategy.
     */
    function estimatedTotalAssets() public virtual view returns (uint256);

    /*
     * @notice
     *  Provide an indication of whether this strategy is currently "active"
     *  in that it is managing an active position, or will manage a position in
     *  the future. This should correlate to `harvest()` activity, so that Harvest
     *  events can be tracked externally by indexing agents.
     * @return True if the strategy is actively managing a position.
     */
    function isActive() public view returns (bool) {
        return vault.strategies(address(this)).debtRatio > 0 || estimatedTotalAssets() > 0;
    }

    /**
     * Perform any Strategy unwinding or other calls necessary to capture the
     * "free return" this Strategy has generated since the last time its core
     * position(s) were adjusted. Examples include unwrapping extra rewards.
     * This call is only used during "normal operation" of a Strategy, and
     * should be optimized to minimize losses as much as possible.
     *
     * This method returns any realized profits and/or realized losses
     * incurred, and should return the total amounts of profits/losses/debt
     * payments (in `want` tokens) for the Vault's accounting (e.g.
     * `want.balanceOf(this) >= _debtPayment + _profit - _loss`).
     *
     * `_debtOutstanding` will be 0 if the Strategy is not past the configured
     * debt limit, otherwise its value will be how far past the debt limit
     * the Strategy is. The Strategy's debt limit is configured in the Vault.
     *
     * NOTE: `_debtPayment` should be less than or equal to `_debtOutstanding`.
     *       It is okay for it to be less than `_debtOutstanding`, as that
     *       should only used as a guide for how much is left to pay back.
     *       Payments should be made to minimize loss from slippage, debt,
     *       withdrawal fees, etc.
     *
     * See `vault.debtOutstanding()`.
     */
    function prepareReturn(uint256 _debtOutstanding)
        internal
        virtual
        returns (
            uint256 _profit,
            uint256 _loss,
            uint256 _debtPayment
        );

    /**
     * Perform any adjustments to the core position(s) of this Strategy given
     * what change the Vault made in the "investable capital" available to the
     * Strategy. Note that all "free capital" in the Strategy after the report
     * was made is available for reinvestment. Also note that this number
     * could be 0, and you should handle that scenario accordingly.
     *
     * See comments regarding `_debtOutstanding` on `prepareReturn()`.
     */
    function adjustPosition(uint256 _debtOutstanding) internal virtual;

    /**
     * Liquidate up to `_amountNeeded` of `want` of this strategy's positions,
     * irregardless of slippage. Any excess will be re-invested with `adjustPosition()`.
     * This function should return the amount of `want` tokens made available by the
     * liquidation. If there is a difference between them, `_loss` indicates whether the
     * difference is due to a realized loss, or if there is some other sitution at play
     * (e.g. locked funds). This function is used during emergency exit instead of
     * `prepareReturn()` to liquidate all of the Strategy's positions back to the Vault.
     *
     * NOTE: The invariant `_amountFreed + _loss <= _amountNeeded` should always be maintained
     */
    function liquidatePosition(uint256 _amountNeeded) internal virtual returns (uint256 _liquidatedAmount, uint256 _loss);

    /**
     *  `Harvest()` calls this function after shares are created during
     *  `vault.report()`. You can customize this function to any share
     *  distribution mechanism you want.
     *
     *   See `vault.report()` for further details.
     */
    function distributeRewards() internal virtual {
        // Transfer 100% of newly-minted shares awarded to this contract to the rewards address.
        uint256 balance = vault.balanceOf(address(this));
        if (balance > 0) {
            vault.transfer(rewards, balance);
        }
    }

    /**
     * @notice
     *  Provide a signal to the keeper that `tend()` should be called. The
     *  keeper will provide the estimated gas cost that they would pay to call
     *  `tend()`, and this function should use that estimate to make a
     *  determination if calling it is "worth it" for the keeper. This is not
     *  the only consideration into issuing this trigger, for example if the
     *  position would be negatively affected if `tend()` is not called
     *  shortly, then this can return `true` even if the keeper might be
     *  "at a loss" (keepers are always reimbursed by Yearn).
     * @dev
     *  `callCost` must be priced in terms of `want`.
     *
     *  This call and `harvestTrigger()` should never return `true` at the same
     *  time.
     * @param callCost The keeper's estimated cast cost to call `tend()`.
     * @return `true` if `tend()` should be called, `false` otherwise.
     */
    function tendTrigger(uint256 callCost) public virtual view returns (bool) {
        // We usually don't need tend, but if there are positions that need
        // active maintainence, overriding this function is how you would
        // signal for that.
        return false;
    }

    /**
     * @notice
     *  Adjust the Strategy's position. The purpose of tending isn't to
     *  realize gains, but to maximize yield by reinvesting any returns.
     *
     *  See comments on `adjustPosition()`.
     *
     *  This may only be called by governance, the strategist, or the keeper.
     */
    function tend() external onlyKeepers {
        // Don't take profits with this call, but adjust for better gains
        adjustPosition(vault.debtOutstanding());
    }

    /**
     * @notice
     *  Provide a signal to the keeper that `harvest()` should be called. The
     *  keeper will provide the estimated gas cost that they would pay to call
     *  `harvest()`, and this function should use that estimate to make a
     *  determination if calling it is "worth it" for the keeper. This is not
     *  the only consideration into issuing this trigger, for example if the
     *  position would be negatively affected if `harvest()` is not called
     *  shortly, then this can return `true` even if the keeper might be "at a
     *  loss" (keepers are always reimbursed by Yearn).
     * @dev
     *  `callCost` must be priced in terms of `want`.
     *
     *  This call and `tendTrigger` should never return `true` at the
     *  same time.
     *
     *  See `maxReportDelay`, `profitFactor`, `debtThreshold` to adjust the
     *  strategist-controlled parameters that will influence whether this call
     *  returns `true` or not. These parameters will be used in conjunction
     *  with the parameters reported to the Vault (see `params`) to determine
     *  if calling `harvest()` is merited.
     *
     *  It is expected that an external system will check `harvestTrigger()`.
     *  This could be a script run off a desktop or cloud bot (e.g.
     *  https://github.com/iearn-finance/yearn-vaults/blob/master/scripts/keep.py),
     *  or via an integration with the Keep3r network (e.g.
     *  https://github.com/Macarse/GenericKeep3rV2/blob/master/contracts/keep3r/GenericKeep3rV2.sol).
     * @param callCost The keeper's estimated cast cost to call `harvest()`.
     * @return `true` if `harvest()` should be called, `false` otherwise.
     */
    function harvestTrigger(uint256 callCost) public virtual view returns (bool) {
        StrategyParams memory params = vault.strategies(address(this));

        // Should not trigger if Strategy is not activated
        if (params.activation == 0) return false;

        // Should trigger if hasn't been called in a while
        if (block.timestamp.sub(params.lastReport) >= maxReportDelay) return true;

        // If some amount is owed, pay it back
        // NOTE: Since debt is based on deposits, it makes sense to guard against large
        //       changes to the value from triggering a harvest directly through user
        //       behavior. This should ensure reasonable resistance to manipulation
        //       from user-initiated withdrawals as the outstanding debt fluctuates.
        uint256 outstanding = vault.debtOutstanding();
        if (outstanding > debtThreshold) return true;

        // Check for profits and losses
        uint256 total = estimatedTotalAssets();
        // Trigger if we have a loss to report
        if (total.add(debtThreshold) < params.totalDebt) return true;

        uint256 profit = 0;
        if (total > params.totalDebt) profit = total.sub(params.totalDebt); // We've earned a profit!

        // Otherwise, only trigger if it "makes sense" economically (gas cost
        // is <N% of value moved)
        uint256 credit = vault.creditAvailable();
        return (profitFactor.mul(callCost) < credit.add(profit));
    }

    /**
     * @notice
     *  Harvests the Strategy, recognizing any profits or losses and adjusting
     *  the Strategy's position.
     *
     *  In the rare case the Strategy is in emergency shutdown, this will exit
     *  the Strategy's position.
     *
     *  This may only be called by governance, the strategist, or the keeper.
     * @dev
     *  When `harvest()` is called, the Strategy reports to the Vault (via
     *  `vault.report()`), so in some cases `harvest()` must be called in order
     *  to take in profits, to borrow newly available funds from the Vault, or
     *  otherwise adjust its position. In other cases `harvest()` must be
     *  called to report to the Vault on the Strategy's position, especially if
     *  any losses have occurred.
     */
    function harvest() external onlyKeepers {
        uint256 profit = 0;
        uint256 loss = 0;
        uint256 debtOutstanding = vault.debtOutstanding();
        uint256 debtPayment = 0;
        if (emergencyExit) {
            // Free up as much capital as possible
            uint256 totalAssets = estimatedTotalAssets();
            // NOTE: use the larger of total assets or debt outstanding to book losses properly
            (debtPayment, loss) = liquidatePosition(totalAssets > debtOutstanding ? totalAssets : debtOutstanding);
            // NOTE: take up any remainder here as profit
            if (debtPayment > debtOutstanding) {
                profit = debtPayment.sub(debtOutstanding);
                debtPayment = debtOutstanding;
            }
        } else {
            // Free up returns for Vault to pull
            (profit, loss, debtPayment) = prepareReturn(debtOutstanding);
        }

        // Allow Vault to take up to the "harvested" balance of this contract,
        // which is the amount it has earned since the last time it reported to
        // the Vault.
        debtOutstanding = vault.report(profit, loss, debtPayment);

        // Distribute any reward shares earned by the strategy on this report
        distributeRewards();

        // Check if free returns are left, and re-invest them
        adjustPosition(debtOutstanding);

        emit Harvested(profit, loss, debtPayment, debtOutstanding);
    }

    /**
     * @notice
     *  Withdraws `_amountNeeded` to `vault`.
     *
     *  This may only be called by the Vault.
     * @param _amountNeeded How much `want` to withdraw.
     * @return _loss Any realized losses
     */
    function withdraw(uint256 _amountNeeded) external returns (uint256 _loss) {
        require(msg.sender == address(vault), "!vault");
        // Liquidate as much as possible to `want`, up to `_amount`
        uint256 amountFreed;
        (amountFreed, _loss) = liquidatePosition(_amountNeeded);
        // Send it directly back (NOTE: Using `msg.sender` saves some gas here)
        want.transfer(msg.sender, amountFreed);
        // NOTE: Reinvest anything leftover on next `tend`/`harvest`
    }

    /**
     * Do anything necessary to prepare this Strategy for migration, such as
     * transferring any reserve or LP tokens, CDPs, or other tokens or stores of
     * value.
     */
    function prepareMigration(address _newStrategy) internal virtual;

    /**
     * @notice
     *  Transfers all `want` from this Strategy to `_newStrategy`.
     *
     *  This may only be called by governance or the Vault.
     * @dev
     *  The new Strategy's Vault must be the same as this Strategy's Vault.
     * @param _newStrategy The Strategy to migrate to.
     */
    function migrate(address _newStrategy) external {
        require(msg.sender == address(vault) || msg.sender == governance());
        require(BaseStrategy(_newStrategy).vault() == vault);
        prepareMigration(_newStrategy);
        want.transfer(_newStrategy, want.balanceOf(address(this)));
    }

    /**
     * @notice
     *  Activates emergency exit. Once activated, the Strategy will exit its
     *  position upon the next harvest, depositing all funds into the Vault as
     *  quickly as is reasonable given on-chain conditions.
     *
     *  This may only be called by governance or the strategist.
     * @dev
     *  See `vault.setEmergencyShutdown()` and `harvest()` for further details.
     */
    function setEmergencyExit() external onlyAuthorized {
        emergencyExit = true;
        vault.revokeStrategy();

        emit EmergencyExitEnabled();
    }

    /**
     * Override this to add all tokens/tokenized positions this contract
     * manages on a *persistent* basis (e.g. not just for swapping back to
     * want ephemerally).
     *
     * NOTE: Do *not* include `want`, already included in `sweep` below.
     *
     * Example:
     *
     *    function protectedTokens() internal override view returns (address[] memory) {
     *      address[] memory protected = new address[](3);
     *      protected[0] = tokenA;
     *      protected[1] = tokenB;
     *      protected[2] = tokenC;
     *      return protected;
     *    }
     */
    function protectedTokens() internal virtual view returns (address[] memory);

    /**
     * @notice
     *  Removes tokens from this Strategy that are not the type of tokens
     *  managed by this Strategy. This may be used in case of accidentally
     *  sending the wrong kind of token to this Strategy.
     *
     *  Tokens will be sent to `governance()`.
     *
     *  This will fail if an attempt is made to sweep `want`, or any tokens
     *  that are protected by this Strategy.
     *
     *  This may only be called by governance.
     * @dev
     *  Implement `protectedTokens()` to specify any additional tokens that
     *  should be protected from sweeping in addition to `want`.
     * @param _token The token to transfer out of this vault.
     */
    function sweep(address _token) external onlyGovernance {
        require(_token != address(want), "!want");
        require(_token != address(vault), "!shares");

        address[] memory _protectedTokens = protectedTokens();
        for (uint256 i; i < _protectedTokens.length; i++) require(_token != _protectedTokens[i], "!protected");

        IERC20(_token).transfer(governance(), IERC20(_token).balanceOf(address(this)));
    }
}

// File: Strategy.sol

// Import interfaces for many popular DeFi projects, or add your own!
//import "../interfaces/<protocol>/<Interface>.sol";

contract Strategy is BaseStrategy {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    address private uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
    address private sushiswapRouter = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F;
    address private mooniswappool = 0x1f629794B34FFb3B29FF206Be5478A52678b47ae;

    address public ldoRouter = 0x1f629794B34FFb3B29FF206Be5478A52678b47ae;
    address[] public ldoPath;

    address public crvRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
    address[] public crvPath;

    Gauge public LiquidityGaugeV2 =  Gauge(address(0x182B723a58739a9c974cFDB385ceaDb237453c28));
    ICurveFi public StableSwapSTETH =  ICurveFi(address(0xDC24316b9AE028F1497c275EB9192a3Ea0f67022));
   // IMinter public CrvMinter = IMinter(address(0xd061D61a4d941c39E5453435B6345Dc261C2fcE0));

    address public constant weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);

    ISteth public stETH =  ISteth(address(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84));
    IERC20 public LDO =  IERC20(address(0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32));
    ICrvV3 public CRV =  ICrvV3(address(0xD533a949740bb3306d119CC777fa900bA034cd52));


    constructor(address _vault) public BaseStrategy(_vault) {
        // You can set these parameters on deployment to whatever you want
        maxReportDelay = 43200;
        profitFactor = 2000;
        debtThreshold = 400*1e18;

        want.safeApprove(address(LiquidityGaugeV2), uint256(-1));
        stETH.approve(address(StableSwapSTETH), uint256(-1));
        LDO.safeApprove(ldoRouter, uint256(-1));
        CRV.approve(crvRouter, uint256(-1));

        
        ldoPath = new address[](2);
        ldoPath[0] = address(LDO);
        ldoPath[1] = weth;

        crvPath = new address[](2);
        crvPath[0] = address(CRV);
        crvPath[1] = weth;
    }


    //we get eth
    receive() external payable {}


    // ******** OVERRIDE THESE METHODS FROM BASE CONTRACT ************
    //0 uniswap, 1 sushi, 2 inch
    function setLDORouter(uint256 exchange, address[] calldata _path) public onlyGovernance {
        if(exchange == 0){
            ldoRouter = uniswapRouter;
        }else if (exchange == 1) {
            ldoRouter = sushiswapRouter;
        }else if (exchange == 2) {
            ldoRouter = mooniswappool;
        }else{
            require(false, "incorrect pool");
        }

        ldoPath = _path;
        LDO.safeApprove(ldoRouter, uint256(-1));
    }

    function updateMooniswapPoolAddress(address newAddress) public onlyGovernance {
        mooniswappool = newAddress;
    }

    function setCRVRouter(uint256 exchange, address[] calldata _path) public onlyGovernance {
        if(exchange == 0){
            crvRouter = uniswapRouter;
        }else if (exchange == 1) {
            crvRouter = sushiswapRouter;
        }else{
            require(false, "incorrect pool");
        }
        crvPath = _path;
        CRV.approve(crvRouter, uint256(-1));
    }

    function name() external override view returns (string memory) {
        // Add your own name here, suggestion e.g. "StrategyCreamYFI"
        return "StrategystETHCurve";
    }

    function estimatedTotalAssets() public override view returns (uint256) {
        return LiquidityGaugeV2.balanceOf(address(this));
    }

    function prepareReturn(uint256 _debtOutstanding)
        internal
        override
        returns (
            uint256 _profit,
            uint256 _loss,
            uint256 _debtPayment
        )
    {
        // TODO: Do stuff here to free up any returns back into `want`
        // NOTE: Return `_profit` which is value generated by all positions, priced in `want`
        // NOTE: Should try to free up at least `_debtOutstanding` of underlying position

        uint256 guageTokens = LiquidityGaugeV2.balanceOf(address(this));
        if(guageTokens > 0){
            LiquidityGaugeV2.claim_rewards();
            IMinter(CRV.minter()).mint(address(LiquidityGaugeV2));

           uint256 ldo_balance = LDO.balanceOf(address(this));

            if(ldo_balance > 0){
                _sell(address(LDO), ldo_balance);
            }

            uint256 crv_balance = CRV.balanceOf(address(this));

            if(crv_balance > 0){
                _sell(address(CRV), crv_balance);
            }

            uint256 balance = address(this).balance;
            uint256 balance2 = stETH.balanceOf(address(this));

            if(balance > 0 || balance2 > 0){
                StableSwapSTETH.add_liquidity{value: balance}([balance, balance2], 0);
            }


            _profit = want.balanceOf(address(this));
        }

        if(_debtOutstanding > 0){
            if(_debtOutstanding > _profit){
                uint256 stakedBal = LiquidityGaugeV2.balanceOf(address(this));
                LiquidityGaugeV2.withdraw(Math.min(stakedBal,_debtOutstanding - _profit));
            }

            _debtPayment = Math.min(_debtOutstanding, want.balanceOf(address(this)).sub(_profit));
        }

        
    }

    function adjustPosition(uint256 _debtOutstanding) internal override {

        uint256 _toInvest = want.balanceOf(address(this));

        LiquidityGaugeV2.deposit(_toInvest);
    }

    function liquidatePosition(uint256 _amountNeeded)
        internal
        override
        returns (uint256 _liquidatedAmount, uint256 _loss)
    {

        uint256 wantBal = want.balanceOf(address(this));
        uint256 stakedBal = LiquidityGaugeV2.balanceOf(address(this));

        if(_amountNeeded > wantBal){
            LiquidityGaugeV2.withdraw(Math.min(stakedBal, _amountNeeded - wantBal));
        }

        _liquidatedAmount = Math.min(_amountNeeded, want.balanceOf(address(this)));

    }

    // NOTE: Can override `tendTrigger` and `harvestTrigger` if necessary

    function prepareMigration(address _newStrategy) internal override {
        IERC20 lg = IERC20(address(LiquidityGaugeV2));
        
        lg.safeTransfer(_newStrategy, lg.balanceOf(address(this)));
    }

    //sell all function
    function _sell(address currency, uint256 amount) internal {

        if(currency == address(LDO)){
            if(ldoRouter == mooniswappool){
                //we sell to stETH
                IMooniswap(mooniswappool).swap(currency, address(stETH), amount, 1, strategist);
            }else{
                IUniswapV2Router02(ldoRouter).swapExactTokensForETH(amount, uint256(0), ldoPath, address(this), now);
            }
            
        }
        else if(currency == address(CRV)){
            IUniswapV2Router02(crvRouter).swapExactTokensForETH(amount, uint256(0), crvPath, address(this), now);
        }else{
            require(false, "BAD SELL");
        }

    }


    // Override this to add all tokens/tokenized positions this contract manages
    // on a *persistent* basis (e.g. not just for swapping back to want ephemerally)
    // NOTE: Do *not* include `want`, already included in `sweep` below
    //
    // Example:
    //
    //    function protectedTokens() internal override view returns (address[] memory) {
    //      address[] memory protected = new address[](3);
    //      protected[0] = tokenA;
    //      protected[1] = tokenB;
    //      protected[2] = tokenC;
    //      return protected;
    //    }
    function protectedTokens()
        internal
        override
        view
        returns (address[] memory)
    {

        address[] memory protected = new address[](1);
          protected[0] = address(LiquidityGaugeV2);
    
          return protected;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"EmergencyExitEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"loss","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"debtPayment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"debtOutstanding","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"debtThreshold","type":"uint256"}],"name":"UpdatedDebtThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newKeeper","type":"address"}],"name":"UpdatedKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"profitFactor","type":"uint256"}],"name":"UpdatedProfitFactor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"delay","type":"uint256"}],"name":"UpdatedReportDelay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewards","type":"address"}],"name":"UpdatedRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategist","type":"address"}],"name":"UpdatedStrategist","type":"event"},{"inputs":[],"name":"CRV","outputs":[{"internalType":"contract ICrvV3","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LDO","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LiquidityGaugeV2","outputs":[{"internalType":"contract Gauge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"StableSwapSTETH","outputs":[{"internalType":"contract ICurveFi","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apiVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"crvPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crvRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"debtThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delegatedAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyExit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"estimatedTotalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"callCost","type":"uint256"}],"name":"harvestTrigger","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ldoPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ldoRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReportDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newStrategy","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"exchange","type":"uint256"},{"internalType":"address[]","name":"_path","type":"address[]"}],"name":"setCRVRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_debtThreshold","type":"uint256"}],"name":"setDebtThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setEmergencyExit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"exchange","type":"uint256"},{"internalType":"address[]","name":"_path","type":"address[]"}],"name":"setLDORouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"setMaxReportDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_profitFactor","type":"uint256"}],"name":"setProfitFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewards","type":"address"}],"name":"setRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stETH","outputs":[{"internalType":"contract ISteth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"callCost","type":"uint256"}],"name":"tendTrigger","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateMooniswapPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract VaultAPI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountNeeded","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"_loss","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052620151806005556064600655600060075560088054747a250d5630b4cf539739df2c5dacb4c659f2488d00610100600160a81b0319909116179055600980546001600160a01b031990811673d9e1ce17f2641f24ae83637ab66a2cca9c378b9f17909155600a80548216731f629794b34ffb3b29ff206be5478a52678b47ae908117909155600b805483169091179055600d80548216737a250d5630b4cf539739df2c5dacb4c659f2488d179055600f8054821673182b723a58739a9c974cfdb385ceadb237453c2817905560108054821673dc24316b9ae028f1497c275eb9192a3ea0f6702217905560118054821673ae7ab96520de3a18e5e111b5eaab095312d7fe84179055601280548216735a98fcbea516cf06857215779fd812ca3bef1b321790556013805490911673d533a949740bb3306d119cc777fa900ba034cd521790553480156200015657600080fd5b5060405162003e8138038062003e81833981016040819052620001799162000978565b600080546001600160a01b0319166001600160a01b03838116919091179182905560408051637e062a3560e11b8152905184939092169163fc0c546a91600480820192602092909190829003018186803b158015620001d757600080fd5b505afa158015620001ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000212919062000978565b600480546001600160a01b0319166001600160a01b039283161780825560405163095ea7b360e01b815292169163095ea7b39162000257918591600019910162000a1b565b602060405180830381600087803b1580156200027257600080fd5b505af115801562000287573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ad9190620009a8565b505060018054336001600160a01b031991821681179092556002805482168317905560038054909116909117905561a8c06005556107d06006556815af1d78b58c400000600755600f5460045462000321916001600160a01b03918216911660001962000615602090811b62001a4b17901c565b60115460105460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926200035b929116906000199060040162000a1b565b602060405180830381600087803b1580156200037657600080fd5b505af11580156200038b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b19190620009a8565b50600b54601254620003df916001600160a01b03918216911660001962000615602090811b62001a4b17901c565b601354600d5460405163095ea7b360e01b81526001600160a01b039283169263095ea7b39262000419929116906000199060040162000a1b565b602060405180830381600087803b1580156200043457600080fd5b505af115801562000449573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200046f9190620009a8565b50604080516002808252606082018352909160208301908036833750508151620004a192600c925060200190620008ed565b50601254600c80546001600160a01b0390921691600090620004bf57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2600c6001815481106200051157fe5b600091825260209091200180546001600160a01b03929092166001600160a01b03199092169190911790556040805160028082526060820190925290816020016020820280368337505081516200057092600e925060200190620008ed565b50601354600e80546001600160a01b03909216916000906200058e57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2600e600181548110620005e057fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505062000b7a565b801580620006a45750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906200064e903090869060040162000a01565b60206040518083038186803b1580156200066757600080fd5b505afa1580156200067c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006a29190620009ca565b155b620006cc5760405162461bcd60e51b8152600401620006c39062000aea565b60405180910390fd5b620007278363095ea7b360e01b8484604051602401620006ee92919062000a1b565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b03938416179052906200072c16565b505050565b606062000788826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620007c860201b62001b45179092919060201c565b805190915015620007275780806020019051810190620007a99190620009a8565b620007275760405162461bcd60e51b8152600401620006c39062000aa0565b6060620007d98484600085620007e1565b949350505050565b6060620007ee85620008b3565b6200080d5760405162461bcd60e51b8152600401620006c39062000a69565b60006060866001600160a01b031685876040516200082c9190620009e3565b60006040518083038185875af1925050503d80600081146200086b576040519150601f19603f3d011682016040523d82523d6000602084013e62000870565b606091505b5091509150811562000886579150620007d99050565b805115620008975780518082602001fd5b8360405162461bcd60e51b8152600401620006c3919062000a34565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590620007d9575050151592915050565b82805482825590600052602060002090810192821562000945579160200282015b828111156200094557825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200090e565b506200095392915062000957565b5090565b5b80821115620009535780546001600160a01b031916815560010162000958565b6000602082840312156200098a578081fd5b81516001600160a01b0381168114620009a1578182fd5b9392505050565b600060208284031215620009ba578081fd5b81518015158114620009a1578182fd5b600060208284031215620009dc578081fd5b5051919050565b60008251620009f781846020870162000b47565b9190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b600060208252825180602084015262000a5581604085016020870162000b47565b601f01601f19169190910160400192915050565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60005b8381101562000b6457818101518382015260200162000b4a565b8381111562000b74576000848401525b50505050565b6132f78062000b8a6000396000f3fe60806040526004361061024a5760003560e01c8063801492d711610139578063b0c89fa9116100b6578063ec38a8621161007a578063ec38a86214610603578063ed882c2b14610623578063efbb5cb014610643578063f017c92f14610658578063fbfa77cf14610678578063fcf2d0ad1461068d57610251565b8063b0c89fa914610579578063c1fe3e4814610599578063c7b9d530146105ae578063ce5494bb146105ce578063d88bba11146105ee57610251565b80639dba9f99116100fd5780639dba9f99146104fa5780639ec5a8941461051a578063a63984111461052f578063aced166114610544578063ad4095001461055957610251565b8063801492d7146104865780638cdfe1661461049b5780638e6350e2146104b057806391397ab4146104c5578063945c9142146104e557610251565b80632c4f93f9116101c75780634641257d1161018b5780634641257d146104075780635641ec031461041c578063650d188014610431578063748747e6146104515780637f1735591461047157610251565b80632c4f93f91461037d5780632e1a7d4d1461039d57806332bf1492146103bd5780633fc8cef3146103dd578063440368a3146103f257610251565b80631f1fcd511161020e5780631f1fcd51146103075780631fe4a6861461031c57806322f3e2d414610331578063258294101461035357806328b7ccf71461036857610251565b806301681a621461025657806306fdde03146102785780630f969b87146102a35780631d12f28b146102c35780631ed042d6146102e557610251565b3661025157005b600080fd5b34801561026257600080fd5b50610276610271366004612c14565b6106a2565b005b34801561028457600080fd5b5061028d6108ac565b60405161029a9190612ef2565b60405180910390f35b3480156102af57600080fd5b506102766102be366004612d73565b6108d8565b3480156102cf57600080fd5b506102d8610965565b60405161029a919061318c565b3480156102f157600080fd5b506102fa61096b565b60405161029a9190612e38565b34801561031357600080fd5b506102fa61097a565b34801561032857600080fd5b506102fa610989565b34801561033d57600080fd5b50610346610998565b60405161029a9190612ee7565b34801561035f57600080fd5b5061028d610a36565b34801561037457600080fd5b506102d8610a55565b34801561038957600080fd5b506102fa610398366004612d73565b610a5b565b3480156103a957600080fd5b506102d86103b8366004612d73565b610a82565b3480156103c957600080fd5b506102766103d8366004612da3565b610b48565b3480156103e957600080fd5b506102fa610c56565b3480156103fe57600080fd5b50610276610c6e565b34801561041357600080fd5b50610276610d55565b34801561042857600080fd5b50610346610f84565b34801561043d57600080fd5b5061034661044c366004612d73565b610f8d565b34801561045d57600080fd5b5061027661046c366004612c14565b610f95565b34801561047d57600080fd5b506102fa611040565b34801561049257600080fd5b506102fa61104f565b3480156104a757600080fd5b506102d861105e565b3480156104bc57600080fd5b506102d8611064565b3480156104d157600080fd5b506102766104e0366004612d73565b611069565b3480156104f157600080fd5b506102fa6110eb565b34801561050657600080fd5b50610276610515366004612da3565b6110fa565b34801561052657600080fd5b506102fa61122d565b34801561053b57600080fd5b506102fa61123c565b34801561055057600080fd5b506102fa61124b565b34801561056557600080fd5b506102fa610574366004612d73565b61125a565b34801561058557600080fd5b50610276610594366004612c14565b611267565b3480156105a557600080fd5b506102fa6112c1565b3480156105ba57600080fd5b506102766105c9366004612c14565b6112d0565b3480156105da57600080fd5b506102766105e9366004612c14565b61137b565b3480156105fa57600080fd5b506102fa61155b565b34801561060f57600080fd5b5061027661061e366004612c14565b61156a565b34801561062f57600080fd5b5061034661063e366004612d73565b6115f2565b34801561064f57600080fd5b506102d861185b565b34801561066457600080fd5b50610276610673366004612d73565b6118dc565b34801561068457600080fd5b506102fa61195e565b34801561069957600080fd5b5061027661196d565b6106aa611b5c565b6001600160a01b0316336001600160a01b0316146106e35760405162461bcd60e51b81526004016106da90613081565b60405180910390fd5b6004546001600160a01b03828116911614156107115760405162461bcd60e51b81526004016106da90612f4a565b6000546001600160a01b038281169116141561073f5760405162461bcd60e51b81526004016106da90613029565b6060610749611be3565b905060005b81518110156107a45781818151811061076357fe5b60200260200101516001600160a01b0316836001600160a01b0316141561079c5760405162461bcd60e51b81526004016106da906130f0565b60010161074e565b50816001600160a01b031663a9059cbb6107bc611b5c565b6040516370a0823160e01b81526001600160a01b038616906370a08231906107e8903090600401612e38565b60206040518083038186803b15801561080057600080fd5b505afa158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190612d8b565b6040518363ffffffff1660e01b8152600401610855929190612e4c565b602060405180830381600087803b15801561086f57600080fd5b505af1158015610883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a79190612ce1565b505050565b60408051808201909152601281527153747261746567797374455448437572766560701b602082015290565b6001546001600160a01b031633148061090957506108f4611b5c565b6001600160a01b0316336001600160a01b0316145b6109255760405162461bcd60e51b81526004016106da90613081565b60078190556040517fa68ba126373d04c004c5748c300c9fca12bd444b3d4332e261f3bd2bac4a86009061095a90839061318c565b60405180910390a150565b60075481565b600f546001600160a01b031681565b6004546001600160a01b031681565b6001546001600160a01b031681565b600080546040516339ebf82360e01b815282916001600160a01b0316906339ebf823906109c9903090600401612e38565b6101006040518083038186803b1580156109e257600080fd5b505afa1580156109f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a9190612d01565b604001511180610a3157506000610a2f61185b565b115b905090565b6040805180820190915260058152640302e332e360dc1b602082015290565b60055481565b600c8181548110610a6857fe5b6000918252602090912001546001600160a01b0316905081565b600080546001600160a01b03163314610aad5760405162461bcd60e51b81526004016106da90613009565b6000610ab883611c3f565b6004805460405163a9059cbb60e01b81529295509293506001600160a01b039092169163a9059cbb91610aef913391869101612e4c565b602060405180830381600087803b158015610b0957600080fd5b505af1158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b419190612ce1565b5050919050565b610b50611b5c565b6001600160a01b0316336001600160a01b031614610b805760405162461bcd60e51b81526004016106da90613081565b82610bb257600854600b80546101009092046001600160a01b03166001600160a01b0319909216919091179055610c2a565b8260011415610be257600954600b80546001600160a01b0319166001600160a01b03909216919091179055610c2a565b8260021415610c1257600a54600b80546001600160a01b0319166001600160a01b03909216919091179055610c2a565b60405162461bcd60e51b81526004016106da90612fa0565b610c36600c8383612b4d565b50600b546012546108a7916001600160a01b039182169116600019611a4b565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6003546001600160a01b0316331480610c9157506001546001600160a01b031633145b80610cb45750610c9f611b5c565b6001600160a01b0316336001600160a01b0316145b610cd05760405162461bcd60e51b81526004016106da90613081565b6000546040805163bf3759b560e01b81529051610d53926001600160a01b03169163bf3759b5916004808301926020929190829003018186803b158015610d1657600080fd5b505afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190612d8b565b611e52565b565b6003546001600160a01b0316331480610d7857506001546001600160a01b031633145b80610d9b5750610d86611b5c565b6001600160a01b0316336001600160a01b0316145b610db75760405162461bcd60e51b81526004016106da90613081565b60008060008060009054906101000a90046001600160a01b03166001600160a01b031663bf3759b56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0957600080fd5b505afa158015610e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e419190612d8b565b60085490915060009060ff1615610e97576000610e5c61185b565b9050610e75838211610e6e5783610e70565b815b611c3f565b9450915082821115610e9157610e8b8284611f3b565b94508291505b50610ea8565b610ea082611f86565b919550935090505b6000546040516328766ebf60e21b81526001600160a01b039091169063a1d9bafc90610edc90879087908690600401613208565b602060405180830381600087803b158015610ef657600080fd5b505af1158015610f0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2e9190612d8b565b9150610f386125dd565b610f4182611e52565b7f4c0f499ffe6befa0ca7c826b0916cf87bea98de658013e76938489368d60d50984848385604051610f76949392919061321e565b60405180910390a150505050565b60085460ff1681565b60005b919050565b6001546001600160a01b0316331480610fc65750610fb1611b5c565b6001600160a01b0316336001600160a01b0316145b610fe25760405162461bcd60e51b81526004016106da90613081565b6001600160a01b038116610ff557600080fd5b600380546001600160a01b0319166001600160a01b0383161790556040517f2f202ddb4a2e345f6323ed90f8fc8559d770a7abbbeee84dde8aca3351fe71549061095a908390612e38565b600d546001600160a01b031681565b6010546001600160a01b031681565b60065481565b600090565b6001546001600160a01b031633148061109a5750611085611b5c565b6001600160a01b0316336001600160a01b0316145b6110b65760405162461bcd60e51b81526004016106da90613081565b60068190556040517fd94596337df4c2f0f44d30a7fc5db1c7bb60d9aca4185ed77c6fd96eb45ec2989061095a90839061318c565b6013546001600160a01b031681565b611102611b5c565b6001600160a01b0316336001600160a01b0316146111325760405162461bcd60e51b81526004016106da90613081565b8261116457600854600d80546101009092046001600160a01b03166001600160a01b0319909216919091179055611190565b8260011415610c1257600954600d80546001600160a01b0319166001600160a01b039092169190911790555b61119c600e8383612b4d565b50601354600d5460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926111d59291169060001990600401612e4c565b602060405180830381600087803b1580156111ef57600080fd5b505af1158015611203573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112279190612ce1565b50505050565b6002546001600160a01b031681565b600b546001600160a01b031681565b6003546001600160a01b031681565b600e8181548110610a6857fe5b61126f611b5c565b6001600160a01b0316336001600160a01b03161461129f5760405162461bcd60e51b81526004016106da90613081565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b031681565b6001546001600160a01b031633148061130157506112ec611b5c565b6001600160a01b0316336001600160a01b0316145b61131d5760405162461bcd60e51b81526004016106da90613081565b6001600160a01b03811661133057600080fd5b600180546001600160a01b0319166001600160a01b0383161790556040517f352ececae6d7d1e6d26bcf2c549dfd55be1637e9b22dc0cf3b71ddb36097a6b49061095a908390612e38565b6000546001600160a01b03163314806113ac5750611397611b5c565b6001600160a01b0316336001600160a01b0316145b6113b557600080fd5b60008054906101000a90046001600160a01b03166001600160a01b0316816001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114439190612c30565b6001600160a01b03161461145657600080fd5b61145f8161269f565b600480546040516370a0823160e01b81526001600160a01b039091169163a9059cbb91849184916370a082319161149891309101612e38565b60206040518083038186803b1580156114b057600080fd5b505afa1580156114c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e89190612d8b565b6040518363ffffffff1660e01b8152600401611505929190612e4c565b602060405180830381600087803b15801561151f57600080fd5b505af1158015611533573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115579190612ce1565b5050565b6012546001600160a01b031681565b6001546001600160a01b031633146115945760405162461bcd60e51b81526004016106da90612f25565b6001600160a01b0381166115a757600080fd5b600280546001600160a01b0319166001600160a01b0383161790556040517fafbb66abf8f3b719799940473a4052a3717cdd8e40fb6c8a3faadab316b1a0699061095a908390612e38565b60006115fc612bb0565b6000546040516339ebf82360e01b81526001600160a01b03909116906339ebf8239061162c903090600401612e38565b6101006040518083038186803b15801561164557600080fd5b505afa158015611659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167d9190612d01565b9050806020015160001415611696576000915050610f90565b60055460808201516116a9904290611f3b565b106116b8576001915050610f90565b60008060009054906101000a90046001600160a01b03166001600160a01b031663bf3759b56040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b505afa15801561171b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173f9190612d8b565b905060075481111561175657600192505050610f90565b600061176061185b565b90508260a0015161177c6007548361273890919063ffffffff16565b101561178e5760019350505050610f90565b60008360a001518211156117af5760a08401516117ac908390611f3b565b90505b60008060009054906101000a90046001600160a01b03166001600160a01b031663112c1f9b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117fe57600080fd5b505afa158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190612d8b565b90506118428183612738565b60065461184f908961275d565b10979650505050505050565b600f546040516370a0823160e01b81526000916001600160a01b0316906370a082319061188c903090600401612e38565b60206040518083038186803b1580156118a457600080fd5b505afa1580156118b8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190612d8b565b6001546001600160a01b031633148061190d57506118f8611b5c565b6001600160a01b0316336001600160a01b0316145b6119295760405162461bcd60e51b81526004016106da90613081565b60058190556040517f4aaf232568bff365c53cad69bdb6e83014e79df80216ceba8ee01769723dfd689061095a90839061318c565b6000546001600160a01b031681565b6001546001600160a01b031633148061199e5750611989611b5c565b6001600160a01b0316336001600160a01b0316145b6119ba5760405162461bcd60e51b81526004016106da90613081565b6008805460ff19166001179055600080546040805163507257cd60e11b815290516001600160a01b039092169263a0e4af9a9260048084019382900301818387803b158015611a0857600080fd5b505af1158015611a1c573d6000803e3d6000fd5b50506040517f97e963041e952738788b9d4871d854d282065b8f90a464928d6528f2e9a4fd0b925060009150a1565b801580611ad35750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90611a819030908690600401612e65565b60206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad19190612d8b565b155b611aef5760405162461bcd60e51b81526004016106da90613136565b6108a78363095ea7b360e01b8484604051602401611b0e929190612e4c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612797565b6060611b548484600085612826565b949350505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015611bab57600080fd5b505afa158015611bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190612c30565b604080516001808252818301909252606091829190602080830190803683375050600f5482519293506001600160a01b031691839150600090611c2257fe5b6001600160a01b0390921660209283029190910190910152905090565b600480546040516370a0823160e01b8152600092839283926001600160a01b03909116916370a0823191611c7591309101612e38565b60206040518083038186803b158015611c8d57600080fd5b505afa158015611ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc59190612d8b565b600f546040516370a0823160e01b81529192506000916001600160a01b03909116906370a0823190611cfb903090600401612e38565b60206040518083038186803b158015611d1357600080fd5b505afa158015611d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d4b9190612d8b565b905081851115611dc157600f546001600160a01b0316632e1a7d4d611d72838589036128ea565b6040518263ffffffff1660e01b8152600401611d8e919061318c565b600060405180830381600087803b158015611da857600080fd5b505af1158015611dbc573d6000803e3d6000fd5b505050505b600480546040516370a0823160e01b8152611e499288926001600160a01b0316916370a0823191611df491309101612e38565b60206040518083038186803b158015611e0c57600080fd5b505afa158015611e20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e449190612d8b565b6128ea565b93505050915091565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a0823191611e8491309101612e38565b60206040518083038186803b158015611e9c57600080fd5b505afa158015611eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed49190612d8b565b600f5460405163b6b55f2560e01b81529192506001600160a01b03169063b6b55f2590611f0590849060040161318c565b600060405180830381600087803b158015611f1f57600080fd5b505af1158015611f33573d6000803e3d6000fd5b505050505050565b6000611f7d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612900565b90505b92915050565b600f546040516370a0823160e01b81526000918291829182916001600160a01b03909116906370a0823190611fbf903090600401612e38565b60206040518083038186803b158015611fd757600080fd5b505afa158015611feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200f9190612d8b565b9050801561244257600f60009054906101000a90046001600160a01b03166001600160a01b031663e6f1daf26040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561206757600080fd5b505af115801561207b573d6000803e3d6000fd5b50505050601360009054906101000a90046001600160a01b03166001600160a01b031663075461726040518163ffffffff1660e01b815260040160206040518083038186803b1580156120cd57600080fd5b505afa1580156120e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121059190612c30565b600f546040516335313c2160e11b81526001600160a01b0392831692636a6278429261213692911690600401612e38565b600060405180830381600087803b15801561215057600080fd5b505af1158015612164573d6000803e3d6000fd5b50506012546040516370a0823160e01b8152600093506001600160a01b0390911691506370a082319061219b903090600401612e38565b60206040518083038186803b1580156121b357600080fd5b505afa1580156121c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121eb9190612d8b565b9050801561220957601254612209906001600160a01b03168261292c565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a082319061223a903090600401612e38565b60206040518083038186803b15801561225257600080fd5b505afa158015612266573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228a9190612d8b565b905080156122a8576013546122a8906001600160a01b03168261292c565b6011546040516370a0823160e01b815247916000916001600160a01b03909116906370a08231906122dd903090600401612e38565b60206040518083038186803b1580156122f557600080fd5b505afa158015612309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232d9190612d8b565b9050600082118061233e5750600081115b156123bc57601054604080518082018252848152602081018490529051630b4c7e4d60e01b81526001600160a01b0390921691630b4c7e4d9185916123899190600090600401612eaf565b6000604051808303818588803b1580156123a257600080fd5b505af11580156123b6573d6000803e3d6000fd5b50505050505b600480546040516370a0823160e01b81526001600160a01b03909116916370a08231916123eb91309101612e38565b60206040518083038186803b15801561240357600080fd5b505afa158015612417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243b9190612d8b565b9750505050505b84156125d5578385111561254157600f546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612481903090600401612e38565b60206040518083038186803b15801561249957600080fd5b505afa1580156124ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d19190612d8b565b600f549091506001600160a01b0316632e1a7d4d6124f183888a036128ea565b6040518263ffffffff1660e01b815260040161250d919061318c565b600060405180830381600087803b15801561252757600080fd5b505af115801561253b573d6000803e3d6000fd5b50505050505b600480546040516370a0823160e01b81526125d2928892611e449289926001600160a01b03909216916370a082319161257c91309101612e38565b60206040518083038186803b15801561259457600080fd5b505afa1580156125a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125cc9190612d8b565b90611f3b565b91505b509193909250565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061260e903090600401612e38565b60206040518083038186803b15801561262657600080fd5b505afa15801561263a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265e9190612d8b565b9050801561269c5760005460025460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92611505929116908590600401612e4c565b50565b600f546040516370a0823160e01b81526001600160a01b039091169061155790839083906370a08231906126d7903090600401612e38565b60206040518083038186803b1580156126ef57600080fd5b505afa158015612703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127279190612d8b565b6001600160a01b0384169190612af5565b600082820183811015611f7d5760405162461bcd60e51b81526004016106da90612f69565b60008261276c57506000611f80565b8282028284828161277957fe5b0414611f7d5760405162461bcd60e51b81526004016106da90612fc8565b60606127ec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b459092919063ffffffff16565b8051909150156108a7578080602001905181019061280a9190612ce1565b6108a75760405162461bcd60e51b81526004016106da906130a6565b606061283185612b14565b61284d5760405162461bcd60e51b81526004016106da9061304a565b60006060866001600160a01b0316858760405161286a9190612e1c565b60006040518083038185875af1925050503d80600081146128a7576040519150601f19603f3d011682016040523d82523d6000602084013e6128ac565b606091505b509150915081156128c0579150611b549050565b8051156128d05780518082602001fd5b8360405162461bcd60e51b81526004016106da9190612ef2565b60008183106128f95781611f7d565b5090919050565b600081848411156129245760405162461bcd60e51b81526004016106da9190612ef2565b505050900390565b6012546001600160a01b0383811691161415612a8d57600a54600b546001600160a01b03908116911614156129f657600a546011546001805460405163d5bcb9b560e01b81526001600160a01b039485169463d5bcb9b59461299e948994918316938993919290911690600401612e7f565b602060405180830381600087803b1580156129b857600080fd5b505af11580156129cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129f09190612d8b565b50612a88565b600b546040516318cbafe560e01b81526001600160a01b03909116906318cbafe590612a30908490600090600c9030904290600401613195565b600060405180830381600087803b158015612a4a57600080fd5b505af1158015612a5e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612a869190810190612c4c565b505b611557565b6013546001600160a01b0383811691161415612add57600d546040516318cbafe560e01b81526001600160a01b03909116906318cbafe590612a30908490600090600e9030904290600401613195565b60405162461bcd60e51b81526004016106da90613114565b6108a78363a9059cbb60e01b8484604051602401611b0e929190612e4c565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611b54575050151592915050565b828054828255906000526020600020908101928215612ba0579160200282015b82811115612ba05781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612b6d565b50612bac929150612bf5565b5090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b80821115612bac5780546001600160a01b0319168155600101612bf6565b600060208284031215612c25578081fd5b8135611f7d816132ac565b600060208284031215612c41578081fd5b8151611f7d816132ac565b60006020808385031215612c5e578182fd5b825167ffffffffffffffff811115612c74578283fd5b8301601f81018513612c84578283fd5b8051612c97612c9282613260565b613239565b8181528381019083850185840285018601891015612cb3578687fd5b8694505b83851015612cd5578051835260019490940193918501918501612cb7565b50979650505050505050565b600060208284031215612cf2578081fd5b81518015158114611f7d578182fd5b6000610100808385031215612d14578182fd5b612d1d81613239565b9050825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201528091505092915050565b600060208284031215612d84578081fd5b5035919050565b600060208284031215612d9c578081fd5b5051919050565b600080600060408486031215612db7578182fd5b83359250602084013567ffffffffffffffff80821115612dd5578384fd5b818601915086601f830112612de8578384fd5b813581811115612df6578485fd5b8760208083028501011115612e09578485fd5b6020830194508093505050509250925092565b60008251612e2e818460208701613280565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039586168152938516602085015260408401929092526060830152909116608082015260a00190565b60608101818460005b6002811015612ed7578151835260209283019290910190600101612eb8565b5050508260408301529392505050565b901515815260200190565b6000602082528251806020840152612f11816040850160208701613280565b601f01601f19169190910160400192915050565b6020808252600b908201526a085cdd1c985d1959da5cdd60aa1b604082015260600190565b602080825260059082015264085dd85b9d60da1b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600e908201526d1a5b98dbdc9c9958dd081c1bdbdb60921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b6020808252600790820152662173686172657360c81b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600b908201526a08585d5d1a1bdc9a5e995960aa1b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600a9082015269085c1c9bdd1958dd195960b21b604082015260600190565b6020808252600890820152671090510814d1531360c21b604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b600060a082018783526020878185015260a0604085015281875480845260c0860191508885528285209350845b818110156131e75784546001600160a01b0316835260019485019492840192016131c2565b50506001600160a01b03969096166060850152505050608001529392505050565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b60405181810167ffffffffffffffff8111828210171561325857600080fd5b604052919050565b600067ffffffffffffffff821115613276578081fd5b5060209081020190565b60005b8381101561329b578181015183820152602001613283565b838111156112275750506000910152565b6001600160a01b038116811461269c57600080fdfea264697066735822122016f5d29c324f3975d6811b5c1b9a8265950bc274217261b659300069ece9cb2a64736f6c634300060c0033000000000000000000000000dcd90c7f6324cfa40d7169ef80b12031770b4325

Deployed Bytecode

0x60806040526004361061024a5760003560e01c8063801492d711610139578063b0c89fa9116100b6578063ec38a8621161007a578063ec38a86214610603578063ed882c2b14610623578063efbb5cb014610643578063f017c92f14610658578063fbfa77cf14610678578063fcf2d0ad1461068d57610251565b8063b0c89fa914610579578063c1fe3e4814610599578063c7b9d530146105ae578063ce5494bb146105ce578063d88bba11146105ee57610251565b80639dba9f99116100fd5780639dba9f99146104fa5780639ec5a8941461051a578063a63984111461052f578063aced166114610544578063ad4095001461055957610251565b8063801492d7146104865780638cdfe1661461049b5780638e6350e2146104b057806391397ab4146104c5578063945c9142146104e557610251565b80632c4f93f9116101c75780634641257d1161018b5780634641257d146104075780635641ec031461041c578063650d188014610431578063748747e6146104515780637f1735591461047157610251565b80632c4f93f91461037d5780632e1a7d4d1461039d57806332bf1492146103bd5780633fc8cef3146103dd578063440368a3146103f257610251565b80631f1fcd511161020e5780631f1fcd51146103075780631fe4a6861461031c57806322f3e2d414610331578063258294101461035357806328b7ccf71461036857610251565b806301681a621461025657806306fdde03146102785780630f969b87146102a35780631d12f28b146102c35780631ed042d6146102e557610251565b3661025157005b600080fd5b34801561026257600080fd5b50610276610271366004612c14565b6106a2565b005b34801561028457600080fd5b5061028d6108ac565b60405161029a9190612ef2565b60405180910390f35b3480156102af57600080fd5b506102766102be366004612d73565b6108d8565b3480156102cf57600080fd5b506102d8610965565b60405161029a919061318c565b3480156102f157600080fd5b506102fa61096b565b60405161029a9190612e38565b34801561031357600080fd5b506102fa61097a565b34801561032857600080fd5b506102fa610989565b34801561033d57600080fd5b50610346610998565b60405161029a9190612ee7565b34801561035f57600080fd5b5061028d610a36565b34801561037457600080fd5b506102d8610a55565b34801561038957600080fd5b506102fa610398366004612d73565b610a5b565b3480156103a957600080fd5b506102d86103b8366004612d73565b610a82565b3480156103c957600080fd5b506102766103d8366004612da3565b610b48565b3480156103e957600080fd5b506102fa610c56565b3480156103fe57600080fd5b50610276610c6e565b34801561041357600080fd5b50610276610d55565b34801561042857600080fd5b50610346610f84565b34801561043d57600080fd5b5061034661044c366004612d73565b610f8d565b34801561045d57600080fd5b5061027661046c366004612c14565b610f95565b34801561047d57600080fd5b506102fa611040565b34801561049257600080fd5b506102fa61104f565b3480156104a757600080fd5b506102d861105e565b3480156104bc57600080fd5b506102d8611064565b3480156104d157600080fd5b506102766104e0366004612d73565b611069565b3480156104f157600080fd5b506102fa6110eb565b34801561050657600080fd5b50610276610515366004612da3565b6110fa565b34801561052657600080fd5b506102fa61122d565b34801561053b57600080fd5b506102fa61123c565b34801561055057600080fd5b506102fa61124b565b34801561056557600080fd5b506102fa610574366004612d73565b61125a565b34801561058557600080fd5b50610276610594366004612c14565b611267565b3480156105a557600080fd5b506102fa6112c1565b3480156105ba57600080fd5b506102766105c9366004612c14565b6112d0565b3480156105da57600080fd5b506102766105e9366004612c14565b61137b565b3480156105fa57600080fd5b506102fa61155b565b34801561060f57600080fd5b5061027661061e366004612c14565b61156a565b34801561062f57600080fd5b5061034661063e366004612d73565b6115f2565b34801561064f57600080fd5b506102d861185b565b34801561066457600080fd5b50610276610673366004612d73565b6118dc565b34801561068457600080fd5b506102fa61195e565b34801561069957600080fd5b5061027661196d565b6106aa611b5c565b6001600160a01b0316336001600160a01b0316146106e35760405162461bcd60e51b81526004016106da90613081565b60405180910390fd5b6004546001600160a01b03828116911614156107115760405162461bcd60e51b81526004016106da90612f4a565b6000546001600160a01b038281169116141561073f5760405162461bcd60e51b81526004016106da90613029565b6060610749611be3565b905060005b81518110156107a45781818151811061076357fe5b60200260200101516001600160a01b0316836001600160a01b0316141561079c5760405162461bcd60e51b81526004016106da906130f0565b60010161074e565b50816001600160a01b031663a9059cbb6107bc611b5c565b6040516370a0823160e01b81526001600160a01b038616906370a08231906107e8903090600401612e38565b60206040518083038186803b15801561080057600080fd5b505afa158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190612d8b565b6040518363ffffffff1660e01b8152600401610855929190612e4c565b602060405180830381600087803b15801561086f57600080fd5b505af1158015610883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a79190612ce1565b505050565b60408051808201909152601281527153747261746567797374455448437572766560701b602082015290565b6001546001600160a01b031633148061090957506108f4611b5c565b6001600160a01b0316336001600160a01b0316145b6109255760405162461bcd60e51b81526004016106da90613081565b60078190556040517fa68ba126373d04c004c5748c300c9fca12bd444b3d4332e261f3bd2bac4a86009061095a90839061318c565b60405180910390a150565b60075481565b600f546001600160a01b031681565b6004546001600160a01b031681565b6001546001600160a01b031681565b600080546040516339ebf82360e01b815282916001600160a01b0316906339ebf823906109c9903090600401612e38565b6101006040518083038186803b1580156109e257600080fd5b505afa1580156109f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a9190612d01565b604001511180610a3157506000610a2f61185b565b115b905090565b6040805180820190915260058152640302e332e360dc1b602082015290565b60055481565b600c8181548110610a6857fe5b6000918252602090912001546001600160a01b0316905081565b600080546001600160a01b03163314610aad5760405162461bcd60e51b81526004016106da90613009565b6000610ab883611c3f565b6004805460405163a9059cbb60e01b81529295509293506001600160a01b039092169163a9059cbb91610aef913391869101612e4c565b602060405180830381600087803b158015610b0957600080fd5b505af1158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b419190612ce1565b5050919050565b610b50611b5c565b6001600160a01b0316336001600160a01b031614610b805760405162461bcd60e51b81526004016106da90613081565b82610bb257600854600b80546101009092046001600160a01b03166001600160a01b0319909216919091179055610c2a565b8260011415610be257600954600b80546001600160a01b0319166001600160a01b03909216919091179055610c2a565b8260021415610c1257600a54600b80546001600160a01b0319166001600160a01b03909216919091179055610c2a565b60405162461bcd60e51b81526004016106da90612fa0565b610c36600c8383612b4d565b50600b546012546108a7916001600160a01b039182169116600019611a4b565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6003546001600160a01b0316331480610c9157506001546001600160a01b031633145b80610cb45750610c9f611b5c565b6001600160a01b0316336001600160a01b0316145b610cd05760405162461bcd60e51b81526004016106da90613081565b6000546040805163bf3759b560e01b81529051610d53926001600160a01b03169163bf3759b5916004808301926020929190829003018186803b158015610d1657600080fd5b505afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190612d8b565b611e52565b565b6003546001600160a01b0316331480610d7857506001546001600160a01b031633145b80610d9b5750610d86611b5c565b6001600160a01b0316336001600160a01b0316145b610db75760405162461bcd60e51b81526004016106da90613081565b60008060008060009054906101000a90046001600160a01b03166001600160a01b031663bf3759b56040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0957600080fd5b505afa158015610e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e419190612d8b565b60085490915060009060ff1615610e97576000610e5c61185b565b9050610e75838211610e6e5783610e70565b815b611c3f565b9450915082821115610e9157610e8b8284611f3b565b94508291505b50610ea8565b610ea082611f86565b919550935090505b6000546040516328766ebf60e21b81526001600160a01b039091169063a1d9bafc90610edc90879087908690600401613208565b602060405180830381600087803b158015610ef657600080fd5b505af1158015610f0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2e9190612d8b565b9150610f386125dd565b610f4182611e52565b7f4c0f499ffe6befa0ca7c826b0916cf87bea98de658013e76938489368d60d50984848385604051610f76949392919061321e565b60405180910390a150505050565b60085460ff1681565b60005b919050565b6001546001600160a01b0316331480610fc65750610fb1611b5c565b6001600160a01b0316336001600160a01b0316145b610fe25760405162461bcd60e51b81526004016106da90613081565b6001600160a01b038116610ff557600080fd5b600380546001600160a01b0319166001600160a01b0383161790556040517f2f202ddb4a2e345f6323ed90f8fc8559d770a7abbbeee84dde8aca3351fe71549061095a908390612e38565b600d546001600160a01b031681565b6010546001600160a01b031681565b60065481565b600090565b6001546001600160a01b031633148061109a5750611085611b5c565b6001600160a01b0316336001600160a01b0316145b6110b65760405162461bcd60e51b81526004016106da90613081565b60068190556040517fd94596337df4c2f0f44d30a7fc5db1c7bb60d9aca4185ed77c6fd96eb45ec2989061095a90839061318c565b6013546001600160a01b031681565b611102611b5c565b6001600160a01b0316336001600160a01b0316146111325760405162461bcd60e51b81526004016106da90613081565b8261116457600854600d80546101009092046001600160a01b03166001600160a01b0319909216919091179055611190565b8260011415610c1257600954600d80546001600160a01b0319166001600160a01b039092169190911790555b61119c600e8383612b4d565b50601354600d5460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926111d59291169060001990600401612e4c565b602060405180830381600087803b1580156111ef57600080fd5b505af1158015611203573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112279190612ce1565b50505050565b6002546001600160a01b031681565b600b546001600160a01b031681565b6003546001600160a01b031681565b600e8181548110610a6857fe5b61126f611b5c565b6001600160a01b0316336001600160a01b03161461129f5760405162461bcd60e51b81526004016106da90613081565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b031681565b6001546001600160a01b031633148061130157506112ec611b5c565b6001600160a01b0316336001600160a01b0316145b61131d5760405162461bcd60e51b81526004016106da90613081565b6001600160a01b03811661133057600080fd5b600180546001600160a01b0319166001600160a01b0383161790556040517f352ececae6d7d1e6d26bcf2c549dfd55be1637e9b22dc0cf3b71ddb36097a6b49061095a908390612e38565b6000546001600160a01b03163314806113ac5750611397611b5c565b6001600160a01b0316336001600160a01b0316145b6113b557600080fd5b60008054906101000a90046001600160a01b03166001600160a01b0316816001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114439190612c30565b6001600160a01b03161461145657600080fd5b61145f8161269f565b600480546040516370a0823160e01b81526001600160a01b039091169163a9059cbb91849184916370a082319161149891309101612e38565b60206040518083038186803b1580156114b057600080fd5b505afa1580156114c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e89190612d8b565b6040518363ffffffff1660e01b8152600401611505929190612e4c565b602060405180830381600087803b15801561151f57600080fd5b505af1158015611533573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115579190612ce1565b5050565b6012546001600160a01b031681565b6001546001600160a01b031633146115945760405162461bcd60e51b81526004016106da90612f25565b6001600160a01b0381166115a757600080fd5b600280546001600160a01b0319166001600160a01b0383161790556040517fafbb66abf8f3b719799940473a4052a3717cdd8e40fb6c8a3faadab316b1a0699061095a908390612e38565b60006115fc612bb0565b6000546040516339ebf82360e01b81526001600160a01b03909116906339ebf8239061162c903090600401612e38565b6101006040518083038186803b15801561164557600080fd5b505afa158015611659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167d9190612d01565b9050806020015160001415611696576000915050610f90565b60055460808201516116a9904290611f3b565b106116b8576001915050610f90565b60008060009054906101000a90046001600160a01b03166001600160a01b031663bf3759b56040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b505afa15801561171b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173f9190612d8b565b905060075481111561175657600192505050610f90565b600061176061185b565b90508260a0015161177c6007548361273890919063ffffffff16565b101561178e5760019350505050610f90565b60008360a001518211156117af5760a08401516117ac908390611f3b565b90505b60008060009054906101000a90046001600160a01b03166001600160a01b031663112c1f9b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117fe57600080fd5b505afa158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190612d8b565b90506118428183612738565b60065461184f908961275d565b10979650505050505050565b600f546040516370a0823160e01b81526000916001600160a01b0316906370a082319061188c903090600401612e38565b60206040518083038186803b1580156118a457600080fd5b505afa1580156118b8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190612d8b565b6001546001600160a01b031633148061190d57506118f8611b5c565b6001600160a01b0316336001600160a01b0316145b6119295760405162461bcd60e51b81526004016106da90613081565b60058190556040517f4aaf232568bff365c53cad69bdb6e83014e79df80216ceba8ee01769723dfd689061095a90839061318c565b6000546001600160a01b031681565b6001546001600160a01b031633148061199e5750611989611b5c565b6001600160a01b0316336001600160a01b0316145b6119ba5760405162461bcd60e51b81526004016106da90613081565b6008805460ff19166001179055600080546040805163507257cd60e11b815290516001600160a01b039092169263a0e4af9a9260048084019382900301818387803b158015611a0857600080fd5b505af1158015611a1c573d6000803e3d6000fd5b50506040517f97e963041e952738788b9d4871d854d282065b8f90a464928d6528f2e9a4fd0b925060009150a1565b801580611ad35750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90611a819030908690600401612e65565b60206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad19190612d8b565b155b611aef5760405162461bcd60e51b81526004016106da90613136565b6108a78363095ea7b360e01b8484604051602401611b0e929190612e4c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612797565b6060611b548484600085612826565b949350505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015611bab57600080fd5b505afa158015611bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190612c30565b604080516001808252818301909252606091829190602080830190803683375050600f5482519293506001600160a01b031691839150600090611c2257fe5b6001600160a01b0390921660209283029190910190910152905090565b600480546040516370a0823160e01b8152600092839283926001600160a01b03909116916370a0823191611c7591309101612e38565b60206040518083038186803b158015611c8d57600080fd5b505afa158015611ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc59190612d8b565b600f546040516370a0823160e01b81529192506000916001600160a01b03909116906370a0823190611cfb903090600401612e38565b60206040518083038186803b158015611d1357600080fd5b505afa158015611d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d4b9190612d8b565b905081851115611dc157600f546001600160a01b0316632e1a7d4d611d72838589036128ea565b6040518263ffffffff1660e01b8152600401611d8e919061318c565b600060405180830381600087803b158015611da857600080fd5b505af1158015611dbc573d6000803e3d6000fd5b505050505b600480546040516370a0823160e01b8152611e499288926001600160a01b0316916370a0823191611df491309101612e38565b60206040518083038186803b158015611e0c57600080fd5b505afa158015611e20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e449190612d8b565b6128ea565b93505050915091565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a0823191611e8491309101612e38565b60206040518083038186803b158015611e9c57600080fd5b505afa158015611eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed49190612d8b565b600f5460405163b6b55f2560e01b81529192506001600160a01b03169063b6b55f2590611f0590849060040161318c565b600060405180830381600087803b158015611f1f57600080fd5b505af1158015611f33573d6000803e3d6000fd5b505050505050565b6000611f7d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612900565b90505b92915050565b600f546040516370a0823160e01b81526000918291829182916001600160a01b03909116906370a0823190611fbf903090600401612e38565b60206040518083038186803b158015611fd757600080fd5b505afa158015611feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200f9190612d8b565b9050801561244257600f60009054906101000a90046001600160a01b03166001600160a01b031663e6f1daf26040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561206757600080fd5b505af115801561207b573d6000803e3d6000fd5b50505050601360009054906101000a90046001600160a01b03166001600160a01b031663075461726040518163ffffffff1660e01b815260040160206040518083038186803b1580156120cd57600080fd5b505afa1580156120e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121059190612c30565b600f546040516335313c2160e11b81526001600160a01b0392831692636a6278429261213692911690600401612e38565b600060405180830381600087803b15801561215057600080fd5b505af1158015612164573d6000803e3d6000fd5b50506012546040516370a0823160e01b8152600093506001600160a01b0390911691506370a082319061219b903090600401612e38565b60206040518083038186803b1580156121b357600080fd5b505afa1580156121c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121eb9190612d8b565b9050801561220957601254612209906001600160a01b03168261292c565b6013546040516370a0823160e01b81526000916001600160a01b0316906370a082319061223a903090600401612e38565b60206040518083038186803b15801561225257600080fd5b505afa158015612266573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228a9190612d8b565b905080156122a8576013546122a8906001600160a01b03168261292c565b6011546040516370a0823160e01b815247916000916001600160a01b03909116906370a08231906122dd903090600401612e38565b60206040518083038186803b1580156122f557600080fd5b505afa158015612309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232d9190612d8b565b9050600082118061233e5750600081115b156123bc57601054604080518082018252848152602081018490529051630b4c7e4d60e01b81526001600160a01b0390921691630b4c7e4d9185916123899190600090600401612eaf565b6000604051808303818588803b1580156123a257600080fd5b505af11580156123b6573d6000803e3d6000fd5b50505050505b600480546040516370a0823160e01b81526001600160a01b03909116916370a08231916123eb91309101612e38565b60206040518083038186803b15801561240357600080fd5b505afa158015612417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243b9190612d8b565b9750505050505b84156125d5578385111561254157600f546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612481903090600401612e38565b60206040518083038186803b15801561249957600080fd5b505afa1580156124ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d19190612d8b565b600f549091506001600160a01b0316632e1a7d4d6124f183888a036128ea565b6040518263ffffffff1660e01b815260040161250d919061318c565b600060405180830381600087803b15801561252757600080fd5b505af115801561253b573d6000803e3d6000fd5b50505050505b600480546040516370a0823160e01b81526125d2928892611e449289926001600160a01b03909216916370a082319161257c91309101612e38565b60206040518083038186803b15801561259457600080fd5b505afa1580156125a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125cc9190612d8b565b90611f3b565b91505b509193909250565b600080546040516370a0823160e01b81526001600160a01b03909116906370a082319061260e903090600401612e38565b60206040518083038186803b15801561262657600080fd5b505afa15801561263a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265e9190612d8b565b9050801561269c5760005460025460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92611505929116908590600401612e4c565b50565b600f546040516370a0823160e01b81526001600160a01b039091169061155790839083906370a08231906126d7903090600401612e38565b60206040518083038186803b1580156126ef57600080fd5b505afa158015612703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127279190612d8b565b6001600160a01b0384169190612af5565b600082820183811015611f7d5760405162461bcd60e51b81526004016106da90612f69565b60008261276c57506000611f80565b8282028284828161277957fe5b0414611f7d5760405162461bcd60e51b81526004016106da90612fc8565b60606127ec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b459092919063ffffffff16565b8051909150156108a7578080602001905181019061280a9190612ce1565b6108a75760405162461bcd60e51b81526004016106da906130a6565b606061283185612b14565b61284d5760405162461bcd60e51b81526004016106da9061304a565b60006060866001600160a01b0316858760405161286a9190612e1c565b60006040518083038185875af1925050503d80600081146128a7576040519150601f19603f3d011682016040523d82523d6000602084013e6128ac565b606091505b509150915081156128c0579150611b549050565b8051156128d05780518082602001fd5b8360405162461bcd60e51b81526004016106da9190612ef2565b60008183106128f95781611f7d565b5090919050565b600081848411156129245760405162461bcd60e51b81526004016106da9190612ef2565b505050900390565b6012546001600160a01b0383811691161415612a8d57600a54600b546001600160a01b03908116911614156129f657600a546011546001805460405163d5bcb9b560e01b81526001600160a01b039485169463d5bcb9b59461299e948994918316938993919290911690600401612e7f565b602060405180830381600087803b1580156129b857600080fd5b505af11580156129cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129f09190612d8b565b50612a88565b600b546040516318cbafe560e01b81526001600160a01b03909116906318cbafe590612a30908490600090600c9030904290600401613195565b600060405180830381600087803b158015612a4a57600080fd5b505af1158015612a5e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612a869190810190612c4c565b505b611557565b6013546001600160a01b0383811691161415612add57600d546040516318cbafe560e01b81526001600160a01b03909116906318cbafe590612a30908490600090600e9030904290600401613195565b60405162461bcd60e51b81526004016106da90613114565b6108a78363a9059cbb60e01b8484604051602401611b0e929190612e4c565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611b54575050151592915050565b828054828255906000526020600020908101928215612ba0579160200282015b82811115612ba05781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612b6d565b50612bac929150612bf5565b5090565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b80821115612bac5780546001600160a01b0319168155600101612bf6565b600060208284031215612c25578081fd5b8135611f7d816132ac565b600060208284031215612c41578081fd5b8151611f7d816132ac565b60006020808385031215612c5e578182fd5b825167ffffffffffffffff811115612c74578283fd5b8301601f81018513612c84578283fd5b8051612c97612c9282613260565b613239565b8181528381019083850185840285018601891015612cb3578687fd5b8694505b83851015612cd5578051835260019490940193918501918501612cb7565b50979650505050505050565b600060208284031215612cf2578081fd5b81518015158114611f7d578182fd5b6000610100808385031215612d14578182fd5b612d1d81613239565b9050825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201528091505092915050565b600060208284031215612d84578081fd5b5035919050565b600060208284031215612d9c578081fd5b5051919050565b600080600060408486031215612db7578182fd5b83359250602084013567ffffffffffffffff80821115612dd5578384fd5b818601915086601f830112612de8578384fd5b813581811115612df6578485fd5b8760208083028501011115612e09578485fd5b6020830194508093505050509250925092565b60008251612e2e818460208701613280565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039586168152938516602085015260408401929092526060830152909116608082015260a00190565b60608101818460005b6002811015612ed7578151835260209283019290910190600101612eb8565b5050508260408301529392505050565b901515815260200190565b6000602082528251806020840152612f11816040850160208701613280565b601f01601f19169190910160400192915050565b6020808252600b908201526a085cdd1c985d1959da5cdd60aa1b604082015260600190565b602080825260059082015264085dd85b9d60da1b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600e908201526d1a5b98dbdc9c9958dd081c1bdbdb60921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b6020808252600790820152662173686172657360c81b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600b908201526a08585d5d1a1bdc9a5e995960aa1b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600a9082015269085c1c9bdd1958dd195960b21b604082015260600190565b6020808252600890820152671090510814d1531360c21b604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b600060a082018783526020878185015260a0604085015281875480845260c0860191508885528285209350845b818110156131e75784546001600160a01b0316835260019485019492840192016131c2565b50506001600160a01b03969096166060850152505050608001529392505050565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b60405181810167ffffffffffffffff8111828210171561325857600080fd5b604052919050565b600067ffffffffffffffff821115613276578081fd5b5060209081020190565b60005b8381101561329b578181015183820152602001613283565b838111156112275750506000910152565b6001600160a01b038116811461269c57600080fdfea264697066735822122016f5d29c324f3975d6811b5c1b9a8265950bc274217261b659300069ece9cb2a64736f6c634300060c0033

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

000000000000000000000000dcd90c7f6324cfa40d7169ef80b12031770b4325

-----Decoded View---------------
Arg [0] : _vault (address): 0xdCD90C7f6324cfa40d7169ef80b12031770B4325

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000dcd90c7f6324cfa40d7169ef80b12031770b4325


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.