ETH Price: $2,832.08 (-10.11%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Rebalance160350122022-11-23 20:15:47802 days ago1669234547IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0186648413.93403223
Rebalance160238412022-11-22 6:44:35803 days ago1669099475IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0109688211.19729238
Rebalance160026502022-11-19 7:44:35806 days ago1668843875IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0126908912.95523294
Rebalance159814752022-11-16 8:44:47809 days ago1668588287IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0151144113.51827648
Rebalance159603012022-11-13 9:47:23812 days ago1668332843IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0131537512.73152882
Rebalance159593922022-11-13 6:44:35812 days ago1668321875IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0127609113.10433533
Harvest VSP159539562022-11-12 12:32:59813 days ago1668256379IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0039613615.63575818
Rebalance159357402022-11-09 23:27:59816 days ago1668036479IN
0xB3325EAE...5C6c9E0b4
0 ETH0.2705713683.98181816
Rebalance159275772022-11-08 20:02:59817 days ago1667937779IN
0xB3325EAE...5C6c9E0b4
0 ETH0.3668142150
Rebalance159164352022-11-07 6:44:35818 days ago1667803475IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0100265111.56308688
Rebalance158949392022-11-04 6:44:35821 days ago1667544275IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0140520714.90803222
Rebalance158734832022-11-01 6:44:47824 days ago1667285087IN
0xB3325EAE...5C6c9E0b4
0 ETH0.010778869.38756459
Rebalance158520082022-10-29 6:44:35827 days ago1667025875IN
0xB3325EAE...5C6c9E0b4
0 ETH0.007393367.84671677
Rebalance158305372022-10-26 6:44:59830 days ago1666766699IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0094881910.01221727
Rebalance158091012022-10-23 6:44:47833 days ago1666507487IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0116314512.37129732
Rebalance157875992022-10-20 6:44:47836 days ago1666248287IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0210713622.41164665
Rebalance157661252022-10-17 6:44:47839 days ago1665989087IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0113952712.02413311
Rebalance157446442022-10-14 6:45:11842 days ago1665729911IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0127189614.66815525
Rebalance157234572022-10-11 7:44:35845 days ago1665474275IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0210992824.74405812
Rebalance157016602022-10-08 6:44:47848 days ago1665211487IN
0xB3325EAE...5C6c9E0b4
0 ETH0.005220675.5204389
Rebalance156801962022-10-05 6:44:47851 days ago1664952287IN
0xB3325EAE...5C6c9E0b4
0 ETH0.005851316.74747394
Rebalance156587502022-10-02 6:44:47854 days ago1664693087IN
0xB3325EAE...5C6c9E0b4
0 ETH0.003419252.83474751
Harvest VSP156533362022-10-01 12:32:59855 days ago1664627579IN
0xB3325EAE...5C6c9E0b4
0 ETH0.001388355.47991733
Rebalance156372922022-09-29 6:44:35857 days ago1664433875IN
0xB3325EAE...5C6c9E0b4
0 ETH0.0121164910.17265821
Rebalance156158392022-09-26 6:44:35860 days ago1664174675IN
0xB3325EAE...5C6c9E0b4
0 ETH0.004418144.66251163
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
160350122022-11-23 20:15:47802 days ago1669234547
0xB3325EAE...5C6c9E0b4
182.3937178 ETH
160350122022-11-23 20:15:47802 days ago1669234547
0xB3325EAE...5C6c9E0b4
182.3937178 ETH
160238412022-11-22 6:44:35803 days ago1669099475
0xB3325EAE...5C6c9E0b4
0.01113314 ETH
160238412022-11-22 6:44:35803 days ago1669099475
0xB3325EAE...5C6c9E0b4
0.01113314 ETH
160238412022-11-22 6:44:35803 days ago1669099475
0xB3325EAE...5C6c9E0b4
0.02407655 ETH
160238412022-11-22 6:44:35803 days ago1669099475
0xB3325EAE...5C6c9E0b4
0.02407655 ETH
160238412022-11-22 6:44:35803 days ago1669099475
0xB3325EAE...5C6c9E0b4
0.01446302 ETH
160238412022-11-22 6:44:35803 days ago1669099475
0xB3325EAE...5C6c9E0b4
0.01446302 ETH
160026502022-11-19 7:44:35806 days ago1668843875
0xB3325EAE...5C6c9E0b4
0.01064271 ETH
160026502022-11-19 7:44:35806 days ago1668843875
0xB3325EAE...5C6c9E0b4
0.01064271 ETH
160026502022-11-19 7:44:35806 days ago1668843875
0xB3325EAE...5C6c9E0b4
3.47823354 ETH
160026502022-11-19 7:44:35806 days ago1668843875
0xB3325EAE...5C6c9E0b4
3.47823354 ETH
160026502022-11-19 7:44:35806 days ago1668843875
0xB3325EAE...5C6c9E0b4
0.01395425 ETH
160026502022-11-19 7:44:35806 days ago1668843875
0xB3325EAE...5C6c9E0b4
0.01395425 ETH
159814752022-11-16 8:44:47809 days ago1668588287
0xB3325EAE...5C6c9E0b4
8.89598436 ETH
159814752022-11-16 8:44:47809 days ago1668588287
0xB3325EAE...5C6c9E0b4
8.89598436 ETH
159814752022-11-16 8:44:47809 days ago1668588287
0xB3325EAE...5C6c9E0b4
0.00106217 ETH
159814752022-11-16 8:44:47809 days ago1668588287
0xB3325EAE...5C6c9E0b4
0.00106217 ETH
159603012022-11-13 9:47:23812 days ago1668332843
0xB3325EAE...5C6c9E0b4
86.54250194 ETH
159603012022-11-13 9:47:23812 days ago1668332843
0xB3325EAE...5C6c9E0b4
86.54250194 ETH
159603012022-11-13 9:47:23812 days ago1668332843
0xB3325EAE...5C6c9E0b4
0.00021655 ETH
159603012022-11-13 9:47:23812 days ago1668332843
0xB3325EAE...5C6c9E0b4
0.00021655 ETH
159593922022-11-13 6:44:35812 days ago1668321875
0xB3325EAE...5C6c9E0b4
0.00066222 ETH
159593922022-11-13 6:44:35812 days ago1668321875
0xB3325EAE...5C6c9E0b4
0.00066222 ETH
159523192022-11-12 7:03:59813 days ago1668236639
0xB3325EAE...5C6c9E0b4
11.58602645 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CompoundVesperXyETH

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion, MIT license
File 1 of 20 : CompoundVesperXyETH.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./CompoundVesperXy.sol";

// solhint-disable no-empty-blocks
/// @title Deposit ETH in Compound and earn interest by depositing borrowed token in a Vesper Pool.
contract CompoundVesperXyETH is CompoundVesperXy {
    using SafeERC20 for IERC20;

    constructor(
        address _pool,
        address _swapper,
        address _comptroller,
        address _rewardToken,
        address _receiptToken,
        address _borrowCToken,
        address _vPool,
        address _vspAddress,
        string memory _name
    )
        CompoundVesperXy(
            _pool,
            _swapper,
            _comptroller,
            _rewardToken,
            _receiptToken,
            _borrowCToken,
            _vPool,
            _vspAddress,
            _name
        )
    {}

    /// @dev Unwrap ETH and supply in Compound
    function _mintX(uint256 _amount) internal override {
        if (_amount > 0) {
            TokenLike(WETH).withdraw(_amount);
            supplyCToken.mint{value: _amount}();
        }
    }

    /// @dev Withdraw ETH from Compound and Wrap those as WETH
    function _redeemX(uint256 _amount) internal override {
        super._redeemX(_amount);
        TokenLike(WETH).deposit{value: address(this).balance}();
    }
}

File 2 of 20 : IStrategy.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

interface IStrategy {
    function rebalance()
        external
        returns (
            uint256 _profit,
            uint256 _loss,
            uint256 _payback
        );

    function sweepERC20(address _fromToken) external;

    function withdraw(uint256 _amount) external;

    function feeCollector() external view returns (address);

    function isReservedToken(address _token) external view returns (bool);

    function keepers() external view returns (address[] memory);

    function migrate(address _newStrategy) external;

    function token() external view returns (address);

    function pool() external view returns (address);

    // solhint-disable-next-line func-name-mixedcase
    function VERSION() external view returns (string memory);

    function collateral() external view returns (address);
}

File 3 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 4 of 20 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 5 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @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 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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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");
        }
    }
}

File 6 of 20 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 20 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 8 of 20 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 9 of 20 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 10 of 20 : IToken.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

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

interface TokenLike is IERC20 {
    function deposit() external payable;

    function withdraw(uint256) external;
}

File 11 of 20 : IGovernable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @notice Governable interface
 */
interface IGovernable {
    function governor() external view returns (address _governor);

    function transferGovernorship(address _proposedGovernor) external;
}

File 12 of 20 : IPausable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @notice Pausable interface
 */
interface IPausable {
    function paused() external view returns (bool);

    function stopEverything() external view returns (bool);

    function pause() external;

    function unpause() external;

    function shutdown() external;

    function open() external;
}

File 13 of 20 : IPoolRewards.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

interface IPoolRewards {
    /// Emitted after reward added
    event RewardAdded(address indexed rewardToken, uint256 reward, uint256 rewardDuration);
    /// Emitted whenever any user claim rewards
    event RewardPaid(address indexed user, address indexed rewardToken, uint256 reward);
    /// Emitted after adding new rewards token into rewardTokens array
    event RewardTokenAdded(address indexed rewardToken, address[] existingRewardTokens);

    function claimReward(address) external;

    function notifyRewardAmount(
        address _rewardToken,
        uint256 _rewardAmount,
        uint256 _rewardDuration
    ) external;

    function notifyRewardAmount(
        address[] memory _rewardTokens,
        uint256[] memory _rewardAmounts,
        uint256[] memory _rewardDurations
    ) external;

    function updateReward(address) external;

    function claimable(address _account)
        external
        view
        returns (address[] memory _rewardTokens, uint256[] memory _claimableAmounts);

    function lastTimeRewardApplicable(address _rewardToken) external view returns (uint256);

    function rewardForDuration()
        external
        view
        returns (address[] memory _rewardTokens, uint256[] memory _rewardForDuration);

    function rewardPerToken()
        external
        view
        returns (address[] memory _rewardTokens, uint256[] memory _rewardPerTokenRate);
}

File 14 of 20 : IVesperPool.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "../../dependencies/openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./IGovernable.sol";
import "./IPausable.sol";

interface IVesperPool is IGovernable, IPausable, IERC20Metadata {
    function calculateUniversalFee(uint256 _profit) external view returns (uint256 _fee);

    function deposit(uint256 _share) external;

    function multiTransfer(address[] memory _recipients, uint256[] memory _amounts) external returns (bool);

    function excessDebt(address _strategy) external view returns (uint256);

    function poolAccountant() external view returns (address);

    function poolRewards() external view returns (address);

    function reportEarning(
        uint256 _profit,
        uint256 _loss,
        uint256 _payback
    ) external;

    function reportLoss(uint256 _loss) external;

    function sweepERC20(address _fromToken) external;

    function withdraw(uint256 _amount) external;

    function keepers() external view returns (address[] memory);

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

    function maintainers() external view returns (address[] memory);

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

    function pricePerShare() external view returns (uint256);

    function strategy(address _strategy)
        external
        view
        returns (
            bool _active,
            uint256 _interestFee, // Obsolete
            uint256 _debtRate, // Obsolete
            uint256 _lastRebalance,
            uint256 _totalDebt,
            uint256 _totalLoss,
            uint256 _totalProfit,
            uint256 _debtRatio,
            uint256 _externalDepositFee
        );

    function token() external view returns (IERC20);

    function tokensHere() external view returns (uint256);

    function totalDebtOf(address _strategy) external view returns (uint256);

    function totalValue() external view returns (uint256);

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

File 15 of 20 : ICompound.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

interface CToken {
    function accrueInterest() external returns (uint256);

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

    function balanceOfUnderlying(address owner) external returns (uint256);

    function borrowBalanceCurrent(address account) external returns (uint256);

    function borrowBalanceStored(address account) external view returns (uint256);

    function exchangeRateCurrent() external returns (uint256);

    function exchangeRateStored() external view returns (uint256);

    function getAccountSnapshot(address account)
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256
        );

    function borrow(uint256 borrowAmount) external returns (uint256);

    function mint() external payable; // For ETH

    function mint(uint256 mintAmount) external returns (uint256); // For ERC20

    function redeem(uint256 redeemTokens) external returns (uint256);

    function redeemUnderlying(uint256 redeemAmount) external returns (uint256);

    function repayBorrow() external payable; // For ETH

    function repayBorrow(uint256 repayAmount) external returns (uint256); // For ERC20

    function transfer(address user, uint256 amount) external returns (bool);

    function getCash() external view returns (uint256);

    function transferFrom(
        address owner,
        address user,
        uint256 amount
    ) external returns (bool);

    function underlying() external view returns (address);

    function comptroller() external view returns (address);
}

interface Comptroller {
    function claimComp(address holder, address[] memory) external;

    function enterMarkets(address[] memory cTokens) external returns (uint256[] memory);

    function exitMarket(address cToken) external returns (uint256);

    function compAccrued(address holder) external view returns (uint256);

    function getAccountLiquidity(address account)
        external
        view
        returns (
            uint256,
            uint256,
            uint256
        );

    function markets(address market)
        external
        view
        returns (
            bool isListed,
            uint256 collateralFactorMantissa,
            bool isCompted
        );

    function oracle() external view returns (address);
}

interface Oracle {
    function getUnderlyingPrice(address cToken) external view returns (uint256);

    function price(string memory symbol) external view returns (uint256);
}

File 16 of 20 : IRoutedSwapper.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @notice Routed Swapper interface
 * @dev This contract doesn't support native coins (e.g. ETH, AVAX, MATIC, etc) use wrapper tokens instead
 */
interface IRoutedSwapper {
    /**
     * @notice The list of supported DEXes
     * @dev This function is gas intensive
     */
    function getAllExchanges() external view returns (address[] memory);

    /**
     * @notice Get *spot* quote
     * It will return the swap amount based on the current reserves of the best pair/path found (i.e. spot price).
     * @dev It shouldn't be used as oracle!!!
     */
    function getAmountIn(
        address tokenIn_,
        address tokenOut_,
        uint256 amountOut_
    ) external returns (uint256 _amountIn);

    /**
     * @notice Get *spot* quote
     * It will return the swap amount based on the current reserves of the best pair/path found (i.e. spot price).
     * @dev It shouldn't be used as oracle!!!
     */
    function getAmountOut(
        address tokenIn_,
        address tokenOut_,
        uint256 amountIn_
    ) external returns (uint256 _amountOut);

    /**
     * @notice Perform an exact input swap - will revert if there is no default routing
     */
    function swapExactInput(
        address tokenIn_,
        address tokenOut_,
        uint256 amountIn_,
        uint256 amountOutMin_,
        address _receiver
    ) external returns (uint256 _amountOut);

    /**
     * @notice Perform an exact output swap - will revert if there is no default routing
     */
    function swapExactOutput(
        address tokenIn_,
        address tokenOut_,
        uint256 amountOut_,
        uint256 amountInMax_,
        address receiver_
    ) external returns (uint256 _amountIn);
}

File 17 of 20 : Strategy.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "vesper-pools/contracts/interfaces/vesper/IVesperPool.sol";
import "vesper-pools/contracts/dependencies/openzeppelin/contracts/token/ERC20/IERC20.sol";
import "vesper-pools/contracts/dependencies/openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "vesper-pools/contracts/dependencies/openzeppelin/contracts/utils/Context.sol";
import "vesper-pools/contracts/dependencies/openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "vesper-pools/contracts/dependencies/openzeppelin/contracts/utils/math/Math.sol";
import "vesper-commons/contracts/interfaces/vesper/IStrategy.sol";
import "../interfaces/swapper/IRoutedSwapper.sol";

abstract contract Strategy is IStrategy, Context {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;

    IERC20 public immutable collateralToken;
    address public receiptToken;
    address public immutable override pool;
    address public override feeCollector;
    IRoutedSwapper public swapper;
    address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    uint256 internal constant MAX_UINT_VALUE = type(uint256).max;

    EnumerableSet.AddressSet private _keepers;

    event UpdatedFeeCollector(address indexed previousFeeCollector, address indexed newFeeCollector);
    event UpdatedSwapper(IRoutedSwapper indexed oldSwapper, IRoutedSwapper indexed newSwapper);

    constructor(
        address _pool,
        address _swapper,
        address _receiptToken
    ) {
        require(_pool != address(0), "pool-address-is-zero");
        require(_swapper != address(0), "swapper-address-is-zero");
        swapper = IRoutedSwapper(_swapper);
        pool = _pool;
        collateralToken = IVesperPool(_pool).token();
        receiptToken = _receiptToken;
        require(_keepers.add(_msgSender()), "add-keeper-failed");
    }

    modifier onlyGovernor() {
        require(_msgSender() == IVesperPool(pool).governor(), "caller-is-not-the-governor");
        _;
    }

    modifier onlyKeeper() {
        require(_keepers.contains(_msgSender()), "caller-is-not-a-keeper");
        _;
    }

    modifier onlyPool() {
        require(_msgSender() == pool, "caller-is-not-vesper-pool");
        _;
    }

    /**
     * @notice Add given address in keepers list.
     * @param _keeperAddress keeper address to add.
     */
    function addKeeper(address _keeperAddress) external onlyGovernor {
        require(_keepers.add(_keeperAddress), "add-keeper-failed");
    }

    /// @dev Approve all required tokens
    function approveToken() external onlyKeeper {
        _approveToken(0);
        _approveToken(MAX_UINT_VALUE);
    }

    /// @notice Check whether given token is reserved or not. Reserved tokens are not allowed to sweep.
    function isReservedToken(address _token) public view virtual override returns (bool);

    /// @notice Return list of keepers
    function keepers() external view override returns (address[] memory) {
        return _keepers.values();
    }

    /**
     * @notice Migrate all asset and vault ownership,if any, to new strategy
     * @dev _beforeMigration hook can be implemented in child strategy to do extra steps.
     * @param _newStrategy Address of new strategy
     */
    function migrate(address _newStrategy) external virtual override onlyPool {
        require(_newStrategy != address(0), "new-strategy-address-is-zero");
        require(IStrategy(_newStrategy).pool() == pool, "not-valid-new-strategy");
        _beforeMigration(_newStrategy);
        IERC20(receiptToken).safeTransfer(_newStrategy, IERC20(receiptToken).balanceOf(address(this)));
        collateralToken.safeTransfer(_newStrategy, collateralToken.balanceOf(address(this)));
    }

    /**
     * @notice OnlyKeeper: Rebalance profit, loss and investment of this strategy.
     *  Calculate profit, loss and payback of this strategy and realize profit/loss and
     *  withdraw fund for payback, if any, and submit this report to pool.
     * @return _profit Realized profit in collateral.
     * @return _loss Realized loss, if any, in collateral.
     * @return _payback If strategy has any excess debt, we have to liquidate asset to payback excess debt.
     */
    function rebalance()
        external
        onlyKeeper
        returns (
            uint256 _profit,
            uint256 _loss,
            uint256 _payback
        )
    {
        return _rebalance();
    }

    /**
     * @notice Remove given address from keepers list.
     * @param _keeperAddress keeper address to remove.
     */
    function removeKeeper(address _keeperAddress) external onlyGovernor {
        require(_keepers.remove(_keeperAddress), "remove-keeper-failed");
    }

    /**
     * @notice sweep given token to feeCollector of strategy
     * @param _fromToken token address to sweep
     */
    function sweepERC20(address _fromToken) external override onlyKeeper {
        require(feeCollector != address(0), "fee-collector-not-set");
        require(_fromToken != address(collateralToken), "not-allowed-to-sweep-collateral");
        require(!isReservedToken(_fromToken), "not-allowed-to-sweep");
        if (_fromToken == ETH) {
            Address.sendValue(payable(feeCollector), address(this).balance);
        } else {
            uint256 _amount = IERC20(_fromToken).balanceOf(address(this));
            IERC20(_fromToken).safeTransfer(feeCollector, _amount);
        }
    }

    /// @notice Returns address of token correspond to receipt token
    function token() external view override returns (address) {
        return receiptToken;
    }

    /// @notice Returns address of token correspond to collateral token
    function collateral() external view override returns (address) {
        return address(collateralToken);
    }

    /// @notice Returns total collateral locked in the strategy
    function tvl() external view virtual returns (uint256);

    /**
     * @notice Update fee collector
     * @param _feeCollector fee collector address
     */
    function updateFeeCollector(address _feeCollector) external onlyGovernor {
        require(_feeCollector != address(0), "fee-collector-address-is-zero");
        require(_feeCollector != feeCollector, "fee-collector-is-same");
        emit UpdatedFeeCollector(feeCollector, _feeCollector);
        feeCollector = _feeCollector;
    }

    /**
     * @notice Update swapper
     * @param _swapper swapper address
     */
    function updateSwapper(IRoutedSwapper _swapper) external onlyGovernor {
        require(address(_swapper) != address(0), "swapper-address-is-zero");
        require(_swapper != swapper, "swapper-is-same");
        emit UpdatedSwapper(swapper, _swapper);
        swapper = _swapper;
    }

    /**
     * @notice Withdraw collateral token from end protocol.
     * @param _amount Amount of collateral token
     */
    function withdraw(uint256 _amount) external override onlyPool {
        uint256 _collateralHere = collateralToken.balanceOf(address(this));
        if (_collateralHere >= _amount) {
            collateralToken.safeTransfer(pool, _amount);
        } else {
            _withdrawHere(_amount - _collateralHere);
            // Do not assume _withdrawHere() will withdraw exact amount. Check balance again and transfer to pool
            _collateralHere = collateralToken.balanceOf(address(this));
            collateralToken.safeTransfer(pool, Math.min(_amount, _collateralHere));
        }
    }

    function _approveToken(uint256 _amount) internal virtual {
        collateralToken.safeApprove(pool, _amount);
    }

    /**
     * @dev some strategy may want to prepare before doing migration.
     *  Example In Maker old strategy want to give vault ownership to new strategy
     * @param _newStrategy .
     */
    function _beforeMigration(address _newStrategy) internal virtual;

    function _rebalance()
        internal
        virtual
        returns (
            uint256 _profit,
            uint256 _loss,
            uint256 _payback
        );

    function _swapExactInput(
        address _tokenIn,
        address _tokenOut,
        uint256 _amountIn
    ) internal {
        swapper.swapExactInput(_tokenIn, _tokenOut, _amountIn, 1, address(this));
    }

    function _safeSwapExactInput(
        address _tokenIn,
        address _tokenOut,
        uint256 _amountIn
    ) internal {
        try swapper.swapExactInput(_tokenIn, _tokenOut, _amountIn, 1, address(this)) {} catch {} //solhint-disable no-empty-blocks
    }

    // These methods must be implemented by the inheriting strategy
    function _withdrawHere(uint256 _amount) internal virtual;
}

File 18 of 20 : CompoundVesperXy.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "vesper-pools/contracts/interfaces/vesper/IPoolRewards.sol";
import "./CompoundXy.sol";

/// @title Deposit Collateral in Compound and earn interest by depositing borrowed token in a Vesper Pool.
contract CompoundVesperXy is CompoundXy {
    using SafeERC20 for IERC20;

    // Destination Grow Pool for borrowed Token
    IVesperPool public immutable vPool;
    // VSP token address
    address public immutable vsp;

    constructor(
        address _pool,
        address _swapper,
        address _comptroller,
        address _rewardToken,
        address _receiptToken,
        address _borrowCToken,
        address _vPool,
        address _vsp,
        string memory _name
    ) CompoundXy(_pool, _swapper, _comptroller, _rewardToken, _receiptToken, _borrowCToken, _name) {
        require(_vsp != address(0), "vsp-address-is-zero");
        require(address(IVesperPool(_vPool).token()) == borrowToken, "invalid-grow-pool");
        vPool = IVesperPool(_vPool);
        vsp = _vsp;
    }

    /// @notice Gets amount of borrowed Y collateral in strategy + Y collateral amount deposited in vPool
    function borrowBalance() external view returns (uint256) {
        return _getBorrowBalance();
    }

    /// @notice Claim VSP and convert to collateral token
    function harvestVSP() external {
        address _poolRewards = vPool.poolRewards();
        if (_poolRewards != address(0)) {
            IPoolRewards(_poolRewards).claimReward(address(this));
        }
        uint256 _vspAmount = IERC20(vsp).balanceOf(address(this));
        if (_vspAmount > 0) {
            _swapExactInput(vsp, address(collateralToken), _vspAmount);
        }
    }

    function isReservedToken(address _token) public view virtual override returns (bool) {
        return super.isReservedToken(_token) || _token == address(vPool);
    }

    /// @notice After borrowing Y, deposit to Vesper Pool
    function _afterBorrowY(uint256 _amount) internal override {
        vPool.deposit(_amount);
    }

    function _approveToken(uint256 _amount) internal override {
        super._approveToken(_amount);
        IERC20(borrowToken).safeApprove(address(vPool), _amount);
        IERC20(vsp).safeApprove(address(swapper), _amount);
    }

    /// @notice Before repaying Y, withdraw it from Vesper Pool
    function _beforeRepayY(uint256 _amount) internal override {
        _withdrawFromPool(_amount);
    }

    /// @notice Borrowed Y balance deposited in Vesper Pool
    function _getBorrowBalance() internal view override returns (uint256) {
        return
            IERC20(borrowToken).balanceOf(address(this)) +
            ((vPool.pricePerShare() * vPool.balanceOf(address(this))) / 1e18);
    }

    function _rebalanceBorrow(uint256 _excessBorrow) internal override {
        if (_excessBorrow > 0) {
            uint256 _borrowedHereBefore = IERC20(borrowToken).balanceOf(address(this));
            _withdrawFromPool(_excessBorrow);
            uint256 _borrowedHere = IERC20(borrowToken).balanceOf(address(this)) - _borrowedHereBefore;
            if (_borrowedHere > 0) {
                _safeSwapExactInput(borrowToken, address(collateralToken), _borrowedHere);
            }
        }
    }

    /// @notice Withdraw _shares proportional to collateral _amount from vPool
    function _withdrawFromPool(uint256 _amount) internal {
        uint256 _pricePerShare = vPool.pricePerShare();
        uint256 _shares = (_amount * 1e18) / _pricePerShare;
        _shares = _amount > ((_shares * _pricePerShare) / 1e18) ? _shares + 1 : _shares;

        uint256 _maxShares = vPool.balanceOf(address(this));
        vPool.withdraw(_shares > _maxShares ? _maxShares : _shares);
    }
}

File 19 of 20 : CompoundXy.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "vesper-pools/contracts/interfaces/token/IToken.sol";
import "./CompoundXyCore.sol";
import "../../interfaces/compound/ICompound.sol";

/// @title This strategy will deposit collateral token in Compound and based on position it will borrow
/// another token. Supply X borrow Y and keep borrowed amount here. It does handle rewards and handle
/// wrap/unwrap of WETH as ETH is required to interact with Compound.
contract CompoundXy is CompoundXyCore {
    using SafeERC20 for IERC20;

    address public immutable rewardToken;
    address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
    address private constant CETH = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5;

    constructor(
        address _pool,
        address _swapper,
        address _comptroller,
        address _rewardToken,
        address _receiptToken,
        address _borrowCToken,
        string memory _name
    ) CompoundXyCore(_pool, _swapper, _comptroller, _receiptToken, _borrowCToken, _name) {
        require(_rewardToken != address(0), "rewardToken-address-is-zero");
        rewardToken = _rewardToken;
    }

    //solhint-disable-next-line no-empty-blocks
    receive() external payable {}

    function _approveToken(uint256 _amount) internal virtual override {
        super._approveToken(_amount);
        IERC20(rewardToken).safeApprove(address(swapper), _amount);
    }

    /// @dev If borrowToken WETH then wrap borrowed ETH to get WETH
    function _borrowY(uint256 _amount) internal override {
        if (_amount > 0) {
            require(borrowCToken.borrow(_amount) == 0, "borrow-from-compound-failed");
            if (borrowToken == WETH) {
                TokenLike(WETH).deposit{value: address(this).balance}();
            }
            _afterBorrowY(_amount);
        }
    }

    /// @notice Claim rewardToken and convert rewardToken into collateral token.
    function _claimRewardsAndConvertTo(address _toToken) internal virtual override {
        address[] memory _markets = new address[](2);
        _markets[0] = address(supplyCToken);
        _markets[1] = address(borrowCToken);
        comptroller.claimComp(address(this), _markets);
        uint256 _rewardAmount = IERC20(rewardToken).balanceOf(address(this));
        if (_rewardAmount > 0) {
            _safeSwapExactInput(rewardToken, _toToken, _rewardAmount);
        }
    }

    /// @dev Native Compound cETH doesn't has underlying method
    function _getUnderlyingToken(address _cToken) internal view virtual override returns (address) {
        if (_cToken == CETH) {
            return WETH;
        }
        return CToken(_cToken).underlying();
    }

    /// @dev If borrowToken is WETH then unwrap WETH to get ETH and repay borrow using ETH.
    function _repayY(uint256 _amount) internal override {
        _beforeRepayY(_amount);
        if (borrowToken == WETH) {
            TokenLike(WETH).withdraw(_amount);
            borrowCToken.repayBorrow{value: _amount}();
        } else {
            require(borrowCToken.repayBorrow(_amount) == 0, "repay-to-compound-failed");
        }
    }
}

File 20 of 20 : CompoundXyCore.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "vesper-pools/contracts/dependencies/openzeppelin/contracts/utils/math/Math.sol";
import "../Strategy.sol";
import "../../interfaces/compound/ICompound.sol";

// solhint-disable no-empty-blocks

/// @title This strategy will deposit collateral token in Compound and based on position it will
/// borrow another token. Supply X borrow Y and keep borrowed amount here.
/// It does not handle rewards and ETH as collateral
abstract contract CompoundXyCore is Strategy {
    using SafeERC20 for IERC20;
    // solhint-disable-next-line var-name-mixedcase
    string public NAME;
    string public constant VERSION = "5.0.0";

    uint256 internal constant MAX_BPS = 10_000; //100%
    uint32 internal constant TWAP_PERIOD = 3_600;
    uint256 public minBorrowLimit = 7_000; // 70% of actual collateral factor of protocol
    uint256 public maxBorrowLimit = 8_500; // 85% of actual collateral factor of protocol
    address public borrowToken;

    Comptroller public comptroller;

    CToken public immutable supplyCToken;
    CToken public immutable borrowCToken;

    event UpdatedBorrowLimit(
        uint256 previousMinBorrowLimit,
        uint256 newMinBorrowLimit,
        uint256 previousMaxBorrowLimit,
        uint256 newMaxBorrowLimit
    );

    constructor(
        address _pool,
        address _swapper,
        address _comptroller,
        address _receiptToken,
        address _borrowCToken,
        string memory _name
    ) Strategy(_pool, _swapper, _receiptToken) {
        require(_receiptToken != address(0), "cToken-address-is-zero");
        require(_comptroller != address(0), "comptroller-address-is-zero");

        NAME = _name;

        comptroller = Comptroller(_comptroller);
        supplyCToken = CToken(_receiptToken);
        borrowCToken = CToken(_borrowCToken);
        borrowToken = _getUnderlyingToken(_borrowCToken);

        address[] memory _cTokens = new address[](2);
        _cTokens[0] = _receiptToken;
        _cTokens[1] = _borrowCToken;
        comptroller.enterMarkets(_cTokens);
    }

    function isReservedToken(address _token) public view virtual override returns (bool) {
        return _token == address(supplyCToken) || _token == address(collateralToken) || _token == borrowToken;
    }

    /// @notice Returns total collateral locked in the strategy
    function tvl() external view override returns (uint256) {
        uint256 _collateralInCompound =
            (supplyCToken.balanceOf(address(this)) * supplyCToken.exchangeRateStored()) / 1e18;
        return _collateralInCompound + collateralToken.balanceOf(address(this));
    }

    /// @dev Hook that executes after collateral borrow.
    function _afterBorrowY(uint256 _amount) internal virtual {}

    /// @notice Approve all required tokens
    function _approveToken(uint256 _amount) internal virtual override {
        super._approveToken(_amount);
        collateralToken.safeApprove(address(supplyCToken), _amount);
        collateralToken.safeApprove(address(swapper), _amount);
        IERC20(borrowToken).safeApprove(address(borrowCToken), _amount);
        IERC20(borrowToken).safeApprove(address(swapper), _amount);
    }

    /**
     * @notice Claim rewardToken and transfer to new strategy
     * @param _newStrategy Address of new strategy.
     */
    function _beforeMigration(address _newStrategy) internal override {
        require(IStrategy(_newStrategy).token() == address(supplyCToken), "wrong-receipt-token");
        _repay(borrowCToken.borrowBalanceCurrent(address(this)), false);
    }

    /// @dev Hook that executes before repaying borrowed collateral
    function _beforeRepayY(uint256 _amount) internal virtual {}

    /// @dev Borrow Y from Compound. _afterBorrowY hook can be used to do anything with borrowed amount.
    /// @dev Override to handle ETH
    function _borrowY(uint256 _amount) internal virtual {
        if (_amount > 0) {
            require(borrowCToken.borrow(_amount) == 0, "borrow-failed");
            _afterBorrowY(_amount);
        }
    }

    /**
     * @notice Calculate borrow and repay amount based on current collateral and new deposit/withdraw amount.
     * @param _depositAmount deposit amount
     * @param _withdrawAmount withdraw amount
     * @return _borrowAmount borrow more amount
     * @return _repayAmount repay amount to keep ltv within limit
     */
    function _calculateBorrowPosition(uint256 _depositAmount, uint256 _withdrawAmount)
        internal
        returns (uint256 _borrowAmount, uint256 _repayAmount)
    {
        require(_depositAmount == 0 || _withdrawAmount == 0, "all-input-gt-zero");
        uint256 _borrowed = borrowCToken.borrowBalanceCurrent(address(this));
        // If maximum borrow limit set to 0 then repay borrow
        if (maxBorrowLimit == 0) {
            return (0, _borrowed);
        }

        uint256 _collateral = supplyCToken.balanceOfUnderlying(address(this));
        uint256 _collateralFactor = _getCollateralFactor(address(supplyCToken));
        // In case of withdraw, _amount can be greater than _supply
        uint256 _hypotheticalCollateral;
        if (_depositAmount > 0) {
            _hypotheticalCollateral = _collateral + _depositAmount;
        } else if (_collateral > _withdrawAmount) {
            _hypotheticalCollateral = _collateral - _withdrawAmount;
        }

        // Calculate max borrow based on collateral factor
        uint256 _maxCollateralForBorrow = (_hypotheticalCollateral * _collateralFactor) / 1e18;
        Oracle _oracle = Oracle(comptroller.oracle());

        // Compound "UnderlyingPrice" decimal = (30 + 6 - tokenDecimal)
        // Rari "UnderlyingPrice" decimal = (30 + 6 - tokenDecimal)
        // Iron "UnderlyingPrice" decimal = (18 + 8 - tokenDecimal)
        uint256 _collateralTokenPrice = _oracle.getUnderlyingPrice(address(supplyCToken));
        uint256 _borrowTokenPrice = _oracle.getUnderlyingPrice(address(borrowCToken));
        // Max borrow limit in borrow token
        uint256 _maxBorrowPossible = (_maxCollateralForBorrow * _collateralTokenPrice) / _borrowTokenPrice;
        // If maxBorrow is zero, we should repay total amount of borrow
        if (_maxBorrowPossible == 0) {
            return (0, _borrowed);
        }

        // Safe buffer to avoid liquidation due to price variations.
        uint256 _borrowUpperBound = (_maxBorrowPossible * maxBorrowLimit) / MAX_BPS;

        // Borrow up to _borrowLowerBound and keep buffer of _borrowUpperBound - _borrowLowerBound for price variation
        uint256 _borrowLowerBound = (_maxBorrowPossible * minBorrowLimit) / MAX_BPS;

        // If current borrow is greater than max borrow, then repay to achieve safe position else borrow more.
        if (_borrowed > _borrowUpperBound) {
            // If borrow > upperBound then it is greater than lowerBound too.
            _repayAmount = _borrowed - _borrowLowerBound;
        } else if (_borrowLowerBound > _borrowed) {
            _borrowAmount = _borrowLowerBound - _borrowed;
        }
    }

    function _claimRewardsAndConvertTo(address _toToken) internal virtual;

    /// @dev Deposit collateral in Compound and adjust borrow position
    function _deposit() internal {
        uint256 _collateralBalance = collateralToken.balanceOf(address(this));
        if (_collateralBalance > 0) {
            (uint256 _borrowAmount, uint256 _repayAmount) = _calculateBorrowPosition(_collateralBalance, 0);
            if (_repayAmount > 0) {
                // Repay to maintain safe position
                _repay(_repayAmount, false);
                _mintX(collateralToken.balanceOf(address(this)));
            } else {
                // Happy path, mint more borrow more
                _mintX(_collateralBalance);
                _borrowY(_borrowAmount);
            }
        }
    }

    /// @dev Get the borrow balance strategy is holding. Override to handle vToken balance.
    function _getBorrowBalance() internal view virtual returns (uint256) {
        return IERC20(borrowToken).balanceOf(address(this));
    }

    /// @dev TraderJoe Compound fork has different markets API so allow this method to override.
    function _getCollateralFactor(address _cToken) internal view virtual returns (uint256 _collateralFactor) {
        (, _collateralFactor, ) = comptroller.markets(_cToken);
    }

    /// @dev Get underlying token. Compound handle ETH differently hence allow this method to override
    function _getUnderlyingToken(address _cToken) internal view virtual returns (address) {
        return CToken(_cToken).underlying();
    }

    /// @dev Deposit collateral aka X in Compound. Override to handle ETH
    function _mintX(uint256 _amount) internal virtual {
        if (_amount > 0) {
            require(supplyCToken.mint(_amount) == 0, "supply-failed");
        }
    }

    function _rebalance()
        internal
        override
        returns (
            uint256 _profit,
            uint256 _loss,
            uint256 _payback
        )
    {
        uint256 _excessDebt = IVesperPool(pool).excessDebt(address(this));
        uint256 _totalDebt = IVesperPool(pool).totalDebtOf(address(this));
        // Claim any reward we have.
        _claimRewardsAndConvertTo(address(collateralToken));
        uint256 _borrow = borrowCToken.borrowBalanceCurrent(address(this));
        uint256 _borrowBalanceHere = _getBorrowBalance();
        // _borrow increases every block. Convert collateral to borrowToken.
        if (_borrow > _borrowBalanceHere) {
            _swapToBorrowToken(_borrow - _borrowBalanceHere);
        } else {
            // When _borrowBalanceHere exceeds _borrow balance from Compound
            // Customize this hook to handle the excess borrowToken profit
            _rebalanceBorrow(_borrowBalanceHere - _borrow);
        }

        uint256 _collateralHere = collateralToken.balanceOf(address(this));
        uint256 _collateralInCompound = supplyCToken.balanceOfUnderlying(address(this));
        uint256 _totalCollateral = _collateralInCompound + _collateralHere;

        if (_totalCollateral > _totalDebt) {
            _profit = _totalCollateral - _totalDebt;
        } else {
            _loss = _totalDebt - _totalCollateral;
        }
        uint256 _profitAndExcessDebt = _profit + _excessDebt;
        if (_collateralHere < _profitAndExcessDebt) {
            uint256 _totalAmountToWithdraw = Math.min((_profitAndExcessDebt - _collateralHere), _collateralInCompound);
            if (_totalAmountToWithdraw > 0) {
                _withdrawHere(_totalAmountToWithdraw);
                _collateralHere = collateralToken.balanceOf(address(this));
            }
        }

        // Set actual payback first and then profit. Make sure _collateralHere >= _payback + profit.
        _payback = Math.min(_collateralHere, _excessDebt);
        _profit = _collateralHere > _payback ? Math.min((_collateralHere - _payback), _profit) : 0;

        IVesperPool(pool).reportEarning(_profit, _loss, _payback);
        _deposit();
    }

    /// @dev Hook to handle profit scenario i.e. actual borrowed balance > Compound borrow account.
    function _rebalanceBorrow(uint256 _excessBorrow) internal virtual {}

    /// @dev Withdraw collateral aka X from Compound. Override to handle ETH
    function _redeemX(uint256 _amount) internal virtual {
        require(supplyCToken.redeemUnderlying(_amount) == 0, "withdraw-failed");
    }

    /**
     * @dev Repay borrow amount
     * @dev Claim rewardToken and convert to collateral. Swap collateral to borrowToken as needed.
     * @param _repayAmount BorrowToken amount that we should repay to maintain safe position.
     * @param _shouldClaimComp Flag indicating should we claim rewardToken and convert to collateral or not.
     */
    function _repay(uint256 _repayAmount, bool _shouldClaimComp) internal {
        if (_repayAmount > 0) {
            uint256 _borrowBalanceHere = _getBorrowBalance();
            // Liability is more than what we have.
            // To repay loan - convert all rewards to collateral, if asked, and redeem collateral(if needed).
            // This scenario is rare and if system works okay it will/might happen during final repay only.
            if (_repayAmount > _borrowBalanceHere) {
                if (_shouldClaimComp) {
                    // Claim rewardToken and convert those to collateral.
                    _claimRewardsAndConvertTo(address(collateralToken));
                }

                uint256 _currentBorrow = borrowCToken.borrowBalanceCurrent(address(this));
                // For example this is final repay and 100 blocks has passed since last withdraw/rebalance,
                // _currentBorrow is increasing due to interest. Now if _repayAmount > _borrowBalanceHere is true
                // _currentBorrow > _borrowBalanceHere is also true.
                // To maintain safe position we always try to keep _currentBorrow = _borrowBalanceHere

                // Swap collateral to borrowToken to repay borrow and also maintain safe position
                // Here borrowToken amount needed is (_currentBorrow - _borrowBalanceHere)
                _swapToBorrowToken(_currentBorrow - _borrowBalanceHere);
            }
            _repayY(_repayAmount);
        }
    }

    /// @dev Repay Y to Compound. _beforeRepayY hook can be used for pre-repay actions.
    /// @dev Override this to handle ETH
    function _repayY(uint256 _amount) internal virtual {
        _beforeRepayY(_amount);
        require(borrowCToken.repayBorrow(_amount) == 0, "repay-failed");
    }

    /**
     * @dev Swap given token to borrowToken
     * @param _shortOnBorrow Expected output of this swap
     */
    function _swapToBorrowToken(uint256 _shortOnBorrow) internal {
        // Looking for _amountIn using fixed output amount
        uint256 _amountIn = swapper.getAmountIn(address(collateralToken), borrowToken, _shortOnBorrow);
        if (_amountIn > 0) {
            uint256 _collateralHere = collateralToken.balanceOf(address(this));
            // If we do not have enough _from token to get expected output, either get
            // some _from token or adjust expected output.
            if (_amountIn > _collateralHere) {
                // Redeem some collateral, so that we have enough collateral to get expected output
                _redeemX(_amountIn - _collateralHere);
            }
            swapper.swapExactOutput(address(collateralToken), borrowToken, _shortOnBorrow, _amountIn, address(this));
        }
    }

    /// @dev Withdraw collateral here. Do not transfer to pool
    function _withdrawHere(uint256 _amount) internal override {
        (, uint256 _repayAmount) = _calculateBorrowPosition(0, _amount);
        _repay(_repayAmount, true);
        uint256 _supply = supplyCToken.balanceOfUnderlying(address(this));
        _redeemX(_supply > _amount ? _amount : _supply);
    }

    /************************************************************************************************
     *                          Governor/admin/keeper function                                      *
     ***********************************************************************************************/
    /**
     * @notice Recover extra borrow tokens from strategy
     * @dev If we get liquidation in Compound, we will have borrowToken sitting in strategy.
     * This function allows to recover idle borrow token amount.
     * @param _amountToRecover Amount of borrow token we want to recover in 1 call.
     *      Set it 0 to recover all available borrow tokens
     */
    function recoverBorrowToken(uint256 _amountToRecover) external onlyKeeper {
        uint256 _borrowBalanceHere = IERC20(borrowToken).balanceOf(address(this));
        uint256 _borrowInCompound = borrowCToken.borrowBalanceStored(address(this));

        if (_borrowBalanceHere > _borrowInCompound) {
            uint256 _extraBorrowBalance = _borrowBalanceHere - _borrowInCompound;
            uint256 _recoveryAmount =
                (_amountToRecover > 0 && _extraBorrowBalance > _amountToRecover)
                    ? _amountToRecover
                    : _extraBorrowBalance;
            // Do swap and transfer
            uint256 _collateralBefore = collateralToken.balanceOf(address(this));
            _safeSwapExactInput(borrowToken, address(collateralToken), _recoveryAmount);
            collateralToken.transfer(pool, collateralToken.balanceOf(address(this)) - _collateralBefore);
        }
    }

    /**
     * @notice Repay all borrow amount and set min borrow limit to 0.
     * @dev This action usually done when loss is detected in strategy.
     * @dev 0 borrow limit make sure that any future rebalance do not borrow again.
     */
    function repayAll() external onlyKeeper {
        _repay(borrowCToken.borrowBalanceCurrent(address(this)), true);
        minBorrowLimit = 0;
        maxBorrowLimit = 0;
    }

    /**
     * @notice Update upper and lower borrow limit. Usually maxBorrowLimit < 100% of actual collateral factor of protocol.
     * @dev It is possible to set 0 as _minBorrowLimit to not borrow anything
     * @param _minBorrowLimit It is % of actual collateral factor of protocol
     * @param _maxBorrowLimit It is % of actual collateral factor of protocol
     */
    function updateBorrowLimit(uint256 _minBorrowLimit, uint256 _maxBorrowLimit) external onlyGovernor {
        require(_maxBorrowLimit < MAX_BPS, "invalid-max-borrow-limit");
        // set _maxBorrowLimit and _minBorrowLimit to zero to disable borrow;
        require(
            (_maxBorrowLimit == 0 && _minBorrowLimit == 0) || _maxBorrowLimit > _minBorrowLimit,
            "max-should-be-higher-than-min"
        );
        emit UpdatedBorrowLimit(minBorrowLimit, _minBorrowLimit, maxBorrowLimit, _maxBorrowLimit);
        // To avoid liquidation due to price variations maxBorrowLimit is a collateral factor that is less than actual collateral factor of protocol
        minBorrowLimit = _minBorrowLimit;
        maxBorrowLimit = _maxBorrowLimit;
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_swapper","type":"address"},{"internalType":"address","name":"_comptroller","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_receiptToken","type":"address"},{"internalType":"address","name":"_borrowCToken","type":"address"},{"internalType":"address","name":"_vPool","type":"address"},{"internalType":"address","name":"_vspAddress","type":"address"},{"internalType":"string","name":"_name","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousMinBorrowLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinBorrowLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"previousMaxBorrowLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxBorrowLimit","type":"uint256"}],"name":"UpdatedBorrowLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousFeeCollector","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeCollector","type":"address"}],"name":"UpdatedFeeCollector","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IRoutedSwapper","name":"oldSwapper","type":"address"},{"indexed":true,"internalType":"contract IRoutedSwapper","name":"newSwapper","type":"address"}],"name":"UpdatedSwapper","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"addKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowCToken","outputs":[{"internalType":"contract CToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateral","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateralToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"comptroller","outputs":[{"internalType":"contract Comptroller","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvestVSP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isReservedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keepers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBorrowLimit","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":"minBorrowLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebalance","outputs":[{"internalType":"uint256","name":"_profit","type":"uint256"},{"internalType":"uint256","name":"_loss","type":"uint256"},{"internalType":"uint256","name":"_payback","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiptToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountToRecover","type":"uint256"}],"name":"recoverBorrowToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"removeKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"repayAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyCToken","outputs":[{"internalType":"contract CToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapper","outputs":[{"internalType":"contract IRoutedSwapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"}],"name":"sweepERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tvl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBorrowLimit","type":"uint256"},{"internalType":"uint256","name":"_maxBorrowLimit","type":"uint256"}],"name":"updateBorrowLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeCollector","type":"address"}],"name":"updateFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRoutedSwapper","name":"_swapper","type":"address"}],"name":"updateSwapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vPool","outputs":[{"internalType":"contract IVesperPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vsp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

610160604052611b586006556121346007553480156200001e57600080fd5b5060405162005a9938038062005a998339810160408190526200004191620008e5565b888888888888888888888888888888868686868585858585846001600160a01b038316620000b65760405162461bcd60e51b815260206004820152601460248201527f706f6f6c2d616464726573732d69732d7a65726f00000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166200010e5760405162461bcd60e51b815260206004820152601760248201527f737761707065722d616464726573732d69732d7a65726f0000000000000000006044820152606401620000ad565b600280546001600160a01b0319166001600160a01b0384811691909117909155831660a081905260408051637e062a3560e11b8152905163fc0c546a91600480820192602092909190829003018186803b1580156200016c57600080fd5b505afa15801562000181573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a79190620009d3565b6001600160a01b03908116608052600080546001600160a01b031916918316919091179055620001ee620001d83390565b60036200061e60201b62001f8c1790919060201c565b620002305760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401620000ad565b5050506001600160a01b0383166200028b5760405162461bcd60e51b815260206004820152601660248201527f63546f6b656e2d616464726573732d69732d7a65726f000000000000000000006044820152606401620000ad565b6001600160a01b038416620002e35760405162461bcd60e51b815260206004820152601b60248201527f636f6d7074726f6c6c65722d616464726573732d69732d7a65726f00000000006044820152606401620000ad565b8051620002f890600590602084019062000748565b50600980546001600160a01b0319166001600160a01b038681169190911790915583811660c052821660e0526200032f826200063e565b600880546001600160a01b0319166001600160a01b03929092169190911790556040805160028082526060820183526000926020830190803683370190505090508381600081518110620003875762000387620009fa565b60200260200101906001600160a01b031690816001600160a01b0316815250508281600181518110620003be57620003be620009fa565b6001600160a01b039283166020918202929092010152600954604051631853304760e31b815291169063c299823890620003fd90849060040162000a10565b600060405180830381600087803b1580156200041857600080fd5b505af11580156200042d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000457919081019062000a5f565b50505050506001600160a01b03871615159250620004bb9150505760405162461bcd60e51b815260206004820152601b60248201527f726577617264546f6b656e2d616464726573732d69732d7a65726f00000000006044820152606401620000ad565b5050506001600160a01b0390811661010052851615159250620005249150505760405162461bcd60e51b815260206004820152601360248201527f7673702d616464726573732d69732d7a65726f000000000000000000000000006044820152606401620000ad565b60085460408051637e062a3560e11b815290516001600160a01b039283169286169163fc0c546a916004808301926020929190829003018186803b1580156200056c57600080fd5b505afa15801562000581573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005a79190620009d3565b6001600160a01b031614620005f35760405162461bcd60e51b81526020600482015260116024820152701a5b9d985b1a590b59dc9bddcb5c1bdbdb607a1b6044820152606401620000ad565b506001600160a01b039182166101205216610140525062000b4c9d5050505050505050505050505050565b600062000635836001600160a01b038416620006f6565b90505b92915050565b60006001600160a01b038216734ddc2d193948926d02f9b1fe9e1daa0718270ed5141562000681575073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2919050565b816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015620006bb57600080fd5b505afa158015620006d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006389190620009d3565b60008181526001830160205260408120546200073f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000638565b50600062000638565b828054620007569062000b0f565b90600052602060002090601f0160209004810192826200077a5760008555620007c5565b82601f106200079557805160ff1916838001178555620007c5565b82800160010185558215620007c5579182015b82811115620007c5578251825591602001919060010190620007a8565b50620007d3929150620007d7565b5090565b5b80821115620007d35760008155600101620007d8565b6001600160a01b03811681146200080457600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000848576200084862000807565b604052919050565b600082601f8301126200086257600080fd5b81516001600160401b038111156200087e576200087e62000807565b602062000894601f8301601f191682016200081d565b8281528582848701011115620008a957600080fd5b60005b83811015620008c9578581018301518282018401528201620008ac565b83811115620008db5760008385840101525b5095945050505050565b60008060008060008060008060006101208a8c0312156200090557600080fd5b89516200091281620007ee565b60208b01519099506200092581620007ee565b60408b01519098506200093881620007ee565b60608b01519097506200094b81620007ee565b60808b01519096506200095e81620007ee565b60a08b01519095506200097181620007ee565b60c08b01519094506200098481620007ee565b60e08b01519093506200099781620007ee565b6101008b01519092506001600160401b03811115620009b557600080fd5b620009c38c828d0162000850565b9150509295985092959850929598565b600060208284031215620009e657600080fd5b8151620009f381620007ee565b9392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101562000a535783516001600160a01b03168352928401929184019160010162000a2c565b50909695505050505050565b6000602080838503121562000a7357600080fd5b82516001600160401b038082111562000a8b57600080fd5b818501915085601f83011262000aa057600080fd5b81518181111562000ab55762000ab562000807565b8060051b915062000ac88483016200081d565b818152918301840191848101908884111562000ae357600080fd5b938501935b8385101562000b035784518252938501939085019062000ae8565b98975050505050505050565b600181811c9082168062000b2457607f821691505b6020821081141562000b4657634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051614cb462000de56000396000818161028701528181610cd401528181610d6601526129e10152600081816103d401528181610b7d01528181610bbb01528181611fca01528181612066015281816129ab01528181614107015281816141f30152818161429101526147a10152600081816106370152818161369f015281816137320152613c800152600081816103a001528181610f6e01528181611d2d0152818161259c01528181612b9801528181612da2015281816130bf015281816133ba015281816135e401528181613e4f01528181613ebe01528181614405015261461801526000818161060301528181611aff01528181611ba50152818161221e015281816122d80152818161270701528181612a9801528181613178015281816132080152818161331a01528181613590015281816140400152818161439001526145a7015260008181610231015281816106df0152818161080a0152818161092601528181610a0401528181610a60015281816111470152818161128901528181611326015281816115520152818161171b01528181611dc90152818161241d015281816124bd0152818161290a01526148370152600081816104910152818161056201528181610869015281816109040152818161097801528181610a3701528181610d8701528181611042015281816110f10152818161111801528181611169015281816114b60152818161194d01528181611c58015281816123130152818161255e0152818161267c0152818161282c01528181612d64015281816137750152818161382f015281816138f601528181613a6301528181613aa201528181613b6e01528181614585015281816145dd01526148150152614cb46000f3fe6080604052600436106101c85760003560e01c8063a3f4df7e116100f8578063e260d74711610090578063e260d747146105a6578063e5328e06146105bc578063ec78e832146105d1578063efead58c146105f1578063f7c618c114610625578063fa3ae6dc14610659578063fb7ee1021461066e578063fc0c546a1461068e578063ffa1ad74146106ac57600080fd5b8063a3f4df7e1461045d578063b2016bd41461047f578063c415b95c146104b3578063c7ad2748146104d3578063ce5494bb146104f3578063d2c35ce814610513578063d3033c3914610533578063d8dfeb4514610553578063e00af4a71461058657600080fd5b8063440d72481161016b578063440d724814610309578063456dc17a146103395780634fc90c2c146103595780635fe3b5671461036e578063620a96d51461038e5780636719578c146103c25780637d7c2a1c146103f6578063951dc22c1461042657806399b71d5c1461044857600080fd5b80630181686c146101d457806314ae9f2e146101fd57806316f0115b1461021f578063243cd14e1461026057806329ba73ed146102755780632b3297f9146102a95780632e1a7d4d146102c95780634032b72b146102e957600080fd5b366101cf57005b600080fd5b3480156101e057600080fd5b506101ea60075481565b6040519081526020015b60405180910390f35b34801561020957600080fd5b5061021d6102183660046148aa565b6106dd565b005b34801561022b57600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b6040516101f491906148c7565b34801561026c57600080fd5b506101ea6107f8565b34801561028157600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b557600080fd5b50600254610253906001600160a01b031681565b3480156102d557600080fd5b5061021d6102e43660046148db565b610807565b3480156102f557600080fd5b5061021d6103043660046148aa565b610a5e565b34801561031557600080fd5b506103296103243660046148aa565b610b6a565b60405190151581526020016101f4565b34801561034557600080fd5b50600854610253906001600160a01b031681565b34801561036557600080fd5b5061021d610bb7565b34801561037a57600080fd5b50600954610253906001600160a01b031681565b34801561039a57600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b34801561040257600080fd5b5061040b610dac565b604080519384526020840192909252908201526060016101f4565b34801561043257600080fd5b5061043b610dec565b6040516101f49190614938565b34801561045457600080fd5b5061021d610df8565b34801561046957600080fd5b50610472610e34565b6040516101f49190614977565b34801561048b57600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bf57600080fd5b50600154610253906001600160a01b031681565b3480156104df57600080fd5b5061021d6104ee3660046148db565b610ec2565b3480156104ff57600080fd5b5061021d61050e3660046148aa565b611286565b34801561051f57600080fd5b5061021d61052e3660046148aa565b611550565b34801561053f57600080fd5b5061021d61054e3660046148aa565b611719565b34801561055f57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610253565b34801561059257600080fd5b5061021d6105a13660046148aa565b6118d6565b3480156105b257600080fd5b506101ea60065481565b3480156105c857600080fd5b506101ea611af1565b3480156105dd57600080fd5b50600054610253906001600160a01b031681565b3480156105fd57600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b34801561063157600080fd5b506102537f000000000000000000000000000000000000000000000000000000000000000081565b34801561066557600080fd5b5061021d611ced565b34801561067a57600080fd5b5061021d6106893660046149aa565b611dc7565b34801561069a57600080fd5b506000546001600160a01b0316610253565b3480156106b857600080fd5b50610472604051806040016040528060058152602001640352e302e360dc1b81525081565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561073657600080fd5b505afa15801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e91906149cc565b6001600160a01b0316336001600160a01b0316146107a75760405162461bcd60e51b815260040161079e906149e9565b60405180910390fd5b6107b2600382611fa8565b6107f55760405162461bcd60e51b81526020600482015260146024820152731c995b5bdd994b5ad9595c195c8b59985a5b195960621b604482015260640161079e565b50565b6000610802611fbd565b905090565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461084f5760405162461bcd60e51b815260040161079e90614a20565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061089e9030906004016148c7565b60206040518083038186803b1580156108b657600080fd5b505afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190614a53565b905081811061094f5761094b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000084612193565b5050565b61096161095c8284614a82565b6121e9565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906109ad9030906004016148c7565b60206040518083038186803b1580156109c557600080fd5b505afa1580156109d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fd9190614a53565b905061094b7f0000000000000000000000000000000000000000000000000000000000000000610a2d84846122be565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190612193565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610ab757600080fd5b505afa158015610acb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aef91906149cc565b6001600160a01b0316336001600160a01b031614610b1f5760405162461bcd60e51b815260040161079e906149e9565b610b2a600382611f8c565b6107f55760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b604482015260640161079e565b6000610b75826122d4565b80610bb157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316145b92915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638bc6beb26040518163ffffffff1660e01b815260040160206040518083038186803b158015610c1257600080fd5b505afa158015610c26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4a91906149cc565b90506001600160a01b03811615610cba5760405163d279c19160e01b81526001600160a01b0382169063d279c19190610c879030906004016148c7565b600060405180830381600087803b158015610ca157600080fd5b505af1158015610cb5573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610d099030906004016148c7565b60206040518083038186803b158015610d2157600080fd5b505afa158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d599190614a53565b9050801561094b5761094b7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083612362565b60008080610dbd335b6003906123f3565b610dd95760405162461bcd60e51b815260040161079e90614a99565b610de1612415565b925092509250909192565b60606108026003612983565b610e0133610db5565b610e1d5760405162461bcd60e51b815260040161079e90614a99565b610e276000612990565b610e32600019612990565b565b60058054610e4190614ac9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6d90614ac9565b8015610eba5780601f10610e8f57610100808354040283529160200191610eba565b820191906000526020600020905b815481529060010190602001808311610e9d57829003601f168201915b505050505081565b610ecb33610db5565b610ee75760405162461bcd60e51b815260040161079e90614a99565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610f189030906004016148c7565b60206040518083038186803b158015610f3057600080fd5b505afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190614a53565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166395dd9193306040518263ffffffff1660e01b8152600401610fb891906148c7565b60206040518083038186803b158015610fd057600080fd5b505afa158015610fe4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110089190614a53565b90508082111561128157600061101e8284614a82565b90506000808511801561103057508482115b61103a578161103c565b845b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161108c91906148c7565b60206040518083038186803b1580156110a457600080fd5b505afa1580156110b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110dc9190614a53565b600854909150611116906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000084612a0a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb7f0000000000000000000000000000000000000000000000000000000000000000837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016111b391906148c7565b60206040518083038186803b1580156111cb57600080fd5b505afa1580156111df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112039190614a53565b61120d9190614a82565b6040518363ffffffff1660e01b815260040161122a929190614b04565b602060405180830381600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127c9190614b32565b505050505b505050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146112ce5760405162461bcd60e51b815260040161079e90614a20565b6001600160a01b0381166113245760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f00000000604482015260640161079e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138757600080fd5b505afa15801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf91906149cc565b6001600160a01b03161461140e5760405162461bcd60e51b81526020600482015260166024820152756e6f742d76616c69642d6e65772d737472617465677960501b604482015260640161079e565b61141781612a96565b6000546040516370a0823160e01b81526114b09183916001600160a01b03909116906370a082319061144d9030906004016148c7565b60206040518083038186803b15801561146557600080fd5b505afa158015611479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149d9190614a53565b6000546001600160a01b03169190612193565b6107f5817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161150091906148c7565b60206040518083038186803b15801561151857600080fd5b505afa15801561152c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2d9190614a53565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156115a957600080fd5b505afa1580156115bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e191906149cc565b6001600160a01b0316336001600160a01b0316146116115760405162461bcd60e51b815260040161079e906149e9565b6001600160a01b0381166116675760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f000000604482015260640161079e565b6001546001600160a01b03828116911614156116bd5760405162461bcd60e51b81526020600482015260156024820152746665652d636f6c6c6563746f722d69732d73616d6560581b604482015260640161079e565b6001546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561177257600080fd5b505afa158015611786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117aa91906149cc565b6001600160a01b0316336001600160a01b0316146117da5760405162461bcd60e51b815260040161079e906149e9565b6001600160a01b03811661182a5760405162461bcd60e51b8152602060048201526017602482015276737761707065722d616464726573732d69732d7a65726f60481b604482015260640161079e565b6002546001600160a01b038281169116141561187a5760405162461bcd60e51b815260206004820152600f60248201526e737761707065722d69732d73616d6560881b604482015260640161079e565b6002546040516001600160a01b038084169216907f6c953b7ec311055c20b96a42cea31e89528e375b1bf953a503db40854b3188fe90600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6118df33610db5565b6118fb5760405162461bcd60e51b815260040161079e90614a99565b6001546001600160a01b031661194b5760405162461bcd60e51b81526020600482015260156024820152741999594b58dbdb1b1958dd1bdc8b5b9bdd0b5cd95d605a1b604482015260640161079e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614156119cd5760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c00604482015260640161079e565b6119d681610b6a565b15611a1a5760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b604482015260640161079e565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611a55576001546107f5906001600160a01b031647612c26565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190611a849030906004016148c7565b60206040518083038186803b158015611a9c57600080fd5b505afa158015611ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad49190614a53565b60015490915061094b906001600160a01b03848116911683612193565b600080670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5657600080fd5b505afa158015611b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8e9190614a53565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611bda9030906004016148c7565b60206040518083038186803b158015611bf257600080fd5b505afa158015611c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2a9190614a53565b611c349190614b4d565b611c3e9190614b6c565b6040516370a0823160e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611c8d9030906004016148c7565b60206040518083038186803b158015611ca557600080fd5b505afa158015611cb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cdd9190614a53565b611ce79082614b8e565b91505090565b611cf633610db5565b611d125760405162461bcd60e51b815260040161079e90614a99565b6040516305eff7ef60e21b8152611dbb906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906317bfdfbc90611d629030906004016148c7565b602060405180830381600087803b158015611d7c57600080fd5b505af1158015611d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db49190614a53565b6001612d3f565b60006006819055600755565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2057600080fd5b505afa158015611e34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5891906149cc565b6001600160a01b0316336001600160a01b031614611e885760405162461bcd60e51b815260040161079e906149e9565b6127108110611ed45760405162461bcd60e51b81526020600482015260186024820152771a5b9d985b1a590b5b585e0b589bdc9c9bddcb5b1a5b5a5d60421b604482015260640161079e565b80158015611ee0575081155b80611eea57508181115b611f365760405162461bcd60e51b815260206004820152601d60248201527f6d61782d73686f756c642d62652d6869676865722d7468616e2d6d696e000000604482015260640161079e565b6006546007546040805192835260208301859052820152606081018290527fedd77444afdf63401315e81ffe86d08f7865796e8ad2e11acf1d56a1393f07d59060800160405180910390a1600691909155600755565b6000611fa1836001600160a01b038416612e43565b9392505050565b6000611fa1836001600160a01b038416612e92565b6000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161201491906148c7565b60206040518083038186803b15801561202c57600080fd5b505afa158015612040573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120649190614a53565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f59190614a53565b6120ff9190614b4d565b6121099190614b6c565b6008546040516370a0823160e01b81526001600160a01b03909116906370a08231906121399030906004016148c7565b60206040518083038186803b15801561215157600080fd5b505afa158015612165573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121899190614a53565b6108029190614b8e565b6112818363a9059cbb60e01b84846040516024016121b2929190614b04565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f85565b60006121f6600083613057565b915050612204816001612d3f565b604051633af9e66960e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633af9e669906122539030906004016148c7565b602060405180830381600087803b15801561226d57600080fd5b505af1158015612281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a59190614a53565b90506112818382116122b757816134f9565b835b6134f9565b60008183106122cd5781611fa1565b5090919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316148061234757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316145b80610bb15750506008546001600160a01b0390811691161490565b600254604051636ccb2b0160e01b81526001600160a01b0390911690636ccb2b019061239b908690869086906001903090600401614ba6565b602060405180830381600087803b1580156123b557600080fd5b505af11580156123c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ed9190614a53565b50505050565b6001600160a01b03811660009081526001830160205260408120541515611fa1565b6000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d53ddc26306040518263ffffffff1660e01b815260040161246791906148c7565b60206040518083038186803b15801561247f57600080fd5b505afa158015612493573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b79190614a53565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f2b2833306040518263ffffffff1660e01b815260040161250791906148c7565b60206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125579190614a53565b90506125827f000000000000000000000000000000000000000000000000000000000000000061356d565b6040516305eff7ef60e21b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906317bfdfbc906125d19030906004016148c7565b602060405180830381600087803b1580156125eb57600080fd5b505af11580156125ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126239190614a53565b9050600061262f611fbd565b9050808211156126505761264b6126468284614a82565b613758565b612662565b61266261265d8383614a82565b613928565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906126b19030906004016148c7565b60206040518083038186803b1580156126c957600080fd5b505afa1580156126dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127019190614a53565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633af9e669306040518263ffffffff1660e01b815260040161275191906148c7565b602060405180830381600087803b15801561276b57600080fd5b505af115801561277f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a39190614a53565b905060006127b18383614b8e565b9050858111156127cc576127c58682614a82565b99506127d9565b6127d68187614a82565b98505b60006127e5888c614b8e565b9050808410156128b65760006128046127fe8684614a82565b856122be565b905080156128b457612815816121e9565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906128619030906004016148c7565b60206040518083038186803b15801561287957600080fd5b505afa15801561288d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b19190614a53565b94505b505b6128c084896122be565b98508884116128d05760006128e3565b6128e36128dd8a86614a82565b8c6122be565b6040516302df682360e11b815260048101829052602481018c9052604481018b9052909b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906305bed04690606401600060405180830381600087803b15801561295657600080fd5b505af115801561296a573d6000803e3d6000fd5b50505050612976613a88565b5050505050505050909192565b60606000611fa183613c0a565b61299981613c66565b6008546129d0906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083613ca5565b6002546107f5906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683613ca5565b600254604051636ccb2b0160e01b81526001600160a01b0390911690636ccb2b0190612a43908690869086906001903090600401614ba6565b602060405180830381600087803b158015612a5d57600080fd5b505af1925050508015612a8d575060408051601f3d908101601f19168201909252612a8a91810190614a53565b60015b6123ed57505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612af957600080fd5b505afa158015612b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3191906149cc565b6001600160a01b031614612b7d5760405162461bcd60e51b81526020600482015260136024820152723bb937b73396b932b1b2b4b83a16ba37b5b2b760691b604482015260640161079e565b6040516305eff7ef60e21b81526107f5906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906317bfdfbc90612bcd9030906004016148c7565b602060405180830381600087803b158015612be757600080fd5b505af1158015612bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1f9190614a53565b6000612d3f565b80471015612c765760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161079e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612cc3576040519150601f19603f3d011682016040523d82523d6000602084013e612cc8565b606091505b50509050806112815760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161079e565b811561094b576000612d4f611fbd565b905080831115612e3a578115612d8857612d887f000000000000000000000000000000000000000000000000000000000000000061356d565b6040516305eff7ef60e21b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906317bfdfbc90612dd79030906004016148c7565b602060405180830381600087803b158015612df157600080fd5b505af1158015612e05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e299190614a53565b9050612e386126468383614a82565b505b61128183613db8565b6000818152600183016020526040812054612e8a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bb1565b506000610bb1565b60008181526001830160205260408120548015612f7b576000612eb6600183614a82565b8554909150600090612eca90600190614a82565b9050818114612f2f576000866000018281548110612eea57612eea614bd6565b9060005260206000200154905080876000018481548110612f0d57612f0d614bd6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612f4057612f40614bec565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bb1565b6000915050610bb1565b6000612fda826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613f8a9092919063ffffffff16565b8051909150156112815780806020019051810190612ff89190614b32565b6112815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161079e565b600080831580613065575082155b6130a55760405162461bcd60e51b8152602060048201526011602482015270616c6c2d696e7075742d67742d7a65726f60781b604482015260640161079e565b6040516305eff7ef60e21b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906317bfdfbc906130f49030906004016148c7565b602060405180830381600087803b15801561310e57600080fd5b505af1158015613122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131469190614a53565b90506007546000141561315e576000925090506134f2565b604051633af9e66960e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633af9e669906131ad9030906004016148c7565b602060405180830381600087803b1580156131c757600080fd5b505af11580156131db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ff9190614a53565b9050600061322c7f0000000000000000000000000000000000000000000000000000000000000000613fa1565b905060008715613247576132408884614b8e565b905061325c565b8683111561325c576132598784614a82565b90505b6000670de0b6b3a76400006132718484614b4d565b61327b9190614b6c565b90506000600960009054906101000a90046001600160a01b03166001600160a01b0316637dc0d1d06040518163ffffffff1660e01b815260040160206040518083038186803b1580156132cd57600080fd5b505afa1580156132e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330591906149cc565b90506000816001600160a01b031663fc57d4df7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161335591906148c7565b60206040518083038186803b15801561336d57600080fd5b505afa158015613381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133a59190614a53565b90506000826001600160a01b031663fc57d4df7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016133f591906148c7565b60206040518083038186803b15801561340d57600080fd5b505afa158015613421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134459190614a53565b90506000816134548487614b4d565b61345e9190614b6c565b90508061347a576000899a509a505050505050505050506134f2565b60006127106007548361348d9190614b4d565b6134979190614b6c565b90506000612710600654846134ac9190614b4d565b6134b69190614b6c565b9050818b11156134d1576134ca818c614a82565b9b506134e6565b8a8111156134e6576134e38b82614a82565b9c505b50505050505050505050505b9250929050565b6135028161402a565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561355157600080fd5b505af1158015613565573d6000803e3d6000fd5b505050505050565b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106135c2576135c2614bd6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000008160018151811061361657613616614bd6565b6001600160a01b03928316602091820292909201015260095460405162e1ed9760e51b8152911690631c3db2e0906136549030908590600401614c02565b600060405180830381600087803b15801561366e57600080fd5b505af1158015613682573d6000803e3d6000fd5b50506040516370a0823160e01b8152600092506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691506370a08231906136d59030906004016148c7565b60206040518083038186803b1580156136ed57600080fd5b505afa158015613701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137259190614a53565b90508015611281576112817f00000000000000000000000000000000000000000000000000000000000000008483612a0a565b6002546008546040516353b609b560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015291821660248201526044810184905260009291909116906353b609b590606401602060405180830381600087803b1580156137d557600080fd5b505af11580156137e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061380d9190614a53565b9050801561094b576040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906138649030906004016148c7565b60206040518083038186803b15801561387c57600080fd5b505afa158015613890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138b49190614a53565b9050808211156138cb576138cb6122b98284614a82565b6002546008546040516381cc619b60e01b81526001600160a01b03928316926381cc619b9261239b927f00000000000000000000000000000000000000000000000000000000000000009290911690889088903090600401614ba6565b80156107f5576008546040516370a0823160e01b81526000916001600160a01b0316906370a082319061395f9030906004016148c7565b60206040518083038186803b15801561397757600080fd5b505afa15801561398b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139af9190614a53565b90506139ba82614103565b6008546040516370a0823160e01b815260009183916001600160a01b03909116906370a08231906139ef9030906004016148c7565b60206040518083038186803b158015613a0757600080fd5b505afa158015613a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a3f9190614a53565b613a499190614a82565b9050801561128157600854611281906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083612a0a565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190613ad79030906004016148c7565b60206040518083038186803b158015613aef57600080fd5b505afa158015613b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b279190614a53565b905080156107f557600080613b3d836000613057565b90925090508015613bf857613b53816000612d3f565b6040516370a0823160e01b8152611281906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190613ba39030906004016148c7565b60206040518083038186803b158015613bbb57600080fd5b505afa158015613bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bf39190614a53565b614323565b613c0183614323565b611281826143e9565b606081600001805480602002602001604051908101604052809291908181526020018280548015613c5a57602002820191906000526020600020905b815481526020019060010190808311613c46575b50505050509050919050565b613c6f8161456f565b6002546107f5906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116835b801580613d2e5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015613cf457600080fd5b505afa158015613d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d2c9190614a53565b155b613d995760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161079e565b6112818363095ea7b360e01b84846040516024016121b2929190614b04565b613dc18161465a565b6008546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415613ea857604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b158015613e3557600080fd5b505af1158015613e49573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634e4d9fea826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561355157600080fd5b60405163073a938160e11b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630e75270290602401602060405180830381600087803b158015613f0a57600080fd5b505af1158015613f1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f429190614a53565b156107f55760405162461bcd60e51b81526020600482015260186024820152771c995c185e4b5d1bcb58dbdb5c1bdd5b990b59985a5b195960421b604482015260640161079e565b6060613f998484600085614663565b949350505050565b600954604051638e8f294b60e01b81526000916001600160a01b031690638e8f294b90613fd29085906004016148c7565b60606040518083038186803b158015613fea57600080fd5b505afa158015613ffe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140229190614c26565b509392505050565b60405163852a12e360e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063852a12e390602401602060405180830381600087803b15801561408c57600080fd5b505af11580156140a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140c49190614a53565b156107f55760405162461bcd60e51b815260206004820152600f60248201526e1dda5d1a191c985dcb59985a5b1959608a1b604482015260640161079e565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b15801561415e57600080fd5b505afa158015614172573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141969190614a53565b90506000816141ad84670de0b6b3a7640000614b4d565b6141b79190614b6c565b9050670de0b6b3a76400006141cc8383614b4d565b6141d69190614b6c565b83116141e257806141ed565b6141ed816001614b8e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161423d91906148c7565b60206040518083038186803b15801561425557600080fd5b505afa158015614269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061428d9190614a53565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d8284116142cb57836142cd565b825b6040518263ffffffff1660e01b81526004016142eb91815260200190565b600060405180830381600087803b15801561430557600080fd5b505af1158015614319573d6000803e3d6000fd5b5050505050505050565b80156107f557604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561437657600080fd5b505af115801561438a573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631249c58b826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561355157600080fd5b80156107f55760405163317afabb60e21b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c5ebeaec90602401602060405180830381600087803b15801561445157600080fd5b505af1158015614465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144899190614a53565b156144d65760405162461bcd60e51b815260206004820152601b60248201527f626f72726f772d66726f6d2d636f6d706f756e642d6661696c65640000000000604482015260640161079e565b6008546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156145665773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561454c57600080fd5b505af1158015614560573d6000803e3d6000fd5b50505050505b6107f58161478b565b61457881614808565b6145cc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083613ca5565b600254614606906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683613ca5565b60085461463d906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083613ca5565b6002546008546107f5916001600160a01b03918216911683613ca5565b6107f581614103565b6060824710156146c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161079e565b843b6147125760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161079e565b600080866001600160a01b0316858760405161472e9190614c62565b60006040518083038185875af1925050503d806000811461476b576040519150601f19603f3d011682016040523d82523d6000602084013e614770565b606091505b509150915061478082828661485c565b979650505050505050565b60405163b6b55f2560e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f2590602401600060405180830381600087803b1580156147ed57600080fd5b505af1158015614801573d6000803e3d6000fd5b5050505050565b6107f56001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083613ca5565b6060831561486b575081611fa1565b82511561487b5782518084602001fd5b8160405162461bcd60e51b815260040161079e9190614977565b6001600160a01b03811681146107f557600080fd5b6000602082840312156148bc57600080fd5b8135611fa181614895565b6001600160a01b0391909116815260200190565b6000602082840312156148ed57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561492d5781516001600160a01b031687529582019590820190600101614908565b509495945050505050565b602081526000611fa160208301846148f4565b60005b8381101561496657818101518382015260200161494e565b838111156123ed5750506000910152565b602081526000825180602084015261499681604085016020870161494b565b601f01601f19169190910160400192915050565b600080604083850312156149bd57600080fd5b50508035926020909101359150565b6000602082840312156149de57600080fd5b8151611fa181614895565b6020808252601a908201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f72000000000000604082015260600190565b60208082526019908201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b604082015260600190565b600060208284031215614a6557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614a9457614a94614a6c565b500390565b60208082526016908201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b604082015260600190565b600181811c90821680614add57607f821691505b60208210811415614afe57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03929092168252602082015260400190565b80518015158114614b2d57600080fd5b919050565b600060208284031215614b4457600080fd5b611fa182614b1d565b6000816000190483118215151615614b6757614b67614a6c565b500290565b600082614b8957634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115614ba157614ba1614a6c565b500190565b6001600160a01b039586168152938516602085015260408401929092526060830152909116608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0383168152604060208201819052600090613f99908301846148f4565b600080600060608486031215614c3b57600080fd5b614c4484614b1d565b925060208401519150614c5960408501614b1d565b90509250925092565b60008251614c7481846020870161494b565b919091019291505056fea264697066735822122018c767382417fe3fa1a5f31a4854d5234901d9213d5e981b2911687eeb7feab464736f6c63430008090033000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f20000000000000000000000008f156189a3cd28dfc8fb7bbbace58f98f09c0bb30000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed50000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36430000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e9984210000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001a436f6d706f756e645f5665737065725f58795f4554485f444149000000000000

Deployed Bytecode

0x6080604052600436106101c85760003560e01c8063a3f4df7e116100f8578063e260d74711610090578063e260d747146105a6578063e5328e06146105bc578063ec78e832146105d1578063efead58c146105f1578063f7c618c114610625578063fa3ae6dc14610659578063fb7ee1021461066e578063fc0c546a1461068e578063ffa1ad74146106ac57600080fd5b8063a3f4df7e1461045d578063b2016bd41461047f578063c415b95c146104b3578063c7ad2748146104d3578063ce5494bb146104f3578063d2c35ce814610513578063d3033c3914610533578063d8dfeb4514610553578063e00af4a71461058657600080fd5b8063440d72481161016b578063440d724814610309578063456dc17a146103395780634fc90c2c146103595780635fe3b5671461036e578063620a96d51461038e5780636719578c146103c25780637d7c2a1c146103f6578063951dc22c1461042657806399b71d5c1461044857600080fd5b80630181686c146101d457806314ae9f2e146101fd57806316f0115b1461021f578063243cd14e1461026057806329ba73ed146102755780632b3297f9146102a95780632e1a7d4d146102c95780634032b72b146102e957600080fd5b366101cf57005b600080fd5b3480156101e057600080fd5b506101ea60075481565b6040519081526020015b60405180910390f35b34801561020957600080fd5b5061021d6102183660046148aa565b6106dd565b005b34801561022b57600080fd5b506102537f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f281565b6040516101f491906148c7565b34801561026c57600080fd5b506101ea6107f8565b34801561028157600080fd5b506102537f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e99842181565b3480156102b557600080fd5b50600254610253906001600160a01b031681565b3480156102d557600080fd5b5061021d6102e43660046148db565b610807565b3480156102f557600080fd5b5061021d6103043660046148aa565b610a5e565b34801561031557600080fd5b506103296103243660046148aa565b610b6a565b60405190151581526020016101f4565b34801561034557600080fd5b50600854610253906001600160a01b031681565b34801561036557600080fd5b5061021d610bb7565b34801561037a57600080fd5b50600954610253906001600160a01b031681565b34801561039a57600080fd5b506102537f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364381565b3480156103ce57600080fd5b506102537f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee81565b34801561040257600080fd5b5061040b610dac565b604080519384526020840192909252908201526060016101f4565b34801561043257600080fd5b5061043b610dec565b6040516101f49190614938565b34801561045457600080fd5b5061021d610df8565b34801561046957600080fd5b50610472610e34565b6040516101f49190614977565b34801561048b57600080fd5b506102537f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156104bf57600080fd5b50600154610253906001600160a01b031681565b3480156104df57600080fd5b5061021d6104ee3660046148db565b610ec2565b3480156104ff57600080fd5b5061021d61050e3660046148aa565b611286565b34801561051f57600080fd5b5061021d61052e3660046148aa565b611550565b34801561053f57600080fd5b5061021d61054e3660046148aa565b611719565b34801561055f57600080fd5b507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2610253565b34801561059257600080fd5b5061021d6105a13660046148aa565b6118d6565b3480156105b257600080fd5b506101ea60065481565b3480156105c857600080fd5b506101ea611af1565b3480156105dd57600080fd5b50600054610253906001600160a01b031681565b3480156105fd57600080fd5b506102537f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed581565b34801561063157600080fd5b506102537f000000000000000000000000c00e94cb662c3520282e6f5717214004a7f2688881565b34801561066557600080fd5b5061021d611ced565b34801561067a57600080fd5b5061021d6106893660046149aa565b611dc7565b34801561069a57600080fd5b506000546001600160a01b0316610253565b3480156106b857600080fd5b50610472604051806040016040528060058152602001640352e302e360dc1b81525081565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561073657600080fd5b505afa15801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e91906149cc565b6001600160a01b0316336001600160a01b0316146107a75760405162461bcd60e51b815260040161079e906149e9565b60405180910390fd5b6107b2600382611fa8565b6107f55760405162461bcd60e51b81526020600482015260146024820152731c995b5bdd994b5ad9595c195c8b59985a5b195960621b604482015260640161079e565b50565b6000610802611fbd565b905090565b337f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b03161461084f5760405162461bcd60e51b815260040161079e90614a20565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a082319061089e9030906004016148c7565b60206040518083038186803b1580156108b657600080fd5b505afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190614a53565b905081811061094f5761094b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2167f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f284612193565b5050565b61096161095c8284614a82565b6121e9565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a08231906109ad9030906004016148c7565b60206040518083038186803b1580156109c557600080fd5b505afa1580156109d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fd9190614a53565b905061094b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2610a2d84846122be565b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2169190612193565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610ab757600080fd5b505afa158015610acb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aef91906149cc565b6001600160a01b0316336001600160a01b031614610b1f5760405162461bcd60e51b815260040161079e906149e9565b610b2a600382611f8c565b6107f55760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b604482015260640161079e565b6000610b75826122d4565b80610bb157507f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316826001600160a01b0316145b92915050565b60007f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316638bc6beb26040518163ffffffff1660e01b815260040160206040518083038186803b158015610c1257600080fd5b505afa158015610c26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4a91906149cc565b90506001600160a01b03811615610cba5760405163d279c19160e01b81526001600160a01b0382169063d279c19190610c879030906004016148c7565b600060405180830381600087803b158015610ca157600080fd5b505af1158015610cb5573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81526000906001600160a01b037f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e99842116906370a0823190610d099030906004016148c7565b60206040518083038186803b158015610d2157600080fd5b505afa158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d599190614a53565b9050801561094b5761094b7f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e9984217f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc283612362565b60008080610dbd335b6003906123f3565b610dd95760405162461bcd60e51b815260040161079e90614a99565b610de1612415565b925092509250909192565b60606108026003612983565b610e0133610db5565b610e1d5760405162461bcd60e51b815260040161079e90614a99565b610e276000612990565b610e32600019612990565b565b60058054610e4190614ac9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6d90614ac9565b8015610eba5780601f10610e8f57610100808354040283529160200191610eba565b820191906000526020600020905b815481529060010190602001808311610e9d57829003601f168201915b505050505081565b610ecb33610db5565b610ee75760405162461bcd60e51b815260040161079e90614a99565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610f189030906004016148c7565b60206040518083038186803b158015610f3057600080fd5b505afa158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f689190614a53565b905060007f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36436001600160a01b03166395dd9193306040518263ffffffff1660e01b8152600401610fb891906148c7565b60206040518083038186803b158015610fd057600080fd5b505afa158015610fe4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110089190614a53565b90508082111561128157600061101e8284614a82565b90506000808511801561103057508482115b61103a578161103c565b845b905060007f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161108c91906148c7565b60206040518083038186803b1580156110a457600080fd5b505afa1580156110b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110dc9190614a53565b600854909150611116906001600160a01b03167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc284612a0a565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663a9059cbb7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2837f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016111b391906148c7565b60206040518083038186803b1580156111cb57600080fd5b505afa1580156111df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112039190614a53565b61120d9190614a82565b6040518363ffffffff1660e01b815260040161122a929190614b04565b602060405180830381600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127c9190614b32565b505050505b505050565b337f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316146112ce5760405162461bcd60e51b815260040161079e90614a20565b6001600160a01b0381166113245760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f00000000604482015260640161079e565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138757600080fd5b505afa15801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf91906149cc565b6001600160a01b03161461140e5760405162461bcd60e51b81526020600482015260166024820152756e6f742d76616c69642d6e65772d737472617465677960501b604482015260640161079e565b61141781612a96565b6000546040516370a0823160e01b81526114b09183916001600160a01b03909116906370a082319061144d9030906004016148c7565b60206040518083038186803b15801561146557600080fd5b505afa158015611479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149d9190614a53565b6000546001600160a01b03169190612193565b6107f5817f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161150091906148c7565b60206040518083038186803b15801561151857600080fd5b505afa15801561152c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2d9190614a53565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156115a957600080fd5b505afa1580156115bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e191906149cc565b6001600160a01b0316336001600160a01b0316146116115760405162461bcd60e51b815260040161079e906149e9565b6001600160a01b0381166116675760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f000000604482015260640161079e565b6001546001600160a01b03828116911614156116bd5760405162461bcd60e51b81526020600482015260156024820152746665652d636f6c6c6563746f722d69732d73616d6560581b604482015260640161079e565b6001546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561177257600080fd5b505afa158015611786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117aa91906149cc565b6001600160a01b0316336001600160a01b0316146117da5760405162461bcd60e51b815260040161079e906149e9565b6001600160a01b03811661182a5760405162461bcd60e51b8152602060048201526017602482015276737761707065722d616464726573732d69732d7a65726f60481b604482015260640161079e565b6002546001600160a01b038281169116141561187a5760405162461bcd60e51b815260206004820152600f60248201526e737761707065722d69732d73616d6560881b604482015260640161079e565b6002546040516001600160a01b038084169216907f6c953b7ec311055c20b96a42cea31e89528e375b1bf953a503db40854b3188fe90600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6118df33610db5565b6118fb5760405162461bcd60e51b815260040161079e90614a99565b6001546001600160a01b031661194b5760405162461bcd60e51b81526020600482015260156024820152741999594b58dbdb1b1958dd1bdc8b5b9bdd0b5cd95d605a1b604482015260640161079e565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316816001600160a01b031614156119cd5760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c00604482015260640161079e565b6119d681610b6a565b15611a1a5760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b604482015260640161079e565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611a55576001546107f5906001600160a01b031647612c26565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190611a849030906004016148c7565b60206040518083038186803b158015611a9c57600080fd5b505afa158015611ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad49190614a53565b60015490915061094b906001600160a01b03848116911683612193565b600080670de0b6b3a76400007f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5657600080fd5b505afa158015611b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8e9190614a53565b6040516370a0823160e01b81526001600160a01b037f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed516906370a0823190611bda9030906004016148c7565b60206040518083038186803b158015611bf257600080fd5b505afa158015611c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2a9190614a53565b611c349190614b4d565b611c3e9190614b6c565b6040516370a0823160e01b81529091506001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a0823190611c8d9030906004016148c7565b60206040518083038186803b158015611ca557600080fd5b505afa158015611cb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cdd9190614a53565b611ce79082614b8e565b91505090565b611cf633610db5565b611d125760405162461bcd60e51b815260040161079e90614a99565b6040516305eff7ef60e21b8152611dbb906001600160a01b037f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364316906317bfdfbc90611d629030906004016148c7565b602060405180830381600087803b158015611d7c57600080fd5b505af1158015611d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db49190614a53565b6001612d3f565b60006006819055600755565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2057600080fd5b505afa158015611e34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5891906149cc565b6001600160a01b0316336001600160a01b031614611e885760405162461bcd60e51b815260040161079e906149e9565b6127108110611ed45760405162461bcd60e51b81526020600482015260186024820152771a5b9d985b1a590b5b585e0b589bdc9c9bddcb5b1a5b5a5d60421b604482015260640161079e565b80158015611ee0575081155b80611eea57508181115b611f365760405162461bcd60e51b815260206004820152601d60248201527f6d61782d73686f756c642d62652d6869676865722d7468616e2d6d696e000000604482015260640161079e565b6006546007546040805192835260208301859052820152606081018290527fedd77444afdf63401315e81ffe86d08f7865796e8ad2e11acf1d56a1393f07d59060800160405180910390a1600691909155600755565b6000611fa1836001600160a01b038416612e43565b9392505050565b6000611fa1836001600160a01b038416612e92565b6000670de0b6b3a76400007f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161201491906148c7565b60206040518083038186803b15801561202c57600080fd5b505afa158015612040573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120649190614a53565b7f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f59190614a53565b6120ff9190614b4d565b6121099190614b6c565b6008546040516370a0823160e01b81526001600160a01b03909116906370a08231906121399030906004016148c7565b60206040518083038186803b15801561215157600080fd5b505afa158015612165573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121899190614a53565b6108029190614b8e565b6112818363a9059cbb60e01b84846040516024016121b2929190614b04565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f85565b60006121f6600083613057565b915050612204816001612d3f565b604051633af9e66960e01b81526000906001600160a01b037f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed51690633af9e669906122539030906004016148c7565b602060405180830381600087803b15801561226d57600080fd5b505af1158015612281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a59190614a53565b90506112818382116122b757816134f9565b835b6134f9565b60008183106122cd5781611fa1565b5090919050565b60007f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56001600160a01b0316826001600160a01b0316148061234757507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316826001600160a01b0316145b80610bb15750506008546001600160a01b0390811691161490565b600254604051636ccb2b0160e01b81526001600160a01b0390911690636ccb2b019061239b908690869086906001903090600401614ba6565b602060405180830381600087803b1580156123b557600080fd5b505af11580156123c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ed9190614a53565b50505050565b6001600160a01b03811660009081526001830160205260408120541515611fa1565b6000806000807f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b031663d53ddc26306040518263ffffffff1660e01b815260040161246791906148c7565b60206040518083038186803b15801561247f57600080fd5b505afa158015612493573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b79190614a53565b905060007f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316639f2b2833306040518263ffffffff1660e01b815260040161250791906148c7565b60206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125579190614a53565b90506125827f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc261356d565b6040516305eff7ef60e21b81526000906001600160a01b037f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364316906317bfdfbc906125d19030906004016148c7565b602060405180830381600087803b1580156125eb57600080fd5b505af11580156125ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126239190614a53565b9050600061262f611fbd565b9050808211156126505761264b6126468284614a82565b613758565b612662565b61266261265d8383614a82565b613928565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a08231906126b19030906004016148c7565b60206040518083038186803b1580156126c957600080fd5b505afa1580156126dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127019190614a53565b905060007f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56001600160a01b0316633af9e669306040518263ffffffff1660e01b815260040161275191906148c7565b602060405180830381600087803b15801561276b57600080fd5b505af115801561277f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a39190614a53565b905060006127b18383614b8e565b9050858111156127cc576127c58682614a82565b99506127d9565b6127d68187614a82565b98505b60006127e5888c614b8e565b9050808410156128b65760006128046127fe8684614a82565b856122be565b905080156128b457612815816121e9565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a08231906128619030906004016148c7565b60206040518083038186803b15801561287957600080fd5b505afa15801561288d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b19190614a53565b94505b505b6128c084896122be565b98508884116128d05760006128e3565b6128e36128dd8a86614a82565b8c6122be565b6040516302df682360e11b815260048101829052602481018c9052604481018b9052909b507f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316906305bed04690606401600060405180830381600087803b15801561295657600080fd5b505af115801561296a573d6000803e3d6000fd5b50505050612976613a88565b5050505050505050909192565b60606000611fa183613c0a565b61299981613c66565b6008546129d0906001600160a01b03167f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee83613ca5565b6002546107f5906001600160a01b037f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e9984218116911683613ca5565b600254604051636ccb2b0160e01b81526001600160a01b0390911690636ccb2b0190612a43908690869086906001903090600401614ba6565b602060405180830381600087803b158015612a5d57600080fd5b505af1925050508015612a8d575060408051601f3d908101601f19168201909252612a8a91810190614a53565b60015b6123ed57505050565b7f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56001600160a01b0316816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612af957600080fd5b505afa158015612b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3191906149cc565b6001600160a01b031614612b7d5760405162461bcd60e51b81526020600482015260136024820152723bb937b73396b932b1b2b4b83a16ba37b5b2b760691b604482015260640161079e565b6040516305eff7ef60e21b81526107f5906001600160a01b037f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364316906317bfdfbc90612bcd9030906004016148c7565b602060405180830381600087803b158015612be757600080fd5b505af1158015612bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1f9190614a53565b6000612d3f565b80471015612c765760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161079e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612cc3576040519150601f19603f3d011682016040523d82523d6000602084013e612cc8565b606091505b50509050806112815760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161079e565b811561094b576000612d4f611fbd565b905080831115612e3a578115612d8857612d887f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc261356d565b6040516305eff7ef60e21b81526000906001600160a01b037f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364316906317bfdfbc90612dd79030906004016148c7565b602060405180830381600087803b158015612df157600080fd5b505af1158015612e05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e299190614a53565b9050612e386126468383614a82565b505b61128183613db8565b6000818152600183016020526040812054612e8a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bb1565b506000610bb1565b60008181526001830160205260408120548015612f7b576000612eb6600183614a82565b8554909150600090612eca90600190614a82565b9050818114612f2f576000866000018281548110612eea57612eea614bd6565b9060005260206000200154905080876000018481548110612f0d57612f0d614bd6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612f4057612f40614bec565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bb1565b6000915050610bb1565b6000612fda826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613f8a9092919063ffffffff16565b8051909150156112815780806020019051810190612ff89190614b32565b6112815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161079e565b600080831580613065575082155b6130a55760405162461bcd60e51b8152602060048201526011602482015270616c6c2d696e7075742d67742d7a65726f60781b604482015260640161079e565b6040516305eff7ef60e21b81526000906001600160a01b037f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364316906317bfdfbc906130f49030906004016148c7565b602060405180830381600087803b15801561310e57600080fd5b505af1158015613122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131469190614a53565b90506007546000141561315e576000925090506134f2565b604051633af9e66960e01b81526000906001600160a01b037f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed51690633af9e669906131ad9030906004016148c7565b602060405180830381600087803b1580156131c757600080fd5b505af11580156131db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ff9190614a53565b9050600061322c7f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed5613fa1565b905060008715613247576132408884614b8e565b905061325c565b8683111561325c576132598784614a82565b90505b6000670de0b6b3a76400006132718484614b4d565b61327b9190614b6c565b90506000600960009054906101000a90046001600160a01b03166001600160a01b0316637dc0d1d06040518163ffffffff1660e01b815260040160206040518083038186803b1580156132cd57600080fd5b505afa1580156132e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061330591906149cc565b90506000816001600160a01b031663fc57d4df7f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56040518263ffffffff1660e01b815260040161335591906148c7565b60206040518083038186803b15801561336d57600080fd5b505afa158015613381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133a59190614a53565b90506000826001600160a01b031663fc57d4df7f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36436040518263ffffffff1660e01b81526004016133f591906148c7565b60206040518083038186803b15801561340d57600080fd5b505afa158015613421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134459190614a53565b90506000816134548487614b4d565b61345e9190614b6c565b90508061347a576000899a509a505050505050505050506134f2565b60006127106007548361348d9190614b4d565b6134979190614b6c565b90506000612710600654846134ac9190614b4d565b6134b69190614b6c565b9050818b11156134d1576134ca818c614a82565b9b506134e6565b8a8111156134e6576134e38b82614a82565b9c505b50505050505050505050505b9250929050565b6135028161402a565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561355157600080fd5b505af1158015613565573d6000803e3d6000fd5b505050505050565b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed5816000815181106135c2576135c2614bd6565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36438160018151811061361657613616614bd6565b6001600160a01b03928316602091820292909201015260095460405162e1ed9760e51b8152911690631c3db2e0906136549030908590600401614c02565b600060405180830381600087803b15801561366e57600080fd5b505af1158015613682573d6000803e3d6000fd5b50506040516370a0823160e01b8152600092506001600160a01b037f000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268881691506370a08231906136d59030906004016148c7565b60206040518083038186803b1580156136ed57600080fd5b505afa158015613701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137259190614a53565b90508015611281576112817f000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268888483612a0a565b6002546008546040516353b609b560e01b81526001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28116600483015291821660248201526044810184905260009291909116906353b609b590606401602060405180830381600087803b1580156137d557600080fd5b505af11580156137e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061380d9190614a53565b9050801561094b576040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a08231906138649030906004016148c7565b60206040518083038186803b15801561387c57600080fd5b505afa158015613890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138b49190614a53565b9050808211156138cb576138cb6122b98284614a82565b6002546008546040516381cc619b60e01b81526001600160a01b03928316926381cc619b9261239b927f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29290911690889088903090600401614ba6565b80156107f5576008546040516370a0823160e01b81526000916001600160a01b0316906370a082319061395f9030906004016148c7565b60206040518083038186803b15801561397757600080fd5b505afa15801561398b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139af9190614a53565b90506139ba82614103565b6008546040516370a0823160e01b815260009183916001600160a01b03909116906370a08231906139ef9030906004016148c7565b60206040518083038186803b158015613a0757600080fd5b505afa158015613a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a3f9190614a53565b613a499190614a82565b9050801561128157600854611281906001600160a01b03167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc283612a0a565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a0823190613ad79030906004016148c7565b60206040518083038186803b158015613aef57600080fd5b505afa158015613b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b279190614a53565b905080156107f557600080613b3d836000613057565b90925090508015613bf857613b53816000612d3f565b6040516370a0823160e01b8152611281906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a0823190613ba39030906004016148c7565b60206040518083038186803b158015613bbb57600080fd5b505afa158015613bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bf39190614a53565b614323565b613c0183614323565b611281826143e9565b606081600001805480602002602001604051908101604052809291908181526020018280548015613c5a57602002820191906000526020600020905b815481526020019060010190808311613c46575b50505050509050919050565b613c6f8161456f565b6002546107f5906001600160a01b037f000000000000000000000000c00e94cb662c3520282e6f5717214004a7f2688881169116835b801580613d2e5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015613cf457600080fd5b505afa158015613d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d2c9190614a53565b155b613d995760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161079e565b6112818363095ea7b360e01b84846040516024016121b2929190614b04565b613dc18161465a565b6008546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415613ea857604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b158015613e3557600080fd5b505af1158015613e49573d6000803e3d6000fd5b505050507f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36436001600160a01b0316634e4d9fea826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561355157600080fd5b60405163073a938160e11b8152600481018290527f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36436001600160a01b031690630e75270290602401602060405180830381600087803b158015613f0a57600080fd5b505af1158015613f1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f429190614a53565b156107f55760405162461bcd60e51b81526020600482015260186024820152771c995c185e4b5d1bcb58dbdb5c1bdd5b990b59985a5b195960421b604482015260640161079e565b6060613f998484600085614663565b949350505050565b600954604051638e8f294b60e01b81526000916001600160a01b031690638e8f294b90613fd29085906004016148c7565b60606040518083038186803b158015613fea57600080fd5b505afa158015613ffe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140229190614c26565b509392505050565b60405163852a12e360e01b8152600481018290527f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56001600160a01b03169063852a12e390602401602060405180830381600087803b15801561408c57600080fd5b505af11580156140a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140c49190614a53565b156107f55760405162461bcd60e51b815260206004820152600f60248201526e1dda5d1a191c985dcb59985a5b1959608a1b604482015260640161079e565b60007f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b15801561415e57600080fd5b505afa158015614172573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141969190614a53565b90506000816141ad84670de0b6b3a7640000614b4d565b6141b79190614b6c565b9050670de0b6b3a76400006141cc8383614b4d565b6141d69190614b6c565b83116141e257806141ed565b6141ed816001614b8e565b905060007f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161423d91906148c7565b60206040518083038186803b15801561425557600080fd5b505afa158015614269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061428d9190614a53565b90507f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b0316632e1a7d4d8284116142cb57836142cd565b825b6040518263ffffffff1660e01b81526004016142eb91815260200190565b600060405180830381600087803b15801561430557600080fd5b505af1158015614319573d6000803e3d6000fd5b5050505050505050565b80156107f557604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561437657600080fd5b505af115801561438a573d6000803e3d6000fd5b505050507f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed56001600160a01b0316631249c58b826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561355157600080fd5b80156107f55760405163317afabb60e21b8152600481018290527f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36436001600160a01b03169063c5ebeaec90602401602060405180830381600087803b15801561445157600080fd5b505af1158015614465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144899190614a53565b156144d65760405162461bcd60e51b815260206004820152601b60248201527f626f72726f772d66726f6d2d636f6d706f756e642d6661696c65640000000000604482015260640161079e565b6008546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156145665773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561454c57600080fd5b505af1158015614560573d6000803e3d6000fd5b50505050505b6107f58161478b565b61457881614808565b6145cc6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2167f0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed583613ca5565b600254614606906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28116911683613ca5565b60085461463d906001600160a01b03167f0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e364383613ca5565b6002546008546107f5916001600160a01b03918216911683613ca5565b6107f581614103565b6060824710156146c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161079e565b843b6147125760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161079e565b600080866001600160a01b0316858760405161472e9190614c62565b60006040518083038185875af1925050503d806000811461476b576040519150601f19603f3d011682016040523d82523d6000602084013e614770565b606091505b509150915061478082828661485c565b979650505050505050565b60405163b6b55f2560e01b8152600481018290527f0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee6001600160a01b03169063b6b55f2590602401600060405180830381600087803b1580156147ed57600080fd5b505af1158015614801573d6000803e3d6000fd5b5050505050565b6107f56001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2167f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f283613ca5565b6060831561486b575081611fa1565b82511561487b5782518084602001fd5b8160405162461bcd60e51b815260040161079e9190614977565b6001600160a01b03811681146107f557600080fd5b6000602082840312156148bc57600080fd5b8135611fa181614895565b6001600160a01b0391909116815260200190565b6000602082840312156148ed57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561492d5781516001600160a01b031687529582019590820190600101614908565b509495945050505050565b602081526000611fa160208301846148f4565b60005b8381101561496657818101518382015260200161494e565b838111156123ed5750506000910152565b602081526000825180602084015261499681604085016020870161494b565b601f01601f19169190910160400192915050565b600080604083850312156149bd57600080fd5b50508035926020909101359150565b6000602082840312156149de57600080fd5b8151611fa181614895565b6020808252601a908201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f72000000000000604082015260600190565b60208082526019908201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b604082015260600190565b600060208284031215614a6557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614a9457614a94614a6c565b500390565b60208082526016908201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b604082015260600190565b600181811c90821680614add57607f821691505b60208210811415614afe57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03929092168252602082015260400190565b80518015158114614b2d57600080fd5b919050565b600060208284031215614b4457600080fd5b611fa182614b1d565b6000816000190483118215151615614b6757614b67614a6c565b500290565b600082614b8957634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115614ba157614ba1614a6c565b500190565b6001600160a01b039586168152938516602085015260408401929092526060830152909116608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0383168152604060208201819052600090613f99908301846148f4565b600080600060608486031215614c3b57600080fd5b614c4484614b1d565b925060208401519150614c5960408501614b1d565b90509250925092565b60008251614c7481846020870161494b565b919091019291505056fea264697066735822122018c767382417fe3fa1a5f31a4854d5234901d9213d5e981b2911687eeb7feab464736f6c63430008090033

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

000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f20000000000000000000000008f156189a3cd28dfc8fb7bbbace58f98f09c0bb30000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed50000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e36430000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e9984210000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001a436f6d706f756e645f5665737065725f58795f4554485f444149000000000000

-----Decoded View---------------
Arg [0] : _pool (address): 0xd1C117319B3595fbc39b471AB1fd485629eb05F2
Arg [1] : _swapper (address): 0x8f156189A3CD28dFc8FB7BbbAce58F98F09c0bB3
Arg [2] : _comptroller (address): 0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B
Arg [3] : _rewardToken (address): 0xc00e94Cb662C3520282E6f5717214004A7f26888
Arg [4] : _receiptToken (address): 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5
Arg [5] : _borrowCToken (address): 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643
Arg [6] : _vPool (address): 0x0538C8bAc84E95A9dF8aC10Aad17DbE81b9E36ee
Arg [7] : _vspAddress (address): 0x1b40183EFB4Dd766f11bDa7A7c3AD8982e998421
Arg [8] : _name (string): Compound_Vesper_Xy_ETH_DAI

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2
Arg [1] : 0000000000000000000000008f156189a3cd28dfc8fb7bbbace58f98f09c0bb3
Arg [2] : 0000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b
Arg [3] : 000000000000000000000000c00e94cb662c3520282e6f5717214004a7f26888
Arg [4] : 0000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed5
Arg [5] : 0000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643
Arg [6] : 0000000000000000000000000538c8bac84e95a9df8ac10aad17dbe81b9e36ee
Arg [7] : 0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e998421
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [9] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [10] : 436f6d706f756e645f5665737065725f58795f4554485f444149000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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