ERC-20
Overview
Max Total Supply
81.382396760069926874 ysWETH
Holders
4
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
81.38183102714069705 ysWETHValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Strategy
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-03-17 */ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.18; // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); } // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.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); } // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) /** * @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) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} } // TokenizedStrategy interface used for internal view delegateCalls. // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) /** * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. * * _Available since v4.7._ */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /** * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. * * - MUST be an ERC-20 token contract. * - MUST NOT revert. */ function asset() external view returns (address assetTokenAddress); /** * @dev Returns the total amount of the underlying asset that is “managed” by Vault. * * - SHOULD include any compounding that occurs from yield. * - MUST be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT revert. */ function totalAssets() external view returns (uint256 totalManagedAssets); /** * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToShares(uint256 assets) external view returns (uint256 shares); /** * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToAssets(uint256 shares) external view returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, * through a deposit call. * * - MUST return a limited value if receiver is subject to some deposit limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. * - MUST NOT revert. */ function maxDeposit(address receiver) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given * current on-chain conditions. * * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called * in the same transaction. * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the * deposit would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewDeposit(uint256 assets) external view returns (uint256 shares); /** * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * deposit execution, and are accounted for during deposit. * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function deposit(uint256 assets, address receiver) external returns (uint256 shares); /** * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. * - MUST return a limited value if receiver is subject to some mint limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. * - MUST NOT revert. */ function maxMint(address receiver) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given * current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the * same transaction. * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint * would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by minting. */ function previewMint(uint256 shares) external view returns (uint256 assets); /** * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint * execution, and are accounted for during mint. * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function mint(uint256 shares, address receiver) external returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the * Vault, through a withdraw call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST NOT revert. */ function maxWithdraw(address owner) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, * given current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if * called * in the same transaction. * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though * the withdrawal would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewWithdraw(uint256 assets) external view returns (uint256 shares); /** * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * withdraw execution, and are accounted for during withdraw. * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); /** * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, * through a redeem call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. * - MUST NOT revert. */ function maxRedeem(address owner) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, * given current on-chain conditions. * * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the * same transaction. * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the * redemption would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by redeeming. */ function previewRedeem(uint256 shares) external view returns (uint256 assets); /** * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * redeem execution, and are accounted for during redeem. * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); } // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } // Interface that implements the 4626 standard and the implementation functions interface ITokenizedStrategy is IERC4626, IERC20Permit { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event StrategyShutdown(); event NewTokenizedStrategy( address indexed strategy, address indexed asset, string apiVersion ); event Reported( uint256 profit, uint256 loss, uint256 protocolFees, uint256 performanceFees ); event UpdatePerformanceFeeRecipient( address indexed newPerformanceFeeRecipient ); event UpdateKeeper(address indexed newKeeper); event UpdatePerformanceFee(uint16 newPerformanceFee); event UpdateManagement(address indexed newManagement); event UpdateEmergencyAdmin(address indexed newEmergencyAdmin); event UpdateProfitMaxUnlockTime(uint256 newProfitMaxUnlockTime); event UpdatePendingManagement(address indexed newPendingManagement); /*////////////////////////////////////////////////////////////// INITIALIZATION //////////////////////////////////////////////////////////////*/ function initialize( address _asset, string memory _name, address _management, address _performanceFeeRecipient, address _keeper ) external; /*////////////////////////////////////////////////////////////// NON-STANDARD 4626 OPTIONS //////////////////////////////////////////////////////////////*/ function withdraw( uint256 assets, address receiver, address owner, uint256 maxLoss ) external returns (uint256); function redeem( uint256 shares, address receiver, address owner, uint256 maxLoss ) external returns (uint256); /*////////////////////////////////////////////////////////////// MODIFIER HELPERS //////////////////////////////////////////////////////////////*/ function requireManagement(address _sender) external view; function requireKeeperOrManagement(address _sender) external view; function requireEmergencyAuthorized(address _sender) external view; /*////////////////////////////////////////////////////////////// KEEPERS FUNCTIONS //////////////////////////////////////////////////////////////*/ function tend() external; function report() external returns (uint256 _profit, uint256 _loss); /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ function MAX_FEE() external view returns (uint16); function FACTORY() external view returns (address); /*////////////////////////////////////////////////////////////// GETTERS //////////////////////////////////////////////////////////////*/ function apiVersion() external view returns (string memory); function pricePerShare() external view returns (uint256); function management() external view returns (address); function pendingManagement() external view returns (address); function keeper() external view returns (address); function emergencyAdmin() external view returns (address); function performanceFee() external view returns (uint16); function performanceFeeRecipient() external view returns (address); function fullProfitUnlockDate() external view returns (uint256); function profitUnlockingRate() external view returns (uint256); function profitMaxUnlockTime() external view returns (uint256); function lastReport() external view returns (uint256); function isShutdown() external view returns (bool); function unlockedShares() external view returns (uint256); /*////////////////////////////////////////////////////////////// SETTERS //////////////////////////////////////////////////////////////*/ function setPendingManagement(address) external; function acceptManagement() external; function setKeeper(address _keeper) external; function setEmergencyAdmin(address _emergencyAdmin) external; function setPerformanceFee(uint16 _performanceFee) external; function setPerformanceFeeRecipient( address _performanceFeeRecipient ) external; function setProfitMaxUnlockTime(uint256 _profitMaxUnlockTime) external; function shutdownStrategy() external; function emergencyWithdraw(uint256 _amount) external; } /** * @title YearnV3 Base Strategy * @author yearn.finance * @notice * BaseStrategy implements all of the required functionality to * seamlessly integrate with the `TokenizedStrategy` implementation contract * allowing anyone to easily build a fully permissionless ERC-4626 compliant * Vault by inheriting this contract and overriding three simple functions. * It utilizes an immutable proxy pattern that allows the BaseStrategy * to remain simple and small. All standard logic is held within the * `TokenizedStrategy` and is reused over any n strategies all using the * `fallback` function to delegatecall the implementation so that strategists * can only be concerned with writing their strategy specific code. * * This contract should be inherited and the three main abstract methods * `_deployFunds`, `_freeFunds` and `_harvestAndReport` implemented to adapt * the Strategy to the particular needs it has to generate yield. There are * other optional methods that can be implemented to further customize * the strategy if desired. * * All default storage for the strategy is controlled and updated by the * `TokenizedStrategy`. The implementation holds a storage struct that * contains all needed global variables in a manual storage slot. This * means strategists can feel free to implement their own custom storage * variables as they need with no concern of collisions. All global variables * can be viewed within the Strategy by a simple call using the * `TokenizedStrategy` variable. IE: TokenizedStrategy.globalVariable();. */ abstract contract BaseStrategy { /*////////////////////////////////////////////////////////////// MODIFIERS //////////////////////////////////////////////////////////////*/ /** * @dev Used on TokenizedStrategy callback functions to make sure it is post * a delegateCall from this address to the TokenizedStrategy. */ modifier onlySelf() { _onlySelf(); _; } /** * @dev Use to assure that the call is coming from the strategies management. */ modifier onlyManagement() { TokenizedStrategy.requireManagement(msg.sender); _; } /** * @dev Use to assure that the call is coming from either the strategies * management or the keeper. */ modifier onlyKeepers() { TokenizedStrategy.requireKeeperOrManagement(msg.sender); _; } /** * @dev Use to assure that the call is coming from either the strategies * management or the emergency admin. */ modifier onlyEmergencyAuthorized() { TokenizedStrategy.requireEmergencyAuthorized(msg.sender); _; } /** * @dev Require that the msg.sender is this address. */ function _onlySelf() internal view { require(msg.sender == address(this), "!self"); } /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ /** * @dev This is the address of the TokenizedStrategy implementation * contract that will be used by all strategies to handle the * accounting, logic, storage etc. * * Any external calls to the that don't hit one of the functions * defined in this base or the strategy will end up being forwarded * through the fallback function, which will delegateCall this address. * * This address should be the same for every strategy, never be adjusted * and always be checked before any integration with the Strategy. */ address public constant tokenizedStrategyAddress = 0xBB51273D6c746910C7C06fe718f30c936170feD0; /*////////////////////////////////////////////////////////////// IMMUTABLES //////////////////////////////////////////////////////////////*/ /** * @dev Underlying asset the Strategy is earning yield on. * Stored here for cheap retrievals within the strategy. */ ERC20 internal immutable asset; /** * @dev This variable is set to address(this) during initialization of each strategy. * * This can be used to retrieve storage data within the strategy * contract as if it were a linked library. * * i.e. uint256 totalAssets = TokenizedStrategy.totalAssets() * * Using address(this) will mean any calls using this variable will lead * to a call to itself. Which will hit the fallback function and * delegateCall that to the actual TokenizedStrategy. */ ITokenizedStrategy internal immutable TokenizedStrategy; /** * @notice Used to initialize the strategy on deployment. * * This will set the `TokenizedStrategy` variable for easy * internal view calls to the implementation. As well as * initializing the default storage variables based on the * parameters and using the deployer for the permissioned roles. * * @param _asset Address of the underlying asset. * @param _name Name the strategy will use. */ constructor(address _asset, string memory _name) { asset = ERC20(_asset); // Set instance of the implementation for internal use. TokenizedStrategy = ITokenizedStrategy(address(this)); // Initialize the strategy's storage variables. _delegateCall( abi.encodeCall( ITokenizedStrategy.initialize, (_asset, _name, msg.sender, msg.sender, msg.sender) ) ); // Store the tokenizedStrategyAddress at the standard implementation // address storage slot so etherscan picks up the interface. This gets // stored on initialization and never updated. assembly { sstore( // keccak256('eip1967.proxy.implementation' - 1) 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, tokenizedStrategyAddress ) } } /*////////////////////////////////////////////////////////////// NEEDED TO BE OVERRIDDEN BY STRATEGIST //////////////////////////////////////////////////////////////*/ /** * @dev Can deploy up to '_amount' of 'asset' in the yield source. * * This function is called at the end of a {deposit} or {mint} * call. Meaning that unless a whitelist is implemented it will * be entirely permissionless and thus can be sandwiched or otherwise * manipulated. * * @param _amount The amount of 'asset' that the strategy can attempt * to deposit in the yield source. */ function _deployFunds(uint256 _amount) internal virtual; /** * @dev Should attempt to free the '_amount' of 'asset'. * * NOTE: The amount of 'asset' that is already loose has already * been accounted for. * * This function is called during {withdraw} and {redeem} calls. * Meaning that unless a whitelist is implemented it will be * entirely permissionless and thus can be sandwiched or otherwise * manipulated. * * Should not rely on asset.balanceOf(address(this)) calls other than * for diff accounting purposes. * * Any difference between `_amount` and what is actually freed will be * counted as a loss and passed on to the withdrawer. This means * care should be taken in times of illiquidity. It may be better to revert * if withdraws are simply illiquid so not to realize incorrect losses. * * @param _amount, The amount of 'asset' to be freed. */ function _freeFunds(uint256 _amount) internal virtual; /** * @dev Internal function to harvest all rewards, redeploy any idle * funds and return an accurate accounting of all funds currently * held by the Strategy. * * This should do any needed harvesting, rewards selling, accrual, * redepositing etc. to get the most accurate view of current assets. * * NOTE: All applicable assets including loose assets should be * accounted for in this function. * * Care should be taken when relying on oracles or swap values rather * than actual amounts as all Strategy profit/loss accounting will * be done based on this returned value. * * This can still be called post a shutdown, a strategist can check * `TokenizedStrategy.isShutdown()` to decide if funds should be * redeployed or simply realize any profits/losses. * * @return _totalAssets A trusted and accurate account for the total * amount of 'asset' the strategy currently holds including idle funds. */ function _harvestAndReport() internal virtual returns (uint256 _totalAssets); /*////////////////////////////////////////////////////////////// OPTIONAL TO OVERRIDE BY STRATEGIST //////////////////////////////////////////////////////////////*/ /** * @dev Optional function for strategist to override that can * be called in between reports. * * If '_tend' is used tendTrigger() will also need to be overridden. * * This call can only be called by a permissioned role so may be * through protected relays. * * This can be used to harvest and compound rewards, deposit idle funds, * perform needed position maintenance or anything else that doesn't need * a full report for. * * EX: A strategy that can not deposit funds without getting * sandwiched can use the tend when a certain threshold * of idle to totalAssets has been reached. * * This will have no effect on PPS of the strategy till report() is called. * * @param _totalIdle The current amount of idle funds that are available to deploy. */ function _tend(uint256 _totalIdle) internal virtual {} /** * @dev Optional trigger to override if tend() will be used by the strategy. * This must be implemented if the strategy hopes to invoke _tend(). * * @return . Should return true if tend() should be called by keeper or false if not. */ function _tendTrigger() internal view virtual returns (bool) { return false; } /** * @notice Returns if tend() should be called by a keeper. * * @return . Should return true if tend() should be called by keeper or false if not. * @return . Calldata for the tend call. */ function tendTrigger() external view virtual returns (bool, bytes memory) { return ( // Return the status of the tend trigger. _tendTrigger(), // And the needed calldata either way. abi.encodeWithSelector(ITokenizedStrategy.tend.selector) ); } /** * @notice Gets the max amount of `asset` that an address can deposit. * @dev Defaults to an unlimited amount for any address. But can * be overridden by strategists. * * This function will be called before any deposit or mints to enforce * any limits desired by the strategist. This can be used for either a * traditional deposit limit or for implementing a whitelist etc. * * EX: * if(isAllowed[_owner]) return super.availableDepositLimit(_owner); * * This does not need to take into account any conversion rates * from shares to assets. But should know that any non max uint256 * amounts may be converted to shares. So it is recommended to keep * custom amounts low enough as not to cause overflow when multiplied * by `totalSupply`. * * @param . The address that is depositing into the strategy. * @return . The available amount the `_owner` can deposit in terms of `asset` */ function availableDepositLimit( address /*_owner*/ ) public view virtual returns (uint256) { return type(uint256).max; } /** * @notice Gets the max amount of `asset` that can be withdrawn. * @dev Defaults to an unlimited amount for any address. But can * be overridden by strategists. * * This function will be called before any withdraw or redeem to enforce * any limits desired by the strategist. This can be used for illiquid * or sandwichable strategies. It should never be lower than `totalIdle`. * * EX: * return TokenIzedStrategy.totalIdle(); * * This does not need to take into account the `_owner`'s share balance * or conversion rates from shares to assets. * * @param . The address that is withdrawing from the strategy. * @return . The available amount that can be withdrawn in terms of `asset` */ function availableWithdrawLimit( address /*_owner*/ ) public view virtual returns (uint256) { return type(uint256).max; } /** * @dev Optional function for a strategist to override that will * allow management to manually withdraw deployed funds from the * yield source if a strategy is shutdown. * * This should attempt to free `_amount`, noting that `_amount` may * be more than is currently deployed. * * NOTE: This will not realize any profits or losses. A separate * {report} will be needed in order to record any profit/loss. If * a report may need to be called after a shutdown it is important * to check if the strategy is shutdown during {_harvestAndReport} * so that it does not simply re-deploy all funds that had been freed. * * EX: * if(freeAsset > 0 && !TokenizedStrategy.isShutdown()) { * depositFunds... * } * * @param _amount The amount of asset to attempt to free. */ function _emergencyWithdraw(uint256 _amount) internal virtual {} /*////////////////////////////////////////////////////////////// TokenizedStrategy HOOKS //////////////////////////////////////////////////////////////*/ /** * @notice Can deploy up to '_amount' of 'asset' in yield source. * @dev Callback for the TokenizedStrategy to call during a {deposit} * or {mint} to tell the strategy it can deploy funds. * * Since this can only be called after a {deposit} or {mint} * delegateCall to the TokenizedStrategy msg.sender == address(this). * * Unless a whitelist is implemented this will be entirely permissionless * and thus can be sandwiched or otherwise manipulated. * * @param _amount The amount of 'asset' that the strategy can * attempt to deposit in the yield source. */ function deployFunds(uint256 _amount) external virtual onlySelf { _deployFunds(_amount); } /** * @notice Should attempt to free the '_amount' of 'asset'. * @dev Callback for the TokenizedStrategy to call during a withdraw * or redeem to free the needed funds to service the withdraw. * * This can only be called after a 'withdraw' or 'redeem' delegateCall * to the TokenizedStrategy so msg.sender == address(this). * * @param _amount The amount of 'asset' that the strategy should attempt to free up. */ function freeFunds(uint256 _amount) external virtual onlySelf { _freeFunds(_amount); } /** * @notice Returns the accurate amount of all funds currently * held by the Strategy. * @dev Callback for the TokenizedStrategy to call during a report to * get an accurate accounting of assets the strategy controls. * * This can only be called after a report() delegateCall to the * TokenizedStrategy so msg.sender == address(this). * * @return . A trusted and accurate account for the total amount * of 'asset' the strategy currently holds including idle funds. */ function harvestAndReport() external virtual onlySelf returns (uint256) { return _harvestAndReport(); } /** * @notice Will call the internal '_tend' when a keeper tends the strategy. * @dev Callback for the TokenizedStrategy to initiate a _tend call in the strategy. * * This can only be called after a tend() delegateCall to the TokenizedStrategy * so msg.sender == address(this). * * We name the function `tendThis` so that `tend` calls are forwarded to * the TokenizedStrategy. * @param _totalIdle The amount of current idle funds that can be * deployed during the tend */ function tendThis(uint256 _totalIdle) external virtual onlySelf { _tend(_totalIdle); } /** * @notice Will call the internal '_emergencyWithdraw' function. * @dev Callback for the TokenizedStrategy during an emergency withdraw. * * This can only be called after a emergencyWithdraw() delegateCall to * the TokenizedStrategy so msg.sender == address(this). * * We name the function `shutdownWithdraw` so that `emergencyWithdraw` * calls are forwarded to the TokenizedStrategy. * * @param _amount The amount of asset to attempt to free. */ function shutdownWithdraw(uint256 _amount) external virtual onlySelf { _emergencyWithdraw(_amount); } /** * @dev Function used to delegate call the TokenizedStrategy with * certain `_calldata` and return any return values. * * This is used to setup the initial storage of the strategy, and * can be used by strategist to forward any other call to the * TokenizedStrategy implementation. * * @param _calldata The abi encoded calldata to use in delegatecall. * @return . The return value if the call was successful in bytes. */ function _delegateCall( bytes memory _calldata ) internal returns (bytes memory) { // Delegate call the tokenized strategy with provided calldata. (bool success, bytes memory result) = tokenizedStrategyAddress .delegatecall(_calldata); // If the call reverted. Return the error. if (!success) { assembly { let ptr := mload(0x40) let size := returndatasize() returndatacopy(ptr, 0, size) revert(ptr, size) } } // Return the result. return result; } /** * @dev Execute a function on the TokenizedStrategy and return any value. * * This fallback function will be executed when any of the standard functions * defined in the TokenizedStrategy are called since they wont be defined in * this contract. * * It will delegatecall the TokenizedStrategy implementation with the exact * calldata and return any relevant values. * */ fallback() external { // load our target address address _tokenizedStrategyAddress = tokenizedStrategyAddress; // Execute external function using delegatecall and return any value. assembly { // Copy function selector and any arguments. calldatacopy(0, 0, calldatasize()) // Execute function delegatecall. let result := delegatecall( gas(), _tokenizedStrategyAddress, 0, calldatasize(), 0, 0 ) // Get any return value returndatacopy(0, 0, returndatasize()) // Return any return value or error back to the caller switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } } /** * @title Base Health Check * @author Yearn.finance * @notice This contract can be inherited by any Yearn * V3 strategy wishing to implement a health check during * the `report` function in order to prevent any unexpected * behavior from being permanently recorded as well as the * `checkHealth` modifier. * * A strategist simply needs to inherit this contract. Set * the limit ratios to the desired amounts and then * override `_harvestAndReport()` just as they otherwise * would. If the profit or loss that would be recorded is * outside the acceptable bounds the tx will revert. * * The healthcheck does not prevent a strategy from reporting * losses, but rather can make sure manual intervention is * needed before reporting an unexpected loss or profit. */ abstract contract BaseHealthCheck is BaseStrategy { // Can be used to determine if a healthcheck should be called. // Defaults to true; bool public doHealthCheck = true; uint256 internal constant MAX_BPS = 10_000; // Default profit limit to 100%. uint256 private _profitLimitRatio = MAX_BPS; // Defaults loss limit to 0. uint256 private _lossLimitRatio; constructor( address _asset, string memory _name ) BaseStrategy(_asset, _name) {} /** * @notice Returns the current profit limit ratio. * @dev Use a getter function to keep the variable private. * @return . The current profit limit ratio. */ function profitLimitRatio() public view returns (uint256) { return _profitLimitRatio; } /** * @notice Returns the current loss limit ratio. * @dev Use a getter function to keep the variable private. * @return . The current loss limit ratio. */ function lossLimitRatio() public view returns (uint256) { return _lossLimitRatio; } /** * @notice Set the `profitLimitRatio`. * @dev Denominated in basis points. I.E. 1_000 == 10%. * @param _newProfitLimitRatio The mew profit limit ratio. */ function setProfitLimitRatio( uint256 _newProfitLimitRatio ) external onlyManagement { _setProfitLimitRatio(_newProfitLimitRatio); } /** * @dev Internally set the profit limit ratio. Denominated * in basis points. I.E. 1_000 == 10%. * @param _newProfitLimitRatio The mew profit limit ratio. */ function _setProfitLimitRatio(uint256 _newProfitLimitRatio) internal { require(_newProfitLimitRatio > 0, "!zero profit"); _profitLimitRatio = _newProfitLimitRatio; } /** * @notice Set the `lossLimitRatio`. * @dev Denominated in basis points. I.E. 1_000 == 10%. * @param _newLossLimitRatio The new loss limit ratio. */ function setLossLimitRatio( uint256 _newLossLimitRatio ) external onlyManagement { _setLossLimitRatio(_newLossLimitRatio); } /** * @dev Internally set the loss limit ratio. Denominated * in basis points. I.E. 1_000 == 10%. * @param _newLossLimitRatio The new loss limit ratio. */ function _setLossLimitRatio(uint256 _newLossLimitRatio) internal { require(_newLossLimitRatio < MAX_BPS, "!loss limit"); _lossLimitRatio = _newLossLimitRatio; } /** * @notice Turns the healthcheck on and off. * @dev If turned off the next report will auto turn it back on. * @param _doHealthCheck Bool if healthCheck should be done. */ function setDoHealthCheck(bool _doHealthCheck) public onlyManagement { doHealthCheck = _doHealthCheck; } /** * @notice OVerrides the default {harvestAndReport} to include a healthcheck. * @return _totalAssets New totalAssets post report. */ function harvestAndReport() external override onlySelf returns (uint256 _totalAssets) { // Let the strategy report. _totalAssets = _harvestAndReport(); // Run the healthcheck on the amount returned. _executeHealthCheck(_totalAssets); } /** * @dev To be called during a report to make sure the profit * or loss being recorded is within the acceptable bound. * * @param _newTotalAssets The amount that will be reported. */ function _executeHealthCheck(uint256 _newTotalAssets) internal virtual { if (!doHealthCheck) { doHealthCheck = true; return; } // Get the current total assets from the implementation. uint256 currentTotalAssets = TokenizedStrategy.totalAssets(); if (_newTotalAssets > currentTotalAssets) { require( ((_newTotalAssets - currentTotalAssets) <= (currentTotalAssets * _profitLimitRatio) / MAX_BPS), "healthCheck" ); } else if (currentTotalAssets > _newTotalAssets) { require( (currentTotalAssets - _newTotalAssets <= ((currentTotalAssets * _lossLimitRatio) / MAX_BPS)), "healthCheck" ); } } } // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @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. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } } // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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"); (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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } /** * @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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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' 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } } interface IWETH is IERC20 { function deposit() external payable; function decimals() external view returns (uint256); function withdraw(uint256) external; } interface ISTETH is IERC20 { //function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256); //function getSharesByPooledEth(uint256 _pooledEthAmount) external view returns (uint256); event Submitted(address sender, uint256 amount, address referral); function submit(address) external payable returns (uint256); function isStakingPaused() external returns (bool); } interface IWSTETH is IERC20 { /** * @notice Get amount of wstETH obtained for a given amount of stETH * @param _stETHAmount amount of stETH * @return Amount of wstETH obtained for a given stETH amount */ function getWstETHByStETH(uint256 _stETHAmount) external view returns (uint256); /** * @notice Get amount of stETH obtained for a given amount of wstETH * @param _wstETHAmount amount of wstETH * @return Amount of stETH obtained for a given wstETH amount */ function getStETHByWstETH(uint256 _wstETHAmount) external view returns (uint256); /** * @notice Get amount of stETH obtained for one wstETH * @return Amount of stETH obtained for one wstETH */ //function stEthPerToken() external view returns (uint256); /** * @notice Get amount of wstETH obtained for one stETH * @return Amount of wstETH obtained for one stETH */ //function tokensPerStEth() external view returns (uint256); /** * @notice Exchanges stETH to wstETH * @param _stETHAmount amount of stETH to wrap in exchange for wstETH * @dev Requirements: * - `_stETHAmount` must be non-zero * - msg.sender must approve at least `_stETHAmount` stETH to this * contract. * - msg.sender must have at least `_stETHAmount` of stETH. * User should first approve _stETHAmount to the WstETH contract * @return Amount of wstETH user receives after wrap */ function wrap(uint256 _stETHAmount) external returns (uint256); /** * @notice Exchanges wstETH to stETH * @param _wstETHAmount amount of wstETH to uwrap in exchange for stETH * @dev Requirements: * - `_wstETHAmount` must be non-zero * - msg.sender must have at least `_wstETHAmount` wstETH. * @return Amount of stETH user receives after unwrap */ function unwrap(uint256 _wstETHAmount) external returns (uint256); } interface IQueue { function requestWithdrawals(uint256[] calldata _amounts, address _owner) external returns (uint256[] memory requestIds); function claimWithdrawal(uint256 _requestId) external; } interface ICurve { function exchange( int128 from, int128 to, uint256 _from_amount, uint256 _min_to_amount ) external payable returns(uint256); function price_oracle() external view returns(uint256); function balances(uint256) external view returns (uint256); function get_dy( int128 from, int128 to, uint256 _from_amount ) external view returns (uint256); } interface AggregatorInterface { function latestAnswer() external view returns (int256); function latestTimestamp() external view returns (uint256); function latestRound() external view returns (uint256); function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound); function getAnswer(uint256 roundId) external view returns (int256); function getTimestamp(uint256 roundId) external view returns (uint256); event AnswerUpdated( int256 indexed current, uint256 indexed roundId, uint256 updatedAt ); event NewRound( uint256 indexed roundId, address indexed startedBy, uint256 startedAt ); } /// @title yearn-v3-LST-MAINNET-STETH /// @author mil0x /// @notice yearn-v3 Strategy that stakes asset into Liquid Staking Token (LST). contract Strategy is BaseHealthCheck { using SafeERC20 for ERC20; address internal constant LST = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84; //STETH address internal constant withdrawalQueueLST = 0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1; //STETH withdrawal queue // Use chainlink oracle to check latest LST/asset price AggregatorInterface public chainlinkOracle = AggregatorInterface(0x86392dC19c0b719886221c78AB11eb8Cf5c52812); //STETH/ETH uint256 public chainlinkHeartbeat = 86400; address public curve = 0xDC24316b9AE028F1497c275EB9192a3Ea0f67022; //curve_ETH_STETH int128 public ASSETID = 0; int128 public LSTID = 1; // Parameters bool public stakeAsset = true; //if true, the strategy will try and stake/swap asset to LST uint256 public maxSingleTrade; //maximum amount that should be swapped by the keeper in one go uint256 public maxSingleWithdraw; //maximum amount that should be withdrawn in one go uint256 public swapSlippage; //actual slippage for a trade uint256 public bufferSlippage; //pessimistic buffer to the totalAssets to simulate having to realize the LST to asset bool public open = true; //bool if the strategy is open for any depositors. mapping(address => bool) public allowed; //mapping of addresses allowed to deposit. uint256 internal constant WAD = 1e18; uint256 internal constant ASSET_DUST = 1000; address internal constant GOV = 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52; //yearn governance constructor(address _asset, string memory _name) BaseHealthCheck(_asset, _name) { //approvals: ERC20(_asset).safeApprove(curve, type(uint256).max); ERC20(LST).safeApprove(curve, type(uint256).max); ERC20(LST).safeApprove(withdrawalQueueLST, type(uint256).max); maxSingleTrade = 1000 * 1e18; //maximum amount that should be swapped by the keeper in one go maxSingleWithdraw = 1000 * 1e18; //maximum amount that should be withdrawn in one go swapSlippage = 50; //actual slippage for a trade bufferSlippage = 50; //pessimistic correction to the totalAssets to simulate having to realize the LST to asset and thus virtually create a buffer for swapping } receive() external payable {} /*////////////////////////////////////////////////////////////// INTERNAL //////////////////////////////////////////////////////////////*/ function _deployFunds(uint256 _amount) internal override { if (stakeAsset) { _stake(_amount); } } function _LSTprice() internal view returns (uint256 LSTprice) { (, int256 answer, , uint256 updatedAt, ) = chainlinkOracle.latestRoundData(); LSTprice = uint256(answer); require((LSTprice > 1 && block.timestamp - updatedAt < chainlinkHeartbeat), "!chainlink"); } function _stake(uint256 _amount) internal { if (_amount < ASSET_DUST) return; IWETH(address(asset)).withdraw(_amount); //WETH --> ETH if (ICurve(curve).get_dy(ASSETID, LSTID, _amount) < _amount){ //check if we receive more than 1:1 through swaps if (!ISTETH(LST).isStakingPaused()) { //if staking is paused & unfavorable swaps, do nothing ISTETH(LST).submit{value: _amount}(GOV); //stake 1:1 } } else { ICurve(curve).exchange{value: _amount}(ASSETID, LSTID, _amount, _amount); //swap for at least 1:1 } } function availableDepositLimit(address _owner) public view override returns (uint256) { // If the owner is whitelisted or the strategy is open. if (open || allowed[_owner]) { return type(uint256).max; } else { return 0; } } function availableWithdrawLimit(address /*_owner*/) public view override returns (uint256) { return _balanceAsset() + maxSingleWithdraw; } function _freeFunds(uint256 _assetAmount) internal override { //Unstake LST amount proportional to the shares redeemed: uint256 totalAssets = TokenizedStrategy.totalAssets(); uint256 totalDebt = totalAssets - _balanceAsset(); uint256 LSTamountToUnstake = _balanceLST() * _assetAmount / totalDebt; if (LSTamountToUnstake > 2) { _unstake(LSTamountToUnstake); } } function _unstake(uint256 _amount) internal { uint256 expectedAmountOut = _amount * _LSTprice() * (MAX_BPS - swapSlippage) / WAD / MAX_BPS; //Without oracle we expect 1:1, but can offset that expectation with swapSlippage & adjust expectedAmountOut by actual depeg ICurve(curve).exchange(LSTID, ASSETID, _amount, expectedAmountOut); IWETH(address(asset)).deposit{value: address(this).balance}(); //ETH --> WETH } function _harvestAndReport() internal override returns (uint256 _totalAssets) { // invest any loose asset if (!TokenizedStrategy.isShutdown() && stakeAsset) { _stake(Math.min(maxSingleTrade, _balanceAsset())); } // Total assets of the strategy, pessimistically account for LST at a value as if it had been swapped back to asset with a virtual buffer slippage uint256 LSTbalance = _balanceLST(); _totalAssets = _balanceAsset() + LSTbalance * _getPessimisticLSTprice(LSTbalance) * (MAX_BPS - bufferSlippage) / WAD / MAX_BPS; } function _getPessimisticLSTprice(uint256 _LSTbalance) internal view returns (uint256 LSTprice) { uint256 amount = Math.min(_LSTbalance, maxSingleWithdraw); amount = Math.max(amount, WAD); //use at the very least WAD LSTprice = ICurve(curve).get_dy(LSTID, ASSETID, amount) * WAD / amount; //price estimate and fee determined through actual swap route LSTprice = Math.min(LSTprice, _LSTprice()); //use pessimistic price to make sure people cannot withdraw more than the current worth of the LST } function _balanceAsset() internal view returns (uint256) { return asset.balanceOf(address(this)); } function _balanceLST() internal view returns (uint256){ return ERC20(LST).balanceOf(address(this)); } /*////////////////////////////////////////////////////////////// EXTERNAL: //////////////////////////////////////////////////////////////*/ /// @notice Returns the amount of asset the strategy holds. function balanceAsset() external view returns (uint256) { return _balanceAsset(); } /// @notice Returns the amount of staked asset in liquid staking token (LST) the strategy holds. function balanceLST() external view returns (uint256) { return _balanceLST(); } /// @notice Set the boolean if the strategy will try and stake/swap asset to LST (true) or not (false). function setStakeAsset(bool _stakeAsset) external onlyManagement { stakeAsset = _stakeAsset; } /// @notice Set the maximum amount of asset that can be moved by keepers in a single transaction. This is to avoid unnecessarily large slippages when harvesting. function setMaxSingleTrade(uint256 _maxSingleTrade) external onlyManagement { maxSingleTrade = _maxSingleTrade; } /// @notice Set the maximum amount of asset that can be withdrawn in a single transaction. This is to avoid unnecessarily large slippages and incentivizes staggered withdrawals. function setMaxSingleWithdraw(uint256 _maxSingleWithdraw) external onlyManagement { maxSingleWithdraw = _maxSingleWithdraw; } /// @notice Set the maximum slippage in basis points (BPS) to accept when swapping asset <-> staked asset in liquid staking token (LST). function setSwapSlippage(uint256 _swapSlippage) external onlyEmergencyAuthorized { require(_swapSlippage <= MAX_BPS); swapSlippage = _swapSlippage; } /// @notice Set the buffer slippage in basis points (BPS) to pessimistically correct the totalAssets to reflect having to eventually swap LST back to asset and thus create a buffer for swaps. function setBufferSlippage(uint256 _bufferSlippage) external onlyManagement { require(_bufferSlippage <= MAX_BPS); bufferSlippage = _bufferSlippage; } // Change if anyone can deposit in or only white listed addresses function setOpen(bool _open) external onlyEmergencyAuthorized { open = _open; } // Set or update an addresses whitelist status. function setAllowed(address _address, bool _allowed) external onlyEmergencyAuthorized { allowed[_address] = _allowed; } /// @notice Set Chainlink heartbeat to determine what qualifies as stale data in units of seconds. function setChainlinkHeartbeat(uint256 _chainlinkHeartbeat) external onlyManagement { chainlinkHeartbeat = _chainlinkHeartbeat; } /*////////////////////////////////////////////////////////////// GOVERNANCE: //////////////////////////////////////////////////////////////*/ modifier onlyGovernance() { require(msg.sender == GOV, "!gov"); _; } /// @notice Set the chainlink oracle address to a new address. Only callable by governance. function setChainlinkOracle(address _chainlinkOracle) external onlyGovernance { require(_chainlinkOracle != address(0)); chainlinkOracle = AggregatorInterface(_chainlinkOracle); } /// @notice Set the curve pool address in case TVL has migrated to a new curve pool. Only callable by governance. function setCurvePool(address _curve, int128 _ASSETID, int128 _LSTID) external onlyGovernance { require(_curve != address(0)); asset.safeApprove(curve, 0); ERC20(LST).safeApprove(curve, 0); asset.safeApprove(_curve, type(uint256).max); ERC20(LST).safeApprove(_curve, type(uint256).max); curve = _curve; ASSETID = _ASSETID; LSTID = _LSTID; } /*////////////////////////////////////////////////////////////// EMERGENCY: //////////////////////////////////////////////////////////////*/ // Emergency swap LST amount. Best to do this in steps. function _emergencyWithdraw(uint256 _amount) internal override { _amount = Math.min(_amount, _balanceLST()); _unstake(_amount); } /// @notice Initiate a liquid staking token (LST) withdrawal process to redeem 1:1. Returns requestIds which can be used to claim asset into the strategy. /// @param _amounts the amounts of LST to initiate a withdrawal process for. function initiateLSTwithdrawal(uint256[] calldata _amounts) external onlyManagement returns (uint256[] memory requestIds) { requestIds = IQueue(withdrawalQueueLST).requestWithdrawals(_amounts, address(this)); } /// @notice Claim asset from a liquid staking token (LST) withdrawal process to redeem 1:1. Use the requestId from initiateLSTwithdrawal() as argument. /// @param _requestId return from calling initiateLSTwithdrawal() to identify the withdrawal. function claimLSTwithdrawal(uint256 _requestId) external onlyManagement { IQueue(withdrawalQueueLST).claimWithdrawal(_requestId); IWETH(address(asset)).deposit{value: address(this).balance}(); //ETH --> WETH } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"string","name":"_name","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"ASSETID","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LSTID","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"availableDepositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableWithdrawLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceLST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bufferSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkHeartbeat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkOracle","outputs":[{"internalType":"contract AggregatorInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"claimLSTwithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"curve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deployFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"doHealthCheck","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"freeFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestAndReport","outputs":[{"internalType":"uint256","name":"_totalAssets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"initiateLSTwithdrawal","outputs":[{"internalType":"uint256[]","name":"requestIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lossLimitRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSingleTrade","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSingleWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"open","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitLimitRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bufferSlippage","type":"uint256"}],"name":"setBufferSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainlinkHeartbeat","type":"uint256"}],"name":"setChainlinkHeartbeat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_chainlinkOracle","type":"address"}],"name":"setChainlinkOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_curve","type":"address"},{"internalType":"int128","name":"_ASSETID","type":"int128"},{"internalType":"int128","name":"_LSTID","type":"int128"}],"name":"setCurvePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_doHealthCheck","type":"bool"}],"name":"setDoHealthCheck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLossLimitRatio","type":"uint256"}],"name":"setLossLimitRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSingleTrade","type":"uint256"}],"name":"setMaxSingleTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSingleWithdraw","type":"uint256"}],"name":"setMaxSingleWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_open","type":"bool"}],"name":"setOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newProfitLimitRatio","type":"uint256"}],"name":"setProfitLimitRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_stakeAsset","type":"bool"}],"name":"setStakeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapSlippage","type":"uint256"}],"name":"setSwapSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"shutdownWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeAsset","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalIdle","type":"uint256"}],"name":"tendThis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tendTrigger","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenizedStrategyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c06040526000805460ff1990811660019081179092556127108255600380546001600160a01b03199081167386392dc19c0b719886221c78ab11eb8cf5c5281217909155620151806004556005805490911673dc24316b9ae028f1497c275eb9192a3ea0f67022179055600160801b60065560078054821683179055600c805490911690911790553480156200009557600080fd5b5060405162002f0038038062002f00833981016040819052620000b891620006d6565b6001600160a01b0382166080523060a05260405182908290829082906200012590620000f19084908490339081908190602401620007df565b60408051601f198184030181529190526020810180516001600160e01b03908116634b839d7360e11b179091526200022e16565b505073bb51273d6c746910c7c06fe718f30c936170fed07f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5550506005546200018b91506001600160a01b038481169116600019620002c2602090811b620012c217901c565b600554620001c79073ae7ab96520de3a18e5e111b5eaab095312d7fe84906001600160a01b0316600019620002c2602090811b620012c217901c565b6200020a73ae7ab96520de3a18e5e111b5eaab095312d7fe8473889edc2edab5f40e902b864ad4d7ade8e412f9b1600019620002c2602090811b620012c217901c565b5050683635c9adc5dea0000060088190556009556032600a819055600b5562000893565b606060008073bb51273d6c746910c7c06fe718f30c936170fed06001600160a01b03168460405162000261919062000822565b600060405180830381855af49150503d80600081146200029e576040519150601f19603f3d011682016040523d82523d6000602084013e620002a3565b606091505b509150915081620002bb576040513d806000833e8082fd5b9392505050565b801580620003405750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000318573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200033e919062000840565b155b620003b85760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620004109185916200041516565b505050565b600062000471826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620004f660201b620013fe179092919060201c565b9050805160001480620004955750808060200190518101906200049591906200085a565b620004105760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620003af565b60606200050784846000856200050f565b949350505050565b606082471015620005725760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620003af565b600080866001600160a01b0316858760405162000590919062000822565b60006040518083038185875af1925050503d8060008114620005cf576040519150601f19603f3d011682016040523d82523d6000602084013e620005d4565b606091505b509092509050620005e887838387620005f3565b979650505050505050565b60608315620006675782516000036200065f576001600160a01b0385163b6200065f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620003af565b508162000507565b6200050783838151156200067e5781518083602001fd5b8060405162461bcd60e51b8152600401620003af91906200087e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620006cd578181015183820152602001620006b3565b50506000910152565b60008060408385031215620006ea57600080fd5b82516001600160a01b03811681146200070257600080fd5b60208401519092506001600160401b03808211156200072057600080fd5b818501915085601f8301126200073557600080fd5b8151818111156200074a576200074a6200069a565b604051601f8201601f19908116603f011681019083821181831017156200077557620007756200069a565b816040528281528860208487010111156200078f57600080fd5b620007a2836020830160208801620006b0565b80955050505050509250929050565b60008151808452620007cb816020860160208601620006b0565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526200080360a0840188620007b1565b9581166040840152938416606083015250911660809091015292915050565b6000825162000836818460208701620006b0565b9190910192915050565b6000602082840312156200085357600080fd5b5051919050565b6000602082840312156200086d57600080fd5b81518015158114620002bb57600080fd5b602081526000620002bb6020830184620007b1565b60805160a0516125bb620009456000396000818161098001528181610aa901528181610bfc01528181610c7b01528181610d0601528181610d9101528181610e9d01528181610f1d01528181610fa40152818161103201528181611132015281816111b20152818161123b015281816114de015281816115b401526116f2015260008181610865015281816108c901528181610b720152818161142d01528181611b900152611c3f01526125bb6000f3fe60806040526004361061024a5760003560e01c80637a9b041211610139578063cc6b36ef116100b6578063ef06e72c1161007a578063ef06e72c14610726578063f533925014610746578063f7de812c14610760578063fa88dd1514610775578063fcfff16f14610795578063fde813a8146107af57610251565b8063cc6b36ef14610661578063d19a3bb81461068e578063d63a8e11146106b6578063d6968601146106e6578063e083ae661461070657610251565b806397ca73fa116100fd57806397ca73fa146105b75780639d7fb70c146105d7578063ac00ff26146105f7578063c1a1bb7714610617578063c79ddb261461062d57610251565b80637a9b0412146105325780637d9699321461055257806380cd916d14610567578063903d42b614610581578063950b3d731461059757610251565b80635d265d3f116101c75780636b940bad1161018b5780636b940bad146104845780636b9e4e38146104a45780636fdca5e0146104c45780637086ca16146104e45780637165485d146104fa57610251565b80635d265d3f146103c15780635f3d962314610404578063668061f21461041a5780636693a0441461043a5780636718835f1461045a57610251565b806346aa2f121161020e57806346aa2f121461034257806349317f1d146103625780634a5d094314610377578063503160d91461038c57806358170f8f146103ac57610251565b806304bd4629146102995780631aedeabe146102cc57806339393a29146102e25780633d6cb575146103025780634697f05d1461032257610251565b3661025157005b34801561025d57600080fd5b5073bb51273d6c746910c7c06fe718f30c936170fed03660008037600080366000845af43d6000803e808015610292573d6000f35b3d6000fd5b005b3480156102a557600080fd5b506102b96102b4366004612117565b6107cf565b6040519081526020015b60405180910390f35b3480156102d857600080fd5b506102b9600a5481565b3480156102ee57600080fd5b506102976102fd366004612144565b6107ec565b34801561030e57600080fd5b5061029761031d366004612187565b610957565b34801561032e57600080fd5b5061029761033d3660046121ae565b61096b565b34801561034e57600080fd5b506102b961035d366004612117565b610a0d565b34801561036e57600080fd5b506102b9610a54565b34801561038357600080fd5b506001546102b9565b34801561039857600080fd5b506102976103a7366004612187565b610a74565b3480156103b857600080fd5b506102b9610a85565b3480156103cd57600080fd5b5060408051600481526024810182526020810180516001600160e01b031663440368a360e01b17905290516102c391600091612235565b34801561041057600080fd5b506102b9600b5481565b34801561042657600080fd5b50610297610435366004612187565b610a94565b34801561044657600080fd5b50610297610455366004612187565b610be7565b34801561046657600080fd5b506000546104749060ff1681565b60405190151581526020016102c3565b34801561049057600080fd5b5061029761049f366004612187565b610c66565b3480156104b057600080fd5b506102976104bf366004612250565b610cf1565b3480156104d057600080fd5b506102976104df366004612250565b610d7c565b3480156104f057600080fd5b506102b960045481565b34801561050657600080fd5b5060055461051a906001600160a01b031681565b6040516001600160a01b0390911681526020016102c3565b34801561053e57600080fd5b5061029761054d366004612117565b610e07565b34801561055e57600080fd5b506002546102b9565b34801561057357600080fd5b506007546104749060ff1681565b34801561058d57600080fd5b506102b960095481565b3480156105a357600080fd5b506102976105b2366004612187565b610e88565b3480156105c357600080fd5b506102976105d2366004612187565b610f08565b3480156105e357600080fd5b506102976105f2366004612187565b610f87565b34801561060357600080fd5b50610297610612366004612250565b610f8f565b34801561062357600080fd5b506102b960085481565b34801561063957600080fd5b5060065461064e90600160801b9004600f0b81565b604051600f9190910b81526020016102c3565b34801561066d57600080fd5b5061068161067c36600461226d565b61101a565b6040516102c391906122e2565b34801561069a57600080fd5b5061051a73bb51273d6c746910c7c06fe718f30c936170fed081565b3480156106c257600080fd5b506104746106d1366004612117565b600d6020526000908152604090205460ff1681565b3480156106f257600080fd5b50610297610701366004612187565b61111d565b34801561071257600080fd5b50610297610721366004612187565b61119d565b34801561073257600080fd5b5060035461051a906001600160a01b031681565b34801561075257600080fd5b5060065461064e90600f0b81565b34801561076c57600080fd5b506102b961121c565b34801561078157600080fd5b50610297610790366004612187565b611226565b3480156107a157600080fd5b50600c546104749060ff1681565b3480156107bb57600080fd5b506102976107ca366004612187565b6112b1565b60006009546107dc611415565b6107e6919061233c565b92915050565b3373feb4acf3df3cdea7399794d0869ef76a6efaff52146108415760405162461bcd60e51b81526004016108389060208082526004908201526310b3b7bb60e11b604082015260600190565b60405180910390fd5b6001600160a01b03831661085457600080fd5b60055461088f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911660006112c2565b6005546108bc9073ae7ab96520de3a18e5e111b5eaab095312d7fe84906001600160a01b031660006112c2565b6108f26001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016846000196112c2565b61091373ae7ab96520de3a18e5e111b5eaab095312d7fe84846000196112c2565b600580546001600160a01b039094166001600160a01b0319909416939093179092556fffffffffffffffffffffffffffffffff918216600160801b02911617600655565b61095f6114a1565b610968816114da565b50565b6040516320b8029160e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906382e00a449060240160006040518083038186803b1580156109ca57600080fd5b505afa1580156109de573d6000803e3d6000fd5b505050506001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b600c5460009060ff1680610a3957506001600160a01b0382166000908152600d602052604090205460ff165b15610a475750600019919050565b506000919050565b919050565b6000610a5e6114a1565b610a666115b0565b9050610a71816116d4565b90565b610a7c6114a1565b6109688161180e565b6000610a8f611822565b905090565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610af357600080fd5b505afa158015610b07573d6000803e3d6000fd5b5050604051637c22221b60e11b81526004810184905273889edc2edab5f40e902b864ad4d7ade8e412f9b1925063f84444369150602401600060405180830381600087803b158015610b5857600080fd5b505af1158015610b6c573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610bcb57600080fd5b505af1158015610bdf573d6000803e3d6000fd5b505050505050565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610c4657600080fd5b505afa158015610c5a573d6000803e3d6000fd5b50505060049190915550565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610cc557600080fd5b505afa158015610cd9573d6000803e3d6000fd5b50505050612710811115610cec57600080fd5b600b55565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610d5057600080fd5b505afa158015610d64573d6000803e3d6000fd5b50506007805460ff1916931515939093179092555050565b6040516320b8029160e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906382e00a449060240160006040518083038186803b158015610ddb57600080fd5b505afa158015610def573d6000803e3d6000fd5b5050600c805460ff1916931515939093179092555050565b3373feb4acf3df3cdea7399794d0869ef76a6efaff5214610e535760405162461bcd60e51b81526004016108389060208082526004908201526310b3b7bb60e11b604082015260600190565b6001600160a01b038116610e6657600080fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610ee757600080fd5b505afa158015610efb573d6000803e3d6000fd5b505050506109688161185c565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610f6757600080fd5b505afa158015610f7b573d6000803e3d6000fd5b50505060089190915550565b6109686114a1565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b158015610fee57600080fd5b505afa158015611002573d6000803e3d6000fd5b50506000805460ff1916931515939093179092555050565b6040516348e4a64960e01b81523360048201526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b15801561107c57600080fd5b505afa158015611090573d6000803e3d6000fd5b5050604051636b34082160e11b815273889edc2edab5f40e902b864ad4d7ade8e412f9b1925063d668104291506110cf9086908690309060040161234f565b6000604051808303816000875af11580156110ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261111691908101906123ac565b9392505050565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b50505050610968816118a0565b6040516348e4a64960e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906348e4a6499060240160006040518083038186803b1580156111fc57600080fd5b505afa158015611210573d6000803e3d6000fd5b50505060099190915550565b6000610a8f611415565b6040516320b8029160e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906382e00a449060240160006040518083038186803b15801561128557600080fd5b505afa158015611299573d6000803e3d6000fd5b505050506127108111156112ac57600080fd5b600a55565b6112b96114a1565b610968816118e4565b80158061133c5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a919061246a565b155b6113a75760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610838565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526113f99084906118fb565b505050565b606061140d84846000856119d0565b949350505050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a08231906024015b602060405180830381865afa15801561147d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8f919061246a565b3330146114d85760405162461bcd60e51b815260206004820152600560248201526410b9b2b63360d91b6044820152606401610838565b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e919061246a565b9050600061156a611415565b6115749083612483565b905060008184611582611822565b61158c9190612496565b61159691906124ad565b905060028111156115aa576115aa81611aab565b50505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bf86d6906040518163ffffffff1660e01b8152600401602060405180830381865afa158015611610573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163491906124cf565b158015611643575060075460ff165b156116635761166361165e600854611659611415565b611c06565b611c1c565b600061166d611822565b9050612710670de0b6b3a7640000600b5461271061168b9190612483565b61169484611e94565b61169e9085612496565b6116a89190612496565b6116b291906124ad565b6116bc91906124ad565b6116c4611415565b6116ce919061233c565b91505090565b60005460ff166116ee57506000805460ff19166001179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611772919061246a565b9050808211156117e1576127106001548261178d9190612496565b61179791906124ad565b6117a18284612483565b11156117dd5760405162461bcd60e51b815260206004820152600b60248201526a6865616c7468436865636b60a81b6044820152606401610838565b5050565b818111156117dd57612710600254826117fa9190612496565b61180491906124ad565b6117a18383612483565b60075460ff16156109685761096881611c1c565b6040516370a0823160e01b815230600482015260009073ae7ab96520de3a18e5e111b5eaab095312d7fe84906370a0823190602401611460565b6000811161189b5760405162461bcd60e51b815260206004820152600c60248201526b085e995c9bc81c1c9bd99a5d60a21b6044820152606401610838565b600155565b61271081106118df5760405162461bcd60e51b815260206004820152600b60248201526a085b1bdcdcc81b1a5b5a5d60aa1b6044820152606401610838565b600255565b6118f081611659611822565b905061096881611aab565b6000611950826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113fe9092919063ffffffff16565b905080516000148061197157508080602001905181019061197191906124cf565b6113f95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610838565b606082471015611a315760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610838565b600080866001600160a01b03168587604051611a4d91906124ec565b60006040518083038185875af1925050503d8060008114611a8a576040519150601f19603f3d011682016040523d82523d6000602084013e611a8f565b606091505b5091509150611aa087838387611f70565b979650505050505050565b6000612710670de0b6b3a7640000600a54612710611ac99190612483565b611ad1611fe9565b611adb9086612496565b611ae59190612496565b611aef91906124ad565b611af991906124ad565b600554600654604051630f7c084960e21b8152600160801b8204600f90810b60048301529190910b602482015260448101859052606481018390529192506001600160a01b031690633df02124906084016020604051808303816000875af1158015611b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8d919061246a565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015611be957600080fd5b505af1158015611bfd573d6000803e3d6000fd5b50505050505050565b6000818310611c155781611116565b5090919050565b6103e8811015611c295750565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015611c8b57600080fd5b505af1158015611c9f573d6000803e3d6000fd5b5050600554600654604051635e0d443f60e01b8152600f82810b6004830152600160801b90920490910b6024820152604481018590528493506001600160a01b039091169150635e0d443f90606401602060405180830381865afa158015611d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2f919061246a565b1015611e3d5773ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316631ea7ca896040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dad91906124cf565b6109685760405163a1903eab60e01b815273feb4acf3df3cdea7399794d0869ef76a6efaff52600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe849063a1903eab9083906024015b60206040518083038185885af1158015611e18573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117dd919061246a565b600554600654604051630f7c084960e21b8152600f82810b6004830152600160801b90920490910b602482015260448101839052606481018390526001600160a01b0390911690633df02124908390608401611dfa565b600080611ea383600954611c06565b9050611eb781670de0b6b3a76400006120c7565b600554600654604051635e0d443f60e01b8152600160801b8204600f90810b60048301529190910b6024820152604481018390529192508291670de0b6b3a7640000916001600160a01b031690635e0d443f90606401602060405180830381865afa158015611f2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4e919061246a565b611f589190612496565b611f6291906124ad565b915061111682611659611fe9565b60608315611fdf578251600003611fd8576001600160a01b0385163b611fd85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610838565b508161140d565b61140d83836120d6565b6000806000600360009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120659190612522565b5093505092505081925060018311801561208957506004546120878242612483565b105b6120c25760405162461bcd60e51b815260206004820152600a60248201526921636861696e6c696e6b60b01b6044820152606401610838565b505090565b6000818311611c155781611116565b8151156120e65781518083602001fd5b8060405162461bcd60e51b81526004016108389190612572565b80356001600160a01b0381168114610a4f57600080fd5b60006020828403121561212957600080fd5b61111682612100565b8035600f81900b8114610a4f57600080fd5b60008060006060848603121561215957600080fd5b61216284612100565b925061217060208501612132565b915061217e60408501612132565b90509250925092565b60006020828403121561219957600080fd5b5035919050565b801515811461096857600080fd5b600080604083850312156121c157600080fd5b6121ca83612100565b915060208301356121da816121a0565b809150509250929050565b60005b838110156122005781810151838201526020016121e8565b50506000910152565b600081518084526122218160208601602086016121e5565b601f01601f19169290920160200192915050565b821515815260406020820152600061140d6040830184612209565b60006020828403121561226257600080fd5b8135611116816121a0565b6000806020838503121561228057600080fd5b823567ffffffffffffffff8082111561229857600080fd5b818501915085601f8301126122ac57600080fd5b8135818111156122bb57600080fd5b8660208260051b85010111156122d057600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b8181101561231a578351835292840192918401916001016122fe565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156107e6576107e6612326565b6040808252810183905260006001600160fb1b0384111561236f57600080fd5b8360051b808660608501376001600160a01b03939093166020830152500160600192915050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156123bf57600080fd5b825167ffffffffffffffff808211156123d757600080fd5b818501915085601f8301126123eb57600080fd5b8151818111156123fd576123fd612396565b8060051b604051601f19603f8301168101818110858211171561242257612422612396565b60405291825284820192508381018501918883111561244057600080fd5b938501935b8285101561245e57845184529385019392850192612445565b98975050505050505050565b60006020828403121561247c57600080fd5b5051919050565b818103818111156107e6576107e6612326565b80820281158282048414176107e6576107e6612326565b6000826124ca57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156124e157600080fd5b8151611116816121a0565b600082516124fe8184602087016121e5565b9190910192915050565b805169ffffffffffffffffffff81168114610a4f57600080fd5b600080600080600060a0868803121561253a57600080fd5b61254386612508565b945060208601519350604086015192506060860151915061256660808701612508565b90509295509295909350565b602081526000611116602083018461220956fea264697066735822122002bd38baa078029d7e343929654e769ce3e410ef76f202a821307663646eeab764736f6c63430008120033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000011737445544820616363756d756c61746f72000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061024a5760003560e01c80637a9b041211610139578063cc6b36ef116100b6578063ef06e72c1161007a578063ef06e72c14610726578063f533925014610746578063f7de812c14610760578063fa88dd1514610775578063fcfff16f14610795578063fde813a8146107af57610251565b8063cc6b36ef14610661578063d19a3bb81461068e578063d63a8e11146106b6578063d6968601146106e6578063e083ae661461070657610251565b806397ca73fa116100fd57806397ca73fa146105b75780639d7fb70c146105d7578063ac00ff26146105f7578063c1a1bb7714610617578063c79ddb261461062d57610251565b80637a9b0412146105325780637d9699321461055257806380cd916d14610567578063903d42b614610581578063950b3d731461059757610251565b80635d265d3f116101c75780636b940bad1161018b5780636b940bad146104845780636b9e4e38146104a45780636fdca5e0146104c45780637086ca16146104e45780637165485d146104fa57610251565b80635d265d3f146103c15780635f3d962314610404578063668061f21461041a5780636693a0441461043a5780636718835f1461045a57610251565b806346aa2f121161020e57806346aa2f121461034257806349317f1d146103625780634a5d094314610377578063503160d91461038c57806358170f8f146103ac57610251565b806304bd4629146102995780631aedeabe146102cc57806339393a29146102e25780633d6cb575146103025780634697f05d1461032257610251565b3661025157005b34801561025d57600080fd5b5073bb51273d6c746910c7c06fe718f30c936170fed03660008037600080366000845af43d6000803e808015610292573d6000f35b3d6000fd5b005b3480156102a557600080fd5b506102b96102b4366004612117565b6107cf565b6040519081526020015b60405180910390f35b3480156102d857600080fd5b506102b9600a5481565b3480156102ee57600080fd5b506102976102fd366004612144565b6107ec565b34801561030e57600080fd5b5061029761031d366004612187565b610957565b34801561032e57600080fd5b5061029761033d3660046121ae565b61096b565b34801561034e57600080fd5b506102b961035d366004612117565b610a0d565b34801561036e57600080fd5b506102b9610a54565b34801561038357600080fd5b506001546102b9565b34801561039857600080fd5b506102976103a7366004612187565b610a74565b3480156103b857600080fd5b506102b9610a85565b3480156103cd57600080fd5b5060408051600481526024810182526020810180516001600160e01b031663440368a360e01b17905290516102c391600091612235565b34801561041057600080fd5b506102b9600b5481565b34801561042657600080fd5b50610297610435366004612187565b610a94565b34801561044657600080fd5b50610297610455366004612187565b610be7565b34801561046657600080fd5b506000546104749060ff1681565b60405190151581526020016102c3565b34801561049057600080fd5b5061029761049f366004612187565b610c66565b3480156104b057600080fd5b506102976104bf366004612250565b610cf1565b3480156104d057600080fd5b506102976104df366004612250565b610d7c565b3480156104f057600080fd5b506102b960045481565b34801561050657600080fd5b5060055461051a906001600160a01b031681565b6040516001600160a01b0390911681526020016102c3565b34801561053e57600080fd5b5061029761054d366004612117565b610e07565b34801561055e57600080fd5b506002546102b9565b34801561057357600080fd5b506007546104749060ff1681565b34801561058d57600080fd5b506102b960095481565b3480156105a357600080fd5b506102976105b2366004612187565b610e88565b3480156105c357600080fd5b506102976105d2366004612187565b610f08565b3480156105e357600080fd5b506102976105f2366004612187565b610f87565b34801561060357600080fd5b50610297610612366004612250565b610f8f565b34801561062357600080fd5b506102b960085481565b34801561063957600080fd5b5060065461064e90600160801b9004600f0b81565b604051600f9190910b81526020016102c3565b34801561066d57600080fd5b5061068161067c36600461226d565b61101a565b6040516102c391906122e2565b34801561069a57600080fd5b5061051a73bb51273d6c746910c7c06fe718f30c936170fed081565b3480156106c257600080fd5b506104746106d1366004612117565b600d6020526000908152604090205460ff1681565b3480156106f257600080fd5b50610297610701366004612187565b61111d565b34801561071257600080fd5b50610297610721366004612187565b61119d565b34801561073257600080fd5b5060035461051a906001600160a01b031681565b34801561075257600080fd5b5060065461064e90600f0b81565b34801561076c57600080fd5b506102b961121c565b34801561078157600080fd5b50610297610790366004612187565b611226565b3480156107a157600080fd5b50600c546104749060ff1681565b3480156107bb57600080fd5b506102976107ca366004612187565b6112b1565b60006009546107dc611415565b6107e6919061233c565b92915050565b3373feb4acf3df3cdea7399794d0869ef76a6efaff52146108415760405162461bcd60e51b81526004016108389060208082526004908201526310b3b7bb60e11b604082015260600190565b60405180910390fd5b6001600160a01b03831661085457600080fd5b60055461088f906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28116911660006112c2565b6005546108bc9073ae7ab96520de3a18e5e111b5eaab095312d7fe84906001600160a01b031660006112c2565b6108f26001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216846000196112c2565b61091373ae7ab96520de3a18e5e111b5eaab095312d7fe84846000196112c2565b600580546001600160a01b039094166001600160a01b0319909416939093179092556fffffffffffffffffffffffffffffffff918216600160801b02911617600655565b61095f6114a1565b610968816114da565b50565b6040516320b8029160e21b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906382e00a449060240160006040518083038186803b1580156109ca57600080fd5b505afa1580156109de573d6000803e3d6000fd5b505050506001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b600c5460009060ff1680610a3957506001600160a01b0382166000908152600d602052604090205460ff165b15610a475750600019919050565b506000919050565b919050565b6000610a5e6114a1565b610a666115b0565b9050610a71816116d4565b90565b610a7c6114a1565b6109688161180e565b6000610a8f611822565b905090565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610af357600080fd5b505afa158015610b07573d6000803e3d6000fd5b5050604051637c22221b60e11b81526004810184905273889edc2edab5f40e902b864ad4d7ade8e412f9b1925063f84444369150602401600060405180830381600087803b158015610b5857600080fd5b505af1158015610b6c573d6000803e3d6000fd5b505050507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610bcb57600080fd5b505af1158015610bdf573d6000803e3d6000fd5b505050505050565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610c4657600080fd5b505afa158015610c5a573d6000803e3d6000fd5b50505060049190915550565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610cc557600080fd5b505afa158015610cd9573d6000803e3d6000fd5b50505050612710811115610cec57600080fd5b600b55565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610d5057600080fd5b505afa158015610d64573d6000803e3d6000fd5b50506007805460ff1916931515939093179092555050565b6040516320b8029160e21b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906382e00a449060240160006040518083038186803b158015610ddb57600080fd5b505afa158015610def573d6000803e3d6000fd5b5050600c805460ff1916931515939093179092555050565b3373feb4acf3df3cdea7399794d0869ef76a6efaff5214610e535760405162461bcd60e51b81526004016108389060208082526004908201526310b3b7bb60e11b604082015260600190565b6001600160a01b038116610e6657600080fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610ee757600080fd5b505afa158015610efb573d6000803e3d6000fd5b505050506109688161185c565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610f6757600080fd5b505afa158015610f7b573d6000803e3d6000fd5b50505060089190915550565b6109686114a1565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b158015610fee57600080fd5b505afa158015611002573d6000803e3d6000fd5b50506000805460ff1916931515939093179092555050565b6040516348e4a64960e01b81523360048201526060907f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b15801561107c57600080fd5b505afa158015611090573d6000803e3d6000fd5b5050604051636b34082160e11b815273889edc2edab5f40e902b864ad4d7ade8e412f9b1925063d668104291506110cf9086908690309060040161234f565b6000604051808303816000875af11580156110ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261111691908101906123ac565b9392505050565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b50505050610968816118a0565b6040516348e4a64960e01b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906348e4a6499060240160006040518083038186803b1580156111fc57600080fd5b505afa158015611210573d6000803e3d6000fd5b50505060099190915550565b6000610a8f611415565b6040516320b8029160e21b81523360048201527f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b0316906382e00a449060240160006040518083038186803b15801561128557600080fd5b505afa158015611299573d6000803e3d6000fd5b505050506127108111156112ac57600080fd5b600a55565b6112b96114a1565b610968816118e4565b80158061133c5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a919061246a565b155b6113a75760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610838565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526113f99084906118fb565b505050565b606061140d84846000856119d0565b949350505050565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906370a08231906024015b602060405180830381865afa15801561147d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8f919061246a565b3330146114d85760405162461bcd60e51b815260206004820152600560248201526410b9b2b63360d91b6044820152606401610838565b565b60007f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e919061246a565b9050600061156a611415565b6115749083612483565b905060008184611582611822565b61158c9190612496565b61159691906124ad565b905060028111156115aa576115aa81611aab565b50505050565b60007f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b031663bf86d6906040518163ffffffff1660e01b8152600401602060405180830381865afa158015611610573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163491906124cf565b158015611643575060075460ff165b156116635761166361165e600854611659611415565b611c06565b611c1c565b600061166d611822565b9050612710670de0b6b3a7640000600b5461271061168b9190612483565b61169484611e94565b61169e9085612496565b6116a89190612496565b6116b291906124ad565b6116bc91906124ad565b6116c4611415565b6116ce919061233c565b91505090565b60005460ff166116ee57506000805460ff19166001179055565b60007f000000000000000000000000288991c055f94e9a0dcf0ad08ee3496e96e681426001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561174e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611772919061246a565b9050808211156117e1576127106001548261178d9190612496565b61179791906124ad565b6117a18284612483565b11156117dd5760405162461bcd60e51b815260206004820152600b60248201526a6865616c7468436865636b60a81b6044820152606401610838565b5050565b818111156117dd57612710600254826117fa9190612496565b61180491906124ad565b6117a18383612483565b60075460ff16156109685761096881611c1c565b6040516370a0823160e01b815230600482015260009073ae7ab96520de3a18e5e111b5eaab095312d7fe84906370a0823190602401611460565b6000811161189b5760405162461bcd60e51b815260206004820152600c60248201526b085e995c9bc81c1c9bd99a5d60a21b6044820152606401610838565b600155565b61271081106118df5760405162461bcd60e51b815260206004820152600b60248201526a085b1bdcdcc81b1a5b5a5d60aa1b6044820152606401610838565b600255565b6118f081611659611822565b905061096881611aab565b6000611950826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113fe9092919063ffffffff16565b905080516000148061197157508080602001905181019061197191906124cf565b6113f95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610838565b606082471015611a315760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610838565b600080866001600160a01b03168587604051611a4d91906124ec565b60006040518083038185875af1925050503d8060008114611a8a576040519150601f19603f3d011682016040523d82523d6000602084013e611a8f565b606091505b5091509150611aa087838387611f70565b979650505050505050565b6000612710670de0b6b3a7640000600a54612710611ac99190612483565b611ad1611fe9565b611adb9086612496565b611ae59190612496565b611aef91906124ad565b611af991906124ad565b600554600654604051630f7c084960e21b8152600160801b8204600f90810b60048301529190910b602482015260448101859052606481018390529192506001600160a01b031690633df02124906084016020604051808303816000875af1158015611b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8d919061246a565b507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015611be957600080fd5b505af1158015611bfd573d6000803e3d6000fd5b50505050505050565b6000818310611c155781611116565b5090919050565b6103e8811015611c295750565b604051632e1a7d4d60e01b8152600481018290527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015611c8b57600080fd5b505af1158015611c9f573d6000803e3d6000fd5b5050600554600654604051635e0d443f60e01b8152600f82810b6004830152600160801b90920490910b6024820152604481018590528493506001600160a01b039091169150635e0d443f90606401602060405180830381865afa158015611d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2f919061246a565b1015611e3d5773ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316631ea7ca896040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dad91906124cf565b6109685760405163a1903eab60e01b815273feb4acf3df3cdea7399794d0869ef76a6efaff52600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe849063a1903eab9083906024015b60206040518083038185885af1158015611e18573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117dd919061246a565b600554600654604051630f7c084960e21b8152600f82810b6004830152600160801b90920490910b602482015260448101839052606481018390526001600160a01b0390911690633df02124908390608401611dfa565b600080611ea383600954611c06565b9050611eb781670de0b6b3a76400006120c7565b600554600654604051635e0d443f60e01b8152600160801b8204600f90810b60048301529190910b6024820152604481018390529192508291670de0b6b3a7640000916001600160a01b031690635e0d443f90606401602060405180830381865afa158015611f2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4e919061246a565b611f589190612496565b611f6291906124ad565b915061111682611659611fe9565b60608315611fdf578251600003611fd8576001600160a01b0385163b611fd85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610838565b508161140d565b61140d83836120d6565b6000806000600360009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612041573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120659190612522565b5093505092505081925060018311801561208957506004546120878242612483565b105b6120c25760405162461bcd60e51b815260206004820152600a60248201526921636861696e6c696e6b60b01b6044820152606401610838565b505090565b6000818311611c155781611116565b8151156120e65781518083602001fd5b8060405162461bcd60e51b81526004016108389190612572565b80356001600160a01b0381168114610a4f57600080fd5b60006020828403121561212957600080fd5b61111682612100565b8035600f81900b8114610a4f57600080fd5b60008060006060848603121561215957600080fd5b61216284612100565b925061217060208501612132565b915061217e60408501612132565b90509250925092565b60006020828403121561219957600080fd5b5035919050565b801515811461096857600080fd5b600080604083850312156121c157600080fd5b6121ca83612100565b915060208301356121da816121a0565b809150509250929050565b60005b838110156122005781810151838201526020016121e8565b50506000910152565b600081518084526122218160208601602086016121e5565b601f01601f19169290920160200192915050565b821515815260406020820152600061140d6040830184612209565b60006020828403121561226257600080fd5b8135611116816121a0565b6000806020838503121561228057600080fd5b823567ffffffffffffffff8082111561229857600080fd5b818501915085601f8301126122ac57600080fd5b8135818111156122bb57600080fd5b8660208260051b85010111156122d057600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b8181101561231a578351835292840192918401916001016122fe565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156107e6576107e6612326565b6040808252810183905260006001600160fb1b0384111561236f57600080fd5b8360051b808660608501376001600160a01b03939093166020830152500160600192915050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156123bf57600080fd5b825167ffffffffffffffff808211156123d757600080fd5b818501915085601f8301126123eb57600080fd5b8151818111156123fd576123fd612396565b8060051b604051601f19603f8301168101818110858211171561242257612422612396565b60405291825284820192508381018501918883111561244057600080fd5b938501935b8285101561245e57845184529385019392850192612445565b98975050505050505050565b60006020828403121561247c57600080fd5b5051919050565b818103818111156107e6576107e6612326565b80820281158282048414176107e6576107e6612326565b6000826124ca57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156124e157600080fd5b8151611116816121a0565b600082516124fe8184602087016121e5565b9190910192915050565b805169ffffffffffffffffffff81168114610a4f57600080fd5b600080600080600060a0868803121561253a57600080fd5b61254386612508565b945060208601519350604086015192506060860151915061256660808701612508565b90509295509295909350565b602081526000611116602083018461220956fea264697066735822122002bd38baa078029d7e343929654e769ce3e410ef76f202a821307663646eeab764736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000011737445544820616363756d756c61746f72000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _asset (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _name (string): stETH accumulator
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000011
Arg [3] : 737445544820616363756d756c61746f72000000000000000000000000000000
Deployed Bytecode Sourcemap
97781:11495:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;42278:42:0;58123:14;57872:33;;58104:34;58385:1;58365;58332:14;58312:1;58268:25;58244:5;58213:188;58473:16;58470:1;58467;58452:38;58579:6;58599:68;;;;58718:16;58715:1;58708:27;58599:68;58635:16;58632:1;58625:27;58572:178;;101625:152;;;;;;;;;;-1:-1:-1;101625:152:0;;;;;:::i;:::-;;:::i;:::-;;;529:25:1;;;517:2;502:18;101625:152:0;;;;;;;;98770:27;;;;;;;;;;;;;;;;107495:417;;;;;;;;;;-1:-1:-1;107495:417:0;;;;;:::i;:::-;;:::i;54158:100::-;;;;;;;;;;-1:-1:-1;54158:100:0;;;;;:::i;:::-;;:::i;106402:133::-;;;;;;;;;;-1:-1:-1;106402:133:0;;;;;:::i;:::-;;:::i;101327:290::-;;;;;;;;;;-1:-1:-1;101327:290:0;;;;;:::i;:::-;;:::i;62659:319::-;;;;;;;;;;;;;:::i;60314:101::-;;;;;;;;;;-1:-1:-1;60390:17:0;;60314:101;;53574:104;;;;;;;;;;-1:-1:-1;53574:104:0;;;;;:::i;:::-;;:::i;104519:93::-;;;;;;;;;;;;;:::i;49309:318::-;;;;;;;;;;-1:-1:-1;49552:56:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;49552:56:0;-1:-1:-1;;;49552:56:0;;;49309:318;;;;-1:-1:-1;;49309:318:0;:::i;98834:29::-;;;;;;;;;;;;;;;;109041:232;;;;;;;;;;-1:-1:-1;109041:232:0;;;;;:::i;:::-;;:::i;106648:143::-;;;;;;;;;;-1:-1:-1;106648:143:0;;;;;:::i;:::-;;:::i;59757:32::-;;;;;;;;;;-1:-1:-1;59757:32:0;;;;;;;;;;;2693:14:1;;2686:22;2668:41;;2656:2;2641:18;59757:32:0;2528:187:1;105996:173:0;;;;;;;;;;-1:-1:-1;105996:173:0;;;;;:::i;:::-;;:::i;104729:108::-;;;;;;;;;;-1:-1:-1;104729:108:0;;;;;:::i;:::-;;:::i;106248:93::-;;;;;;;;;;-1:-1:-1;106248:93:0;;;;;:::i;:::-;;:::i;98257:41::-;;;;;;;;;;;;;;;;98305:65;;;;;;;;;;-1:-1:-1;98305:65:0;;;;-1:-1:-1;;;;;98305:65:0;;;;;;-1:-1:-1;;;;;3130:32:1;;;3112:51;;3100:2;3085:18;98305:65:0;2966:203:1;107166:202:0;;;;;;;;;;-1:-1:-1;107166:202:0;;;;;:::i;:::-;;:::i;60608:97::-;;;;;;;;;;-1:-1:-1;60682:15:0;;60608:97;;98482:29;;;;;;;;;;-1:-1:-1;98482:29:0;;;;;;;;98679:32;;;;;;;;;;;;;;;;60900:160;;;;;;;;;;-1:-1:-1;60900:160:0;;;;;:::i;:::-;;:::i;105012:127::-;;;;;;;;;;-1:-1:-1;105012:127:0;;;;;:::i;:::-;;:::i;55477:100::-;;;;;;;;;;-1:-1:-1;55477:100:0;;;;;:::i;:::-;;:::i;62374:118::-;;;;;;;;;;-1:-1:-1;62374:118:0;;;;;:::i;:::-;;:::i;98579:29::-;;;;;;;;;;;;;;;;98427:23;;;;;;;;;;-1:-1:-1;98427:23:0;;;;-1:-1:-1;;;98427:23:0;;;;;;;;;3347:2:1;3336:22;;;;3318:41;;3306:2;3291:18;98427:23:0;3174:191:1;108553:224:0;;;;;;;;;;-1:-1:-1;108553:224:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;42218:102::-;;;;;;;;;;;;42278:42;42218:102;;99038:39;;;;;;;;;;-1:-1:-1;99038:39:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;61635:152;;;;;;;;;;-1:-1:-1;61635:152:0;;;;;:::i;:::-;;:::i;105330:139::-;;;;;;;;;;-1:-1:-1;105330:139:0;;;;;:::i;:::-;;:::i;98130:108::-;;;;;;;;;;-1:-1:-1;98130:108:0;;;;-1:-1:-1;;;;;98130:108:0;;;98395:25;;;;;;;;;;-1:-1:-1;98395:25:0;;;;;;;;104308:97;;;;;;;;;;;;;:::i;105619:172::-;;;;;;;;;;-1:-1:-1;105619:172:0;;;;;:::i;:::-;;:::i;98957:23::-;;;;;;;;;;-1:-1:-1;98957:23:0;;;;;;;;56106:115;;;;;;;;;;-1:-1:-1;56106:115:0;;;;;:::i;:::-;;:::i;101625:152::-;101707:7;101752:17;;101734:15;:13;:15::i;:::-;:35;;;;:::i;:::-;101727:42;101625:152;-1:-1:-1;;101625:152:0:o;107495:417::-;107015:10;99254:42;107015:17;107007:34;;;;-1:-1:-1;;;107007:34:0;;;;;;5327:2:1;5309:21;;;5366:1;5346:18;;;5339:29;-1:-1:-1;;;5399:2:1;5384:18;;5377:34;5443:2;5428:18;;5125:327;107007:34:0;;;;;;;;;-1:-1:-1;;;;;107608:20:0;::::1;107600:29;;;::::0;::::1;;107658:5;::::0;107640:27:::1;::::0;-1:-1:-1;;;;;107640:5:0::1;:17:::0;::::1;::::0;107658:5:::1;;107640:17;:27::i;:::-;107701:5;::::0;107678:32:::1;::::0;97891:42:::1;::::0;-1:-1:-1;;;;;107701:5:0::1;;107678:22;:32::i;:::-;107721:44;-1:-1:-1::0;;;;;107721:5:0::1;:17;107739:6:::0;-1:-1:-1;;107721:17:0::1;:44::i;:::-;107776:49;97891:42;107799:6:::0;-1:-1:-1;;107776:22:0::1;:49::i;:::-;107836:5;:14:::0;;-1:-1:-1;;;;;107836:14:0;;::::1;-1:-1:-1::0;;;;;;107836:14:0;;::::1;::::0;;;::::1;::::0;;;107861:18:::1;107890:14:::0;;;-1:-1:-1;;;107890:14:0::1;107861:18:::0;;107890:14:::1;107861:7;107890:14:::0;107495:417::o;54158:100::-;40502:11;:9;:11::i;:::-;54231:19:::1;54242:7;54231:10;:19::i;:::-;54158:100:::0;:::o;106402:133::-;41186:56;;-1:-1:-1;;;41186:56:0;;41231:10;41186:56;;;3112:51:1;41186:17:0;-1:-1:-1;;;;;41186:44:0;;;;3085:18:1;;41186:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;106499:17:0;;;::::1;;::::0;;;:7:::1;:17;::::0;;;;:28;;-1:-1:-1;;106499:28:0::1;::::0;::::1;;::::0;;;::::1;::::0;;106402:133::o;101327:290::-;101493:4;;101404:7;;101493:4;;;:23;;-1:-1:-1;;;;;;101501:15:0;;;;;;:7;:15;;;;;;;;101493:23;101489:121;;;-1:-1:-1;;;101540:17:0;101327:290;-1:-1:-1;101327:290:0:o;101489:121::-;-1:-1:-1;101597:1:0;;101327:290;-1:-1:-1;101327:290:0:o;101489:121::-;101327:290;;;:::o;62659:319::-;62759:20;40502:11;:9;:11::i;:::-;62849:19:::1;:17;:19::i;:::-;62834:34;;62937:33;62957:12;62937:19;:33::i;:::-;62659:319:::0;:::o;53574:104::-;40502:11;:9;:11::i;:::-;53649:21:::1;53662:7;53649:12;:21::i;104519:93::-:0;104564:7;104591:13;:11;:13::i;:::-;104584:20;;104519:93;:::o;109041:232::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;109124:54:0::1;::::0;-1:-1:-1;;;109124:54:0;;::::1;::::0;::::1;529:25:1::0;;;97995:42:0::1;::::0;-1:-1:-1;109124:42:0::1;::::0;-1:-1:-1;502:18:1;;109124:54:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;109203:5;-1:-1:-1::0;;;;;109189:29:0::1;;109226:21;109189:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;109041:232:::0;:::o;106648:143::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;106743:18:0::1;:40:::0;;;;-1:-1:-1;106648:143:0:o;105996:173::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59834:6:::1;106091:15;:26;;106083:35;;;::::0;::::1;;106129:14;:32:::0;105996:173::o;104729:108::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;104805:10:0::1;:24:::0;;-1:-1:-1;;104805:24:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;-1:-1:-1;;104729:108:0:o;106248:93::-;41186:56;;-1:-1:-1;;;41186:56:0;;41231:10;41186:56;;;3112:51:1;41186:17:0;-1:-1:-1;;;;;41186:44:0;;;;3085:18:1;;41186:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;106321:4:0::1;:12:::0;;-1:-1:-1;;106321:12:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;-1:-1:-1;;106248:93:0:o;107166:202::-;107015:10;99254:42;107015:17;107007:34;;;;-1:-1:-1;;;107007:34:0;;;;;;5327:2:1;5309:21;;;5366:1;5346:18;;;5339:29;-1:-1:-1;;;5399:2:1;5384:18;;5377:34;5443:2;5428:18;;5125:327;107007:34:0;-1:-1:-1;;;;;107263:30:0;::::1;107255:39;;;::::0;::::1;;107305:15;:55:::0;;-1:-1:-1;;;;;;107305:55:0::1;-1:-1:-1::0;;;;;107305:55:0;;;::::1;::::0;;;::::1;::::0;;107166:202::o;60900:160::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61010:42:::1;61031:20;61010;:42::i;105012:127::-:0;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;105099:14:0::1;:32:::0;;;;-1:-1:-1;105012:127:0:o;55477:100::-;40502:11;:9;:11::i;62374:118::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;62454:13:0::1;:30:::0;;-1:-1:-1;;62454:30:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;-1:-1:-1;;62374:118:0:o;108553:224::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;108646:27:0;;40679:17;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;108699:70:0::1;::::0;-1:-1:-1;;;108699:70:0;;97995:42:::1;::::0;-1:-1:-1;108699:45:0::1;::::0;-1:-1:-1;108699:70:0::1;::::0;108745:8;;;;108763:4:::1;::::0;108699:70:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;::::0;;::::1;-1:-1:-1::0;;108699:70:0::1;::::0;::::1;;::::0;::::1;::::0;;;::::1;::::0;::::1;:::i;:::-;108686:83:::0;108553:224;-1:-1:-1;;;108553:224:0:o;61635:152::-;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61741:38:::1;61760:18;61741;:38::i;105330:139::-:0;40679:47;;-1:-1:-1;;;40679:47:0;;40715:10;40679:47;;;3112:51:1;40679:17:0;-1:-1:-1;;;;;40679:35:0;;;;3085:18:1;;40679:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;105423:17:0::1;:38:::0;;;;-1:-1:-1;105330:139:0:o;104308:97::-;104355:7;104382:15;:13;:15::i;105619:172::-;41186:56;;-1:-1:-1;;;41186:56:0;;41231:10;41186:56;;;3112:51:1;41186:17:0;-1:-1:-1;;;;;41186:44:0;;;;3085:18:1;;41186:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59834:6:::1;105719:13;:24;;105711:33;;;::::0;::::1;;105755:12;:28:::0;105619:172::o;56106:115::-;40502:11;:9;:11::i;:::-;56186:27:::1;56205:7;56186:18;:27::i;88370:582::-:0;88700:10;;;88699:62;;-1:-1:-1;88716:39:0;;-1:-1:-1;;;88716:39:0;;88740:4;88716:39;;;7458:34:1;-1:-1:-1;;;;;7528:15:1;;;7508:18;;;7501:43;88716:15:0;;;;;7393:18:1;;88716:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;88699:62;88677:166;;;;-1:-1:-1;;;88677:166:0;;7946:2:1;88677:166:0;;;7928:21:1;7985:2;7965:18;;;7958:30;8024:34;8004:18;;;7997:62;-1:-1:-1;;;8075:18:1;;;8068:52;8137:19;;88677:166:0;7744:418:1;88677:166:0;88881:62;;;-1:-1:-1;;;;;8359:32:1;;88881:62:0;;;8341:51:1;8408:18;;;;8401:34;;;88881:62:0;;;;;;;;;;8314:18:1;;;;88881:62:0;;;;;;;;-1:-1:-1;;;;;88881:62:0;-1:-1:-1;;;88881:62:0;;;88854:90;;88874:5;;88854:19;:90::i;:::-;88370:582;;;:::o;81356:229::-;81493:12;81525:52;81547:6;81555:4;81561:1;81564:12;81525:21;:52::i;:::-;81518:59;81356:229;-1:-1:-1;;;;81356:229:0:o;103830:113::-;103905:30;;-1:-1:-1;;;103905:30:0;;103929:4;103905:30;;;3112:51:1;103878:7:0;;103905:5;-1:-1:-1;;;;;103905:15:0;;;;3085:18:1;;103905:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;41346:99::-;41400:10;41422:4;41400:27;41392:45;;;;-1:-1:-1;;;41392:45:0;;8648:2:1;41392:45:0;;;8630:21:1;8687:1;8667:18;;;8660:29;-1:-1:-1;;;8705:18:1;;;8698:35;8750:18;;41392:45:0;8446:328:1;41392:45:0;41346:99::o;101789:432::-;101927:19;101949:17;-1:-1:-1;;;;;101949:29:0;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;101927:53;;101991:17;102025:15;:13;:15::i;:::-;102011:29;;:11;:29;:::i;:::-;101991:49;;102051:26;102111:9;102096:12;102080:13;:11;:13::i;:::-;:28;;;;:::i;:::-;:40;;;;:::i;:::-;102051:69;;102156:1;102135:18;:22;102131:83;;;102174:28;102183:18;102174:8;:28::i;:::-;101849:372;;;101789:432;:::o;102681:598::-;102737:20;102810:17;-1:-1:-1;;;;;102810:28:0;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;102809:31;:45;;;;-1:-1:-1;102844:10:0;;;;102809:45;102805:127;;;102871:49;102878:41;102887:14;;102903:15;:13;:15::i;:::-;102878:8;:41::i;:::-;102871:6;:49::i;:::-;103100:18;103121:13;:11;:13::i;:::-;103100:34;;59834:6;99161:4;103240:14;;59834:6;103230:24;;;;:::i;:::-;103191:35;103215:10;103191:23;:35::i;:::-;103178:48;;:10;:48;:::i;:::-;:77;;;;:::i;:::-;:83;;;;:::i;:::-;:93;;;;:::i;:::-;103160:15;:13;:15::i;:::-;:111;;;;:::i;:::-;103145:126;;102759:520;102681:598;:::o;63206:846::-;63293:13;;;;63288:88;;-1:-1:-1;63323:13:0;:20;;-1:-1:-1;;63323:20:0;63339:4;63323:20;;;63206:846::o;63288:88::-;63454:26;63483:17;-1:-1:-1;;;;;63483:29:0;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;63454:60;;63549:18;63531:15;:36;63527:518;;;59834:6;63696:17;;63675:18;:38;;;;:::i;:::-;63674:50;;;;:::i;:::-;63612:36;63630:18;63612:15;:36;:::i;:::-;63611:113;;63584:188;;;;-1:-1:-1;;;63584:188:0;;9759:2:1;63584:188:0;;;9741:21:1;9798:2;9778:18;;;9771:30;-1:-1:-1;;;9817:18:1;;;9810:41;9868:18;;63584:188:0;9557:335:1;63584:188:0;63277:775;63206:846;:::o;63527:518::-;63815:15;63794:18;:36;63790:255;;;59834:6;63958:15;;63937:18;:36;;;;:::i;:::-;63936:48;;;;:::i;:::-;63874:36;63895:15;63874:18;:36;:::i;100266:133::-;100338:10;;;;100334:58;;;100365:15;100372:7;100365:6;:15::i;103951:115::-;104023:35;;-1:-1:-1;;;104023:35:0;;104052:4;104023:35;;;3112:51:1;103997:7:0;;97891:42;;104023:20;;3085:18:1;;104023:35:0;2966:203:1;61258:188:0;61369:1;61346:20;:24;61338:49;;;;-1:-1:-1;;;61338:49:0;;10099:2:1;61338:49:0;;;10081:21:1;10138:2;10118:18;;;10111:30;-1:-1:-1;;;10157:18:1;;;10150:42;10209:18;;61338:49:0;9897:336:1;61338:49:0;61398:17;:40;61258:188::o;61979:183::-;59834:6;62063:18;:28;62055:52;;;;-1:-1:-1;;;62055:52:0;;10440:2:1;62055:52:0;;;10422:21:1;10479:2;10459:18;;;10452:30;-1:-1:-1;;;10498:18:1;;;10491:41;10549:18;;62055:52:0;10238:335:1;62055:52:0;62118:15;:36;61979:183::o;108151:152::-;108235:32;108244:7;108253:13;:11;:13::i;108235:32::-;108225:42;;108278:17;108287:7;108278:8;:17::i;91820:649::-;92244:23;92270:69;92298:4;92270:69;;;;;;;;;;;;;;;;;92278:5;-1:-1:-1;;;;;92270:27:0;;;:69;;;;;:::i;:::-;92244:95;;92358:10;:17;92379:1;92358:22;:56;;;;92395:10;92384:30;;;;;;;;;;;;:::i;:::-;92350:111;;;;-1:-1:-1;;;92350:111:0;;10780:2:1;92350:111:0;;;10762:21:1;10819:2;10799:18;;;10792:30;10858:34;10838:18;;;10831:62;-1:-1:-1;;;10909:18:1;;;10902:40;10959:19;;92350:111:0;10578:406:1;82442:455:0;82612:12;82670:5;82645:21;:30;;82637:81;;;;-1:-1:-1;;;82637:81:0;;11191:2:1;82637:81:0;;;11173:21:1;11230:2;11210:18;;;11203:30;11269:34;11249:18;;;11242:62;-1:-1:-1;;;11320:18:1;;;11313:36;11366:19;;82637:81:0;10989:402:1;82637:81:0;82730:12;82744:23;82771:6;-1:-1:-1;;;;;82771:11:0;82790:5;82797:4;82771:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82729:73;;;;82820:69;82847:6;82855:7;82864:10;82876:12;82820:26;:69::i;:::-;82813:76;82442:455;-1:-1:-1;;;;;;;82442:455:0:o;102229:444::-;102284:25;59834:6;99161:4;102347:12;;59834:6;102337:22;;;;:::i;:::-;102322:11;:9;:11::i;:::-;102312:21;;:7;:21;:::i;:::-;:48;;;;:::i;:::-;:54;;;;:::i;:::-;:64;;;;:::i;:::-;102519:5;;102535;;102512:66;;-1:-1:-1;;;102512:66:0;;-1:-1:-1;;;102535:5:0;;;;;;102512:66;;;11915:41:1;102542:7:0;;;;11972:18:1;;;11965:50;12031:18;;;12024:34;;;12074:18;;;12067:34;;;102284:92:0;;-1:-1:-1;;;;;;102519:5:0;;102512:22;;11887:19:1;;102512:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;102603:5;-1:-1:-1;;;;;102589:29:0;;102626:21;102589:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;102273:400;102229:444;:::o;64612:106::-;64670:7;64701:1;64697;:5;:13;;64709:1;64697:13;;;-1:-1:-1;64705:1:0;;64612:106;-1:-1:-1;64612:106:0:o;100709:610::-;99211:4;100766:7;:20;100762:33;;;100709:610;:::o;100762:33::-;100805:39;;-1:-1:-1;;;100805:39:0;;;;;529:25:1;;;100819:5:0;-1:-1:-1;;;;;100805:30:0;;;;502:18:1;;100805:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;100881:5:0;;100895:7;;100874:45;;-1:-1:-1;;;100874:45:0;;100895:7;;;;100874:45;;;12310:41:1;-1:-1:-1;;;100904:5:0;;;;;;12367:18:1;;;12360:50;12426:18;;;12419:34;;;100922:7:0;;-1:-1:-1;;;;;;100881:5:0;;;;-1:-1:-1;100874:20:0;;12283:18:1;;100874:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:55;100870:442;;;97891:42;-1:-1:-1;;;;;101000:27:0;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;100995:177;;101105:39;;-1:-1:-1;;;101105:39:0;;99254:42;101105:39;;;3112:51:1;97891:42:0;;101105:18;;101131:7;;3085:18:1;;101105:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;100870:442::-;101211:5;;101243:7;;101204:72;;-1:-1:-1;;;101204:72:0;;101243:7;;;;101204:72;;;11915:41:1;-1:-1:-1;;;101252:5:0;;;;;;11972:18:1;;;11965:50;12031:18;;;12024:34;;;12074:18;;;12067:34;;;-1:-1:-1;;;;;101211:5:0;;;;101204:22;;101234:7;;11887:19:1;;101204:72:0;11688:419:1;103287:535:0;103364:16;103393:14;103410:40;103419:11;103432:17;;103410:8;:40::i;:::-;103393:57;;103470:21;103479:6;99161:4;103470:8;:21::i;:::-;103548:5;;103562;;103541:44;;-1:-1:-1;;;103541:44:0;;-1:-1:-1;;;103562:5:0;;;;;;103541:44;;;12310:41:1;103569:7:0;;;;12367:18:1;;;12360:50;12426:18;;;12419:34;;;103461:30:0;;-1:-1:-1;103461:30:0;;99161:4;;-1:-1:-1;;;;;103548:5:0;;103541:20;;12283:18:1;;103541:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:50;;;;:::i;:::-;:59;;;;:::i;:::-;103530:70;;103684:31;103693:8;103703:11;:9;:11::i;85015:644::-;85200:12;85229:7;85225:427;;;85257:10;:17;85278:1;85257:22;85253:290;;-1:-1:-1;;;;;78896:19:0;;;85467:60;;;;-1:-1:-1;;;85467:60:0;;12666:2:1;85467:60:0;;;12648:21:1;12705:2;12685:18;;;12678:30;12744:31;12724:18;;;12717:59;12793:18;;85467:60:0;12464:353:1;85467:60:0;-1:-1:-1;85564:10:0;85557:17;;85225:427;85607:33;85615:10;85627:12;85607:7;:33::i;100407:294::-;100451:16;100483:13;100500:17;100523:15;;;;;;;;;-1:-1:-1;;;;;100523:15:0;-1:-1:-1;;;;;100523:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;100480:76;;;;;;;100586:6;100567:26;;100624:1;100613:8;:12;:64;;;;-1:-1:-1;100659:18:0;;100629:27;100647:9;100629:15;:27;:::i;:::-;:48;100613:64;100604:89;;;;-1:-1:-1;;;100604:89:0;;13686:2:1;100604:89:0;;;13668:21:1;13725:2;13705:18;;;13698:30;-1:-1:-1;;;13744:18:1;;;13737:40;13794:18;;100604:89:0;13484:334:1;100604:89:0;100469:232;;100407:294;:::o;64430:106::-;64488:7;64519:1;64515;:5;:13;;64527:1;64515:13;;86201:552;86362:17;;:21;86358:388;;86594:10;86588:17;86651:15;86638:10;86634:2;86630:19;86623:44;86358:388;86721:12;86714:20;;-1:-1:-1;;;86714:20:0;;;;;;;;:::i;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;192:186;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;565:162::-;632:20;;692:2;681:21;;;671:32;;661:60;;717:1;714;707:12;732:330;807:6;815;823;876:2;864:9;855:7;851:23;847:32;844:52;;;892:1;889;882:12;844:52;915:29;934:9;915:29;:::i;:::-;905:39;;963:37;996:2;985:9;981:18;963:37;:::i;:::-;953:47;;1019:37;1052:2;1041:9;1037:18;1019:37;:::i;:::-;1009:47;;732:330;;;;;:::o;1067:180::-;1126:6;1179:2;1167:9;1158:7;1154:23;1150:32;1147:52;;;1195:1;1192;1185:12;1147:52;-1:-1:-1;1218:23:1;;1067:180;-1:-1:-1;1067:180:1:o;1252:118::-;1338:5;1331:13;1324:21;1317:5;1314:32;1304:60;;1360:1;1357;1350:12;1375:315;1440:6;1448;1501:2;1489:9;1480:7;1476:23;1472:32;1469:52;;;1517:1;1514;1507:12;1469:52;1540:29;1559:9;1540:29;:::i;:::-;1530:39;;1619:2;1608:9;1604:18;1591:32;1632:28;1654:5;1632:28;:::i;:::-;1679:5;1669:15;;;1375:315;;;;;:::o;1695:250::-;1780:1;1790:113;1804:6;1801:1;1798:13;1790:113;;;1880:11;;;1874:18;1861:11;;;1854:39;1826:2;1819:10;1790:113;;;-1:-1:-1;;1937:1:1;1919:16;;1912:27;1695:250::o;1950:270::-;1991:3;2029:5;2023:12;2056:6;2051:3;2044:19;2072:76;2141:6;2134:4;2129:3;2125:14;2118:4;2111:5;2107:16;2072:76;:::i;:::-;2202:2;2181:15;-1:-1:-1;;2177:29:1;2168:39;;;;2209:4;2164:50;;1950:270;-1:-1:-1;;1950:270:1:o;2225:298::-;2408:6;2401:14;2394:22;2383:9;2376:41;2453:2;2448;2437:9;2433:18;2426:30;2357:4;2473:44;2513:2;2502:9;2498:18;2490:6;2473:44;:::i;2720:241::-;2776:6;2829:2;2817:9;2808:7;2804:23;2800:32;2797:52;;;2845:1;2842;2835:12;2797:52;2884:9;2871:23;2903:28;2925:5;2903:28;:::i;3370:615::-;3456:6;3464;3517:2;3505:9;3496:7;3492:23;3488:32;3485:52;;;3533:1;3530;3523:12;3485:52;3573:9;3560:23;3602:18;3643:2;3635:6;3632:14;3629:34;;;3659:1;3656;3649:12;3629:34;3697:6;3686:9;3682:22;3672:32;;3742:7;3735:4;3731:2;3727:13;3723:27;3713:55;;3764:1;3761;3754:12;3713:55;3804:2;3791:16;3830:2;3822:6;3819:14;3816:34;;;3846:1;3843;3836:12;3816:34;3899:7;3894:2;3884:6;3881:1;3877:14;3873:2;3869:23;3865:32;3862:45;3859:65;;;3920:1;3917;3910:12;3859:65;3951:2;3943:11;;;;;3973:6;;-1:-1:-1;3370:615:1;;-1:-1:-1;;;;3370:615:1:o;3990:632::-;4161:2;4213:21;;;4283:13;;4186:18;;;4305:22;;;4132:4;;4161:2;4384:15;;;;4358:2;4343:18;;;4132:4;4427:169;4441:6;4438:1;4435:13;4427:169;;;4502:13;;4490:26;;4571:15;;;;4536:12;;;;4463:1;4456:9;4427:169;;;-1:-1:-1;4613:3:1;;3990:632;-1:-1:-1;;;;;;3990:632:1:o;4863:127::-;4924:10;4919:3;4915:20;4912:1;4905:31;4955:4;4952:1;4945:15;4979:4;4976:1;4969:15;4995:125;5060:9;;;5081:10;;;5078:36;;;5094:18;;:::i;5457:542::-;5674:2;5656:21;;;5693:18;;5686:34;;;-1:-1:-1;;;;;;5732:31:1;;5729:51;;;5776:1;5773;5766:12;5729:51;5810:6;5807:1;5803:14;5867:6;5859;5854:2;5843:9;5839:18;5826:48;-1:-1:-1;;;;;5960:32:1;;;;5953:4;5938:20;;5931:62;-1:-1:-1;5895:22:1;5919:2;5891:31;;5457:542;-1:-1:-1;;5457:542:1:o;6004:127::-;6065:10;6060:3;6056:20;6053:1;6046:31;6096:4;6093:1;6086:15;6120:4;6117:1;6110:15;6136:1105;6231:6;6262:2;6305;6293:9;6284:7;6280:23;6276:32;6273:52;;;6321:1;6318;6311:12;6273:52;6354:9;6348:16;6383:18;6424:2;6416:6;6413:14;6410:34;;;6440:1;6437;6430:12;6410:34;6478:6;6467:9;6463:22;6453:32;;6523:7;6516:4;6512:2;6508:13;6504:27;6494:55;;6545:1;6542;6535:12;6494:55;6574:2;6568:9;6596:2;6592;6589:10;6586:36;;;6602:18;;:::i;:::-;6648:2;6645:1;6641:10;6680:2;6674:9;6743:2;6739:7;6734:2;6730;6726:11;6722:25;6714:6;6710:38;6798:6;6786:10;6783:22;6778:2;6766:10;6763:18;6760:46;6757:72;;;6809:18;;:::i;:::-;6845:2;6838:22;6895:18;;;6929:15;;;;-1:-1:-1;6971:11:1;;;6967:20;;;6999:19;;;6996:39;;;7031:1;7028;7021:12;6996:39;7055:11;;;;7075:135;7091:6;7086:3;7083:15;7075:135;;;7157:10;;7145:23;;7108:12;;;;7188;;;;7075:135;;;7229:6;6136:1105;-1:-1:-1;;;;;;;;6136:1105:1:o;7555:184::-;7625:6;7678:2;7666:9;7657:7;7653:23;7649:32;7646:52;;;7694:1;7691;7684:12;7646:52;-1:-1:-1;7717:16:1;;7555:184;-1:-1:-1;7555:184:1:o;8779:128::-;8846:9;;;8867:11;;;8864:37;;;8881:18;;:::i;8912:168::-;8985:9;;;9016;;9033:15;;;9027:22;;9013:37;9003:71;;9054:18;;:::i;9085:217::-;9125:1;9151;9141:132;;9195:10;9190:3;9186:20;9183:1;9176:31;9230:4;9227:1;9220:15;9258:4;9255:1;9248:15;9141:132;-1:-1:-1;9287:9:1;;9085:217::o;9307:245::-;9374:6;9427:2;9415:9;9406:7;9402:23;9398:32;9395:52;;;9443:1;9440;9433:12;9395:52;9475:9;9469:16;9494:28;9516:5;9494:28;:::i;11396:287::-;11525:3;11563:6;11557:13;11579:66;11638:6;11633:3;11626:4;11618:6;11614:17;11579:66;:::i;:::-;11661:16;;;;;11396:287;-1:-1:-1;;11396:287:1:o;12822:179::-;12900:13;;12953:22;12942:34;;12932:45;;12922:73;;12991:1;12988;12981:12;13006:473;13109:6;13117;13125;13133;13141;13194:3;13182:9;13173:7;13169:23;13165:33;13162:53;;;13211:1;13208;13201:12;13162:53;13234:39;13263:9;13234:39;:::i;:::-;13224:49;;13313:2;13302:9;13298:18;13292:25;13282:35;;13357:2;13346:9;13342:18;13336:25;13326:35;;13401:2;13390:9;13386:18;13380:25;13370:35;;13424:49;13468:3;13457:9;13453:19;13424:49;:::i;:::-;13414:59;;13006:473;;;;;;;;:::o;13823:219::-;13972:2;13961:9;13954:21;13935:4;13992:44;14032:2;14021:9;14017:18;14009:6;13992:44;:::i
Swarm Source
ipfs://02bd38baa078029d7e343929654e769ce3e410ef76f202a821307663646eeab7
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.