More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
AaveV3VesperStETH
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "../../../interfaces/external/lido/IWstETH.sol"; import "./AaveV3VesperXy.sol"; /// @title Deposit wstETH in Aave and earn yield by depositing borrowed token in a Vesper Pool. contract AaveV3VesperStETH is AaveV3VesperXy { using SafeERC20 for IERC20; IWstETH internal constant WSTETH = IWstETH(0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0); constructor( address pool_, address swapper_, address receiptToken_, address borrowToken_, address aaveAddressProvider_, address vPool_, string memory name_ ) AaveV3VesperXy(pool_, swapper_, receiptToken_, borrowToken_, aaveAddressProvider_, vPool_, name_) {} /// @notice Returns total collateral locked in the strategy function tvl() external view virtual override returns (uint256) { // receiptToken is aToken. aToken is 1:1 of collateral token return IERC20(receiptToken).balanceOf(address(this)) + wrappedCollateral.balanceOf(address(this)) + _calculateWrapped(collateralToken.balanceOf(address(this))); } function _approveToken(uint256 amount_) internal virtual override { super._approveToken(amount_); collateralToken.safeApprove(address(wrappedCollateral), amount_); } function _calculateUnwrapped(uint256 wrappedAmount_) internal view override returns (uint256) { return WSTETH.getStETHByWstETH(wrappedAmount_); } function _calculateWrapped(uint256 unwrappedAmount_) internal view override returns (uint256) { return WSTETH.getWstETHByStETH(unwrappedAmount_); } function _getCollateralHere() internal virtual override returns (uint256) { uint256 _wrapped = wrappedCollateral.balanceOf(address(this)); if (_wrapped > 0) { _unwrap(_wrapped); } // Return unwrapped balance return collateralToken.balanceOf(address(this)); } function _getWrappedToken(IERC20) internal pure override returns (IERC20) { return IERC20(address(WSTETH)); } function _unwrap(uint256 wrappedAmount_) internal override returns (uint256) { return WSTETH.unwrap(wrappedAmount_); } function _wrap(uint256 unwrappedAmount_) internal override returns (uint256) { return WSTETH.wrap(unwrappedAmount_); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; interface IStrategy { function rebalance() external returns (uint256 _profit, uint256 _loss, uint256 _payback); function sweep(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); }
// 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); }
// 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); }
// 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"); } } }
// 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); } } } }
// 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; } }
// 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); } }
// 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; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /// @title Errors library library Errors { string public constant INVALID_COLLATERAL_AMOUNT = "1"; // Collateral must be greater than 0 or > defined limit string public constant INVALID_SHARE_AMOUNT = "2"; // Share must be greater than 0 string public constant INVALID_INPUT_LENGTH = "3"; // Input array length must be greater than 0 string public constant INPUT_LENGTH_MISMATCH = "4"; // Input array length mismatch with another array length string public constant NOT_WHITELISTED_ADDRESS = "5"; // Caller is not whitelisted to withdraw without fee string public constant MULTI_TRANSFER_FAILED = "6"; // Multi transfer of tokens has failed string public constant FEE_COLLECTOR_NOT_SET = "7"; // Fee Collector is not set string public constant NOT_ALLOWED_TO_SWEEP = "8"; // Token is not allowed to sweep string public constant INSUFFICIENT_BALANCE = "9"; // Insufficient balance to performs operations to follow string public constant INPUT_ADDRESS_IS_ZERO = "10"; // Input address is zero string public constant FEE_LIMIT_REACHED = "11"; // Fee must be less than MAX_BPS string public constant ALREADY_INITIALIZED = "12"; // Data structure, contract, or logic already initialized and can not be called again string public constant ADD_IN_LIST_FAILED = "13"; // Cannot add address in address list string public constant REMOVE_FROM_LIST_FAILED = "14"; // Cannot remove address from address list string public constant STRATEGY_IS_ACTIVE = "15"; // Strategy is already active, an inactive strategy is required string public constant STRATEGY_IS_NOT_ACTIVE = "16"; // Strategy is not active, an active strategy is required string public constant INVALID_STRATEGY = "17"; // Given strategy is not a strategy of this pool string public constant DEBT_RATIO_LIMIT_REACHED = "18"; // Debt ratio limit reached. It must be less than MAX_BPS string public constant TOTAL_DEBT_IS_NOT_ZERO = "19"; // Strategy total debt must be 0 string public constant LOSS_TOO_HIGH = "20"; // Strategy reported loss must be less than current debt string public constant INVALID_MAX_BORROW_LIMIT = "21"; // Max borrow limit is beyond range. string public constant MAX_LIMIT_LESS_THAN_MIN = "22"; // Max limit should be greater than min limit. string public constant INVALID_SLIPPAGE = "23"; // Slippage should be less than MAX_BPS string public constant WRONG_RECEIPT_TOKEN = "24"; // Wrong receipt token address string public constant AAVE_FLASH_LOAN_NOT_ACTIVE = "25"; // aave flash loan is not active string public constant DYDX_FLASH_LOAN_NOT_ACTIVE = "26"; // DYDX flash loan is not active string public constant INVALID_FLASH_LOAN = "27"; // invalid-flash-loan string public constant INVALID_INITIATOR = "28"; // "invalid-initiator" string public constant INCORRECT_WITHDRAW_AMOUNT = "29"; // withdrawn amount is not correct string public constant NO_MARKET_ID_FOUND = "30"; // dydx flash loan no marketId found for token string public constant SAME_AS_PREVIOUS = "31"; // Input should not be same as previous value. string public constant INVALID_INPUT = "32"; // Generic invalid input error code }
// 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; }
// 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; }
// 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); function getRewardTokens() external view returns (address[] memory); function isRewardToken(address) external view returns (bool); function addRewardToken(address newRewardToken_) external; function periodFinish(address) external view returns (uint256); }
// 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 collateralAmount_) external; 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 share_) 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); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-pools/contracts/dependencies/openzeppelin/contracts/token/ERC20/IERC20.sol"; interface PoolAddressesProviderV3 { function getPool() external view returns (AaveLendingPool); function getPoolDataProvider() external view returns (AaveProtocolDataProvider); } // @dev Interface support both Aave v2 and v3 methods interface PoolAddressesProvider { function getPool() external view returns (address); // Aave v2 method. function getLendingPool() external view returns (address); function getPoolDataProvider() external view returns (address); function getAddress(bytes32 id) external view returns (address); function getPriceOracle() external view returns (address); } interface AaveOracle { function getAssetPrice(address _asset) external view returns (uint256); } interface AToken is IERC20 { /** * @dev Returns the address of the incentives controller contract **/ function getIncentivesController() external view returns (address); function mint(address user, uint256 amount, uint256 index) external returns (bool); function burn(address user, address receiverOfUnderlying, uint256 amount, uint256 index) external; //solhint-disable func-name-mixedcase function UNDERLYING_ASSET_ADDRESS() external view returns (address); } interface AaveIncentivesController { function getRewardsBalance(address[] calldata assets, address user) external view returns (uint256); function claimRewards(address[] calldata assets, uint256 amount, address to) external returns (uint256); function claimAllRewards( address[] calldata assets, address to ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); function getRewardsList() external view returns (address[] memory); } interface AaveLendingPool { function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; function withdraw(address asset, uint256 amount, address to) external returns (uint256); function flashLoan( address receiverAddress, address[] calldata assets, uint256[] calldata amounts, uint256[] calldata interestRateModes, address onBehalfOf, bytes calldata params, uint16 referralCode ) external; function borrow( address asset, uint256 amount, uint256 interestRateMode, uint16 referralCode, address onBehalfOf ) external; function repay(address asset, uint256 amount, uint256 interestRateMode, address onBehalfOf) external; function getUserAccountData( address _user ) external view returns ( uint256 totalCollateralETH, uint256 totalDebtETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor ); } interface AaveProtocolDataProvider { function getReserveTokensAddresses( address asset ) external view returns (address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress); function getReserveData( address asset ) external view returns ( uint256 availableLiquidity, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 liquidityIndex, uint256 variableBorrowIndex, uint40 lastUpdateTimestamp ); function getReserveConfigurationData( address asset ) external view returns ( uint256 decimals, uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, uint256 reserveFactor, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive, bool isFrozen ); } //solhint-disable func-name-mixedcase interface StakedAave is IERC20 { function claimRewards(address to, uint256 amount) external; function cooldown() external; function stake(address onBehalfOf, uint256 amount) external; function redeem(address to, uint256 amount) external; function getTotalRewardsBalance(address staker) external view returns (uint256); function stakersCooldowns(address staker) external view returns (uint256); function COOLDOWN_SECONDS() external view returns (uint256); function UNSTAKE_WINDOW() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-pools/contracts/dependencies/openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IWstETH is IERC20 { function unwrap(uint256 _wstETHAmount) external returns (uint256 _stETHAmount); function wrap(uint256 _stETHAmount) external returns (uint256 _wstETHAmount); function getStETHByWstETH(uint256 _wstETHAmount) external view returns (uint256 _stETHAmount); function getWstETHByStETH(uint256 _stETHAmount) external view returns (uint256 _wstETHAmount); }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "../../../interfaces/aave/IAave.sol"; /// @title This contract provide core operations for Aave v3 library AaveV3Incentive { /** * @notice Claim rewards from Aave incentive controller */ function _claimRewards( address _aToken ) internal returns (address[] memory rewardsList, uint256[] memory claimedAmounts) { // Some aTokens may have no incentive controller method/variable. Better use try catch try AToken(_aToken).getIncentivesController() returns (address _aaveIncentivesController) { address[] memory assets = new address[](1); assets[0] = address(_aToken); return AaveIncentivesController(_aaveIncentivesController).claimAllRewards(assets, address(this)); //solhint-disable no-empty-blocks } catch {} } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-pools/contracts/interfaces/vesper/IVesperPool.sol"; import "./AaveV3Xy.sol"; import "../../VesperRewards.sol"; /// @title Deposit Collateral in Aave and earn interest by depositing borrowed token in a Vesper Pool. contract AaveV3VesperXy is AaveV3Xy { using SafeERC20 for IERC20; // Destination Grow Pool for borrowed Token IVesperPool public immutable vPool; constructor( address _pool, address _swapper, address _receiptToken, address _borrowToken, address _aaveAddressProvider, address _vPool, string memory _name ) AaveV3Xy(_pool, _swapper, _receiptToken, _borrowToken, _aaveAddressProvider, _name) { require(address(IVesperPool(_vPool).token()) == borrowToken, "invalid-grow-pool"); vPool = IVesperPool(_vPool); } /// @notice After borrowing Y, deposit to Vesper Pool function _afterBorrowY(uint256 _amount) internal virtual override { vPool.deposit(_amount); } /// @notice Approve all required tokens function _approveToken(uint256 _amount) internal virtual override { super._approveToken(_amount); IERC20(borrowToken).safeApprove(address(vPool), _amount); VesperRewards._approveToken(vPool, swapper, _amount); } /// @notice Before repaying Y, withdraw it from Vesper Pool function _beforeRepayY(uint256 _amount) internal virtual override { _withdrawFromVesperPool(_amount); } /// @dev Claim all rewards and convert to collateral. function _claimAndSwapRewards() internal override { // Claim rewards from Aave AaveV3Xy._claimAndSwapRewards(); VesperRewards._claimAndSwapRewards(vPool, swapper, address(wrappedCollateral)); } /// @notice Borrowed Y balance deposited in Vesper Pool function _getInvestedBorrowBalance() internal view virtual override returns (uint256) { return IERC20(borrowToken).balanceOf(address(this)) + ((vPool.pricePerShare() * vPool.balanceOf(address(this))) / 1e18); } /// @notice Swap excess borrow for more wrappedCollateral when underlying vPool is making profits function _rebalanceBorrow(uint256 _excessBorrow) internal virtual override { if (_excessBorrow > 0) { _withdrawFromVesperPool(_excessBorrow); uint256 _borrowedHere = IERC20(borrowToken).balanceOf(address(this)); if (_borrowedHere > 0) { _safeSwapExactInput(borrowToken, address(wrappedCollateral), _borrowedHere); } } } /// @notice Withdraw _shares proportional to collateral _amount from vPool function _withdrawFromVesperPool(uint256 _amount) internal { if (_amount > 0) { uint256 _pricePerShare = vPool.pricePerShare(); uint256 _shares = (_amount * 1e18) / _pricePerShare; _shares = _amount > ((_shares * _pricePerShare) / 1e18) ? _shares + 1 : _shares; vPool.withdraw(Math.min(_shares, vPool.balanceOf(address(this)))); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-pools/contracts/interfaces/vesper/IPoolRewards.sol"; import "vesper-pools/contracts/Errors.sol"; import "../../../interfaces/aave/IAave.sol"; import "./AaveV3Incentive.sol"; import "../../Strategy.sol"; // solhint-disable no-empty-blocks /// @title Deposit Collateral in Aave and earn interest by depositing borrowed token in a Vesper Pool. contract AaveV3Xy is Strategy { using SafeERC20 for IERC20; // solhint-disable-next-line var-name-mixedcase string public NAME; string public constant VERSION = "5.1.0"; uint256 internal constant MAX_BPS = 10_000; //100% uint256 public minBorrowLimit = 7_000; // 70% of actual collateral factor of protocol uint256 public maxBorrowLimit = 8_500; // 85% of actual collateral factor of protocol PoolAddressesProvider public immutable aaveAddressProvider; address public borrowToken; AToken public vdToken; // Variable Debt Token address internal aBorrowToken; IERC20 public wrappedCollateral; event UpdatedBorrowLimit( uint256 previousMinBorrowLimit, uint256 newMinBorrowLimit, uint256 previousMaxBorrowLimit, uint256 newMaxBorrowLimit ); constructor( address _pool, address _swapper, address _receiptToken, address _borrowToken, address _aaveAddressProvider, string memory _name ) Strategy(_pool, _swapper, _receiptToken) { NAME = _name; require(_aaveAddressProvider != address(0), "addressProvider-is-zero"); wrappedCollateral = _getWrappedToken(collateralToken); require( AToken(_receiptToken).UNDERLYING_ASSET_ADDRESS() == address(wrappedCollateral), "invalid-receipt-token" ); (address _aBorrowToken, , address _vdToken) = AaveProtocolDataProvider( PoolAddressesProvider(_aaveAddressProvider).getPoolDataProvider() ).getReserveTokensAddresses(_borrowToken); vdToken = AToken(_vdToken); borrowToken = _borrowToken; aBorrowToken = _aBorrowToken; aaveAddressProvider = PoolAddressesProvider(_aaveAddressProvider); } function isReservedToken(address _token) public view virtual override returns (bool) { return _token == address(collateralToken) || _token == receiptToken || address(vdToken) == _token || borrowToken == _token; } /// @notice Returns total collateral locked in the strategy function tvl() external view virtual override returns (uint256) { // receiptToken is aToken. aToken is 1:1 of collateral token return IERC20(receiptToken).balanceOf(address(this)) + collateralToken.balanceOf(address(this)); } /// @notice After borrowing Y Hook function _afterBorrowY(uint256 _amount) internal virtual {} /// @notice Approve all required tokens function _approveToken(uint256 _amount) internal virtual override { super._approveToken(_amount); address _swapper = address(swapper); wrappedCollateral.safeApprove(aaveAddressProvider.getPool(), _amount); wrappedCollateral.safeApprove(_swapper, _amount); IERC20(borrowToken).safeApprove(aaveAddressProvider.getPool(), _amount); IERC20(borrowToken).safeApprove(_swapper, _amount); try AToken(receiptToken).getIncentivesController() returns (address _aaveIncentivesController) { address[] memory _rewardTokens = AaveIncentivesController(_aaveIncentivesController).getRewardsList(); for (uint256 i; i < _rewardTokens.length; ++i) { if (_rewardTokens[i] != address(collateralToken) && _rewardTokens[i] != borrowToken) { IERC20(_rewardTokens[i]).safeApprove(_swapper, _amount); } } //solhint-disable no-empty-blocks } catch {} } /** * @notice Claim rewardToken and transfer to new strategy * @param _newStrategy Address of new strategy. */ function _beforeMigration(address _newStrategy) internal virtual override { require(IStrategy(_newStrategy).token() == receiptToken, "wrong-receipt-token"); uint256 _repayAmount = vdToken.balanceOf(address(this)); if (_repayAmount > 0) { _repayY(_repayAmount, AaveLendingPool(aaveAddressProvider.getPool())); } } /// @notice Before repaying Y Hook function _beforeRepayY(uint256 _amount) internal virtual {} /** * @notice Calculate borrow and repay amount based on current collateral and new deposit/withdraw amount. * @param _depositAmount wrapped collateral amount to deposit * @param _withdrawAmount wrapped collateral amount to withdraw * @param _borrowed borrowed from protocol * @param _supplied wrapped collateral supplied to protocol * @return _borrowAmount borrow more amount * @return _repayAmount repay amount to keep ltv within limit */ function _calculateBorrowPosition( uint256 _depositAmount, uint256 _withdrawAmount, uint256 _borrowed, uint256 _supplied ) internal view returns (uint256 _borrowAmount, uint256 _repayAmount) { require(_depositAmount == 0 || _withdrawAmount == 0, "all-input-gt-zero"); // If maximum borrow limit set to 0 then repay borrow if (maxBorrowLimit == 0) { return (0, _borrowed); } // In case of withdraw, _amount can be greater than _supply uint256 _hypotheticalCollateral = _depositAmount > 0 ? _supplied + _depositAmount : _supplied > _withdrawAmount ? _supplied - _withdrawAmount : 0; if (_hypotheticalCollateral == 0) { return (0, _borrowed); } AaveOracle _aaveOracle = AaveOracle(aaveAddressProvider.getPriceOracle()); uint256 _borrowTokenPrice = _aaveOracle.getAssetPrice(borrowToken); uint256 _collateralTokenPrice = _aaveOracle.getAssetPrice(address(wrappedCollateral)); if (_borrowTokenPrice == 0 || _collateralTokenPrice == 0) { // Oracle problem. Lets payback all return (0, _borrowed); } // _collateralFactor in 4 decimal. 10_000 = 100% (, uint256 _collateralFactor, , , , , , , , ) = AaveProtocolDataProvider( aaveAddressProvider.getPoolDataProvider() ).getReserveConfigurationData(address(wrappedCollateral)); // Collateral in base currency based on oracle price and cf; uint256 _actualCollateralForBorrow = (_hypotheticalCollateral * _collateralFactor * _collateralTokenPrice) / (MAX_BPS * (10 ** IERC20Metadata(address(wrappedCollateral)).decimals())); // Calculate max borrow possible in borrow token number uint256 _maxBorrowPossible = (_actualCollateralForBorrow * (10 ** IERC20Metadata(address(borrowToken)).decimals())) / _borrowTokenPrice; 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. if (_borrowed > _borrowUpperBound) { // If borrow > upperBound then it is greater than lowerBound too. _repayAmount = _borrowed - _borrowLowerBound; } else if (_borrowLowerBound > _borrowed) { _borrowAmount = _borrowLowerBound - _borrowed; uint256 _availableLiquidity = IERC20(borrowToken).balanceOf(aBorrowToken); if (_borrowAmount > _availableLiquidity) { _borrowAmount = _availableLiquidity; } } } function _calculateUnwrapped(uint256 wrappedAmount_) internal view virtual returns (uint256) { return wrappedAmount_; } function _calculateWrapped(uint256 unwrappedAmount_) internal view virtual returns (uint256) { return unwrappedAmount_; } /// @dev Claim all rewards and convert to collateral. /// Overriding _claimAndSwapRewards will help child contract otherwise override _claimReward. function _claimAndSwapRewards() internal virtual override { (address[] memory _tokens, uint256[] memory _amounts) = AaveV3Incentive._claimRewards(receiptToken); uint256 _length = _tokens.length; for (uint256 i; i < _length; ++i) { if (_amounts[i] > 0 && _tokens[i] != address(wrappedCollateral)) { _safeSwapExactInput(_tokens[i], address(wrappedCollateral), _amounts[i]); } } } function _depositToAave(uint256 _amount, AaveLendingPool _aaveLendingPool) internal virtual { uint256 _wrappedAmount = _wrap(_amount); if (_wrappedAmount > 0) { try _aaveLendingPool.supply(address(wrappedCollateral), _wrappedAmount, address(this), 0) {} catch Error( string memory _reason ) { // Aave uses liquidityIndex and some other indexes as needed to normalize input. // If normalized input equals to 0 then error will be thrown with '56' error code. // CT_INVALID_MINT_AMOUNT = '56'; //invalid amount to mint // Hence discard error where error code is '56' require(bytes32(bytes(_reason)) == "56", "deposit failed"); } } } function _getCollateralHere() internal virtual returns (uint256) { return collateralToken.balanceOf(address(this)); } /// @notice Borrowed Y balance deposited here or elsewhere hook function _getInvestedBorrowBalance() internal view virtual returns (uint256) { return IERC20(borrowToken).balanceOf(address(this)); } function _getWrappedToken(IERC20 unwrappedToken_) internal pure virtual returns (IERC20) { return unwrappedToken_; } /** * @dev Generate report for pools accounting and also send profit and any payback to pool. */ function _rebalance() internal override returns (uint256 _profit, uint256 _loss, uint256 _payback) { // NOTE:: Pool has unwrapped as collateral and any state is also unwrapped amount uint256 _excessDebt = IVesperPool(pool).excessDebt(address(this)); uint256 _borrowed = vdToken.balanceOf(address(this)); uint256 _investedBorrowBalance = _getInvestedBorrowBalance(); AaveLendingPool _aaveLendingPool = AaveLendingPool(aaveAddressProvider.getPool()); // _borrow increases every block. Convert collateral to borrowToken. if (_borrowed > _investedBorrowBalance) { _swapToBorrowToken(_borrowed - _investedBorrowBalance, _aaveLendingPool); } else { // When _investedBorrowBalance exceeds _borrow balance from Aave // Customize this hook to handle the excess borrowToken for profit _rebalanceBorrow(_investedBorrowBalance - _borrowed); } uint256 _collateralHere = _getCollateralHere(); uint256 _supplied = IERC20(receiptToken).balanceOf(address(this)); uint256 _unwrappedSupplied = _calculateUnwrapped(_supplied); uint256 _totalCollateral = _unwrappedSupplied + _collateralHere; uint256 _totalDebt = IVesperPool(pool).totalDebtOf(address(this)); if (_totalCollateral > _totalDebt) { _profit = _totalCollateral - _totalDebt; } else { _loss = _totalDebt - _totalCollateral; } uint256 _profitAndExcessDebt = _profit + _excessDebt; if (_collateralHere < _profitAndExcessDebt) { uint256 _totalAmountToWithdraw = Math.min((_profitAndExcessDebt - _collateralHere), _unwrappedSupplied); if (_totalAmountToWithdraw > 0) { _withdrawHere(_totalAmountToWithdraw, _aaveLendingPool, _borrowed, _supplied); _collateralHere = collateralToken.balanceOf(address(this)); } } // Make sure _collateralHere >= _payback + profit. set actual payback first and then profit _payback = Math.min(_collateralHere, _excessDebt); _profit = _collateralHere > _payback ? Math.min((_collateralHere - _payback), _profit) : 0; IVesperPool(pool).reportEarning(_profit, _loss, _payback); // This is unwrapped balance if pool supports unwrap token eg stETH uint256 _newSupply = collateralToken.balanceOf(address(this)); if (_newSupply > 0) { _depositToAave(_newSupply, _aaveLendingPool); } // There are scenarios when we want to call _calculateBorrowPosition and act on it. // 1. Strategy got some collateral from pool which will allow strategy to borrow more. // 2. Collateral and/or borrow token price is changed which leads to repay or borrow. // 3. BorrowLimits are updated. // In some edge scenarios, below call is redundant but keeping it as is for simplicity. (uint256 _borrowAmount, uint256 _repayAmount) = _calculateBorrowPosition( 0, 0, vdToken.balanceOf(address(this)), IERC20(receiptToken).balanceOf(address(this)) ); if (_repayAmount > 0) { // Repay _borrowAmount to maintain safe position _repayY(_repayAmount, _aaveLendingPool); } else if (_borrowAmount > 0) { // 2 for variable rate borrow, 0 for referralCode _aaveLendingPool.borrow(borrowToken, _borrowAmount, 2, 0, address(this)); } uint256 _borrowTokenBalance = IERC20(borrowToken).balanceOf(address(this)); if (_borrowTokenBalance > 0) { _afterBorrowY(_borrowTokenBalance); } } /// @notice Swap excess borrow for more collateral hook function _rebalanceBorrow(uint256 _excessBorrow) internal virtual {} function _repayY(uint256 _amount, AaveLendingPool _aaveLendingPool) internal virtual { _beforeRepayY(_amount); _aaveLendingPool.repay(borrowToken, _amount, 2, address(this)); } /** * @dev Swap collateral to borrow token. * @param _shortOnBorrow Expected output of this swap */ function _swapToBorrowToken(uint256 _shortOnBorrow, AaveLendingPool _aaveLendingPool) internal { // Looking for _amountIn using fixed output amount uint256 _amountIn = swapper.getAmountIn(address(wrappedCollateral), borrowToken, _shortOnBorrow); if (_amountIn > 0) { // Not using unwrapped balance here as those can be used in rebalance reporting via getCollateralHere uint256 _collateralHere = wrappedCollateral.balanceOf(address(this)); if (_amountIn > _collateralHere) { // Withdraw some collateral from Aave so that we have enough collateral to get expected output uint256 _amount = _amountIn - _collateralHere; require( _aaveLendingPool.withdraw(address(wrappedCollateral), _amount, address(this)) == _amount, Errors.INCORRECT_WITHDRAW_AMOUNT ); } swapper.swapExactOutput(address(wrappedCollateral), borrowToken, _shortOnBorrow, _amountIn, address(this)); } } function _unwrap(uint256 wrappedAmount_) internal virtual returns (uint256) { return wrappedAmount_; } function _wrap(uint256 unwrappedAmount_) internal virtual returns (uint256) { return unwrappedAmount_; } /// @dev If pool supports unwrapped token(stETH) then input and output both are unwrapped token amount. function _withdrawHere(uint256 _requireAmount) internal override { _withdrawHere( _requireAmount, AaveLendingPool(aaveAddressProvider.getPool()), vdToken.balanceOf(address(this)), IERC20(receiptToken).balanceOf(address(this)) ); } /** * @dev If pool supports unwrapped token(stETH) then _requireAmount and output both are unwrapped token amount. * @param _requireAmount unwrapped collateral amount * @param _supplied wrapped collateral amount */ function _withdrawHere( uint256 _requireAmount, AaveLendingPool _aaveLendingPool, uint256 _borrowed, uint256 _supplied ) internal { uint256 _wrappedRequireAmount = _calculateWrapped(_requireAmount); (, uint256 _repayAmount) = _calculateBorrowPosition(0, _wrappedRequireAmount, _borrowed, _supplied); if (_repayAmount > 0) { _repayY(_repayAmount, _aaveLendingPool); } // withdraw asking more than available liquidity will fail. To do safe withdraw, check // _wrappedRequireAmount against available liquidity. uint256 _possibleWithdraw = Math.min( _wrappedRequireAmount, Math.min(_supplied, wrappedCollateral.balanceOf(receiptToken)) ); require( _aaveLendingPool.withdraw(address(wrappedCollateral), _possibleWithdraw, address(this)) == _possibleWithdraw, Errors.INCORRECT_WITHDRAW_AMOUNT ); // Unwrap wrapped tokens _unwrap(wrappedCollateral.balanceOf(address(this))); } /************************************************************************************************ * Governor/admin/keeper function * ***********************************************************************************************/ /** * @notice Update upper and lower borrow limit. Usually maxBorrowLimit < 100% of actual collateral factor of protocol. * @dev It is possible to set _maxBorrowLimit and _minBorrowLimit as 0 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 disable borrow; require( (_maxBorrowLimit == 0 && _minBorrowLimit == 0) || _maxBorrowLimit > _minBorrowLimit, "max-should-be-higher-than-min" ); emit UpdatedBorrowLimit(minBorrowLimit, _minBorrowLimit, maxBorrowLimit, _maxBorrowLimit); minBorrowLimit = _minBorrowLimit; maxBorrowLimit = _maxBorrowLimit; } }
// 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(uint256 _approvalAmount) external onlyKeeper { _approveToken(_approvalAmount); } /// @notice Claim rewardToken and convert rewardToken into collateral token. function claimAndSwapRewards(uint256 _minAmountOut) external onlyKeeper returns (uint256 _amountOut) { uint256 _collateralBefore = collateralToken.balanceOf(address(this)); _claimAndSwapRewards(); _amountOut = collateralToken.balanceOf(address(this)) - _collateralBefore; require(_amountOut >= _minAmountOut, "not-enough-amountOut"); } /// @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 onlyKeeper:: Swap given token into collateral token. function swapToCollateral(IERC20 _tokenIn, uint256 _minAmountOut) external onlyKeeper returns (uint256 _amountOut) { require(address(_tokenIn) != address(collateralToken), "not-allowed-to-sweep-collateral"); require(!isReservedToken(address(_tokenIn)), "not-allowed-to-sweep"); uint256 _collateralBefore = collateralToken.balanceOf(address(this)); uint256 _amountIn = _tokenIn.balanceOf(address(this)); if (_amountIn > 0) { if (_amountIn > _tokenIn.allowance(address(this), address(swapper))) { _tokenIn.safeApprove(address(swapper), 0); _tokenIn.safeApprove(address(swapper), MAX_UINT_VALUE); } _swapExactInput(address(_tokenIn), address(collateralToken), _amountIn); } _amountOut = collateralToken.balanceOf(address(this)) - _collateralBefore; require(_amountOut >= _minAmountOut, "not-enough-amountOut"); } /** * @notice sweep given token to feeCollector of strategy * @param _fromToken token address to sweep */ function sweep(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 _claimAndSwapRewards() internal virtual { (address _rewardToken, uint256 _rewardsAmount) = _claimRewards(); if (_rewardsAmount > 0) { _safeSwapExactInput(_rewardToken, address(collateralToken), _rewardsAmount); } } // solhint-disable-next-line no-empty-blocks function _claimRewards() internal virtual returns (address, uint256) {} function _rebalance() internal virtual returns (uint256 _profit, uint256 _loss, uint256 _payback); function _swapExactInput( address _tokenIn, address _tokenOut, uint256 _amountIn ) internal returns (uint256 _amountOut) { _amountOut = 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; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-commons/contracts/interfaces/vesper/IStrategy.sol"; import "vesper-pools/contracts/interfaces/vesper/IVesperPool.sol"; import "vesper-pools/contracts/interfaces/vesper/IPoolRewards.sol"; import "vesper-pools/contracts/dependencies/openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/swapper/IRoutedSwapper.sol"; library VesperRewards { using SafeERC20 for IERC20; function _approveToken(IVesperPool vPool_, IRoutedSwapper swapper_, uint256 amount_) internal { address _poolRewards = vPool_.poolRewards(); if (_poolRewards != address(0)) { address[] memory _rewardTokens = IPoolRewards(_poolRewards).getRewardTokens(); uint256 _length = _rewardTokens.length; for (uint256 i; i < _length; ++i) { // Borrow strategy is using 2 protocols and other protocol may have same reward token. // So it is possible that we have already approved reward token. if (IERC20(_rewardTokens[i]).allowance(address(this), address(swapper_)) == 0) { IERC20(_rewardTokens[i]).safeApprove(address(swapper_), amount_); } else { IERC20(_rewardTokens[i]).safeApprove(address(swapper_), 0); IERC20(_rewardTokens[i]).safeApprove(address(swapper_), amount_); } } } } function _claimAndSwapRewards(IVesperPool vPool_, IRoutedSwapper swapper_, address collateralToken_) internal { address _poolRewards = vPool_.poolRewards(); if (_poolRewards != address(0)) { IPoolRewards(_poolRewards).claimReward(address(this)); address[] memory _rewardTokens = IPoolRewards(_poolRewards).getRewardTokens(); uint256 _length = _rewardTokens.length; for (uint256 i; i < _length; ++i) { uint256 _rewardAmount = IERC20(_rewardTokens[i]).balanceOf(address(this)); if (_rewardAmount > 0 && _rewardTokens[i] != collateralToken_) { try swapper_.swapExactInput(_rewardTokens[i], collateralToken_, _rewardAmount, 1, address(this)) {} catch {} //solhint-disable no-empty-blocks } } } } }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"address","name":"swapper_","type":"address"},{"internalType":"address","name":"receiptToken_","type":"address"},{"internalType":"address","name":"borrowToken_","type":"address"},{"internalType":"address","name":"aaveAddressProvider_","type":"address"},{"internalType":"address","name":"vPool_","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":[],"name":"aaveAddressProvider","outputs":[{"internalType":"contract PoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"addKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_approvalAmount","type":"uint256"}],"name":"approveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAmountOut","type":"uint256"}],"name":"claimAndSwapRewards","outputs":[{"internalType":"uint256","name":"_amountOut","type":"uint256"}],"stateMutability":"nonpayable","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":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"address","name":"_keeperAddress","type":"address"}],"name":"removeKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_tokenIn","type":"address"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"}],"name":"swapToCollateral","outputs":[{"internalType":"uint256","name":"_amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapper","outputs":[{"internalType":"contract IRoutedSwapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"}],"name":"sweep","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":"vdToken","outputs":[{"internalType":"contract AToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedCollateral","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
610100604052611b586006556121346007553480156200001e57600080fd5b50604051620064a1380380620064a1833981016040819052620000419162000702565b868686868686868686868686858585856001600160a01b038316620000ad5760405162461bcd60e51b815260206004820152601460248201527f706f6f6c2d616464726573732d69732d7a65726f00000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620001055760405162461bcd60e51b815260206004820152601760248201527f737761707065722d616464726573732d69732d7a65726f0000000000000000006044820152606401620000a4565b600280546001600160a01b0319166001600160a01b0384811691909117909155831660a081905260408051637e062a3560e11b8152905163fc0c546a91600480820192602092909190829003018186803b1580156200016357600080fd5b505afa15801562000178573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019e919062000863565b6001600160a01b03908116608052600080546001600160a01b031916918316919091179055620001e5620001cf3390565b6003620005bb60201b62001edd1790919060201c565b620002275760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401620000a4565b505081516200023f915060059060208401906200062d565b506001600160a01b038216620002985760405162461bcd60e51b815260206004820152601760248201527f6164647265737350726f76696465722d69732d7a65726f0000000000000000006044820152606401620000a4565b600b80546001600160a01b031916737f39c581f595b53c5cb19bd0b3f8da6c935e2ca0908117909155604080516358b50cef60e11b815290516001600160a01b0387169163b16a19de916004808301926020929190829003018186803b1580156200030257600080fd5b505afa15801562000317573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200033d919062000863565b6001600160a01b031614620003955760405162461bcd60e51b815260206004820152601560248201527f696e76616c69642d726563656970742d746f6b656e00000000000000000000006044820152606401620000a4565b600080836001600160a01b031663e860accb6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003d257600080fd5b505afa158015620003e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200040d919062000863565b6040516334924edb60e21b81526001600160a01b038781166004830152919091169063d2493b6c9060240160606040518083038186803b1580156200045157600080fd5b505afa15801562000466573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200048c91906200088a565b600980546001600160a01b03199081166001600160a01b0393841617909155600880548216998316998a179055600a8054909116938216939093179092555093841660c052505060408051637e062a3560e11b81529051939650918816945063fc0c546a935050600480820192602092909190829003018186803b1580156200051457600080fd5b505afa15801562000529573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200054f919062000863565b6001600160a01b0316146200059b5760405162461bcd60e51b81526020600482015260116024820152701a5b9d985b1a590b59dc9bddcb5c1bdbdb607a1b6044820152606401620000a4565b506001600160a01b031660e052506200091b9a5050505050505050505050565b6000620005d2836001600160a01b038416620005db565b90505b92915050565b60008181526001830160205260408120546200062457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005d5565b506000620005d5565b8280546200063b90620008de565b90600052602060002090601f0160209004810192826200065f5760008555620006aa565b82601f106200067a57805160ff1916838001178555620006aa565b82800160010185558215620006aa579182015b82811115620006aa5782518255916020019190600101906200068d565b50620006b8929150620006bc565b5090565b5b80821115620006b85760008155600101620006bd565b6001600160a01b0381168114620006e957600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b600080600080600080600060e0888a0312156200071e57600080fd5b87516200072b81620006d3565b809750506020808901516200074081620006d3565b60408a01519097506200075381620006d3565b60608a01519096506200076681620006d3565b60808a01519095506200077981620006d3565b60a08a01519094506200078c81620006d3565b60c08a01519093506001600160401b0380821115620007aa57600080fd5b818b0191508b601f830112620007bf57600080fd5b815181811115620007d457620007d4620006ec565b604051601f8201601f19908116603f01168101908382118183101715620007ff57620007ff620006ec565b816040528281528e868487010111156200081857600080fd5b600093505b828410156200083c57848401860151818501870152928501926200081d565b828411156200084e5760008684830101525b80965050505050505092959891949750929550565b6000602082840312156200087657600080fd5b81516200088381620006d3565b9392505050565b600080600060608486031215620008a057600080fd5b8351620008ad81620006d3565b6020850151909350620008c081620006d3565b6040850151909250620008d381620006d3565b809150509250925092565b600181811c90821680620008f357607f821691505b602082108114156200091557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516159ee62000ab36000396000818161031a015281816120c501528181613793015281816137c10152818161381a015281816138960152818161463801528181614edf0152614fe50152600081816103db015281816121140152818161242a01528181612c530152818161403d015281816141f8015281816149750152614a330152600081816102710152818161091a01528181610a6301528181610baa01528181610c7f01528181610d3201528181611004015281816110d1015281816112fc0152818161150a01528181611ce50152818161231d015281816125b60152818161278f01526152090152600081816103a1015281816104380152818161058c0152818161079a0152818161083d01528181610af001528181610b8801528181610bf601528181610cb201528181610e7c015281816112800152818161173a01528181611915015281816119fa01528181611bc801528181611c06015281816122ce015281816126ac0152818161280201528181613db301528181614bf701526151e701526159ee6000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063951dc22c1161010f578063d8dfeb45116100a2578063ee330ee311610071578063ee330ee314610480578063fb7ee10214610493578063fc0c546a146104a6578063ffa1ad74146104b757600080fd5b8063d8dfeb4514610436578063e260d7471461045c578063e5328e0614610465578063ec78e8321461046d57600080fd5b8063cdaabe41116100de578063cdaabe41146103d6578063ce5494bb146103fd578063d2c35ce814610410578063d3033c391461042357600080fd5b8063951dc22c14610372578063a3f4df7e14610387578063b2016bd41461039c578063c415b95c146103c357600080fd5b80632e1a7d4d11610187578063456dc17a11610156578063456dc17a146103025780636719578c146103155780637d7c2a1c1461033c57806390d675141461035f57600080fd5b80632e1a7d4d146102a65780633ac9fc11146102b95780634032b72b146102cc578063440d7248146102df57600080fd5b80631026013a116101c35780631026013a1461024657806314ae9f2e1461025957806316f0115b1461026c5780632b3297f91461029357600080fd5b806301681a62146101ea5780630181686c146101ff5780630ade00f21461021b575b600080fd5b6101fd6101f836600461527c565b6104db565b005b61020860075481565b6040519081526020015b60405180910390f35b600b5461022e906001600160a01b031681565b6040516001600160a01b039091168152602001610212565b610208610254366004615299565b610732565b6101fd61026736600461527c565b610918565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b60025461022e906001600160a01b031681565b6101fd6102b4366004615299565b610a60565b6101fd6102c7366004615299565b610cd9565b6101fd6102da36600461527c565b610d30565b6102f26102ed36600461527c565b610e78565b6040519015158152602001610212565b60085461022e906001600160a01b031681565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b610344610efd565b60408051938452602084019290925290820152606001610212565b60095461022e906001600160a01b031681565b61037a610f62565b60405161021291906152f6565b61038f610f73565b6040516102129190615335565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b60015461022e906001600160a01b031681565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b6101fd61040b36600461527c565b611001565b6101fd61041e36600461527c565b6112fa565b6101fd61043136600461527c565b611508565b7f000000000000000000000000000000000000000000000000000000000000000061022e565b61020860065481565b610208611716565b60005461022e906001600160a01b031681565b61020861048e366004615368565b6118c3565b6101fd6104a1366004615394565b611ce3565b6000546001600160a01b031661022e565b61038f604051806040016040528060058152602001640352e312e360dc1b81525081565b6104e8335b600390611ef9565b6105325760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b60448201526064015b60405180910390fd5b6001546001600160a01b031661058a5760405162461bcd60e51b815260206004820152601560248201527f6665652d636f6c6c6563746f722d6e6f742d73657400000000000000000000006044820152606401610529565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316141561060c5760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610529565b61061581610e78565b156106595760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610529565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561069757600154610694906001600160a01b031647611f1b565b50565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156106d957600080fd5b505afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071191906153b6565b60015490915061072e906001600160a01b03848116911683612039565b5050565b600061073d336104e0565b6107825760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156107e457600080fd5b505afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c91906153b6565b90506108266120b1565b6040516370a0823160e01b815230600482015281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561088757600080fd5b505afa15801561089b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bf91906153b6565b6108c991906153e5565b9150828210156109125760405162461bcd60e51b81526020600482015260146024820152731b9bdd0b595b9bdd59da0b585b5bdd5b9d13dd5d60621b6044820152606401610529565b50919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561097157600080fd5b505afa158015610985573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a991906153fc565b6001600160a01b0316336001600160a01b031614610a095760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b610a146003826120f9565b6106945760405162461bcd60e51b815260206004820152601460248201527f72656d6f76652d6b65657065722d6661696c65640000000000000000000000006044820152606401610529565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ad85760405162461bcd60e51b815260206004820152601960248201527f63616c6c65722d69732d6e6f742d7665737065722d706f6f6c000000000000006044820152606401610529565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610b3a57600080fd5b505afa158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7291906153b6565b9050818110610bcf5761072e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000084612039565b610be1610bdc82846153e5565b61210e565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610c4057600080fd5b505afa158015610c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7891906153b6565b905061072e7f0000000000000000000000000000000000000000000000000000000000000000610ca8848461229e565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190612039565b610ce2336104e0565b610d275760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b610694816122b4565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8957600080fd5b505afa158015610d9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc191906153fc565b6001600160a01b0316336001600160a01b031614610e215760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b610e2c600382611edd565b6106945760405162461bcd60e51b815260206004820152601160248201527f6164642d6b65657065722d6661696c65640000000000000000000000000000006044820152606401610529565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161480610ec757506000546001600160a01b038381169116145b80610edf57506009546001600160a01b038381169116145b80610ef757506008546001600160a01b038381169116145b92915050565b60008080610f0a336104e0565b610f4f5760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b610f576122f7565b925092509250909192565b6060610f6e6003612ad8565b905090565b60058054610f8090615419565b80601f0160208091040260200160405190810160405280929190818152602001828054610fac90615419565b8015610ff95780601f10610fce57610100808354040283529160200191610ff9565b820191906000526020600020905b815481529060010190602001808311610fdc57829003601f168201915b505050505081565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110795760405162461bcd60e51b815260206004820152601960248201527f63616c6c65722d69732d6e6f742d7665737065722d706f6f6c000000000000006044820152606401610529565b6001600160a01b0381166110cf5760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f000000006044820152606401610529565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561113257600080fd5b505afa158015611146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116a91906153fc565b6001600160a01b0316146111c05760405162461bcd60e51b815260206004820152601660248201527f6e6f742d76616c69642d6e65772d7374726174656779000000000000000000006044820152606401610529565b6111c981612ae5565b6000546040516370a0823160e01b815230600482015261125d9183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561121257600080fd5b505afa158015611226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124a91906153b6565b6000546001600160a01b03169190612039565b6040516370a0823160e01b81523060048201526106949082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca891906153b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561135357600080fd5b505afa158015611367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138b91906153fc565b6001600160a01b0316336001600160a01b0316146113eb5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b6001600160a01b0381166114415760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f0000006044820152606401610529565b6001546001600160a01b038281169116141561149f5760405162461bcd60e51b815260206004820152601560248201527f6665652d636f6c6c6563746f722d69732d73616d6500000000000000000000006044820152606401610529565b6001546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a36001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561156157600080fd5b505afa158015611575573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159991906153fc565b6001600160a01b0316336001600160a01b0316146115f95760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b6001600160a01b03811661164f5760405162461bcd60e51b815260206004820152601760248201527f737761707065722d616464726573732d69732d7a65726f0000000000000000006044820152606401610529565b6002546001600160a01b03828116911614156116ad5760405162461bcd60e51b815260206004820152600f60248201527f737761707065722d69732d73616d6500000000000000000000000000000000006044820152606401610529565b6002546040516001600160a01b038084169216907f6c953b7ec311055c20b96a42cea31e89528e375b1bf953a503db40854b3188fe90600090a36002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6040516370a0823160e01b81523060048201526000906117b9906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561177c57600080fd5b505afa158015611790573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b491906153b6565b612ce7565b600b546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156117fc57600080fd5b505afa158015611810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183491906153b6565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561187757600080fd5b505afa15801561188b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118af91906153b6565b6118b9919061544e565b610f6e919061544e565b60006118ce336104e0565b6119135760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614156119955760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610529565b61199e83610e78565b156119e25760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610529565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015611a4457600080fd5b505afa158015611a58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7c91906153b6565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038616906370a082319060240160206040518083038186803b158015611ac157600080fd5b505afa158015611ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af991906153b6565b90508015611bef57600254604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201529086169063dd62ed3e9060440160206040518083038186803b158015611b4c57600080fd5b505afa158015611b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8491906153b6565b811115611bc257600254611ba6906001600160a01b0387811691166000612d6d565b600254611bc2906001600160a01b038781169116600019612d6d565b611bed857f000000000000000000000000000000000000000000000000000000000000000083612e98565b505b6040516370a0823160e01b815230600482015282907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8891906153b6565b611c9291906153e5565b925083831015611cdb5760405162461bcd60e51b81526020600482015260146024820152731b9bdd0b595b9bdd59da0b585b5bdd5b9d13dd5d60621b6044820152606401610529565b505092915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611d3c57600080fd5b505afa158015611d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7491906153fc565b6001600160a01b0316336001600160a01b031614611dd45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b6127108110611e255760405162461bcd60e51b815260206004820152601860248201527f696e76616c69642d6d61782d626f72726f772d6c696d697400000000000000006044820152606401610529565b80158015611e31575081155b80611e3b57508181115b611e875760405162461bcd60e51b815260206004820152601d60248201527f6d61782d73686f756c642d62652d6869676865722d7468616e2d6d696e0000006044820152606401610529565b6006546007546040805192835260208301859052820152606081018290527fedd77444afdf63401315e81ffe86d08f7865796e8ad2e11acf1d56a1393f07d59060800160405180910390a1600691909155600755565b6000611ef2836001600160a01b038416612f3c565b9392505050565b6001600160a01b03811660009081526001830160205260408120541515611ef2565b80471015611f6b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610529565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fb8576040519150601f19603f3d011682016040523d82523d6000602084013e611fbd565b606091505b50509050806120345760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610529565b505050565b6040516001600160a01b03831660248201526044810182905261203490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152612f8b565b6120b961305d565b600254600b546120f7917f0000000000000000000000000000000000000000000000000000000000000000916001600160a01b03918216911661314f565b565b6000611ef2836001600160a01b03841661346a565b610694817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561216b57600080fd5b505afa15801561217f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a391906153fc565b6009546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156121e657600080fd5b505afa1580156121fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061221e91906153b6565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561226157600080fd5b505afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229991906153b6565b61355d565b60008183106122ad5781611ef2565b5090919050565b6122bd81613778565b600b54610694906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612d6d565b604051636a9eee1360e11b81523060048201526000908190819081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d53ddc269060240160206040518083038186803b15801561235f57600080fd5b505afa158015612373573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061239791906153b6565b6009546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b1580156123e057600080fd5b505afa1580156123f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061241891906153b6565b905060006124246137f0565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561248157600080fd5b505afa158015612495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b991906153fc565b9050818311156124db576124d66124d083856153e5565b826139b4565b6124ed565b6124ed6124e884846153e5565b613c5b565b60006124f7613d0b565b600080546040516370a0823160e01b815230600482015292935090916001600160a01b03909116906370a082319060240160206040518083038186803b15801561254057600080fd5b505afa158015612554573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257891906153b6565b9050600061258582613e3b565b90506000612593848361544e565b604051639f2b283360e01b81523060048201529091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639f2b28339060240160206040518083038186803b1580156125f857600080fd5b505afa15801561260c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061263091906153b6565b90508082111561264b5761264481836153e5565b9b50612658565b61265582826153e5565b9a505b60006126648a8e61544e565b90508086101561273357600061268361267d88846153e5565b8661229e565b905080156127315761269781898c8961355d565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156126f657600080fd5b505afa15801561270a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272e91906153b6565b96505b505b61273d868b61229e565b9a508a861161274d576000612760565b61276061275a8c886153e5565b8e61229e565b6040516302df682360e11b815260048101829052602481018e9052604481018d9052909d506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906305bed04690606401600060405180830381600087803b1580156127d357600080fd5b505af11580156127e7573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b15801561284d57600080fd5b505afa158015612861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288591906153b6565b90508015612897576128978189613e76565b6009546040516370a0823160e01b8152306004820152600091829161299d91839182916001600160a01b0316906370a082319060240160206040518083038186803b1580156128e557600080fd5b505afa1580156128f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291d91906153b6565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561296057600080fd5b505afa158015612974573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299891906153b6565b613f89565b909250905080156129b7576129b2818b6145a2565b612a38565b8115612a385760085460405163a415bcad60e01b81526001600160a01b039182166004820152602481018490526002604482015260006064820152306084820152908b169063a415bcad9060a401600060405180830381600087803b158015612a1f57600080fd5b505af1158015612a33573d6000803e3d6000fd5b505050505b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612a7c57600080fd5b505afa158015612a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab491906153b6565b90508015612ac557612ac581614622565b5050505050505050505050505050909192565b60606000611ef283614698565b60008054906101000a90046001600160a01b03166001600160a01b0316816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3b57600080fd5b505afa158015612b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b7391906153fc565b6001600160a01b031614612bc95760405162461bcd60e51b815260206004820152601360248201527f77726f6e672d726563656970742d746f6b656e000000000000000000000000006044820152606401610529565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612c0d57600080fd5b505afa158015612c21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4591906153b6565b9050801561072e5761072e817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015612caa57600080fd5b505afa158015612cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce291906153fc565b6145a2565b60405162b0e38960e81b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063b0e38900906024015b60206040518083038186803b158015612d3557600080fd5b505afa158015612d49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef791906153b6565b801580612df65750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015612dbc57600080fd5b505afa158015612dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df491906153b6565b155b612e685760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610529565b6040516001600160a01b03831660248201526044810182905261203490849063095ea7b360e01b90606401612065565b600254604051636ccb2b0160e01b81526001600160a01b038581166004830152848116602483015260448201849052600160648301523060848301526000921690636ccb2b019060a401602060405180830381600087803b158015612efc57600080fd5b505af1158015612f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3491906153b6565b949350505050565b6000818152600183016020526040812054612f8357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ef7565b506000610ef7565b6000612fe0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146f49092919063ffffffff16565b8051909150156120345780806020019051810190612ffe919061547b565b6120345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610529565b600080548190613075906001600160a01b0316614703565b8151919350915060005b8181101561314957600083828151811061309b5761309b615496565b60200260200101511180156130e25750600b5484516001600160a01b03909116908590839081106130ce576130ce615496565b60200260200101516001600160a01b031614155b15613139576131398482815181106130fc576130fc615496565b6020026020010151600b60009054906101000a90046001600160a01b031685848151811061312c5761312c615496565b602002602001015161484c565b613142816154ac565b905061307f565b50505050565b6000836001600160a01b0316638bc6beb26040518163ffffffff1660e01b815260040160206040518083038186803b15801561318a57600080fd5b505afa15801561319e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c291906153fc565b90506001600160a01b038116156131495760405163d279c19160e01b81523060048201526001600160a01b0382169063d279c19190602401600060405180830381600087803b15801561321457600080fd5b505af1158015613228573d6000803e3d6000fd5b505050506000816001600160a01b031663c4f59f9b6040518163ffffffff1660e01b815260040160006040518083038186803b15801561326757600080fd5b505afa15801561327b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526132a391908101906155a8565b805190915060005b818110156134615760008382815181106132c7576132c7615496565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561331257600080fd5b505afa158015613326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061334a91906153b6565b90506000811180156133875750856001600160a01b031684838151811061337357613373615496565b60200260200101516001600160a01b031614155b1561345057866001600160a01b0316636ccb2b018584815181106133ad576133ad615496565b60209081029190910101516040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529089166024820152604481018490526001606482015230608482015260a401602060405180830381600087803b15801561341557600080fd5b505af1925050508015613445575060408051601f3d908101601f19168201909252613442918101906153b6565b60015b61344e57613450565b505b5061345a816154ac565b90506132ab565b50505050505050565b6000818152600183016020526040812054801561355357600061348e6001836153e5565b85549091506000906134a2906001906153e5565b90508181146135075760008660000182815481106134c2576134c2615496565b90600052602060002001549050808760000184815481106134e5576134e5615496565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613518576135186155dd565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ef7565b6000915050610ef7565b600061356885612ce7565b905060006135796000838686613f89565b915050801561358c5761358c81866145a2565b600b54600080546040516370a0823160e01b81526001600160a01b039182166004820152919261362092869261361b9289929116906370a08231906024015b60206040518083038186803b1580156135e357600080fd5b505afa1580156135f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361b91906153b6565b61229e565b600b54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018390523060448201529192508291908816906369328dec90606401602060405180830381600087803b15801561367957600080fd5b505af115801561368d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b191906153b6565b1460405180604001604052806002815260200161323960f01b815250906136eb5760405162461bcd60e51b81526004016105299190615335565b50600b546040516370a0823160e01b815230600482015261376e916001600160a01b0316906370a082319060240160206040518083038186803b15801561373157600080fd5b505afa158015613745573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061376991906153b6565b6148e8565b5050505050505050565b6137818161494d565b6008546137b8906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083612d6d565b600254610694907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b031683614cce565b6040516370a0823160e01b8152306004820152600090670de0b6b3a7640000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561385c57600080fd5b505afa158015613870573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061389491906153b6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156138ed57600080fd5b505afa158015613901573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061392591906153b6565b61392f91906155f3565b6139399190615612565b6008546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561397c57600080fd5b505afa158015613990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b991906153b6565b600254600b546008546040516353b609b560e01b81526001600160a01b03928316600482015290821660248201526044810185905260009291909116906353b609b590606401602060405180830381600087803b158015613a1457600080fd5b505af1158015613a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a4c91906153b6565b9050801561203457600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015613a9857600080fd5b505afa158015613aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ad091906153b6565b905080821115613bb4576000613ae682846153e5565b600b54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018390523060448201529192508291908616906369328dec90606401602060405180830381600087803b158015613b3f57600080fd5b505af1158015613b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b7791906153b6565b1460405180604001604052806002815260200161323960f01b81525090613bb15760405162461bcd60e51b81526004016105299190615335565b50505b600254600b546008546040516381cc619b60e01b81526001600160a01b039283166004820152908216602482015260448101879052606481018590523060848201529116906381cc619b9060a401602060405180830381600087803b158015613c1c57600080fd5b505af1158015613c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c5491906153b6565b5050505050565b801561069457613c6a81614ed5565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015613cae57600080fd5b505afa158015613cc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ce691906153b6565b9050801561072e57600854600b5461072e916001600160a01b0390811691168361484c565b600b546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015613d5357600080fd5b505afa158015613d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d8b91906153b6565b90508015613d9e57613d9c816148e8565b505b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015613dfd57600080fd5b505afa158015613e11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e3591906153b6565b91505090565b604051632eca54bf60e21b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063bb2952fc90602401612d1d565b6000613e818361506e565b9050801561203457600b5460405163617ba03760e01b81526001600160a01b03918216600482015260248101839052306044820152600060648201529083169063617ba03790608401600060405180830381600087803b158015613ee457600080fd5b505af1925050508015613ef5575060015b61203457613f01615634565b806308c379a01415613f7d5750613f16615650565b80613f215750613f7f565b613f2a816156da565b611a9b60f11b146131495760405162461bcd60e51b815260206004820152600e60248201527f6465706f736974206661696c65640000000000000000000000000000000000006044820152606401610529565b505b3d6000803e3d6000fd5b600080851580613f97575084155b613fe35760405162461bcd60e51b815260206004820152601160248201527f616c6c2d696e7075742d67742d7a65726f0000000000000000000000000000006044820152606401610529565b600754613ff557506000905082614599565b600080871161401b5785841161400c576000614025565b61401686856153e5565b614025565b614025878561544e565b905080614039576000859250925050614599565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561409457600080fd5b505afa1580156140a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140cc91906153fc565b60085460405163b3596f0760e01b81526001600160a01b0391821660048201529192506000919083169063b3596f079060240160206040518083038186803b15801561411757600080fd5b505afa15801561412b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061414f91906153b6565b600b5460405163b3596f0760e01b81526001600160a01b0391821660048201529192506000919084169063b3596f079060240160206040518083038186803b15801561419a57600080fd5b505afa1580156141ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d291906153b6565b90508115806141df575080155b156141f4576000889550955050505050614599565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e860accb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561424f57600080fd5b505afa158015614263573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061428791906153fc565b600b54604051633e15014160e01b81526001600160a01b039182166004820152911690633e150141906024016101406040518083038186803b1580156142cc57600080fd5b505afa1580156142e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061430491906156fe565b50505050505050509150506000600b60009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561435f57600080fd5b505afa158015614373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143979190615795565b6143a290600a61589c565b6143ae906127106155f3565b836143b984896155f3565b6143c391906155f3565b6143cd9190615612565b9050600084600860009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561442057600080fd5b505afa158015614434573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144589190615795565b61446390600a61589c565b61446d90846155f3565b6144779190615612565b9050806144915760008b9850985050505050505050614599565b6000612710600754836144a491906155f3565b6144ae9190615612565b90506000612710600654846144c391906155f3565b6144cd9190615612565b9050818d11156144e8576144e1818e6153e5565b995061458f565b8c81111561458f576144fa8d826153e5565b600854600a546040516370a0823160e01b81526001600160a01b039182166004820152929d506000929116906370a082319060240160206040518083038186803b15801561454757600080fd5b505afa15801561455b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061457f91906153b6565b9050808c111561458d57809b505b505b5050505050505050505b94509492505050565b6145ab826150a9565b60085460405163573ade8160e01b81526001600160a01b03918216600482015260248101849052600260448201523060648201529082169063573ade8190608401600060405180830381600087803b15801561460657600080fd5b505af115801561461a573d6000803e3d6000fd5b505050505050565b60405163b6b55f2560e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f2590602401600060405180830381600087803b15801561468457600080fd5b505af1158015613c54573d6000803e3d6000fd5b6060816000018054806020026020016040519081016040528092919081815260200182805480156146e857602002820191906000526020600020905b8154815260200190600101908083116146d4575b50505050509050919050565b6060612f3484846000856150b2565b606080826001600160a01b03166375d264136040518163ffffffff1660e01b815260040160206040518083038186803b15801561473f57600080fd5b505afa92505050801561476f575060408051601f3d908101601f1916820190925261476c918101906153fc565b60015b61477857915091565b6040805160018082528183019092526000916020808301908036833701905050905084816000815181106147ae576147ae615496565b6001600160a01b03928316602091820292909201015260405163bb492bf560e01b81529083169063bb492bf5906147eb90849030906004016158ab565b600060405180830381600087803b15801561480557600080fd5b505af1158015614819573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261484191908101906158d6565b935093505050915091565b600254604051636ccb2b0160e01b81526001600160a01b0385811660048301528481166024830152604482018490526001606483015230608483015290911690636ccb2b019060a401602060405180830381600087803b1580156148af57600080fd5b505af19250505080156148df575060408051601f3d908101601f191682019092526148dc918101906153b6565b60015b61314957505050565b604051636f074d1f60e11b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063de0e9a3e906024015b602060405180830381600087803b15801561493957600080fd5b505af1158015612d49573d6000803e3d6000fd5b614956816151da565b6000600260009054906101000a90046001600160a01b03169050614a177f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156149cc57600080fd5b505afa1580156149e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a0491906153fc565b600b546001600160a01b03169084612d6d565b600b54614a2e906001600160a01b03168284612d6d565b614ad57f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a8a57600080fd5b505afa158015614a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ac291906153fc565b6008546001600160a01b03169084612d6d565b600854614aec906001600160a01b03168284612d6d565b60008054906101000a90046001600160a01b03166001600160a01b03166375d264136040518163ffffffff1660e01b815260040160206040518083038186803b158015614b3857600080fd5b505afa925050508015614b68575060408051601f3d908101601f19168201909252614b65918101906153fc565b60015b614b70575050565b6000816001600160a01b031663b45ac1a96040518163ffffffff1660e01b815260040160006040518083038186803b158015614bab57600080fd5b505afa158015614bbf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614be791908101906155a8565b905060005b8151811015613c54577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316828281518110614c3157614c31615496565b60200260200101516001600160a01b031614158015614c82575060085482516001600160a01b0390911690839083908110614c6e57614c6e615496565b60200260200101516001600160a01b031614155b15614cbe57614cbe8486848481518110614c9e57614c9e615496565b60200260200101516001600160a01b0316612d6d9092919063ffffffff16565b614cc7816154ac565b9050614bec565b6000836001600160a01b0316638bc6beb26040518163ffffffff1660e01b815260040160206040518083038186803b158015614d0957600080fd5b505afa158015614d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d4191906153fc565b90506001600160a01b03811615613149576000816001600160a01b031663c4f59f9b6040518163ffffffff1660e01b815260040160006040518083038186803b158015614d8d57600080fd5b505afa158015614da1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614dc991908101906155a8565b805190915060005b8181101561346157828181518110614deb57614deb615496565b6020908102919091010151604051636eb1769f60e11b81523060048201526001600160a01b0388811660248301529091169063dd62ed3e9060440160206040518083038186803b158015614e3e57600080fd5b505afa158015614e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e7691906153b6565b614e9657614e918686858481518110614c9e57614c9e615496565b614ec5565b614eae866000858481518110614c9e57614c9e615496565b614ec58686858481518110614c9e57614c9e615496565b614ece816154ac565b9050614dd1565b80156106945760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b158015614f3657600080fd5b505afa158015614f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614f6e91906153b6565b9050600081614f8584670de0b6b3a76400006155f3565b614f8f9190615612565b9050670de0b6b3a7640000614fa483836155f3565b614fae9190615612565b8311614fba5780614fc5565b614fc581600161544e565b6040516370a0823160e01b81523060048201529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9061502290849084906370a08231906024016135cb565b6040518263ffffffff1660e01b815260040161504091815260200190565b600060405180830381600087803b15801561505a57600080fd5b505af1158015613461573d6000803e3d6000fd5b604051630ea598cb60e41b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063ea598cb09060240161491f565b61069481614ed5565b6060824710156151135760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610529565b843b6151615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610529565b600080866001600160a01b0316858760405161517d919061599c565b60006040518083038185875af1925050503d80600081146151ba576040519150601f19603f3d011682016040523d82523d6000602084013e6151bf565b606091505b50915091506151cf82828661522e565b979650505050505050565b6106946001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083612d6d565b6060831561523d575081611ef2565b82511561524d5782518084602001fd5b8160405162461bcd60e51b81526004016105299190615335565b6001600160a01b038116811461069457600080fd5b60006020828403121561528e57600080fd5b8135611ef281615267565b6000602082840312156152ab57600080fd5b5035919050565b600081518084526020808501945080840160005b838110156152eb5781516001600160a01b0316875295820195908201906001016152c6565b509495945050505050565b602081526000611ef260208301846152b2565b60005b8381101561532457818101518382015260200161530c565b838111156131495750506000910152565b6020815260008251806020840152615354816040850160208701615309565b601f01601f19169190910160400192915050565b6000806040838503121561537b57600080fd5b823561538681615267565b946020939093013593505050565b600080604083850312156153a757600080fd5b50508035926020909101359150565b6000602082840312156153c857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156153f7576153f76153cf565b500390565b60006020828403121561540e57600080fd5b8151611ef281615267565b600181811c9082168061542d57607f821691505b6020821081141561091257634e487b7160e01b600052602260045260246000fd5b60008219821115615461576154616153cf565b500190565b8051801515811461547657600080fd5b919050565b60006020828403121561548d57600080fd5b611ef282615466565b634e487b7160e01b600052603260045260246000fd5b60006000198214156154c0576154c06153cf565b5060010190565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715615503576155036154c7565b6040525050565b600067ffffffffffffffff821115615524576155246154c7565b5060051b60200190565b600082601f83011261553f57600080fd5b8151602061554c8261550a565b60405161555982826154dd565b83815260059390931b850182019282810191508684111561557957600080fd5b8286015b8481101561559d57805161559081615267565b835291830191830161557d565b509695505050505050565b6000602082840312156155ba57600080fd5b815167ffffffffffffffff8111156155d157600080fd5b612f348482850161552e565b634e487b7160e01b600052603160045260246000fd5b600081600019048311821515161561560d5761560d6153cf565b500290565b60008261562f57634e487b7160e01b600052601260045260246000fd5b500490565b600060033d111561564d5760046000803e5060005160e01c5b90565b600060443d101561565e5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561568e57505050505090565b82850191508151818111156156a65750505050505090565b843d87010160208285010111156156c05750505050505090565b6156cf602082860101876154dd565b509095945050505050565b805160208083015191908110156109125760001960209190910360031b1b16919050565b6000806000806000806000806000806101408b8d03121561571e57600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151955061574a60a08c01615466565b945061575860c08c01615466565b935061576660e08c01615466565b92506157756101008c01615466565b91506157846101208c01615466565b90509295989b9194979a5092959850565b6000602082840312156157a757600080fd5b815160ff81168114611ef257600080fd5b600181815b808511156157f35781600019048211156157d9576157d96153cf565b808516156157e657918102915b93841c93908002906157bd565b509250929050565b60008261580a57506001610ef7565b8161581757506000610ef7565b816001811461582d576002811461583757615853565b6001915050610ef7565b60ff841115615848576158486153cf565b50506001821b610ef7565b5060208310610133831016604e8410600b8410161715615876575081810a610ef7565b61588083836157b8565b8060001904821115615894576158946153cf565b029392505050565b6000611ef260ff8416836157fb565b6040815260006158be60408301856152b2565b90506001600160a01b03831660208301529392505050565b600080604083850312156158e957600080fd5b825167ffffffffffffffff8082111561590157600080fd5b61590d8683870161552e565b935060209150818501518181111561592457600080fd5b85019050601f8101861361593757600080fd5b80516159428161550a565b60405161594f82826154dd565b82815260059290921b830184019184810191508883111561596f57600080fd5b928401925b8284101561598d57835182529284019290840190615974565b80955050505050509250929050565b600082516159ae818460208701615309565b919091019291505056fea2646970667358221220da19a809dab5bbac43405d5e2c54f830f3f379f761841beae63cb1f5b7da9bf364736f6c634300080900330000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b000000000000000000000000229f19942612a8dbdec3643cb23f88685ccd56a50000000000000000000000000b925ed163218f6662a35e0f0371ac234f9e9371000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a8045200000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001b4161766556335f5665737065725f58795f53544554485f555344430000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063951dc22c1161010f578063d8dfeb45116100a2578063ee330ee311610071578063ee330ee314610480578063fb7ee10214610493578063fc0c546a146104a6578063ffa1ad74146104b757600080fd5b8063d8dfeb4514610436578063e260d7471461045c578063e5328e0614610465578063ec78e8321461046d57600080fd5b8063cdaabe41116100de578063cdaabe41146103d6578063ce5494bb146103fd578063d2c35ce814610410578063d3033c391461042357600080fd5b8063951dc22c14610372578063a3f4df7e14610387578063b2016bd41461039c578063c415b95c146103c357600080fd5b80632e1a7d4d11610187578063456dc17a11610156578063456dc17a146103025780636719578c146103155780637d7c2a1c1461033c57806390d675141461035f57600080fd5b80632e1a7d4d146102a65780633ac9fc11146102b95780634032b72b146102cc578063440d7248146102df57600080fd5b80631026013a116101c35780631026013a1461024657806314ae9f2e1461025957806316f0115b1461026c5780632b3297f91461029357600080fd5b806301681a62146101ea5780630181686c146101ff5780630ade00f21461021b575b600080fd5b6101fd6101f836600461527c565b6104db565b005b61020860075481565b6040519081526020015b60405180910390f35b600b5461022e906001600160a01b031681565b6040516001600160a01b039091168152602001610212565b610208610254366004615299565b610732565b6101fd61026736600461527c565b610918565b61022e7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b81565b60025461022e906001600160a01b031681565b6101fd6102b4366004615299565b610a60565b6101fd6102c7366004615299565b610cd9565b6101fd6102da36600461527c565b610d30565b6102f26102ed36600461527c565b610e78565b6040519015158152602001610212565b60085461022e906001600160a01b031681565b61022e7f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a8045281565b610344610efd565b60408051938452602084019290925290820152606001610212565b60095461022e906001600160a01b031681565b61037a610f62565b60405161021291906152f6565b61038f610f73565b6040516102129190615335565b61022e7f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b60015461022e906001600160a01b031681565b61022e7f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e81565b6101fd61040b36600461527c565b611001565b6101fd61041e36600461527c565b6112fa565b6101fd61043136600461527c565b611508565b7f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8461022e565b61020860065481565b610208611716565b60005461022e906001600160a01b031681565b61020861048e366004615368565b6118c3565b6101fd6104a1366004615394565b611ce3565b6000546001600160a01b031661022e565b61038f604051806040016040528060058152602001640352e312e360dc1b81525081565b6104e8335b600390611ef9565b6105325760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b60448201526064015b60405180910390fd5b6001546001600160a01b031661058a5760405162461bcd60e51b815260206004820152601560248201527f6665652d636f6c6c6563746f722d6e6f742d73657400000000000000000000006044820152606401610529565b7f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316816001600160a01b0316141561060c5760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610529565b61061581610e78565b156106595760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610529565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561069757600154610694906001600160a01b031647611f1b565b50565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156106d957600080fd5b505afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071191906153b6565b60015490915061072e906001600160a01b03848116911683612039565b5050565b600061073d336104e0565b6107825760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b1580156107e457600080fd5b505afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c91906153b6565b90506108266120b1565b6040516370a0823160e01b815230600482015281907f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b15801561088757600080fd5b505afa15801561089b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bf91906153b6565b6108c991906153e5565b9150828210156109125760405162461bcd60e51b81526020600482015260146024820152731b9bdd0b595b9bdd59da0b585b5bdd5b9d13dd5d60621b6044820152606401610529565b50919050565b7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561097157600080fd5b505afa158015610985573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a991906153fc565b6001600160a01b0316336001600160a01b031614610a095760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b610a146003826120f9565b6106945760405162461bcd60e51b815260206004820152601460248201527f72656d6f76652d6b65657065722d6661696c65640000000000000000000000006044820152606401610529565b337f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b031614610ad85760405162461bcd60e51b815260206004820152601960248201527f63616c6c65722d69732d6e6f742d7665737065722d706f6f6c000000000000006044820152606401610529565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b158015610b3a57600080fd5b505afa158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7291906153b6565b9050818110610bcf5761072e6001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84167f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b84612039565b610be1610bdc82846153e5565b61210e565b6040516370a0823160e01b81523060048201527f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b158015610c4057600080fd5b505afa158015610c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7891906153b6565b905061072e7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b610ca8848461229e565b6001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84169190612039565b610ce2336104e0565b610d275760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b610694816122b4565b7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8957600080fd5b505afa158015610d9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc191906153fc565b6001600160a01b0316336001600160a01b031614610e215760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b610e2c600382611edd565b6106945760405162461bcd60e51b815260206004820152601160248201527f6164642d6b65657065722d6661696c65640000000000000000000000000000006044820152606401610529565b60007f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316826001600160a01b03161480610ec757506000546001600160a01b038381169116145b80610edf57506009546001600160a01b038381169116145b80610ef757506008546001600160a01b038381169116145b92915050565b60008080610f0a336104e0565b610f4f5760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b610f576122f7565b925092509250909192565b6060610f6e6003612ad8565b905090565b60058054610f8090615419565b80601f0160208091040260200160405190810160405280929190818152602001828054610fac90615419565b8015610ff95780601f10610fce57610100808354040283529160200191610ff9565b820191906000526020600020905b815481529060010190602001808311610fdc57829003601f168201915b505050505081565b337f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316146110795760405162461bcd60e51b815260206004820152601960248201527f63616c6c65722d69732d6e6f742d7665737065722d706f6f6c000000000000006044820152606401610529565b6001600160a01b0381166110cf5760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f000000006044820152606401610529565b7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561113257600080fd5b505afa158015611146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116a91906153fc565b6001600160a01b0316146111c05760405162461bcd60e51b815260206004820152601660248201527f6e6f742d76616c69642d6e65772d7374726174656779000000000000000000006044820152606401610529565b6111c981612ae5565b6000546040516370a0823160e01b815230600482015261125d9183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561121257600080fd5b505afa158015611226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124a91906153b6565b6000546001600160a01b03169190612039565b6040516370a0823160e01b81523060048201526106949082906001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8416906370a082319060240160206040518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca891906153b6565b7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561135357600080fd5b505afa158015611367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138b91906153fc565b6001600160a01b0316336001600160a01b0316146113eb5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b6001600160a01b0381166114415760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f0000006044820152606401610529565b6001546001600160a01b038281169116141561149f5760405162461bcd60e51b815260206004820152601560248201527f6665652d636f6c6c6563746f722d69732d73616d6500000000000000000000006044820152606401610529565b6001546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a36001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561156157600080fd5b505afa158015611575573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159991906153fc565b6001600160a01b0316336001600160a01b0316146115f95760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b6001600160a01b03811661164f5760405162461bcd60e51b815260206004820152601760248201527f737761707065722d616464726573732d69732d7a65726f0000000000000000006044820152606401610529565b6002546001600160a01b03828116911614156116ad5760405162461bcd60e51b815260206004820152600f60248201527f737761707065722d69732d73616d6500000000000000000000000000000000006044820152606401610529565b6002546040516001600160a01b038084169216907f6c953b7ec311055c20b96a42cea31e89528e375b1bf953a503db40854b3188fe90600090a36002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6040516370a0823160e01b81523060048201526000906117b9906001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8416906370a082319060240160206040518083038186803b15801561177c57600080fd5b505afa158015611790573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b491906153b6565b612ce7565b600b546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156117fc57600080fd5b505afa158015611810573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183491906153b6565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561187757600080fd5b505afa15801561188b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118af91906153b6565b6118b9919061544e565b610f6e919061544e565b60006118ce336104e0565b6119135760405162461bcd60e51b815260206004820152601660248201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b6044820152606401610529565b7f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316836001600160a01b031614156119955760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610529565b61199e83610e78565b156119e25760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610529565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b158015611a4457600080fd5b505afa158015611a58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7c91906153b6565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038616906370a082319060240160206040518083038186803b158015611ac157600080fd5b505afa158015611ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af991906153b6565b90508015611bef57600254604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201529086169063dd62ed3e9060440160206040518083038186803b158015611b4c57600080fd5b505afa158015611b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8491906153b6565b811115611bc257600254611ba6906001600160a01b0387811691166000612d6d565b600254611bc2906001600160a01b038781169116600019612d6d565b611bed857f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8483612e98565b505b6040516370a0823160e01b815230600482015282907f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8891906153b6565b611c9291906153e5565b925083831015611cdb5760405162461bcd60e51b81526020600482015260146024820152731b9bdd0b595b9bdd59da0b585b5bdd5b9d13dd5d60621b6044820152606401610529565b505092915050565b7f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b6001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611d3c57600080fd5b505afa158015611d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7491906153fc565b6001600160a01b0316336001600160a01b031614611dd45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f720000000000006044820152606401610529565b6127108110611e255760405162461bcd60e51b815260206004820152601860248201527f696e76616c69642d6d61782d626f72726f772d6c696d697400000000000000006044820152606401610529565b80158015611e31575081155b80611e3b57508181115b611e875760405162461bcd60e51b815260206004820152601d60248201527f6d61782d73686f756c642d62652d6869676865722d7468616e2d6d696e0000006044820152606401610529565b6006546007546040805192835260208301859052820152606081018290527fedd77444afdf63401315e81ffe86d08f7865796e8ad2e11acf1d56a1393f07d59060800160405180910390a1600691909155600755565b6000611ef2836001600160a01b038416612f3c565b9392505050565b6001600160a01b03811660009081526001830160205260408120541515611ef2565b80471015611f6b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610529565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fb8576040519150601f19603f3d011682016040523d82523d6000602084013e611fbd565b606091505b50509050806120345760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610529565b505050565b6040516001600160a01b03831660248201526044810182905261203490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152612f8b565b6120b961305d565b600254600b546120f7917f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a80452916001600160a01b03918216911661314f565b565b6000611ef2836001600160a01b03841661346a565b610694817f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561216b57600080fd5b505afa15801561217f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a391906153fc565b6009546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156121e657600080fd5b505afa1580156121fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061221e91906153b6565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561226157600080fd5b505afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229991906153b6565b61355d565b60008183106122ad5781611ef2565b5090919050565b6122bd81613778565b600b54610694906001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe848116911683612d6d565b604051636a9eee1360e11b81523060048201526000908190819081906001600160a01b037f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b169063d53ddc269060240160206040518083038186803b15801561235f57600080fd5b505afa158015612373573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061239791906153b6565b6009546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b1580156123e057600080fd5b505afa1580156123f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061241891906153b6565b905060006124246137f0565b905060007f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561248157600080fd5b505afa158015612495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b991906153fc565b9050818311156124db576124d66124d083856153e5565b826139b4565b6124ed565b6124ed6124e884846153e5565b613c5b565b60006124f7613d0b565b600080546040516370a0823160e01b815230600482015292935090916001600160a01b03909116906370a082319060240160206040518083038186803b15801561254057600080fd5b505afa158015612554573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257891906153b6565b9050600061258582613e3b565b90506000612593848361544e565b604051639f2b283360e01b81523060048201529091506000906001600160a01b037f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b1690639f2b28339060240160206040518083038186803b1580156125f857600080fd5b505afa15801561260c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061263091906153b6565b90508082111561264b5761264481836153e5565b9b50612658565b61265582826153e5565b9a505b60006126648a8e61544e565b90508086101561273357600061268361267d88846153e5565b8661229e565b905080156127315761269781898c8961355d565b6040516370a0823160e01b81523060048201527f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b1580156126f657600080fd5b505afa15801561270a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272e91906153b6565b96505b505b61273d868b61229e565b9a508a861161274d576000612760565b61276061275a8c886153e5565b8e61229e565b6040516302df682360e11b815260048101829052602481018e9052604481018d9052909d506001600160a01b037f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b16906305bed04690606401600060405180830381600087803b1580156127d357600080fd5b505af11580156127e7573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b031691506370a082319060240160206040518083038186803b15801561284d57600080fd5b505afa158015612861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288591906153b6565b90508015612897576128978189613e76565b6009546040516370a0823160e01b8152306004820152600091829161299d91839182916001600160a01b0316906370a082319060240160206040518083038186803b1580156128e557600080fd5b505afa1580156128f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291d91906153b6565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561296057600080fd5b505afa158015612974573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299891906153b6565b613f89565b909250905080156129b7576129b2818b6145a2565b612a38565b8115612a385760085460405163a415bcad60e01b81526001600160a01b039182166004820152602481018490526002604482015260006064820152306084820152908b169063a415bcad9060a401600060405180830381600087803b158015612a1f57600080fd5b505af1158015612a33573d6000803e3d6000fd5b505050505b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612a7c57600080fd5b505afa158015612a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab491906153b6565b90508015612ac557612ac581614622565b5050505050505050505050505050909192565b60606000611ef283614698565b60008054906101000a90046001600160a01b03166001600160a01b0316816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3b57600080fd5b505afa158015612b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b7391906153fc565b6001600160a01b031614612bc95760405162461bcd60e51b815260206004820152601360248201527f77726f6e672d726563656970742d746f6b656e000000000000000000000000006044820152606401610529565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612c0d57600080fd5b505afa158015612c21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4591906153b6565b9050801561072e5761072e817f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015612caa57600080fd5b505afa158015612cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce291906153fc565b6145a2565b60405162b0e38960e81b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063b0e38900906024015b60206040518083038186803b158015612d3557600080fd5b505afa158015612d49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef791906153b6565b801580612df65750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015612dbc57600080fd5b505afa158015612dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df491906153b6565b155b612e685760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610529565b6040516001600160a01b03831660248201526044810182905261203490849063095ea7b360e01b90606401612065565b600254604051636ccb2b0160e01b81526001600160a01b038581166004830152848116602483015260448201849052600160648301523060848301526000921690636ccb2b019060a401602060405180830381600087803b158015612efc57600080fd5b505af1158015612f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3491906153b6565b949350505050565b6000818152600183016020526040812054612f8357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ef7565b506000610ef7565b6000612fe0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146f49092919063ffffffff16565b8051909150156120345780806020019051810190612ffe919061547b565b6120345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610529565b600080548190613075906001600160a01b0316614703565b8151919350915060005b8181101561314957600083828151811061309b5761309b615496565b60200260200101511180156130e25750600b5484516001600160a01b03909116908590839081106130ce576130ce615496565b60200260200101516001600160a01b031614155b15613139576131398482815181106130fc576130fc615496565b6020026020010151600b60009054906101000a90046001600160a01b031685848151811061312c5761312c615496565b602002602001015161484c565b613142816154ac565b905061307f565b50505050565b6000836001600160a01b0316638bc6beb26040518163ffffffff1660e01b815260040160206040518083038186803b15801561318a57600080fd5b505afa15801561319e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c291906153fc565b90506001600160a01b038116156131495760405163d279c19160e01b81523060048201526001600160a01b0382169063d279c19190602401600060405180830381600087803b15801561321457600080fd5b505af1158015613228573d6000803e3d6000fd5b505050506000816001600160a01b031663c4f59f9b6040518163ffffffff1660e01b815260040160006040518083038186803b15801561326757600080fd5b505afa15801561327b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526132a391908101906155a8565b805190915060005b818110156134615760008382815181106132c7576132c7615496565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561331257600080fd5b505afa158015613326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061334a91906153b6565b90506000811180156133875750856001600160a01b031684838151811061337357613373615496565b60200260200101516001600160a01b031614155b1561345057866001600160a01b0316636ccb2b018584815181106133ad576133ad615496565b60209081029190910101516040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529089166024820152604481018490526001606482015230608482015260a401602060405180830381600087803b15801561341557600080fd5b505af1925050508015613445575060408051601f3d908101601f19168201909252613442918101906153b6565b60015b61344e57613450565b505b5061345a816154ac565b90506132ab565b50505050505050565b6000818152600183016020526040812054801561355357600061348e6001836153e5565b85549091506000906134a2906001906153e5565b90508181146135075760008660000182815481106134c2576134c2615496565b90600052602060002001549050808760000184815481106134e5576134e5615496565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613518576135186155dd565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ef7565b6000915050610ef7565b600061356885612ce7565b905060006135796000838686613f89565b915050801561358c5761358c81866145a2565b600b54600080546040516370a0823160e01b81526001600160a01b039182166004820152919261362092869261361b9289929116906370a08231906024015b60206040518083038186803b1580156135e357600080fd5b505afa1580156135f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361b91906153b6565b61229e565b600b54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018390523060448201529192508291908816906369328dec90606401602060405180830381600087803b15801561367957600080fd5b505af115801561368d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b191906153b6565b1460405180604001604052806002815260200161323960f01b815250906136eb5760405162461bcd60e51b81526004016105299190615335565b50600b546040516370a0823160e01b815230600482015261376e916001600160a01b0316906370a082319060240160206040518083038186803b15801561373157600080fd5b505afa158015613745573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061376991906153b6565b6148e8565b5050505050505050565b6137818161494d565b6008546137b8906001600160a01b03167f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a8045283612d6d565b600254610694907f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a80452906001600160a01b031683614cce565b6040516370a0823160e01b8152306004820152600090670de0b6b3a7640000906001600160a01b037f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a8045216906370a082319060240160206040518083038186803b15801561385c57600080fd5b505afa158015613870573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061389491906153b6565b7f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a804526001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156138ed57600080fd5b505afa158015613901573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061392591906153b6565b61392f91906155f3565b6139399190615612565b6008546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561397c57600080fd5b505afa158015613990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b991906153b6565b600254600b546008546040516353b609b560e01b81526001600160a01b03928316600482015290821660248201526044810185905260009291909116906353b609b590606401602060405180830381600087803b158015613a1457600080fd5b505af1158015613a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a4c91906153b6565b9050801561203457600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015613a9857600080fd5b505afa158015613aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ad091906153b6565b905080821115613bb4576000613ae682846153e5565b600b54604051631a4ca37b60e21b81526001600160a01b039182166004820152602481018390523060448201529192508291908616906369328dec90606401602060405180830381600087803b158015613b3f57600080fd5b505af1158015613b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b7791906153b6565b1460405180604001604052806002815260200161323960f01b81525090613bb15760405162461bcd60e51b81526004016105299190615335565b50505b600254600b546008546040516381cc619b60e01b81526001600160a01b039283166004820152908216602482015260448101879052606481018590523060848201529116906381cc619b9060a401602060405180830381600087803b158015613c1c57600080fd5b505af1158015613c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c5491906153b6565b5050505050565b801561069457613c6a81614ed5565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015613cae57600080fd5b505afa158015613cc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ce691906153b6565b9050801561072e57600854600b5461072e916001600160a01b0390811691168361484c565b600b546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015613d5357600080fd5b505afa158015613d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d8b91906153b6565b90508015613d9e57613d9c816148e8565b505b6040516370a0823160e01b81523060048201527f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a082319060240160206040518083038186803b158015613dfd57600080fd5b505afa158015613e11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e3591906153b6565b91505090565b604051632eca54bf60e21b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063bb2952fc90602401612d1d565b6000613e818361506e565b9050801561203457600b5460405163617ba03760e01b81526001600160a01b03918216600482015260248101839052306044820152600060648201529083169063617ba03790608401600060405180830381600087803b158015613ee457600080fd5b505af1925050508015613ef5575060015b61203457613f01615634565b806308c379a01415613f7d5750613f16615650565b80613f215750613f7f565b613f2a816156da565b611a9b60f11b146131495760405162461bcd60e51b815260206004820152600e60248201527f6465706f736974206661696c65640000000000000000000000000000000000006044820152606401610529565b505b3d6000803e3d6000fd5b600080851580613f97575084155b613fe35760405162461bcd60e51b815260206004820152601160248201527f616c6c2d696e7075742d67742d7a65726f0000000000000000000000000000006044820152606401610529565b600754613ff557506000905082614599565b600080871161401b5785841161400c576000614025565b61401686856153e5565b614025565b614025878561544e565b905080614039576000859250925050614599565b60007f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561409457600080fd5b505afa1580156140a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140cc91906153fc565b60085460405163b3596f0760e01b81526001600160a01b0391821660048201529192506000919083169063b3596f079060240160206040518083038186803b15801561411757600080fd5b505afa15801561412b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061414f91906153b6565b600b5460405163b3596f0760e01b81526001600160a01b0391821660048201529192506000919084169063b3596f079060240160206040518083038186803b15801561419a57600080fd5b505afa1580156141ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d291906153b6565b90508115806141df575080155b156141f4576000889550955050505050614599565b60007f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663e860accb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561424f57600080fd5b505afa158015614263573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061428791906153fc565b600b54604051633e15014160e01b81526001600160a01b039182166004820152911690633e150141906024016101406040518083038186803b1580156142cc57600080fd5b505afa1580156142e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061430491906156fe565b50505050505050509150506000600b60009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561435f57600080fd5b505afa158015614373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143979190615795565b6143a290600a61589c565b6143ae906127106155f3565b836143b984896155f3565b6143c391906155f3565b6143cd9190615612565b9050600084600860009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561442057600080fd5b505afa158015614434573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144589190615795565b61446390600a61589c565b61446d90846155f3565b6144779190615612565b9050806144915760008b9850985050505050505050614599565b6000612710600754836144a491906155f3565b6144ae9190615612565b90506000612710600654846144c391906155f3565b6144cd9190615612565b9050818d11156144e8576144e1818e6153e5565b995061458f565b8c81111561458f576144fa8d826153e5565b600854600a546040516370a0823160e01b81526001600160a01b039182166004820152929d506000929116906370a082319060240160206040518083038186803b15801561454757600080fd5b505afa15801561455b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061457f91906153b6565b9050808c111561458d57809b505b505b5050505050505050505b94509492505050565b6145ab826150a9565b60085460405163573ade8160e01b81526001600160a01b03918216600482015260248101849052600260448201523060648201529082169063573ade8190608401600060405180830381600087803b15801561460657600080fd5b505af115801561461a573d6000803e3d6000fd5b505050505050565b60405163b6b55f2560e01b8152600481018290527f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a804526001600160a01b03169063b6b55f2590602401600060405180830381600087803b15801561468457600080fd5b505af1158015613c54573d6000803e3d6000fd5b6060816000018054806020026020016040519081016040528092919081815260200182805480156146e857602002820191906000526020600020905b8154815260200190600101908083116146d4575b50505050509050919050565b6060612f3484846000856150b2565b606080826001600160a01b03166375d264136040518163ffffffff1660e01b815260040160206040518083038186803b15801561473f57600080fd5b505afa92505050801561476f575060408051601f3d908101601f1916820190925261476c918101906153fc565b60015b61477857915091565b6040805160018082528183019092526000916020808301908036833701905050905084816000815181106147ae576147ae615496565b6001600160a01b03928316602091820292909201015260405163bb492bf560e01b81529083169063bb492bf5906147eb90849030906004016158ab565b600060405180830381600087803b15801561480557600080fd5b505af1158015614819573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261484191908101906158d6565b935093505050915091565b600254604051636ccb2b0160e01b81526001600160a01b0385811660048301528481166024830152604482018490526001606483015230608483015290911690636ccb2b019060a401602060405180830381600087803b1580156148af57600080fd5b505af19250505080156148df575060408051601f3d908101601f191682019092526148dc918101906153b6565b60015b61314957505050565b604051636f074d1f60e11b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063de0e9a3e906024015b602060405180830381600087803b15801561493957600080fd5b505af1158015612d49573d6000803e3d6000fd5b614956816151da565b6000600260009054906101000a90046001600160a01b03169050614a177f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156149cc57600080fd5b505afa1580156149e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a0491906153fc565b600b546001600160a01b03169084612d6d565b600b54614a2e906001600160a01b03168284612d6d565b614ad57f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a8a57600080fd5b505afa158015614a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ac291906153fc565b6008546001600160a01b03169084612d6d565b600854614aec906001600160a01b03168284612d6d565b60008054906101000a90046001600160a01b03166001600160a01b03166375d264136040518163ffffffff1660e01b815260040160206040518083038186803b158015614b3857600080fd5b505afa925050508015614b68575060408051601f3d908101601f19168201909252614b65918101906153fc565b60015b614b70575050565b6000816001600160a01b031663b45ac1a96040518163ffffffff1660e01b815260040160006040518083038186803b158015614bab57600080fd5b505afa158015614bbf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614be791908101906155a8565b905060005b8151811015613c54577f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316828281518110614c3157614c31615496565b60200260200101516001600160a01b031614158015614c82575060085482516001600160a01b0390911690839083908110614c6e57614c6e615496565b60200260200101516001600160a01b031614155b15614cbe57614cbe8486848481518110614c9e57614c9e615496565b60200260200101516001600160a01b0316612d6d9092919063ffffffff16565b614cc7816154ac565b9050614bec565b6000836001600160a01b0316638bc6beb26040518163ffffffff1660e01b815260040160206040518083038186803b158015614d0957600080fd5b505afa158015614d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d4191906153fc565b90506001600160a01b03811615613149576000816001600160a01b031663c4f59f9b6040518163ffffffff1660e01b815260040160006040518083038186803b158015614d8d57600080fd5b505afa158015614da1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614dc991908101906155a8565b805190915060005b8181101561346157828181518110614deb57614deb615496565b6020908102919091010151604051636eb1769f60e11b81523060048201526001600160a01b0388811660248301529091169063dd62ed3e9060440160206040518083038186803b158015614e3e57600080fd5b505afa158015614e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e7691906153b6565b614e9657614e918686858481518110614c9e57614c9e615496565b614ec5565b614eae866000858481518110614c9e57614c9e615496565b614ec58686858481518110614c9e57614c9e615496565b614ece816154ac565b9050614dd1565b80156106945760007f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a804526001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b158015614f3657600080fd5b505afa158015614f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614f6e91906153b6565b9050600081614f8584670de0b6b3a76400006155f3565b614f8f9190615612565b9050670de0b6b3a7640000614fa483836155f3565b614fae9190615612565b8311614fba5780614fc5565b614fc581600161544e565b6040516370a0823160e01b81523060048201529091506001600160a01b037f000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a804521690632e1a7d4d9061502290849084906370a08231906024016135cb565b6040518263ffffffff1660e01b815260040161504091815260200190565b600060405180830381600087803b15801561505a57600080fd5b505af1158015613461573d6000803e3d6000fd5b604051630ea598cb60e41b815260048101829052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063ea598cb09060240161491f565b61069481614ed5565b6060824710156151135760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610529565b843b6151615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610529565b600080866001600160a01b0316858760405161517d919061599c565b60006040518083038185875af1925050503d80600081146151ba576040519150601f19603f3d011682016040523d82523d6000602084013e6151bf565b606091505b50915091506151cf82828661522e565b979650505050505050565b6106946001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84167f0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b83612d6d565b6060831561523d575081611ef2565b82511561524d5782518084602001fd5b8160405162461bcd60e51b81526004016105299190615335565b6001600160a01b038116811461069457600080fd5b60006020828403121561528e57600080fd5b8135611ef281615267565b6000602082840312156152ab57600080fd5b5035919050565b600081518084526020808501945080840160005b838110156152eb5781516001600160a01b0316875295820195908201906001016152c6565b509495945050505050565b602081526000611ef260208301846152b2565b60005b8381101561532457818101518382015260200161530c565b838111156131495750506000910152565b6020815260008251806020840152615354816040850160208701615309565b601f01601f19169190910160400192915050565b6000806040838503121561537b57600080fd5b823561538681615267565b946020939093013593505050565b600080604083850312156153a757600080fd5b50508035926020909101359150565b6000602082840312156153c857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156153f7576153f76153cf565b500390565b60006020828403121561540e57600080fd5b8151611ef281615267565b600181811c9082168061542d57607f821691505b6020821081141561091257634e487b7160e01b600052602260045260246000fd5b60008219821115615461576154616153cf565b500190565b8051801515811461547657600080fd5b919050565b60006020828403121561548d57600080fd5b611ef282615466565b634e487b7160e01b600052603260045260246000fd5b60006000198214156154c0576154c06153cf565b5060010190565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715615503576155036154c7565b6040525050565b600067ffffffffffffffff821115615524576155246154c7565b5060051b60200190565b600082601f83011261553f57600080fd5b8151602061554c8261550a565b60405161555982826154dd565b83815260059390931b850182019282810191508684111561557957600080fd5b8286015b8481101561559d57805161559081615267565b835291830191830161557d565b509695505050505050565b6000602082840312156155ba57600080fd5b815167ffffffffffffffff8111156155d157600080fd5b612f348482850161552e565b634e487b7160e01b600052603160045260246000fd5b600081600019048311821515161561560d5761560d6153cf565b500290565b60008261562f57634e487b7160e01b600052601260045260246000fd5b500490565b600060033d111561564d5760046000803e5060005160e01c5b90565b600060443d101561565e5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561568e57505050505090565b82850191508151818111156156a65750505050505090565b843d87010160208285010111156156c05750505050505090565b6156cf602082860101876154dd565b509095945050505050565b805160208083015191908110156109125760001960209190910360031b1b16919050565b6000806000806000806000806000806101408b8d03121561571e57600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151955061574a60a08c01615466565b945061575860c08c01615466565b935061576660e08c01615466565b92506157756101008c01615466565b91506157846101208c01615466565b90509295989b9194979a5092959850565b6000602082840312156157a757600080fd5b815160ff81168114611ef257600080fd5b600181815b808511156157f35781600019048211156157d9576157d96153cf565b808516156157e657918102915b93841c93908002906157bd565b509250929050565b60008261580a57506001610ef7565b8161581757506000610ef7565b816001811461582d576002811461583757615853565b6001915050610ef7565b60ff841115615848576158486153cf565b50506001821b610ef7565b5060208310610133831016604e8410600b8410161715615876575081810a610ef7565b61588083836157b8565b8060001904821115615894576158946153cf565b029392505050565b6000611ef260ff8416836157fb565b6040815260006158be60408301856152b2565b90506001600160a01b03831660208301529392505050565b600080604083850312156158e957600080fd5b825167ffffffffffffffff8082111561590157600080fd5b61590d8683870161552e565b935060209150818501518181111561592457600080fd5b85019050601f8101861361593757600080fd5b80516159428161550a565b60405161594f82826154dd565b82815260059290921b830184019184810191508883111561596f57600080fd5b928401925b8284101561598d57835182529284019290840190615974565b80955050505050509250929050565b600082516159ae818460208701615309565b919091019291505056fea2646970667358221220da19a809dab5bbac43405d5e2c54f830f3f379f761841beae63cb1f5b7da9bf364736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b000000000000000000000000229f19942612a8dbdec3643cb23f88685ccd56a50000000000000000000000000b925ed163218f6662a35e0f0371ac234f9e9371000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a8045200000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001b4161766556335f5665737065725f58795f53544554485f555344430000000000
-----Decoded View---------------
Arg [0] : pool_ (address): 0x4Dbe3f01aBe271D3E65432c74851625a8c30Aa7B
Arg [1] : swapper_ (address): 0x229f19942612A8dbdec3643CB23F88685CCd56A5
Arg [2] : receiptToken_ (address): 0x0B925eD163218f6662a35e0f0371Ac234f9E9371
Arg [3] : borrowToken_ (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [4] : aaveAddressProvider_ (address): 0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e
Arg [5] : vPool_ (address): 0xa8b607Aa09B6A2E306F93e74c282Fb13f6A80452
Arg [6] : name_ (string): AaveV3_Vesper_Xy_STETH_USDC
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000004dbe3f01abe271d3e65432c74851625a8c30aa7b
Arg [1] : 000000000000000000000000229f19942612a8dbdec3643cb23f88685ccd56a5
Arg [2] : 0000000000000000000000000b925ed163218f6662a35e0f0371ac234f9e9371
Arg [3] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [4] : 0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e
Arg [5] : 000000000000000000000000a8b607aa09b6a2e306f93e74c282fb13f6a80452
Arg [6] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [7] : 000000000000000000000000000000000000000000000000000000000000001b
Arg [8] : 4161766556335f5665737065725f58795f53544554485f555344430000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.