Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 11349588 | 1442 days ago | IN | 0 ETH | 0.00135577 | ||||
Withdraw | 11349379 | 1442 days ago | IN | 0 ETH | 0.00269383 | ||||
Migrate Strategy | 11318777 | 1446 days ago | IN | 0 ETH | 0.02531645 | ||||
Deposit | 11292800 | 1450 days ago | IN | 0 ETH | 0.00558281 | ||||
Add Strategy | 11292762 | 1450 days ago | IN | 0 ETH | 0.00793172 | ||||
Set Management F... | 11292693 | 1450 days ago | IN | 0 ETH | 0.00076647 | ||||
0x60a0613d | 11291432 | 1450 days ago | IN | 0 ETH | 0.10476807 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.2.7
Contract Source Code (Vyper language format)
# @version 0.2.7 """ @title Yearn Token Vault @license GNU AGPLv3 @author yearn.finance @notice Yearn Token Vault. Holds an underlying token, and allows users to interact with the Yearn ecosystem through Strategies connected to the Vault. Vaults are not limited to a single Strategy, they can have as many Strategies as can be designed (however the withdrawal queue is capped at 20.) Deposited funds are moved into the most impactful strategy that has not already reached its limit for assets under management, regardless of which Strategy a user's funds end up in, they receive their portion of yields generated across all Strategies. When a user withdraws, if there are no funds sitting undeployed in the Vault, the Vault withdraws funds from Strategies in the order of least impact. (Funds are taken from the Strategy that will disturb everyone's gains the least, then the next least, etc.) In order to achieve this, the withdrawal queue's order must be properly set and managed by the community (through governance). Vault Strategies are parameterized to pursue the highest risk-adjusted yield. There is an "Emergency Shutdown" mode. When the Vault is put into emergency shutdown, assets will be recalled from the Strategies as quickly as is practical (given on-chain conditions), minimizing loss. Deposits are halted, new Strategies may not be added, and each Strategy exits with the minimum possible damage to position, while opening up deposits to be withdrawn by users. There are no restrictions on withdrawals above what is expected under Normal Operation. For further details, please refer to the specification: https://github.com/iearn-finance/yearn-vaults/blob/master/SPECIFICATION.md """ API_VERSION: constant(String[28]) = "0.2.0" # TODO: Add ETH Configuration # TODO: Add Delegated Configuration from vyper.interfaces import ERC20 implements: ERC20 interface DetailedERC20: def name() -> String[42]: view def symbol() -> String[20]: view def decimals() -> uint256: view interface Strategy: def distributeRewards(_shares: uint256): nonpayable def estimatedTotalAssets() -> uint256: view def withdraw(_amount: uint256): nonpayable def migrate(_newStrategy: address): nonpayable interface GuestList: def authorized(guest: address, amount: uint256) -> bool: view event Transfer: sender: indexed(address) receiver: indexed(address) value: uint256 event Approval: owner: indexed(address) spender: indexed(address) value: uint256 name: public(String[64]) symbol: public(String[32]) decimals: public(uint256) balanceOf: public(HashMap[address, uint256]) allowance: public(HashMap[address, HashMap[address, uint256]]) totalSupply: public(uint256) token: public(ERC20) governance: public(address) guardian: public(address) pendingGovernance: address guestList: public(GuestList) struct StrategyParams: performanceFee: uint256 # Strategist's fee (basis points) activation: uint256 # Activation block.number debtLimit: uint256 # Maximum borrow amount rateLimit: uint256 # Increase/decrease per block lastReport: uint256 # block.timestamp of the last time a report occured totalDebt: uint256 # Total outstanding debt that Strategy has totalGain: uint256 # Total returns that Strategy has realized for Vault totalLoss: uint256 # Total losses that Strategy has realized for Vault event StrategyAdded: strategy: indexed(address) debtLimit: uint256 # Maximum borrow amount rateLimit: uint256 # Increase/decrease per block performanceFee: uint256 # Strategist's fee (basis points) event StrategyReported: strategy: indexed(address) gain: uint256 loss: uint256 totalGain: uint256 totalLoss: uint256 totalDebt: uint256 debtAdded: uint256 debtLimit: uint256 # NOTE: Track the total for overhead targeting purposes strategies: public(HashMap[address, StrategyParams]) MAXIMUM_STRATEGIES: constant(uint256) = 20 # Ordering that `withdraw` uses to determine which strategies to pull funds from # NOTE: Does *NOT* have to match the ordering of all the current strategies that # exist, but it is recommended that it does or else withdrawal depth is # limited to only those inside the queue. # NOTE: Ordering is determined by governance, and should be balanced according # to risk, slippage, and/or volatility. Can also be ordered to increase the # withdrawal speed of a particular Strategy. # NOTE: The first time a ZERO_ADDRESS is encountered, it stops withdrawing withdrawalQueue: public(address[MAXIMUM_STRATEGIES]) emergencyShutdown: public(bool) depositLimit: public(uint256) # Limit for totalAssets the Vault can hold debtLimit: public(uint256) # Debt limit for the Vault across all strategies totalDebt: public(uint256) # Amount of tokens that all strategies have borrowed lastReport: public(uint256) # block.timestamp of last report rewards: public(address) # Rewards contract where Governance fees are sent to # Governance Fee for management of Vault (given to `rewards`) managementFee: public(uint256) # Governance Fee for performance of Vault (given to `rewards`) performanceFee: public(uint256) FEE_MAX: constant(uint256) = 10_000 # 100%, or 10k basis points SECS_PER_YEAR: constant(uint256) = 31_557_600 # 365.25 days @external def __init__( _token: address, _governance: address, _rewards: address, _nameOverride: String[64], _symbolOverride: String[32], ): """ @notice Initializes the Vault, this is called only once, when the contract is deployed. The performance fee is set to 10% of yield, per Strategy. The management fee is set to 2%, per year. There is no initial deposit limit. @dev If `_nameOverride` is not specified, the name will be 'yearn' combined with the name of _token. If `_symbolOverride` is not specified, the symbol will be 'y' combined with the symbol of _token. @param _token The token that may be deposited into this Vault. @param _governance The address authorized for governance interactions. @param _rewards The address to distribute rewards to. @param _nameOverride Specify a custom Vault name. Leave empty for default choice. @param _symbolOverride Specify a custom Vault symbol name. Leave empty for default choice. """ # TODO: Non-detailed Configuration? self.token = ERC20(_token) if _nameOverride == "": self.name = concat(DetailedERC20(_token).symbol(), " yVault") else: self.name = _nameOverride if _symbolOverride == "": self.symbol = concat("yv", DetailedERC20(_token).symbol()) else: self.symbol = _symbolOverride self.decimals = DetailedERC20(_token).decimals() self.governance = _governance self.rewards = _rewards self.guardian = msg.sender self.performanceFee = 1000 # 10% of yield (per Strategy) self.managementFee = 200 # 2% per year self.depositLimit = MAX_UINT256 # Start unlimited self.lastReport = block.timestamp @pure @external def apiVersion() -> String[28]: """ @notice Used to track the deployed version of this contract. In practice you can use this version number to compare with Yearn's GitHub and determine which version of the source matches this deployed contract. @return API_VERSION which holds the current version of this contract. """ return API_VERSION @external def setName(_name: String[42]): """ @notice Used to change the value of `name`. This may only be called by governance. @param _name The new name to use. """ assert msg.sender == self.governance self.name = _name @external def setSymbol(_symbol: String[20]): """ @notice Used to change the value of `symbol`. This may only be called by governance. @param _symbol The new symbol to use. """ assert msg.sender == self.governance self.symbol = _symbol # 2-phase commit for a change in governance @external def setGovernance(_governance: address): """ @notice Nominate a new address to use as governance. The change does not go into effect immediately. This function sets a pending change, and the governance address is not updated until the proposed governance address has accepted the responsibility. This may only be called by the current governance address. @param _governance The address requested to take over Vault governance. """ assert msg.sender == self.governance self.pendingGovernance = _governance @external def acceptGovernance(): """ @notice Once a new governance address has been proposed using setGovernance(), this function may be called by the proposed address to accept the responsibility of taking over governance for this contract. This may only be called by the proposed governance address. @dev setGovernance() should be called by the existing governance address, prior to calling this function. """ assert msg.sender == self.pendingGovernance self.governance = msg.sender @external def setGuestList(_guestList: address): """ @notice Used to set or change `guestList`. A guest list is another contract that dictates who is allowed to participate in a Vault (and transfer shares). This may only be called by governance. @param _guestList The address of the `GuestList` contract to use. """ assert msg.sender == self.governance self.guestList = GuestList(_guestList) @external def setRewards(_rewards: address): """ @notice Changes the rewards address. Any distributed rewards will cease flowing to the old address and begin flowing to this address once the change is in effect. This will not change any Strategy reports in progress, only new reports made after this change goes into effect. This may only be called by governance. @param _rewards The address to use for collecting rewards. """ assert msg.sender == self.governance self.rewards = _rewards @external def setDepositLimit(_limit: uint256): """ @notice Changes the maximum amount of tokens that can be deposited in this Vault. Note, this is not how much may be deposited by a single depositor, but the maximum amount that may be deposited across all depositors. This may only be called by governance. @param _limit The new deposit limit to use. """ assert msg.sender == self.governance self.depositLimit = _limit @external def setPerformanceFee(_fee: uint256): """ @notice Used to change the value of `performanceFee`. This may only be called by governance. @param _fee The new performance fee to use. """ assert msg.sender == self.governance self.performanceFee = _fee @external def setManagementFee(_fee: uint256): """ @notice Used to change the value of `managementFee`. This may only be called by governance. @param _fee The new management fee to use. """ assert msg.sender == self.governance self.managementFee = _fee @external def setGuardian(_guardian: address): """ @notice Used to change the address of `guardian`. This may only be called by governance or the existing guardian. @param _guardian The new guardian address to use. """ assert msg.sender in [self.guardian, self.governance] self.guardian = _guardian @external def setEmergencyShutdown(_active: bool): """ @notice Activates or deactivates Vault mode where all Strategies go into full withdrawal. During Emergency Shutdown: 1. No Users may deposit into the Vault (but may withdraw as usual.) 2. Governance may not add new Strategies. 3. Each Strategy must pay back their debt as quickly as reasonable to minimally affect their position. 4. Only Governance may undo Emergency Shutdown. See contract level note for further details. This may only be called by governance or the guardian. @param _active If true, the Vault goes into Emergency Shutdown. If false, the Vault goes back into Normal Operation. """ assert msg.sender in [self.guardian, self.governance] self.emergencyShutdown = _active @external def setWithdrawalQueue(_queue: address[MAXIMUM_STRATEGIES]): """ @notice Updates the withdrawalQueue to match the addresses and order specified by `_queue`. There can be fewer strategies than the maximum, as well as fewer than the total number of strategies active in the vault. `withdrawalQueue` will be updated in a gas-efficient manner, assuming the input is well- ordered with 0x0 only at the end. This may only be called by governance. @dev This is order sensitive, specify the addresses in the order in which funds should be withdrawn (so `_queue`[0] is the first Strategy withdrawn from, `_queue`[1] is the second, etc.) This means that the least impactful Strategy (the Strategy that will have its core positions impacted the least by having funds removed) should be at `_queue`[0], then the next least impactful at `_queue`[1], and so on. @param _queue The array of addresses to use as the new withdrawal queue. This is order sensitive. """ assert msg.sender == self.governance # HACK: Temporary until Vyper adds support for Dynamic arrays for i in range(MAXIMUM_STRATEGIES): if _queue[i] == ZERO_ADDRESS and self.withdrawalQueue[i] == ZERO_ADDRESS: break assert self.strategies[_queue[i]].activation > 0 self.withdrawalQueue[i] = _queue[i] @internal def _transfer(_from: address, _to: address, _value: uint256): # See note on `transfer()`. # Protect people from accidentally sending their shares to bad places assert not (_to in [self, ZERO_ADDRESS]) self.balanceOf[_from] -= _value self.balanceOf[_to] += _value log Transfer(_from, _to, _value) @external def transfer(_to: address, _value: uint256) -> bool: """ @notice Transfers shares from the caller's address to `_to`. This function will always return true, unless the user is attempting to transfer shares to this contract's address, or to 0x0. @param _to The address shares are being transferred to. Must not be this contract's address, must not be 0x0. @param _value The quantity of shares to transfer. @return True if transfer is sent to an address other than this contract's or 0x0, otherwise the transaction will fail. """ self._transfer(msg.sender, _to, _value) return True @external def transferFrom(_from: address, _to: address, _value: uint256) -> bool: """ @notice Transfers `_value` shares from `_from` to `_to`. This operation will always return true, unless the user is attempting to transfer shares to this contract's address, or to 0x0. Unless the caller has given this contract unlimited approval, transfering shares will decrement the caller's `allowance` by `_value`. @param _from The address shares are being transferred from. @param _to The address shares are being transferred to. Must not be this contract's address, must not be 0x0. @param _value The quantity of shares to transfer. @return True if transfer is sent to an address other than this contract's or 0x0, otherwise the transaction will fail. """ # Unlimited approval (saves an SSTORE) if (self.allowance[_from][msg.sender] < MAX_UINT256): self.allowance[_from][msg.sender] -= _value self._transfer(_from, _to, _value) return True @external def approve(_spender: address, _value: uint256) -> bool: """ @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`. 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. See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds. @param _value The amount of tokens to be spent. """ self.allowance[msg.sender][_spender] = _value log Approval(msg.sender, _spender, _value) return True @external def increaseAllowance(_spender: address, _value: uint256) -> bool: """ @dev Increase the allowance of the passed address to spend the total amount of tokens on behalf of msg.sender. This method mitigates the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds. @param _value The amount of tokens to increase the allowance by. """ self.allowance[msg.sender][_spender] += _value log Approval(msg.sender, _spender, self.allowance[msg.sender][_spender]) return True @external def decreaseAllowance(_spender: address, _value: uint256) -> bool: """ @dev Decrease the allowance of the passed address to spend the total amount of tokens on behalf of msg.sender. This method mitigates the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds. @param _value The amount of tokens to decrease the allowance by. """ self.allowance[msg.sender][_spender] -= _value log Approval(msg.sender, _spender, self.allowance[msg.sender][_spender]) return True @view @internal def _totalAssets() -> uint256: # See note on `totalAssets()`. return self.token.balanceOf(self) + self.totalDebt @view @external def totalAssets() -> uint256: """ @notice Returns the total quantity of all assets under control of this Vault, whether they're loaned out to a Strategy, or currently held in the Vault. @return The total assets under control of this Vault. """ return self._totalAssets() @view @internal def _balanceSheetOfStrategy(_strategy: address) -> uint256: # See note on `balanceSheetOfStrategy()`. return Strategy(_strategy).estimatedTotalAssets() @view @external def balanceSheetOfStrategy(_strategy: address) -> uint256: """ @notice Provide an accurate estimate for the total amount of assets (principle + return) that `_strategy` is currently managing, denominated in terms of `_token`. This total is the total realizable value that could *actually* be obtained from this Strategy if it were to divest its entire position based on current on-chain conditions. @param _strategy The Strategy to estimate the realizable assets of. @return An estimate of the total realizable assets in `_strategy`. """ return self._balanceSheetOfStrategy(_strategy) @view @external def totalBalanceSheet(_strategies: address[2 * MAXIMUM_STRATEGIES]) -> uint256: """ @notice Measure the total balance sheet of this Vault, using the list of strategies given above. (2x the expected maximum is used to ensure completeness.) NOTE: The safety of this function depends *entirely* on the list of strategies given as the function argument. Care should be taken to choose this list to ensure that the estimate is accurate. No additional checking is used. NOTE: Guardian should use this value vs. `totalAssets()` to determine if a condition exists where the Vault is experiencing a dangerous 'balance sheet' attack, leading Vault shares to be worth less than what their price on paper is (based on their debt) @param _strategies A list of strategies managed by this Vault, which will be included in the balance sheet calculation. @return The total balance sheet of this Vault. """ balanceSheet: uint256 = self.token.balanceOf(self) for strategy in _strategies: if strategy == ZERO_ADDRESS: break balanceSheet += self._balanceSheetOfStrategy(strategy) return balanceSheet @internal def _issueSharesForAmount(_to: address, _amount: uint256) -> uint256: # Issues `_amount` Vault shares to `_to`. # Shares must be issued prior to taking on new collateral, or # calculation will be wrong. This means that only *trusted* tokens # (with no capability for exploitive behavior) can be used. shares: uint256 = 0 # HACK: Saves 2 SLOADs (~4000 gas) totalSupply: uint256 = self.totalSupply if totalSupply > 0: # Mint amount of shares based on what the Vault is managing overall # NOTE: if sqrt(token.totalSupply()) > 1e39, this could potentially revert shares = _amount * totalSupply / self._totalAssets() else: # No existing shares, so mint 1:1 shares = _amount # Mint new shares self.totalSupply = totalSupply + shares self.balanceOf[_to] += shares log Transfer(ZERO_ADDRESS, _to, shares) return shares @external def deposit(_amount: uint256 = MAX_UINT256, _recipient: address = msg.sender) -> uint256: """ @notice Deposits `_amount` `token`, issuing shares to `_recipient`. If the Vault is in Emergency Shutdown, deposits will not be accepted and this call will fail. @dev Measuring quantity of shares to issues is based on the total outstanding debt that this contract has ("expected value") instead of the total balance sheet it has ("estimated value") has important security considerations, and is done intentionally. If this value were measured against external systems, it could be purposely manipulated by an attacker to withdraw more assets than they otherwise should be able to claim by redeeming their shares. On deposit, this means that shares are issued against the total amount that the deposited capital can be given in service of the debt that Strategies assume. If that number were to be lower than the "expected value" at some future point, depositing shares via this method could entitle the depositor to *less* than the deposited value once the "realized value" is updated from further reports by the Strategies to the Vaults. Care should be taken by integrators to account for this discrepancy, by using the view-only methods of this contract (both off-chain and on-chain) to determine if depositing into the Vault is a "good idea". @param _amount The quantity of tokens to deposit, defaults to all. @param _recipient The address to issue the shares in this Vault to. Defaults to the caller's address. @return The issued Vault shares. """ assert not self.emergencyShutdown # Deposits are locked out amount: uint256 = _amount # If _amount not specified, transfer the full token balance, # up to deposit limit if amount == MAX_UINT256: amount = min( self.depositLimit - self._totalAssets(), self.token.balanceOf(msg.sender), ) # Ensure we are depositing something assert amount > 0 # Ensure deposit limit is respected assert self._totalAssets() + amount <= self.depositLimit # Ensure deposit is permitted by guest list if self.guestList.address != ZERO_ADDRESS: assert self.guestList.authorized(msg.sender, amount) # Issue new shares (needs to be done before taking deposit to be accurate) # Shares are issued to recipient (may be different from msg.sender) # See @dev note, above. shares: uint256 = self._issueSharesForAmount(_recipient, amount) # Get new collateral reserve: uint256 = self.token.balanceOf(self) # Tokens are transferred from msg.sender (may be different from _recipient) assert self.token.transferFrom(msg.sender, self, amount) # TODO: `Deflationary` configuration only assert self.token.balanceOf(self) - reserve == amount # Deflationary token check return shares # Just in case someone wants them @view @internal def _shareValue(_shares: uint256) -> uint256: # Determines the current value of `_shares`. # NOTE: if sqrt(Vault.totalAssets()) >>> 1e39, this could potentially revert return (_shares * (self._totalAssets())) / self.totalSupply @view @internal def _sharesForAmount(_amount: uint256) -> uint256: # Determines how many shares `_amount` of token would receive. # See dev note on `deposit`. if self._totalAssets() > 0: # NOTE: if sqrt(token.totalSupply()) > 1e39, this could potentially revert return (_amount * self.totalSupply) / self._totalAssets() else: return 0 @view @external def maxAvailableShares() -> uint256: """ @notice Determines the total quantity of shares this Vault can provide, factoring in assets currently residing in the Vault, as well as those deployed to strategies. @dev Regarding how shares are calculated, see dev note on `deposit`. @return The total quantity of shares this Vault can provide. """ shares: uint256 = self._sharesForAmount(self.token.balanceOf(self)) for strategy in self.withdrawalQueue: if strategy == ZERO_ADDRESS: break shares += self._sharesForAmount(self.strategies[strategy].totalDebt) return shares @external def withdraw(_shares: uint256 = MAX_UINT256, _recipient: address = msg.sender) -> uint256: """ @notice Withdraws the calling account's tokens from this Vault, redeeming amount `_shares` for an appropriate amount of tokens. See note on `setWithdrawalQueue` for further details of withdrawal ordering and behavior. @dev Measuring the value of shares is based on the total outstanding debt that this contract has ("expected value") instead of the total balance sheet it has ("estimated value") has important security considerations, and is done intentionally. If this value were measured against external systems, it could be purposely manipulated by an attacker to withdraw more assets than they otherwise should be able to claim by redeeming their shares. On withdrawal, this means that shares are redeemed against the total amount that the deposited capital had "realized" since the point it was deposited, up until the point it was withdrawn. If that number were to be higher than the "expected value" at some future point, withdrawing shares via this method could entitle the depositor to *more* than the expected value once the "realized value" is updated from further reports by the Strategies to the Vaults. Under exceptional scenarios, this could cause earlier withdrawals to earn "more" of the underlying assets than Users might otherwise be entitled to, if the Vault's estimated value were otherwise measured through external means, accounting for whatever exceptional scenarios exist for the Vault (that aren't covered by the Vault's own design.) @param _shares How many shares to redeem for tokens, defaults to all. @param _recipient The address to issue the shares in this Vault to. Defaults to the caller's address. @return The quantity of tokens redeemable for `_shares`. """ shares: uint256 = _shares # May reduce this number below # If _shares not specified, transfer full share balance if shares == MAX_UINT256: shares = self.balanceOf[msg.sender] # Limit to only the shares they own assert shares <= self.balanceOf[msg.sender] # See @dev note, above. value: uint256 = self._shareValue(shares) if value > self.token.balanceOf(self): # We need to go get some from our strategies in the withdrawal queue # NOTE: This performs forced withdrawals from each Strategy. There is # a 0.5% withdrawal fee assessed on each forced withdrawal (<= 0.5% total) for strategy in self.withdrawalQueue: if strategy == ZERO_ADDRESS: break # We've exhausted the queue amountNeeded: uint256 = value - self.token.balanceOf(self) if amountNeeded == 0: break # We're done withdrawing # NOTE: Don't withdraw more than the debt so that Strategy can still # continue to work based on the profits it has # NOTE: This means that user will lose out on any profits that each # Strategy in the queue would return on next harvest, benefiting others amountNeeded = min(amountNeeded, self.strategies[strategy].totalDebt) if amountNeeded == 0: continue # Nothing to withdraw from this Strategy, try the next one # Force withdraw amount from each Strategy in the order set by governance before: uint256 = self.token.balanceOf(self) Strategy(strategy).withdraw(amountNeeded) withdrawn: uint256 = self.token.balanceOf(self) - before # Reduce the Strategy's debt by the amount withdrawn ("realized returns") # NOTE: This doesn't add to returns as it's not earned by "normal means" self.strategies[strategy].totalDebt -= withdrawn self.totalDebt -= withdrawn # NOTE: We have withdrawn everything possible out of the withdrawal queue # but we still don't have enough to fully pay them back, so adjust # to the total amount we've freed up through forced withdrawals if value > self.token.balanceOf(self): value = self.token.balanceOf(self) shares = self._sharesForAmount(value) # Burn shares (full value of what is being withdrawn) self.totalSupply -= shares self.balanceOf[msg.sender] -= shares log Transfer(msg.sender, ZERO_ADDRESS, shares) # Withdraw remaining balance to _recipient (may be different to msg.sender) (minus fee) assert self.token.transfer(_recipient, value) return value @view @external def pricePerShare() -> uint256: """ @notice Gives the price for a single Vault share. @dev See dev note on `withdraw`. @return The value of a single share. """ return self._shareValue(10 ** self.decimals) @internal def _organizeWithdrawalQueue(): # Reorganize `withdrawalQueue` based on premise that if there is an # empty value between two actual values, then the empty value should be # replaced by the later value. # NOTE: Relative ordering of non-zero values is maintained. offset: uint256 = 0 for idx in range(MAXIMUM_STRATEGIES): strategy: address = self.withdrawalQueue[idx] if strategy == ZERO_ADDRESS: offset += 1 # how many values we need to shift, always `<= idx` elif offset > 0: self.withdrawalQueue[idx - offset] = strategy self.withdrawalQueue[idx] = ZERO_ADDRESS @external def addStrategy( _strategy: address, _debtLimit: uint256, _rateLimit: uint256, _performanceFee: uint256, ): """ @notice Add a Strategy to the Vault. This may only be called by governance. @dev The Strategy will be appended to `withdrawalQueue`, call `setWithdrawalQueue` to change the order. @param _strategy The address of the Strategy to add. @param _debtLimit The quantity of assets `_strategy` can manage. @param _rateLimit How many assets per block this Vault may deposit to or withdraw from `_strategy`. @param _performanceFee The fee the strategist will receive based on this Vault's performance. """ assert _strategy != ZERO_ADDRESS assert msg.sender == self.governance assert self.strategies[_strategy].activation == 0 self.strategies[_strategy] = StrategyParams({ performanceFee: _performanceFee, activation: block.timestamp, debtLimit: _debtLimit, rateLimit: _rateLimit, lastReport: block.timestamp, totalDebt: 0, totalGain: 0, totalLoss: 0, }) self.debtLimit += _debtLimit log StrategyAdded(_strategy, _debtLimit, _rateLimit, _performanceFee) # queue is full assert self.withdrawalQueue[MAXIMUM_STRATEGIES - 1] == ZERO_ADDRESS self.withdrawalQueue[MAXIMUM_STRATEGIES - 1] = _strategy self._organizeWithdrawalQueue() @external def updateStrategyDebtLimit( _strategy: address, _debtLimit: uint256, ): """ @notice Change the quantity of assets `_strategy` may manage. This may only be called by governance. @param _strategy The Strategy to update. @param _debtLimit The quantity of assets `_strategy` may now manage. """ assert msg.sender == self.governance assert self.strategies[_strategy].activation > 0 self.debtLimit -= self.strategies[_strategy].debtLimit self.strategies[_strategy].debtLimit = _debtLimit self.debtLimit += _debtLimit @external def updateStrategyRateLimit( _strategy: address, _rateLimit: uint256, ): """ @notice Change the quantity assets per block this Vault may deposit to or withdraw from `_strategy`. This may only be called by governance. @param _strategy The Strategy to update. @param _rateLimit The quantity of assets `_strategy` may now manage. """ assert msg.sender == self.governance assert self.strategies[_strategy].activation > 0 self.strategies[_strategy].rateLimit = _rateLimit @external def updateStrategyPerformanceFee( _strategy: address, _performanceFee: uint256, ): """ @notice Change the fee the strategist will receive based on this Vault's performance. This may only be called by governance. @param _strategy The Strategy to update. @param _performanceFee The new fee the strategist will receive. """ assert msg.sender == self.governance assert self.strategies[_strategy].activation > 0 self.strategies[_strategy].performanceFee = _performanceFee @external def migrateStrategy(_oldVersion: address, _newVersion: address): """ @notice Migrates a Strategy, including all assets from `_oldVersion` to `_newVersion`. This may only be called by governance. @dev Strategy must successfully migrate all capital and positions to new Strategy, or else this will upset the balance of the Vault. The new Strategy should be "empty" e.g. have no prior commitments to this Vault, otherwise it could have issues. @param _oldVersion The existing Strategy to migrate from. @param _newVersion The new Strategy to migrate to. """ assert msg.sender == self.governance assert self.strategies[_oldVersion].activation > 0 assert self.strategies[_newVersion].activation == 0 strategy: StrategyParams = self.strategies[_oldVersion] self.strategies[_oldVersion] = empty(StrategyParams) self.strategies[_newVersion] = strategy Strategy(_oldVersion).migrate(_newVersion) # TODO: Ensure a smooth transition in terms of Strategy return for idx in range(MAXIMUM_STRATEGIES): if self.withdrawalQueue[idx] == _oldVersion: self.withdrawalQueue[idx] = _newVersion return # Don't need to reorder anything because we swapped @external def revokeStrategy(_strategy: address = msg.sender): """ @notice Revoke a Strategy, setting its debt limit to 0 and preventing any future deposits. This function should only be used in the scenario where the Strategy is being retired but no migration of the positions are possible, or in the extreme scenario that the Strategy needs to be put into "Emergency Exit" mode in order for it to exit as quickly as possible. The latter scenario could be for any reason that is considered "critical" that the Strategy exits its position as fast as possible, such as a sudden change in market conditions leading to losses, or an imminent failure in an external dependency. This may only be called by governance, the guardian, or the Strategy itself. Note that a Strategy will only revoke itself during emergency shutdown. @param _strategy The Strategy to revoke. """ assert msg.sender in [_strategy, self.governance, self.guardian] self.debtLimit -= self.strategies[_strategy].debtLimit self.strategies[_strategy].debtLimit = 0 @external def addStrategyToQueue(_strategy: address): """ @notice Adds `_strategy` to `withdrawalQueue`. This may only be called by governance. @dev The Strategy will be appended to `withdrawalQueue`, call `setWithdrawalQueue` to change the order. @param _strategy The Strategy to add. """ assert msg.sender == self.governance # Must be a current Strategy assert ( self.strategies[_strategy].activation > 0 and self.strategies[_strategy].totalDebt > 0 ) # Check if queue is full assert self.withdrawalQueue[MAXIMUM_STRATEGIES - 1] == ZERO_ADDRESS # Can't already be in the queue for strategy in self.withdrawalQueue: if strategy == ZERO_ADDRESS: break assert strategy != _strategy self.withdrawalQueue[MAXIMUM_STRATEGIES - 1] = _strategy self._organizeWithdrawalQueue() @external def removeStrategyFromQueue(_strategy: address): """ @notice Remove `_strategy` from `withdrawalQueue`. This may only be called by governance. @dev We don't do this with revokeStrategy because it should still be possible to withdraw from the Strategy if it's unwinding. @param _strategy The Strategy to add. """ assert msg.sender == self.governance for idx in range(MAXIMUM_STRATEGIES): if self.withdrawalQueue[idx] == _strategy: self.withdrawalQueue[idx] = ZERO_ADDRESS self._organizeWithdrawalQueue() return # We found the right location and cleared it raise # We didn't find the Strategy in the queue @view @internal def _debtOutstanding(_strategy: address) -> uint256: # See note on `debtOutstanding()`. strategy_debtLimit: uint256 = self.strategies[_strategy].debtLimit strategy_totalDebt: uint256 = self.strategies[_strategy].totalDebt if self.emergencyShutdown: return strategy_totalDebt elif strategy_totalDebt <= strategy_debtLimit: return 0 else: return strategy_totalDebt - strategy_debtLimit @view @external def debtOutstanding(_strategy: address = msg.sender) -> uint256: """ @notice Determines if `_strategy` is past its debt limit and if any tokens should be withdrawn to the Vault. @param _strategy The Strategy to check. Defaults to the caller. @return The quantity of tokens to withdraw. """ return self._debtOutstanding(_strategy) @view @internal def _creditAvailable(_strategy: address) -> uint256: # See note on `creditAvailable()`. if self.emergencyShutdown: return 0 strategy_debtLimit: uint256 = self.strategies[_strategy].debtLimit strategy_totalDebt: uint256 = self.strategies[_strategy].totalDebt strategy_rateLimit: uint256 = self.strategies[_strategy].rateLimit strategy_lastReport: uint256 = self.strategies[_strategy].lastReport # Exhausted credit line if strategy_debtLimit <= strategy_totalDebt or self.debtLimit <= self.totalDebt: return 0 # Start with debt limit left for the Strategy available: uint256 = strategy_debtLimit - strategy_totalDebt # Adjust by the global debt limit left available = min(available, self.debtLimit - self.totalDebt) # Adjust by the rate limit algorithm (limits the step size per reporting period) delta: uint256 = block.timestamp - strategy_lastReport # NOTE: Protect against unnecessary overflow faults here # NOTE: Set `strategy_rateLimit` to 0 to disable the rate limit if strategy_rateLimit > 0 and available / strategy_rateLimit >= delta: available = min(available, strategy_rateLimit * delta) # Can only borrow up to what the contract has in reserve # NOTE: Running near 100% is discouraged return min(available, self.token.balanceOf(self)) @view @external def creditAvailable(_strategy: address = msg.sender) -> uint256: """ @notice Amount of tokens in Vault a Strategy has access to as a credit line. This will check the Strategy's debt limit, as well as the tokens available in the Vault, and determine the maximum amount of tokens (if any) the Strategy may draw on. In the rare case the Vault is in emergency shutdown this will return 0. @param _strategy The Strategy to check. Defaults to caller. @return The quantity of tokens available for the Strategy to draw on. """ return self._creditAvailable(_strategy) @view @internal def _expectedReturn(_strategy: address) -> uint256: # See note on `expectedReturn()`. delta: uint256 = block.timestamp - self.strategies[_strategy].lastReport if delta > 0: # NOTE: Unlikely to throw unless strategy accumalates >1e68 returns # NOTE: Will not throw for DIV/0 because activation <= lastReport return (self.strategies[_strategy].totalGain * delta) / ( block.timestamp - self.strategies[_strategy].activation ) else: return 0 # Covers the scenario when block.timestamp == activation @view @external def availableDepositLimit() -> uint256: if self.depositLimit > self._totalAssets(): return self.depositLimit - self._totalAssets() else: return 0 @view @external def expectedReturn(_strategy: address = msg.sender) -> uint256: """ @notice Provide an accurate expected value for the return this `_strategy` would provide to the Vault the next time `report()` is called (since the last time it was called). @param _strategy The Strategy to determine the expected return for. Defaults to caller. @return The anticipated amount `_strategy` should make on its investment since its last report. """ return self._expectedReturn(_strategy) @internal def _reportLoss(_strategy: address, _loss: uint256): # Loss can only be up the amount of debt issued to strategy totalDebt: uint256 = self.strategies[_strategy].totalDebt loss: uint256 = min(_loss, totalDebt) self.strategies[_strategy].totalLoss += loss self.strategies[_strategy].totalDebt = totalDebt - loss self.totalDebt -= loss # Also, make sure we reduce our trust with the strategy by the same amount debtLimit: uint256 = self.strategies[_strategy].debtLimit self.strategies[_strategy].debtLimit -= min(loss, debtLimit) @internal def _assessFees(_strategy: address, _gain: uint256): # Issue new shares to cover fees # NOTE: In effect, this reduces overall share price by the combined fee # NOTE: may throw if Vault.totalAssets() > 1e64, or not called for more than a year governance_fee: uint256 = ( (self._totalAssets() * (block.timestamp - self.lastReport) * self.managementFee) / FEE_MAX / SECS_PER_YEAR ) strategist_fee: uint256 = 0 # Only applies in certain conditions # NOTE: Applies if Strategy is not shutting down, or it is but all debt paid off # NOTE: No fee is taken when a Strategy is unwinding it's position, until all debt is paid if _gain > 0: # NOTE: Unlikely to throw unless strategy reports >1e72 harvest profit strategist_fee = ( _gain * self.strategies[_strategy].performanceFee ) / FEE_MAX # NOTE: Unlikely to throw unless strategy reports >1e72 harvest profit governance_fee += _gain * self.performanceFee / FEE_MAX # NOTE: This must be called prior to taking new collateral, # or the calculation will be wrong! # NOTE: This must be done at the same time, to ensure the relative # ratio of governance_fee : strategist_fee is kept intact total_fee: uint256 = governance_fee + strategist_fee if total_fee > 0: # NOTE: If mgmt fee is 0% and no gains were realized, skip reward: uint256 = self._issueSharesForAmount(self, total_fee) # Send the rewards out as new shares in this Vault if strategist_fee > 0: # NOTE: Guard against DIV/0 fault # NOTE: Unlikely to throw unless sqrt(reward) >>> 1e39 strategist_reward: uint256 = (strategist_fee * reward) / total_fee self._transfer(self, _strategy, strategist_reward) Strategy(_strategy).distributeRewards(strategist_reward) # NOTE: Governance earns any dust leftover from flooring math above if self.balanceOf[self] > 0: self._transfer(self, self.rewards, self.balanceOf[self]) @external def report(_gain: uint256, _loss: uint256, _debtPayment: uint256) -> uint256: """ @notice Reports the amount of assets the calling Strategy has free (usually in terms of ROI). This may only be called by a Strategy managed by this Vault. @dev For approved strategies, this is the most efficient behavior. The Strategy reports back what it has free, then Vault "decides" whether to take some back or give it more. Note that the most it can take is `_gain + _debtPayment`, and the most it can give is all of the remaining reserves. Anything outside of those bounds is abnormal behavior. All approved strategies must have increased diligence around calling this function, as abnormal behavior could become catastrophic. @param _gain Amount Strategy has realized as a gain on it's investment since its last report, and is free to be given back to Vault as earnings @param _loss Amount Strategy has realized as a loss on it's investment since its last report, and should be accounted for on the Vault's balance sheet @param _debtPayment Amount Strategy has made available to cover outstanding debt @return Amount of debt outstanding (iff totalDebt > debtLimit). """ # Only approved strategies can call this function assert self.strategies[msg.sender].activation > 0 # No lying about total available to withdraw! assert self.token.balanceOf(msg.sender) >= _gain + _debtPayment # We have a loss to report, do it before the rest of the calculations if _loss > 0: self._reportLoss(msg.sender, _loss) # Assess both management fee and performance fee, and issue both as shares of the vault self._assessFees(msg.sender, _gain) # Returns are always "realized gains" self.strategies[msg.sender].totalGain += _gain # Outstanding debt the Strategy wants to take back from the Vault (if any) # NOTE: debtOutstanding <= StrategyParams.totalDebt debt: uint256 = self._debtOutstanding(msg.sender) debtPayment: uint256 = min(_debtPayment, debt) if debtPayment > 0: self.strategies[msg.sender].totalDebt -= debtPayment self.totalDebt -= debtPayment debt -= debtPayment # NOTE: `debt` is being tracked for later # Compute the line of credit the Vault is able to offer the Strategy (if any) credit: uint256 = self._creditAvailable(msg.sender) # Update the actual debt based on the full credit we are extending to the Strategy # or the returns if we are taking funds back # NOTE: credit + self.strategies[msg.sender].totalDebt is always < self.debtLimit # NOTE: At least one of `credit` or `debt` is always 0 (both can be 0) if credit > 0: self.strategies[msg.sender].totalDebt += credit self.totalDebt += credit # Give/take balance to Strategy, based on the difference between the reported gains # (if any), the debt payment (if any), the credit increase we are offering (if any), # and the debt needed to be paid off (if any) # NOTE: This is just used to adjust the balance of tokens between the Strategy and # the Vault based on the Strategy's debt limit (as well as the Vault's). totalAvail: uint256 = _gain + debtPayment if totalAvail < credit: # credit surplus, give to Strategy assert self.token.transfer(msg.sender, credit - totalAvail) elif totalAvail > credit: # credit deficit, take from Strategy assert self.token.transferFrom(msg.sender, self, totalAvail - credit) # else, don't do anything because it is balanced # Update reporting time self.strategies[msg.sender].lastReport = block.timestamp self.lastReport = block.timestamp log StrategyReported( msg.sender, _gain, _loss, self.strategies[msg.sender].totalGain, self.strategies[msg.sender].totalLoss, self.strategies[msg.sender].totalDebt, credit, self.strategies[msg.sender].debtLimit, ) if self.strategies[msg.sender].debtLimit == 0 or self.emergencyShutdown: # Take every last penny the Strategy has (Emergency Exit/revokeStrategy) # NOTE: This is different than `debt` in order to extract *all* of the returns return self._balanceSheetOfStrategy(msg.sender) else: # Otherwise, just return what we have as debt outstanding return debt @internal def erc20_safe_transfer(_token: address, _to: address, _value: uint256): # Used only to send tokens that are not the type managed by this Vault. # HACK: Used to handle non-compliant tokens like USDT _response: Bytes[32] = raw_call( _token, concat( method_id("transfer(address,uint256)"), convert(_to, bytes32), convert(_value, bytes32), ), max_outsize=32, ) if len(_response) > 0: assert convert(_response, bool), "Transfer failed!" @external def sweep(_token: address, _value: uint256 = MAX_UINT256): """ @notice Removes tokens from this Vault that are not the type of token managed by this Vault. This may be used in case of accidentally sending the wrong kind of token to this Vault. Tokens will be sent to `governance`. This will fail if an attempt is made to sweep the tokens that this Vault manages. This may only be called by governance. @param _token The token to transfer out of this vault. @param _value The quantity or tokenId to transfer out. """ assert msg.sender == self.governance # Can't be used to steal what this Vault is protecting assert _token != self.token.address value: uint256 = _value if _value == MAX_UINT256: value = ERC20(_token).balanceOf(self) self.erc20_safe_transfer(_token, self.governance, value)
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"Transfer","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"address","name":"receiver","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"spender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false,"type":"event"},{"name":"StrategyAdded","inputs":[{"type":"address","name":"strategy","indexed":true},{"type":"uint256","name":"debtLimit","indexed":false},{"type":"uint256","name":"rateLimit","indexed":false},{"type":"uint256","name":"performanceFee","indexed":false}],"anonymous":false,"type":"event"},{"name":"StrategyReported","inputs":[{"type":"address","name":"strategy","indexed":true},{"type":"uint256","name":"gain","indexed":false},{"type":"uint256","name":"loss","indexed":false},{"type":"uint256","name":"totalGain","indexed":false},{"type":"uint256","name":"totalLoss","indexed":false},{"type":"uint256","name":"totalDebt","indexed":false},{"type":"uint256","name":"debtAdded","indexed":false},{"type":"uint256","name":"debtLimit","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[{"type":"address","name":"_token"},{"type":"address","name":"_governance"},{"type":"address","name":"_rewards"},{"type":"string","name":"_nameOverride"},{"type":"string","name":"_symbolOverride"}],"stateMutability":"nonpayable","type":"constructor"},{"name":"apiVersion","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"pure","type":"function","gas":4489},{"name":"setName","outputs":[],"inputs":[{"type":"string","name":"_name"}],"stateMutability":"nonpayable","type":"function","gas":106987},{"name":"setSymbol","outputs":[],"inputs":[{"type":"string","name":"_symbol"}],"stateMutability":"nonpayable","type":"function","gas":71837},{"name":"setGovernance","outputs":[],"inputs":[{"type":"address","name":"_governance"}],"stateMutability":"nonpayable","type":"function","gas":36308},{"name":"acceptGovernance","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":36234},{"name":"setGuestList","outputs":[],"inputs":[{"type":"address","name":"_guestList"}],"stateMutability":"nonpayable","type":"function","gas":36368},{"name":"setRewards","outputs":[],"inputs":[{"type":"address","name":"_rewards"}],"stateMutability":"nonpayable","type":"function","gas":36398},{"name":"setDepositLimit","outputs":[],"inputs":[{"type":"uint256","name":"_limit"}],"stateMutability":"nonpayable","type":"function","gas":36328},{"name":"setPerformanceFee","outputs":[],"inputs":[{"type":"uint256","name":"_fee"}],"stateMutability":"nonpayable","type":"function","gas":36358},{"name":"setManagementFee","outputs":[],"inputs":[{"type":"uint256","name":"_fee"}],"stateMutability":"nonpayable","type":"function","gas":36388},{"name":"setGuardian","outputs":[],"inputs":[{"type":"address","name":"_guardian"}],"stateMutability":"nonpayable","type":"function","gas":37745},{"name":"setEmergencyShutdown","outputs":[],"inputs":[{"type":"bool","name":"_active"}],"stateMutability":"nonpayable","type":"function","gas":37775},{"name":"setWithdrawalQueue","outputs":[],"inputs":[{"type":"address[20]","name":"_queue"}],"stateMutability":"nonpayable","type":"function","gas":750044},{"name":"transfer","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":76619},{"name":"transferFrom","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":114054},{"name":"approve","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":38184},{"name":"increaseAllowance","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":40225},{"name":"decreaseAllowance","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":40249},{"name":"totalAssets","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3943},{"name":"balanceSheetOfStrategy","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"view","type":"function","gas":2448},{"name":"totalBalanceSheet","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address[40]","name":"_strategies"}],"stateMutability":"view","type":"function","gas":75836},{"name":"deposit","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"nonpayable","type":"function"},{"name":"deposit","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_amount"}],"stateMutability":"nonpayable","type":"function"},{"name":"deposit","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_amount"},{"type":"address","name":"_recipient"}],"stateMutability":"nonpayable","type":"function"},{"name":"maxAvailableShares","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":356611},{"name":"withdraw","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"nonpayable","type":"function"},{"name":"withdraw","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_shares"}],"stateMutability":"nonpayable","type":"function"},{"name":"withdraw","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_shares"},{"type":"address","name":"_recipient"}],"stateMutability":"nonpayable","type":"function"},{"name":"pricePerShare","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":11391},{"name":"addStrategy","outputs":[],"inputs":[{"type":"address","name":"_strategy"},{"type":"uint256","name":"_debtLimit"},{"type":"uint256","name":"_rateLimit"},{"type":"uint256","name":"_performanceFee"}],"stateMutability":"nonpayable","type":"function","gas":1445692},{"name":"updateStrategyDebtLimit","outputs":[],"inputs":[{"type":"address","name":"_strategy"},{"type":"uint256","name":"_debtLimit"}],"stateMutability":"nonpayable","type":"function","gas":111466},{"name":"updateStrategyRateLimit","outputs":[],"inputs":[{"type":"address","name":"_strategy"},{"type":"uint256","name":"_rateLimit"}],"stateMutability":"nonpayable","type":"function","gas":38518},{"name":"updateStrategyPerformanceFee","outputs":[],"inputs":[{"type":"address","name":"_strategy"},{"type":"uint256","name":"_performanceFee"}],"stateMutability":"nonpayable","type":"function","gas":38542},{"name":"migrateStrategy","outputs":[],"inputs":[{"type":"address","name":"_oldVersion"},{"type":"address","name":"_newVersion"}],"stateMutability":"nonpayable","type":"function","gas":1178388},{"name":"revokeStrategy","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function"},{"name":"revokeStrategy","outputs":[],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"nonpayable","type":"function"},{"name":"addStrategyToQueue","outputs":[],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"nonpayable","type":"function","gas":1195542},{"name":"removeStrategyFromQueue","outputs":[],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"nonpayable","type":"function","gas":23067618},{"name":"debtOutstanding","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function"},{"name":"debtOutstanding","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"view","type":"function"},{"name":"creditAvailable","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function"},{"name":"creditAvailable","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"view","type":"function"},{"name":"availableDepositLimit","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":9598},{"name":"expectedReturn","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function"},{"name":"expectedReturn","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_strategy"}],"stateMutability":"view","type":"function"},{"name":"report","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_gain"},{"type":"uint256","name":"_loss"},{"type":"uint256","name":"_debtPayment"}],"stateMutability":"nonpayable","type":"function","gas":920813},{"name":"sweep","outputs":[],"inputs":[{"type":"address","name":"_token"}],"stateMutability":"nonpayable","type":"function"},{"name":"sweep","outputs":[],"inputs":[{"type":"address","name":"_token"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function"},{"name":"name","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":9023},{"name":"symbol","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":8076},{"name":"decimals","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2681},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2926},{"name":"allowance","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"},{"type":"address","name":"arg1"}],"stateMutability":"view","type":"function","gas":3171},{"name":"totalSupply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2771},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2801},{"name":"governance","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2831},{"name":"guardian","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2861},{"name":"guestList","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2891},{"name":"strategies","outputs":[{"type":"uint256","name":"performanceFee"},{"type":"uint256","name":"activation"},{"type":"uint256","name":"debtLimit"},{"type":"uint256","name":"rateLimit"},{"type":"uint256","name":"lastReport"},{"type":"uint256","name":"totalDebt"},{"type":"uint256","name":"totalGain"},{"type":"uint256","name":"totalLoss"}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":10262},{"name":"withdrawalQueue","outputs":[{"type":"address","name":""}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":3060},{"name":"emergencyShutdown","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2981},{"name":"depositLimit","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3011},{"name":"debtLimit","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3041},{"name":"totalDebt","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3071},{"name":"lastReport","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3101},{"name":"rewards","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3131},{"name":"managementFee","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3161},{"name":"performanceFee","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":3191}]
Contract Creation Code
60a0613da2610140396020613da260c03960c05160a01c1561002057600080fd5b60206020613da20160c03960c05160a01c1561003b57600080fd5b60206040613da20160c03960c05160a01c1561005657600080fd5b606060206060613da20160c03960c051613da2016101e039604060206060613da20160c03960c05160040135111561008d57600080fd5b604060206080613da20160c03960c051613da20161026039602060206080613da20160c03960c0516004013511156100c457600080fd5b610140516006556000610300526103008051602082012090506101e0805160208201209050141561020d57600060606103a060046395d89b416103405261035c610140515afa61011357600080fd5b603f3d1161012057600080fd5b60156103a06103a05101511061013557600080fd5b6000506103c060148060208461046001018260208501600060045af15050805182019150506007610400527f20795661756c74000000000000000000000000000000000000000000000000006104205261040060078060208461046001018260208501600060045af15050805182019150508061046052610460905080600060c052602060c020602082510161012060006002818352015b826101205160200211156101e057610202565b61012051602002850151610120518501555b81516001018083528114156101cd575b505050505050610268565b6101e080600060c052602060c020602082510161012060006003818352015b8261012051602002111561023f57610261565b61012051602002850151610120518501555b815160010180835281141561022c575b5050505050505b60006103005261030080516020820120905061026080516020820120905014156103aa5760006002610340527f79760000000000000000000000000000000000000000000000000000000000006103605261034060028060208461046001018260208501600060045af1505080518201915050606061040060046395d89b416103a0526103bc610140515afa6102fd57600080fd5b603f3d1161030a57600080fd5b60156104006104005101511061031f57600080fd5b60005061042060148060208461046001018260208501600060045af15050805182019150508061046052610460905080600160c052602060c020602082510161012060006002818352015b8261012051602002111561037d5761039f565b61012051602002850151610120518501555b815160010180835281141561036a575b505050505050610405565b61026080600160c052602060c020602082510161012060006002818352015b826101205160200211156103dc576103fe565b61012051602002850151610120518501555b81516001018083528114156103c9575b5050505050505b6020610320600463313ce5676102c0526102dc610140515afa61042757600080fd5b601f3d1161043457600080fd5b600050610320516002556101605160075561018051601255336008556103e860145560c86013557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600e5542601155613d8a56341561000a57600080fd5b6004361015610018576138fc565b600035601c52632582941060005114156100b7576005610140527f302e322e30000000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161007457600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f350005b63c47f0027600051141561014f57604a60043560040161014037602a6004356004013511156100e557600080fd5b60075433146100f357600080fd5b61014080600060c052602060c020602082510161012060006003818352015b8261012051602002111561012557610147565b61012051602002850151610120518501555b8151600101808352811415610112575b505050505050005b63b84c824660005114156101e757603460043560040161014037601460043560040135111561017d57600080fd5b600754331461018b57600080fd5b61014080600160c052602060c020602082510161012060006002818352015b826101205160200211156101bd576101df565b61012051602002850151610120518501555b81516001018083528114156101aa575b505050505050005b63ab033ea9600051141561021b5760043560a01c1561020557600080fd5b600754331461021357600080fd5b600435600955005b63238efcbc600051141561023d57600954331461023757600080fd5b33600755005b630b5b78eb60005114156102715760043560a01c1561025b57600080fd5b600754331461026957600080fd5b600435600a55005b63ec38a86260005114156102a55760043560a01c1561028f57600080fd5b600754331461029d57600080fd5b600435601255005b63bdc8144b60005114156102c95760075433146102c157600080fd5b600435600e55005b6370897b2360005114156102ed5760075433146102e557600080fd5b600435601455005b63fe56e232600051141561031157600754331461030957600080fd5b600435601355005b638a0dac4a600051141561039a5760043560a01c1561032f57600080fd5b600854610160526007546101805260006101405261014061012060006002818352015b61012051602002610160015133141561036e576001835261037f565b5b8151600101808352811415610352575b5050506101405160011461039257600080fd5b600435600855005b6314c6440260005114156104235760043560011c156103b857600080fd5b600854610160526007546101805260006101405261014061012060006002818352015b6101205160200261016001513314156103f75760018352610408565b5b81516001018083528114156103db575b5050506101405160011461041b57600080fd5b600435600d55005b63941484156000511415610559576000610120525b610120516004013560a01c1561044d57600080fd5b602061012051016101205261028061012051101561046a57610438565b600754331461047857600080fd5b61014060006014818352015b6004610140516014811061049757600080fd5b602002013515156104c55761014051601481106104b357600080fd5b600c60c052602060c0200154156104c8565b60005b156104d257610555565b60006001600b600461014051601481106104eb57600080fd5b602002013560e05260c052604060c02060c052602060c02001541161050f57600080fd5b6004610140516014811061052257600080fd5b6020020135610140516014811061053857600080fd5b600c60c052602060c02001555b8151600101808352811415610484575b5050005b600015610670575b6101a052610140526101605261018052306101e05260006102005260006101c0526101c061012060006002818352015b610120516020026101e001516101605114156105b057600183526105c1565b5b8151600101808352811415610591575b5050506101c051600114156105d557600080fd5b60036101405160e05260c052604060c020805461018051808210156105f957600080fd5b8082039050905081555060036101605160e05260c052604060c02080546101805181818301101561062957600080fd5b80820190509050815550610180516101c05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36101a051565b63a9059cbb60005114156106c65760043560a01c1561068e57600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801610561565b600050600160005260206000f350005b6323b872dd60005114156107ab5760043560a01c156106e457600080fd5b60243560a01c156106f457600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460043560e05260c052604060c0203360e05260c052604060c02054101561077157600460043560e05260c052604060c0203360e05260c052604060c02080546044358082101561076657600080fd5b808203905090508155505b60043561014052602435610160526044356101805261018051610160516101405160065801610561565b600050600160005260206000f350005b63095ea7b360005114156108285760043560a01c156107c957600080fd5b60243560043360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b633950935160005114156108d95760043560a01c1561084657600080fd5b60043360e05260c052604060c02060043560e05260c052604060c020805460243581818301101561087657600080fd5b8082019050905081555060043360e05260c052604060c02060043560e05260c052604060c0205461014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b63a457c2d760005114156109885760043560a01c156108f757600080fd5b60043360e05260c052604060c02060043560e05260c052604060c02080546024358082101561092557600080fd5b8082039050905081555060043360e05260c052604060c02060043560e05260c052604060c0205461014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b6000156109f5575b6101405260206101e060246370a0823161016052306101805261017c6006545afa6109ba57600080fd5b601f3d116109c757600080fd5b6000506101e0516010548181830110156109e057600080fd5b80820190509050600052600051610140515650005b6301e1d1146000511415610a1f5760065801610990565b610140526101405160005260206000f350005b600015610a73575b610160526101405260206101e0600463efbb5cb06101805261019c610140515afa610a5157600080fd5b601f3d11610a5e57600080fd5b6000506101e051600052600051610160515650005b635ac220806000511415610ab85760043560a01c15610a9157600080fd5b600435610140526101405160065801610a27565b6101a0526101a05160005260206000f350005b631d3249766000511415610bdc576000610120525b610120516004013560a01c15610ae257600080fd5b6020610120510161012052610500610120511015610aff57610acd565b60206101e060246370a0823161016052306101805261017c6006545afa610b2557600080fd5b601f3d11610b3257600080fd5b6000506101e0516101405261018060006028818352015b602061018051026004013561016052610160511515610b6757610bcb565b6101408051610140516101605161018051610160516101a0526101a05160065801610a27565b6102005261018052610160526101405261020051818183011015610bb057600080fd5b808201905090508152505b8151600101808352811415610b49575b50506101405160005260206000f350005b600015610d20575b61018052610140526101605260006101a0526005546101c05260006101c0511115610c7f57610160516101c0518082028215828483041417610c2557600080fd5b809050905090506101405161016051610180516101a0516101c05160065801610990565b6101e0526101c0526101a0526101805261016052610140526101e0518080610c7057600080fd5b8204905090506101a052610c88565b610160516101a0525b6101c0516101a051818183011015610c9f57600080fd5b8082019050905060055560036101405160e05260c052604060c02080546101a051818183011015610ccf57600080fd5b808201905090508155506101a0516101e0526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101e0a36101a051600052600051610180515650005b63d0e30db06000511415610d5d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610140523361016052610dbe565b63b6b55f256000511415610d805733610160526020600461014037600050610dbe565b636e553f656000511415610db657602060046101403760243560a01c15610da657600080fd5b6020602461016037600050610dbe565b600015611095575b600d5415610dcb57600080fd5b61014051610180527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610180511415610e9157600e5461014051610160516101805160065801610990565b6101a0526101805261016052610140526101a05180821015610e3757600080fd5b80820390509050602061024060246370a082316101c052336101e0526101dc6006545afa610e6457600080fd5b601f3d11610e7157600080fd5b6000506102405180821115610e865780610e88565b815b90509050610180525b60006101805111610ea157600080fd5b600e5461014051610160516101805160065801610990565b6101a0526101805261016052610140526101a05161018051818183011015610ee057600080fd5b808201905090501115610ef257600080fd5b6000600a541815610f495760206102406044635ed7660e6101a052336101c052610180516101e0526101bc600a545afa610f2b57600080fd5b601f3d11610f3857600080fd5b60005061024051610f4857600080fd5b5b6101405161016051610180516101a051610160516101c052610180516101e0526101e0516101c05160065801610be4565b610240526101a052610180526101605261014052610240516101a052602061026060246370a082316101e05230610200526101fc6006545afa610fbc57600080fd5b601f3d11610fc957600080fd5b600050610260516101c05260206102a060646323b872dd6101e0523361020052306102205261018051610240526101fc60006006545af161100957600080fd5b601f3d1161101657600080fd5b6000506102a05161102657600080fd5b61018051602061026060246370a082316101e05230610200526101fc6006545afa61105057600080fd5b601f3d1161105d57600080fd5b600050610260516101c0518082101561107557600080fd5b808203905090501461108657600080fd5b6101a05160005260206000f350005b600015611107575b610160526101405261014051610140516101605160065801610990565b6101805261016052610140526101805180820282158284830414176110de57600080fd5b8090509050905060055480806110f357600080fd5b820490509050600052600051610160515650005b6000156111be575b61016052610140526000610140516101605160065801610990565b6101805261016052610140526101805111156111ad5761014051600554808202821582848304141761115b57600080fd5b8090509050905061014051610160516101805160065801610990565b6101a0526101805261016052610140526101a051808061119657600080fd5b8204905090506000526000516101605156506111bc565b60006000526000516101605156505b005b6375de290260005114156113205760206101e060246370a0823161016052306101805261017c6006545afa6111f257600080fd5b601f3d116111ff57600080fd5b6000506101e051610200526101405161016051610180516101a0516101c0516101e051610200516102005161022052610220516006580161110f565b61028052610200526101e0526101c0526101a052610180526101605261014052610280516101405261018060006014818352015b61018051600c60c052602060c0200154610160526101605115156112925761130f565b61014080516101405161016051610180516005600b6101605160e05260c052604060c02060c052602060c02001546101a0526101a0516006580161110f565b61020052610180526101605261014052610200518181830110156112f457600080fd5b808201905090508152505b815160010180835281141561126f575b50506101405160005260206000f350005b633ccfd60b600051141561135d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405233610160526113bd565b632e1a7d4d600051141561138057336101605260206004610140376000506113bd565b62f714ce60005114156113b557602060046101403760243560a01c156113a557600080fd5b60206024610160376000506113bd565b600015611883575b61014051610180527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101805114156114045760033360e05260c052604060c02054610180525b60033360e05260c052604060c0205461018051111561142257600080fd5b6101405161016051610180516101a051610180516101c0526101c0516006580161109d565b610220526101a052610180526101605261014052610220516101a052602061024060246370a082316101c052306101e0526101dc6006545afa61148957600080fd5b601f3d1161149657600080fd5b600050610240516101a05111156116bc5761028060006014818352015b61028051600c60c052602060c0200154610260526102605115156114d6576116b9565b6101a051602061034060246370a082316102c052306102e0526102dc6006545afa61150057600080fd5b601f3d1161150d57600080fd5b600050610340518082101561152157600080fd5b808203905090506102a0526102a051151561153b576116b9565b6102a0516005600b6102605160e05260c052604060c02060c052602060c02001548082111561156a578061156c565b815b905090506102a0526102a0511515611583576116a9565b602061036060246370a082316102e05230610300526102fc6006545afa6115a957600080fd5b601f3d116115b657600080fd5b600050610360516102c052610260513b6115cf57600080fd5b600060006024632e1a7d4d6102e0526102a051610300526102fc6000610260515af16115fa57600080fd5b602061038060246370a0823161030052306103205261031c6006545afa61162057600080fd5b601f3d1161162d57600080fd5b600050610380516102c0518082101561164557600080fd5b808203905090506102e0526005600b6102605160e05260c052604060c02060c052602060c0200180546102e0518082101561167f57600080fd5b80820390509050815550601080546102e0518082101561169e57600080fd5b808203905090508155505b81516001018083528114156114b3575b50505b602061024060246370a082316101c052306101e0526101dc6006545afa6116e257600080fd5b601f3d116116ef57600080fd5b600050610240516101a05111156117a85760206102e060246370a0823161026052306102805261027c6006545afa61172657600080fd5b601f3d1161173357600080fd5b6000506102e0516101a0526101405161016051610180516101a0516101c0516101e0516102005161022051610240516101a05161026052610260516006580161110f565b6102c0526102405261022052610200526101e0526101c0526101a0526101805261016052610140526102c051610180525b6005805461018051808210156117bd57600080fd5b8082039050905081555060033360e05260c052604060c020805461018051808210156117e857600080fd5b80820390509050815550610180516101c0526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36020610260604463a9059cbb6101c052610160516101e0526101a051610200526101dc60006006545af161185757600080fd5b601f3d1161186457600080fd5b6000506102605161187457600080fd5b6101a05160005260206000f350005b6399530b0660005114156118ca57604e600254106118a057600080fd5b600254600a0a61014052610140516006580161109d565b6101a0526101a05160005260206000f350005b6000156119b7575b6101405260006101605261018060006014818352015b61018051601481106118f957600080fd5b600c60c052602060c02001546101a0526101a0511515611938576101608051600181818301101561192957600080fd5b8082019050905081525061199e565b600061016051111561199d576101a05161018051610160518082101561195d57600080fd5b808203905090506014811061197157600080fd5b600c60c052602060c02001556000610180516014811061199057600080fd5b600c60c052602060c02001555b5b5b81516001018083528114156118e8575b505061014051565b630dd21b6c6000511415611afd5760043560a01c156119d557600080fd5b6000600435186119e457600080fd5b60075433146119f257600080fd5b6001600b60043560e05260c052604060c02060c052602060c020015415611a1857600080fd5b600b60043560e05260c052604060c02060c052602060c02060643581554260018201556024356002820155604435600382015542600482015560006005820155600060068201556000600782015550600f8054602435818183011015611a7d57600080fd5b808201905090508155506024356101405260443561016052606435610180526004357f5ec27a4fa537fc86d0d17d84e0ee3172c9d253c78cc4ab5c69ee99c5f7084f516060610140a26013600c60c052602060c020015415611ade57600080fd5b6004356013600c60c052602060c0200155600658016118d2565b600050005b63cd7d8f4f6000511415611bc95760043560a01c15611b1b57600080fd5b6007543314611b2957600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611b5157600080fd5b600f80546002600b60043560e05260c052604060c02060c052602060c020015480821015611b7e57600080fd5b808203905090508155506024356002600b60043560e05260c052604060c02060c052602060c0200155600f8054602435818183011015611bbd57600080fd5b80820190509050815550005b6362fdbc9f6000511415611c3e5760043560a01c15611be757600080fd5b6007543314611bf557600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611c1d57600080fd5b6024356003600b60043560e05260c052604060c02060c052602060c0200155005b63d0194ed66000511415611cb05760043560a01c15611c5c57600080fd5b6007543314611c6a57600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611c9257600080fd5b602435600b60043560e05260c052604060c02060c052602060c02055005b636cb56d196000511415611f315760043560a01c15611cce57600080fd5b60243560a01c15611cde57600080fd5b6007543314611cec57600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611d1457600080fd5b6001600b60243560e05260c052604060c02060c052602060c020015415611d3a57600080fd5b610140600b60043560e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c0200154826060015260048160c052602060c0200154826080015260058160c052602060c02001548260a0015260068160c052602060c02001548260c0015260078160c052602060c02001548260e001525050600b60043560e05260c052604060c02060c052602060c020600081556000600182015560006002820155600060038201556000600482015560006005820155600060068201556000600782015550600b60243560e05260c052604060c02060c052602060c02061014080518255806020015160018301558060400151600283015580606001516003830155806080015160048301558060a0015160058301558060c0015160068301558060e00151600783015550506004353b611e9b57600080fd5b60006000602463ce5494bb610240526024356102605261025c60006004355af1611ec457600080fd5b61024060006014818352015b6004356102405160148110611ee457600080fd5b600c60c052602060c02001541415611f1c576024356102405160148110611f0a57600080fd5b600c60c052602060c020015560006000f35b5b8151600101808352811415611ed0575b5050005b63a0e4af9a6000511415611f49573361014052611f7f565b63bb994d486000511415611f775760043560a01c15611f6757600080fd5b6020600461014037600050611f7f565b600015612043575b61014051610180526007546101a0526008546101c05260006101605261016061012060006003818352015b610120516020026101800151331415611fc65760018352611fd7565b5b8151600101808352811415611faa575b50505061016051600114611fea57600080fd5b600f80546002600b6101405160e05260c052604060c02060c052602060c02001548082101561201857600080fd5b8082039050905081555060006002600b6101405160e05260c052604060c02060c052602060c0200155005b63f76e4caa600051141561214d5760043560a01c1561206157600080fd5b600754331461206f57600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411156120b75760006005600b60043560e05260c052604060c02060c052602060c0200154116120ba565b60005b6120c357600080fd5b6013600c60c052602060c0200154156120db57600080fd5b61016060006014818352015b61016051600c60c052602060c02001546101405261014051151561210a5761212c565b600435610140511861211b57600080fd5b5b81516001018083528114156120e7575b50506004356013600c60c052602060c0200155600658016118d2565b600050005b63b22439f560005114156121fe5760043560a01c1561216b57600080fd5b600754331461217957600080fd5b61014060006014818352015b600435610140516014811061219957600080fd5b600c60c052602060c020015414156121e457600061014051601481106121be57600080fd5b600c60c052602060c020015561014051600658016118d2565b6101405260005060006000f35b5b8151600101808352811415612185575b505060006000fd005b6000156122bb575b61016052610140526002600b6101405160e05260c052604060c02060c052602060c0200154610180526005600b6101405160e05260c052604060c02060c052602060c02001546101a052600d541561226d576101a0516000526000516101605156506122b9565b610180516101a05111151561228f5760006000526000516101605156506122b8565b6101a05161018051808210156122a457600080fd5b808203905090506000526000516101605156505b5b005b63bf3759b560005114156122d3573361014052612309565b63bdcf36bb60005114156123015760043560a01c156122f157600080fd5b6020600461014037600050612309565b600015612339575b6101405161014051610160526101605160065801612206565b6101c052610140526101c05160005260206000f350005b600015612563575b6101605261014052600d54156123605760006000526000516101605156505b6002600b6101405160e05260c052604060c02060c052602060c0200154610180526005600b6101405160e05260c052604060c02060c052602060c02001546101a0526003600b6101405160e05260c052604060c02060c052602060c02001546101c0526004600b6101405160e05260c052604060c02060c052602060c02001546101e0526101a051610180511115156123fa576001612403565b601054600f5411155b5b156124185760006000526000516101605156505b610180516101a0518082101561242d57600080fd5b808203905090506102005261020051600f546010548082101561244f57600080fd5b80820390509050808211156124645780612466565b815b9050905061020052426101e0518082101561248057600080fd5b808203905090506102205260006101c05111156124bb5761022051610200516101c05180806124ae57600080fd5b82049050905010156124be565b60005b1561250357610200516101c0516102205180820282158284830414176124e357600080fd5b80905090509050808211156124f857806124fa565b815b90509050610200525b6102005160206102c060246370a0823161024052306102605261025c6006545afa61252d57600080fd5b601f3d1161253a57600080fd5b6000506102c0518082111561254f5780612551565b815b90509050600052600051610160515650005b63112c1f9b600051141561257b5733610140526125b1565b63d764801360005114156125a95760043560a01c1561259957600080fd5b60206004610140376000506125b1565b6000156125e1575b6101405161014051610160526101605160065801612341565b6101c052610140526101c05160005260206000f350005b6000156126d4575b6101605261014052426004600b6101405160e05260c052604060c02060c052602060c02001548082101561261c57600080fd5b808203905090506101805260006101805111156126c3576006600b6101405160e05260c052604060c02060c052602060c020015461018051808202821582848304141761266857600080fd5b80905090509050426001600b6101405160e05260c052604060c02060c052602060c02001548082101561269a57600080fd5b8082039050905080806126ac57600080fd5b8204905090506000526000516101605156506126d2565b60006000526000516101605156505b005b63153c27c460005114156127485760065801610990565b6101405261014051600e54111561273a57600e546101405160065801610990565b6101605261014052610160518082101561272557600080fd5b8082039050905060005260206000f350612746565b600060005260206000f3505b005b63d3406abd6000511415612760573361014052612796565b6333586b67600051141561278e5760043560a01c1561277e57600080fd5b6020600461014037600050612796565b6000156127c6575b61014051610140516101605261016051600658016125e9565b6101c052610140526101c05160005260206000f350005b600015612926575b6101805261014052610160526005600b6101405160e05260c052604060c02060c052602060c02001546101a052610160516101a051808211156128115780612813565b815b905090506101c0526007600b6101405160e05260c052604060c02060c052602060c0200180546101c05181818301101561284c57600080fd5b808201905090508155506101a0516101c0518082101561286b57600080fd5b808203905090506005600b6101405160e05260c052604060c02060c052602060c0200155601080546101c051808210156128a457600080fd5b808203905090508155506002600b6101405160e05260c052604060c02060c052602060c02001546101e0526002600b6101405160e05260c052604060c02060c052602060c0200180546101c0516101e051808211156129035780612905565b815b905090508082101561291657600080fd5b8082039050905081555061018051565b600015612c87575b6101805261014052610160526101405161016051610180516101a05160065801610990565b6101c0526101a0526101805261016052610140526101c051426011548082101561297c57600080fd5b80820390509050808202821582848304141761299757600080fd5b8090509050905060135480820282158284830414176129b557600080fd5b80905090509050612710808204905090506301e187e0808204905090506101a05260006101c0526000610160511115612a7a5761016051600b6101405160e05260c052604060c02060c052602060c020548082028215828483041417612a1a57600080fd5b80905090509050612710808204905090506101c0526101a08051610160516014548082028215828483041417612a4f57600080fd5b8090509050905061271080820490509050818183011015612a6f57600080fd5b808201905090508152505b6101a0516101c051818183011015612a9157600080fd5b808201905090506101e05260006101e0511115612c81576101405161016051610180516101a0516101c0516101e0516102005130610220526101e05161024052610240516102205160065801610be4565b6102a052610200526101e0526101c0526101a0526101805261016052610140526102a0516102005260006101c0511115612bf9576101c051610200518082028215828483041417612b3257600080fd5b809050905090506101e0518080612b4857600080fd5b820490509050610220526101405161016051610180516101a0516101c0516101e051610200516102205130610240526101405161026052610220516102805261028051610260516102405160065801610561565b61022052610200526101e0526101c0526101a052610180526101605261014052600050610140513b612bcd57600080fd5b6000600060246359974e3861024052610220516102605261025c6000610140515af1612bf857600080fd5b5b600060033060e05260c052604060c020541115612c80576101405161016051610180516101a0516101c0516101e0516102005130610220526012546102405260033060e05260c052604060c020546102605261026051610240516102205160065801610561565b610200526101e0526101c0526101a0526101805261016052610140526000505b5b61018051565b63a1d9bafc60005114156131735760006001600b3360e05260c052604060c02060c052602060c020015411612cbb57600080fd5b600435604435818183011015612cd057600080fd5b8082019050905060206101c060246370a0823161014052336101605261015c6006545afa612cfd57600080fd5b601f3d11612d0a57600080fd5b6000506101c0511015612d1c57600080fd5b60006024351115612d48573361014052602435610160526101605161014051600658016127ce565b6000505b33610140526004356101605261016051610140516006580161292e565b6000506006600b3360e05260c052604060c02060c052602060c020018054600435818183011015612d9557600080fd5b808201905090508155506101405133610160526101605160065801612206565b6101c052610140526101c051610140526044356101405180821115612dda5780612ddc565b815b90509050610160526000610160511115612e66576005600b3360e05260c052604060c02060c052602060c0200180546101605180821015612e1c57600080fd5b80820390509050815550601080546101605180821015612e3b57600080fd5b8082039050905081555061014080516101605180821015612e5b57600080fd5b808203905090508152505b610140516101605161018051336101a0526101a05160065801612341565b6102005261018052610160526101405261020051610180526000610180511115612f02576005600b3360e05260c052604060c02060c052602060c02001805461018051818183011015612ed657600080fd5b808201905090508155506010805461018051818183011015612ef757600080fd5b808201905090508155505b60043561016051818183011015612f1857600080fd5b808201905090506101a052610180516101a0511015612f9b576020610260604463a9059cbb6101c052336101e052610180516101a05180821015612f5b57600080fd5b80820390509050610200526101dc60006006545af1612f7957600080fd5b601f3d11612f8657600080fd5b60005061026051612f9657600080fd5b613015565b610180516101a051111561301457602061028060646323b872dd6101c052336101e05230610200526101a0516101805180821015612fd857600080fd5b80820390509050610220526101dc60006006545af1612ff657600080fd5b601f3d1161300357600080fd5b6000506102805161301357600080fd5b5b5b426004600b3360e05260c052604060c02060c052602060c0200155426011556004356101c0526024356101e0526006600b3360e05260c052604060c02060c052602060c0200154610200526007600b3360e05260c052604060c02060c052602060c0200154610220526005600b3360e05260c052604060c02060c052602060c02001546102405261018051610260526002600b3360e05260c052604060c02060c052602060c020015461028052337f2fb611faf48b1d1b91edbba34cee10c6357adee410540e4a8f7a82b6b38673e460e06101c0a26002600b3360e05260c052604060c02060c052602060c02001541515613111576001613115565b600d545b5b15613163576101405161016051610180516101a051336101c0526101c05160065801610a27565b610220526101a0526101805261016052610140526102205160005260206000f350613171565b6101405160005260206000f3505b005b600015613316575b6101a05261014052610160526101805260006004610220527fa9059cbb000000000000000000000000000000000000000000000000000000006102405261022060048060208461028001018260208501600060045af15050805182019150506101605160208261028001015260208101905061018051602082610280010152602081019050806102805261028090508051602001806103208284600060045af161322457600080fd5b505060206103e0610320516103406000610140515af161324357600080fd5b60203d808211156132545780613256565b815b905090506103c0526103c08051602001806101c08284600060045af161327b57600080fd5b505060006101c0511115613310576101c08060200151600082518060209013156132a457600080fd5b80919012156132b257600080fd5b806020036101000a82049050905090501515151561330f576308c379a0610220526020610240526010610260527f5472616e73666572206661696c656421000000000000000000000000000000006102805261026050606461023cfd5b5b6101a051565b6301681a62600051141561334e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014052613374565b636ea056a9600051141561336c576020602461014037600050613374565b600015613454575b60043560a01c1561338457600080fd5b600754331461339257600080fd5b600654600435186133a257600080fd5b61014051610160527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014051141561341457602061020060246370a0823161018052306101a05261019c6004355afa6133fb57600080fd5b601f3d1161340857600080fd5b60005061020051610160525b6101405161016051600435610180526007546101a052610160516101c0526101c0516101a051610180516006580161317b565b6101605261014052600050005b6306fdde0360005114156134fd5760008060c052602060c020610180602082540161012060006003818352015b82610120516020021115613494576134b6565b61012051850154610120516020028501525b8151600101808352811415613481575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6395d89b4160005114156135a65760018060c052602060c020610180602082540161012060006002818352015b8261012051602002111561353d5761355f565b61012051850154610120516020028501525b815160010180835281141561352a575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b63313ce56760005114156135c25760025460005260206000f350005b6370a0823160005114156135fc5760043560a01c156135e057600080fd5b600360043560e05260c052604060c0205460005260206000f350005b63dd62ed3e60005114156136545760043560a01c1561361a57600080fd5b60243560a01c1561362a57600080fd5b600460043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b6318160ddd60005114156136705760055460005260206000f350005b63fc0c546a600051141561368c5760065460005260206000f350005b635aa6e67560005114156136a85760075460005260206000f350005b63452a932060005114156136c45760085460005260206000f350005b6346d5587560005114156136e057600a5460005260206000f350005b6339ebf82360005114156137e65760043560a01c156136fe57600080fd5b600b60043560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c020015481525050602081019050808060028560c052602060c020015481525050602081019050808060038560c052602060c020015481525050602081019050808060048560c052602060c020015481525050602081019050808060058560c052602060c020015481525050602081019050808060068560c052602060c020015481525050602081019050808060078560c052602060c0200154815250506101009050905060c05260c051610140f39050005b63c822adda600051141561381b576004356014811061380457600080fd5b600c60c052602060c020015460005260206000f350005b633403c2fc600051141561383757600d5460005260206000f350005b63ecf70858600051141561385357600e5460005260206000f350005b6318a1c4b6600051141561386f57600f5460005260206000f350005b63fc7b9c18600051141561388b5760105460005260206000f350005b63c3535b5260005114156138a75760115460005260206000f350005b639ec5a89460005114156138c35760125460005260206000f350005b63a6f7f5d660005114156138df5760135460005260206000f350005b638778878260005114156138fb5760145460005260206000f350005b5b60006000fd5b610488613d8a03610488600039610488613d8a036000f3000000000000000000000000a8e7ad77c60ee6f30bac54e2e7c0617bd7b5a03e00000000000000000000000073f2f3a4ff97b6a6d7afc03c449f0e9a0c0d90ab00000000000000000000000073f2f3a4ff97b6a6d7afc03c449f0e9a0c0d90ab00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x341561000a57600080fd5b6004361015610018576138fc565b600035601c52632582941060005114156100b7576005610140527f302e322e30000000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161007457600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f350005b63c47f0027600051141561014f57604a60043560040161014037602a6004356004013511156100e557600080fd5b60075433146100f357600080fd5b61014080600060c052602060c020602082510161012060006003818352015b8261012051602002111561012557610147565b61012051602002850151610120518501555b8151600101808352811415610112575b505050505050005b63b84c824660005114156101e757603460043560040161014037601460043560040135111561017d57600080fd5b600754331461018b57600080fd5b61014080600160c052602060c020602082510161012060006002818352015b826101205160200211156101bd576101df565b61012051602002850151610120518501555b81516001018083528114156101aa575b505050505050005b63ab033ea9600051141561021b5760043560a01c1561020557600080fd5b600754331461021357600080fd5b600435600955005b63238efcbc600051141561023d57600954331461023757600080fd5b33600755005b630b5b78eb60005114156102715760043560a01c1561025b57600080fd5b600754331461026957600080fd5b600435600a55005b63ec38a86260005114156102a55760043560a01c1561028f57600080fd5b600754331461029d57600080fd5b600435601255005b63bdc8144b60005114156102c95760075433146102c157600080fd5b600435600e55005b6370897b2360005114156102ed5760075433146102e557600080fd5b600435601455005b63fe56e232600051141561031157600754331461030957600080fd5b600435601355005b638a0dac4a600051141561039a5760043560a01c1561032f57600080fd5b600854610160526007546101805260006101405261014061012060006002818352015b61012051602002610160015133141561036e576001835261037f565b5b8151600101808352811415610352575b5050506101405160011461039257600080fd5b600435600855005b6314c6440260005114156104235760043560011c156103b857600080fd5b600854610160526007546101805260006101405261014061012060006002818352015b6101205160200261016001513314156103f75760018352610408565b5b81516001018083528114156103db575b5050506101405160011461041b57600080fd5b600435600d55005b63941484156000511415610559576000610120525b610120516004013560a01c1561044d57600080fd5b602061012051016101205261028061012051101561046a57610438565b600754331461047857600080fd5b61014060006014818352015b6004610140516014811061049757600080fd5b602002013515156104c55761014051601481106104b357600080fd5b600c60c052602060c0200154156104c8565b60005b156104d257610555565b60006001600b600461014051601481106104eb57600080fd5b602002013560e05260c052604060c02060c052602060c02001541161050f57600080fd5b6004610140516014811061052257600080fd5b6020020135610140516014811061053857600080fd5b600c60c052602060c02001555b8151600101808352811415610484575b5050005b600015610670575b6101a052610140526101605261018052306101e05260006102005260006101c0526101c061012060006002818352015b610120516020026101e001516101605114156105b057600183526105c1565b5b8151600101808352811415610591575b5050506101c051600114156105d557600080fd5b60036101405160e05260c052604060c020805461018051808210156105f957600080fd5b8082039050905081555060036101605160e05260c052604060c02080546101805181818301101561062957600080fd5b80820190509050815550610180516101c05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36101a051565b63a9059cbb60005114156106c65760043560a01c1561068e57600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801610561565b600050600160005260206000f350005b6323b872dd60005114156107ab5760043560a01c156106e457600080fd5b60243560a01c156106f457600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460043560e05260c052604060c0203360e05260c052604060c02054101561077157600460043560e05260c052604060c0203360e05260c052604060c02080546044358082101561076657600080fd5b808203905090508155505b60043561014052602435610160526044356101805261018051610160516101405160065801610561565b600050600160005260206000f350005b63095ea7b360005114156108285760043560a01c156107c957600080fd5b60243560043360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b633950935160005114156108d95760043560a01c1561084657600080fd5b60043360e05260c052604060c02060043560e05260c052604060c020805460243581818301101561087657600080fd5b8082019050905081555060043360e05260c052604060c02060043560e05260c052604060c0205461014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b63a457c2d760005114156109885760043560a01c156108f757600080fd5b60043360e05260c052604060c02060043560e05260c052604060c02080546024358082101561092557600080fd5b8082039050905081555060043360e05260c052604060c02060043560e05260c052604060c0205461014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b6000156109f5575b6101405260206101e060246370a0823161016052306101805261017c6006545afa6109ba57600080fd5b601f3d116109c757600080fd5b6000506101e0516010548181830110156109e057600080fd5b80820190509050600052600051610140515650005b6301e1d1146000511415610a1f5760065801610990565b610140526101405160005260206000f350005b600015610a73575b610160526101405260206101e0600463efbb5cb06101805261019c610140515afa610a5157600080fd5b601f3d11610a5e57600080fd5b6000506101e051600052600051610160515650005b635ac220806000511415610ab85760043560a01c15610a9157600080fd5b600435610140526101405160065801610a27565b6101a0526101a05160005260206000f350005b631d3249766000511415610bdc576000610120525b610120516004013560a01c15610ae257600080fd5b6020610120510161012052610500610120511015610aff57610acd565b60206101e060246370a0823161016052306101805261017c6006545afa610b2557600080fd5b601f3d11610b3257600080fd5b6000506101e0516101405261018060006028818352015b602061018051026004013561016052610160511515610b6757610bcb565b6101408051610140516101605161018051610160516101a0526101a05160065801610a27565b6102005261018052610160526101405261020051818183011015610bb057600080fd5b808201905090508152505b8151600101808352811415610b49575b50506101405160005260206000f350005b600015610d20575b61018052610140526101605260006101a0526005546101c05260006101c0511115610c7f57610160516101c0518082028215828483041417610c2557600080fd5b809050905090506101405161016051610180516101a0516101c05160065801610990565b6101e0526101c0526101a0526101805261016052610140526101e0518080610c7057600080fd5b8204905090506101a052610c88565b610160516101a0525b6101c0516101a051818183011015610c9f57600080fd5b8082019050905060055560036101405160e05260c052604060c02080546101a051818183011015610ccf57600080fd5b808201905090508155506101a0516101e0526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101e0a36101a051600052600051610180515650005b63d0e30db06000511415610d5d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610140523361016052610dbe565b63b6b55f256000511415610d805733610160526020600461014037600050610dbe565b636e553f656000511415610db657602060046101403760243560a01c15610da657600080fd5b6020602461016037600050610dbe565b600015611095575b600d5415610dcb57600080fd5b61014051610180527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610180511415610e9157600e5461014051610160516101805160065801610990565b6101a0526101805261016052610140526101a05180821015610e3757600080fd5b80820390509050602061024060246370a082316101c052336101e0526101dc6006545afa610e6457600080fd5b601f3d11610e7157600080fd5b6000506102405180821115610e865780610e88565b815b90509050610180525b60006101805111610ea157600080fd5b600e5461014051610160516101805160065801610990565b6101a0526101805261016052610140526101a05161018051818183011015610ee057600080fd5b808201905090501115610ef257600080fd5b6000600a541815610f495760206102406044635ed7660e6101a052336101c052610180516101e0526101bc600a545afa610f2b57600080fd5b601f3d11610f3857600080fd5b60005061024051610f4857600080fd5b5b6101405161016051610180516101a051610160516101c052610180516101e0526101e0516101c05160065801610be4565b610240526101a052610180526101605261014052610240516101a052602061026060246370a082316101e05230610200526101fc6006545afa610fbc57600080fd5b601f3d11610fc957600080fd5b600050610260516101c05260206102a060646323b872dd6101e0523361020052306102205261018051610240526101fc60006006545af161100957600080fd5b601f3d1161101657600080fd5b6000506102a05161102657600080fd5b61018051602061026060246370a082316101e05230610200526101fc6006545afa61105057600080fd5b601f3d1161105d57600080fd5b600050610260516101c0518082101561107557600080fd5b808203905090501461108657600080fd5b6101a05160005260206000f350005b600015611107575b610160526101405261014051610140516101605160065801610990565b6101805261016052610140526101805180820282158284830414176110de57600080fd5b8090509050905060055480806110f357600080fd5b820490509050600052600051610160515650005b6000156111be575b61016052610140526000610140516101605160065801610990565b6101805261016052610140526101805111156111ad5761014051600554808202821582848304141761115b57600080fd5b8090509050905061014051610160516101805160065801610990565b6101a0526101805261016052610140526101a051808061119657600080fd5b8204905090506000526000516101605156506111bc565b60006000526000516101605156505b005b6375de290260005114156113205760206101e060246370a0823161016052306101805261017c6006545afa6111f257600080fd5b601f3d116111ff57600080fd5b6000506101e051610200526101405161016051610180516101a0516101c0516101e051610200516102005161022052610220516006580161110f565b61028052610200526101e0526101c0526101a052610180526101605261014052610280516101405261018060006014818352015b61018051600c60c052602060c0200154610160526101605115156112925761130f565b61014080516101405161016051610180516005600b6101605160e05260c052604060c02060c052602060c02001546101a0526101a0516006580161110f565b61020052610180526101605261014052610200518181830110156112f457600080fd5b808201905090508152505b815160010180835281141561126f575b50506101405160005260206000f350005b633ccfd60b600051141561135d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405233610160526113bd565b632e1a7d4d600051141561138057336101605260206004610140376000506113bd565b62f714ce60005114156113b557602060046101403760243560a01c156113a557600080fd5b60206024610160376000506113bd565b600015611883575b61014051610180527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101805114156114045760033360e05260c052604060c02054610180525b60033360e05260c052604060c0205461018051111561142257600080fd5b6101405161016051610180516101a051610180516101c0526101c0516006580161109d565b610220526101a052610180526101605261014052610220516101a052602061024060246370a082316101c052306101e0526101dc6006545afa61148957600080fd5b601f3d1161149657600080fd5b600050610240516101a05111156116bc5761028060006014818352015b61028051600c60c052602060c0200154610260526102605115156114d6576116b9565b6101a051602061034060246370a082316102c052306102e0526102dc6006545afa61150057600080fd5b601f3d1161150d57600080fd5b600050610340518082101561152157600080fd5b808203905090506102a0526102a051151561153b576116b9565b6102a0516005600b6102605160e05260c052604060c02060c052602060c02001548082111561156a578061156c565b815b905090506102a0526102a0511515611583576116a9565b602061036060246370a082316102e05230610300526102fc6006545afa6115a957600080fd5b601f3d116115b657600080fd5b600050610360516102c052610260513b6115cf57600080fd5b600060006024632e1a7d4d6102e0526102a051610300526102fc6000610260515af16115fa57600080fd5b602061038060246370a0823161030052306103205261031c6006545afa61162057600080fd5b601f3d1161162d57600080fd5b600050610380516102c0518082101561164557600080fd5b808203905090506102e0526005600b6102605160e05260c052604060c02060c052602060c0200180546102e0518082101561167f57600080fd5b80820390509050815550601080546102e0518082101561169e57600080fd5b808203905090508155505b81516001018083528114156114b3575b50505b602061024060246370a082316101c052306101e0526101dc6006545afa6116e257600080fd5b601f3d116116ef57600080fd5b600050610240516101a05111156117a85760206102e060246370a0823161026052306102805261027c6006545afa61172657600080fd5b601f3d1161173357600080fd5b6000506102e0516101a0526101405161016051610180516101a0516101c0516101e0516102005161022051610240516101a05161026052610260516006580161110f565b6102c0526102405261022052610200526101e0526101c0526101a0526101805261016052610140526102c051610180525b6005805461018051808210156117bd57600080fd5b8082039050905081555060033360e05260c052604060c020805461018051808210156117e857600080fd5b80820390509050815550610180516101c0526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36020610260604463a9059cbb6101c052610160516101e0526101a051610200526101dc60006006545af161185757600080fd5b601f3d1161186457600080fd5b6000506102605161187457600080fd5b6101a05160005260206000f350005b6399530b0660005114156118ca57604e600254106118a057600080fd5b600254600a0a61014052610140516006580161109d565b6101a0526101a05160005260206000f350005b6000156119b7575b6101405260006101605261018060006014818352015b61018051601481106118f957600080fd5b600c60c052602060c02001546101a0526101a0511515611938576101608051600181818301101561192957600080fd5b8082019050905081525061199e565b600061016051111561199d576101a05161018051610160518082101561195d57600080fd5b808203905090506014811061197157600080fd5b600c60c052602060c02001556000610180516014811061199057600080fd5b600c60c052602060c02001555b5b5b81516001018083528114156118e8575b505061014051565b630dd21b6c6000511415611afd5760043560a01c156119d557600080fd5b6000600435186119e457600080fd5b60075433146119f257600080fd5b6001600b60043560e05260c052604060c02060c052602060c020015415611a1857600080fd5b600b60043560e05260c052604060c02060c052602060c02060643581554260018201556024356002820155604435600382015542600482015560006005820155600060068201556000600782015550600f8054602435818183011015611a7d57600080fd5b808201905090508155506024356101405260443561016052606435610180526004357f5ec27a4fa537fc86d0d17d84e0ee3172c9d253c78cc4ab5c69ee99c5f7084f516060610140a26013600c60c052602060c020015415611ade57600080fd5b6004356013600c60c052602060c0200155600658016118d2565b600050005b63cd7d8f4f6000511415611bc95760043560a01c15611b1b57600080fd5b6007543314611b2957600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611b5157600080fd5b600f80546002600b60043560e05260c052604060c02060c052602060c020015480821015611b7e57600080fd5b808203905090508155506024356002600b60043560e05260c052604060c02060c052602060c0200155600f8054602435818183011015611bbd57600080fd5b80820190509050815550005b6362fdbc9f6000511415611c3e5760043560a01c15611be757600080fd5b6007543314611bf557600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611c1d57600080fd5b6024356003600b60043560e05260c052604060c02060c052602060c0200155005b63d0194ed66000511415611cb05760043560a01c15611c5c57600080fd5b6007543314611c6a57600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611c9257600080fd5b602435600b60043560e05260c052604060c02060c052602060c02055005b636cb56d196000511415611f315760043560a01c15611cce57600080fd5b60243560a01c15611cde57600080fd5b6007543314611cec57600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411611d1457600080fd5b6001600b60243560e05260c052604060c02060c052602060c020015415611d3a57600080fd5b610140600b60043560e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c0200154826060015260048160c052602060c0200154826080015260058160c052602060c02001548260a0015260068160c052602060c02001548260c0015260078160c052602060c02001548260e001525050600b60043560e05260c052604060c02060c052602060c020600081556000600182015560006002820155600060038201556000600482015560006005820155600060068201556000600782015550600b60243560e05260c052604060c02060c052602060c02061014080518255806020015160018301558060400151600283015580606001516003830155806080015160048301558060a0015160058301558060c0015160068301558060e00151600783015550506004353b611e9b57600080fd5b60006000602463ce5494bb610240526024356102605261025c60006004355af1611ec457600080fd5b61024060006014818352015b6004356102405160148110611ee457600080fd5b600c60c052602060c02001541415611f1c576024356102405160148110611f0a57600080fd5b600c60c052602060c020015560006000f35b5b8151600101808352811415611ed0575b5050005b63a0e4af9a6000511415611f49573361014052611f7f565b63bb994d486000511415611f775760043560a01c15611f6757600080fd5b6020600461014037600050611f7f565b600015612043575b61014051610180526007546101a0526008546101c05260006101605261016061012060006003818352015b610120516020026101800151331415611fc65760018352611fd7565b5b8151600101808352811415611faa575b50505061016051600114611fea57600080fd5b600f80546002600b6101405160e05260c052604060c02060c052602060c02001548082101561201857600080fd5b8082039050905081555060006002600b6101405160e05260c052604060c02060c052602060c0200155005b63f76e4caa600051141561214d5760043560a01c1561206157600080fd5b600754331461206f57600080fd5b60006001600b60043560e05260c052604060c02060c052602060c020015411156120b75760006005600b60043560e05260c052604060c02060c052602060c0200154116120ba565b60005b6120c357600080fd5b6013600c60c052602060c0200154156120db57600080fd5b61016060006014818352015b61016051600c60c052602060c02001546101405261014051151561210a5761212c565b600435610140511861211b57600080fd5b5b81516001018083528114156120e7575b50506004356013600c60c052602060c0200155600658016118d2565b600050005b63b22439f560005114156121fe5760043560a01c1561216b57600080fd5b600754331461217957600080fd5b61014060006014818352015b600435610140516014811061219957600080fd5b600c60c052602060c020015414156121e457600061014051601481106121be57600080fd5b600c60c052602060c020015561014051600658016118d2565b6101405260005060006000f35b5b8151600101808352811415612185575b505060006000fd005b6000156122bb575b61016052610140526002600b6101405160e05260c052604060c02060c052602060c0200154610180526005600b6101405160e05260c052604060c02060c052602060c02001546101a052600d541561226d576101a0516000526000516101605156506122b9565b610180516101a05111151561228f5760006000526000516101605156506122b8565b6101a05161018051808210156122a457600080fd5b808203905090506000526000516101605156505b5b005b63bf3759b560005114156122d3573361014052612309565b63bdcf36bb60005114156123015760043560a01c156122f157600080fd5b6020600461014037600050612309565b600015612339575b6101405161014051610160526101605160065801612206565b6101c052610140526101c05160005260206000f350005b600015612563575b6101605261014052600d54156123605760006000526000516101605156505b6002600b6101405160e05260c052604060c02060c052602060c0200154610180526005600b6101405160e05260c052604060c02060c052602060c02001546101a0526003600b6101405160e05260c052604060c02060c052602060c02001546101c0526004600b6101405160e05260c052604060c02060c052602060c02001546101e0526101a051610180511115156123fa576001612403565b601054600f5411155b5b156124185760006000526000516101605156505b610180516101a0518082101561242d57600080fd5b808203905090506102005261020051600f546010548082101561244f57600080fd5b80820390509050808211156124645780612466565b815b9050905061020052426101e0518082101561248057600080fd5b808203905090506102205260006101c05111156124bb5761022051610200516101c05180806124ae57600080fd5b82049050905010156124be565b60005b1561250357610200516101c0516102205180820282158284830414176124e357600080fd5b80905090509050808211156124f857806124fa565b815b90509050610200525b6102005160206102c060246370a0823161024052306102605261025c6006545afa61252d57600080fd5b601f3d1161253a57600080fd5b6000506102c0518082111561254f5780612551565b815b90509050600052600051610160515650005b63112c1f9b600051141561257b5733610140526125b1565b63d764801360005114156125a95760043560a01c1561259957600080fd5b60206004610140376000506125b1565b6000156125e1575b6101405161014051610160526101605160065801612341565b6101c052610140526101c05160005260206000f350005b6000156126d4575b6101605261014052426004600b6101405160e05260c052604060c02060c052602060c02001548082101561261c57600080fd5b808203905090506101805260006101805111156126c3576006600b6101405160e05260c052604060c02060c052602060c020015461018051808202821582848304141761266857600080fd5b80905090509050426001600b6101405160e05260c052604060c02060c052602060c02001548082101561269a57600080fd5b8082039050905080806126ac57600080fd5b8204905090506000526000516101605156506126d2565b60006000526000516101605156505b005b63153c27c460005114156127485760065801610990565b6101405261014051600e54111561273a57600e546101405160065801610990565b6101605261014052610160518082101561272557600080fd5b8082039050905060005260206000f350612746565b600060005260206000f3505b005b63d3406abd6000511415612760573361014052612796565b6333586b67600051141561278e5760043560a01c1561277e57600080fd5b6020600461014037600050612796565b6000156127c6575b61014051610140516101605261016051600658016125e9565b6101c052610140526101c05160005260206000f350005b600015612926575b6101805261014052610160526005600b6101405160e05260c052604060c02060c052602060c02001546101a052610160516101a051808211156128115780612813565b815b905090506101c0526007600b6101405160e05260c052604060c02060c052602060c0200180546101c05181818301101561284c57600080fd5b808201905090508155506101a0516101c0518082101561286b57600080fd5b808203905090506005600b6101405160e05260c052604060c02060c052602060c0200155601080546101c051808210156128a457600080fd5b808203905090508155506002600b6101405160e05260c052604060c02060c052602060c02001546101e0526002600b6101405160e05260c052604060c02060c052602060c0200180546101c0516101e051808211156129035780612905565b815b905090508082101561291657600080fd5b8082039050905081555061018051565b600015612c87575b6101805261014052610160526101405161016051610180516101a05160065801610990565b6101c0526101a0526101805261016052610140526101c051426011548082101561297c57600080fd5b80820390509050808202821582848304141761299757600080fd5b8090509050905060135480820282158284830414176129b557600080fd5b80905090509050612710808204905090506301e187e0808204905090506101a05260006101c0526000610160511115612a7a5761016051600b6101405160e05260c052604060c02060c052602060c020548082028215828483041417612a1a57600080fd5b80905090509050612710808204905090506101c0526101a08051610160516014548082028215828483041417612a4f57600080fd5b8090509050905061271080820490509050818183011015612a6f57600080fd5b808201905090508152505b6101a0516101c051818183011015612a9157600080fd5b808201905090506101e05260006101e0511115612c81576101405161016051610180516101a0516101c0516101e0516102005130610220526101e05161024052610240516102205160065801610be4565b6102a052610200526101e0526101c0526101a0526101805261016052610140526102a0516102005260006101c0511115612bf9576101c051610200518082028215828483041417612b3257600080fd5b809050905090506101e0518080612b4857600080fd5b820490509050610220526101405161016051610180516101a0516101c0516101e051610200516102205130610240526101405161026052610220516102805261028051610260516102405160065801610561565b61022052610200526101e0526101c0526101a052610180526101605261014052600050610140513b612bcd57600080fd5b6000600060246359974e3861024052610220516102605261025c6000610140515af1612bf857600080fd5b5b600060033060e05260c052604060c020541115612c80576101405161016051610180516101a0516101c0516101e0516102005130610220526012546102405260033060e05260c052604060c020546102605261026051610240516102205160065801610561565b610200526101e0526101c0526101a0526101805261016052610140526000505b5b61018051565b63a1d9bafc60005114156131735760006001600b3360e05260c052604060c02060c052602060c020015411612cbb57600080fd5b600435604435818183011015612cd057600080fd5b8082019050905060206101c060246370a0823161014052336101605261015c6006545afa612cfd57600080fd5b601f3d11612d0a57600080fd5b6000506101c0511015612d1c57600080fd5b60006024351115612d48573361014052602435610160526101605161014051600658016127ce565b6000505b33610140526004356101605261016051610140516006580161292e565b6000506006600b3360e05260c052604060c02060c052602060c020018054600435818183011015612d9557600080fd5b808201905090508155506101405133610160526101605160065801612206565b6101c052610140526101c051610140526044356101405180821115612dda5780612ddc565b815b90509050610160526000610160511115612e66576005600b3360e05260c052604060c02060c052602060c0200180546101605180821015612e1c57600080fd5b80820390509050815550601080546101605180821015612e3b57600080fd5b8082039050905081555061014080516101605180821015612e5b57600080fd5b808203905090508152505b610140516101605161018051336101a0526101a05160065801612341565b6102005261018052610160526101405261020051610180526000610180511115612f02576005600b3360e05260c052604060c02060c052602060c02001805461018051818183011015612ed657600080fd5b808201905090508155506010805461018051818183011015612ef757600080fd5b808201905090508155505b60043561016051818183011015612f1857600080fd5b808201905090506101a052610180516101a0511015612f9b576020610260604463a9059cbb6101c052336101e052610180516101a05180821015612f5b57600080fd5b80820390509050610200526101dc60006006545af1612f7957600080fd5b601f3d11612f8657600080fd5b60005061026051612f9657600080fd5b613015565b610180516101a051111561301457602061028060646323b872dd6101c052336101e05230610200526101a0516101805180821015612fd857600080fd5b80820390509050610220526101dc60006006545af1612ff657600080fd5b601f3d1161300357600080fd5b6000506102805161301357600080fd5b5b5b426004600b3360e05260c052604060c02060c052602060c0200155426011556004356101c0526024356101e0526006600b3360e05260c052604060c02060c052602060c0200154610200526007600b3360e05260c052604060c02060c052602060c0200154610220526005600b3360e05260c052604060c02060c052602060c02001546102405261018051610260526002600b3360e05260c052604060c02060c052602060c020015461028052337f2fb611faf48b1d1b91edbba34cee10c6357adee410540e4a8f7a82b6b38673e460e06101c0a26002600b3360e05260c052604060c02060c052602060c02001541515613111576001613115565b600d545b5b15613163576101405161016051610180516101a051336101c0526101c05160065801610a27565b610220526101a0526101805261016052610140526102205160005260206000f350613171565b6101405160005260206000f3505b005b600015613316575b6101a05261014052610160526101805260006004610220527fa9059cbb000000000000000000000000000000000000000000000000000000006102405261022060048060208461028001018260208501600060045af15050805182019150506101605160208261028001015260208101905061018051602082610280010152602081019050806102805261028090508051602001806103208284600060045af161322457600080fd5b505060206103e0610320516103406000610140515af161324357600080fd5b60203d808211156132545780613256565b815b905090506103c0526103c08051602001806101c08284600060045af161327b57600080fd5b505060006101c0511115613310576101c08060200151600082518060209013156132a457600080fd5b80919012156132b257600080fd5b806020036101000a82049050905090501515151561330f576308c379a0610220526020610240526010610260527f5472616e73666572206661696c656421000000000000000000000000000000006102805261026050606461023cfd5b5b6101a051565b6301681a62600051141561334e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014052613374565b636ea056a9600051141561336c576020602461014037600050613374565b600015613454575b60043560a01c1561338457600080fd5b600754331461339257600080fd5b600654600435186133a257600080fd5b61014051610160527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014051141561341457602061020060246370a0823161018052306101a05261019c6004355afa6133fb57600080fd5b601f3d1161340857600080fd5b60005061020051610160525b6101405161016051600435610180526007546101a052610160516101c0526101c0516101a051610180516006580161317b565b6101605261014052600050005b6306fdde0360005114156134fd5760008060c052602060c020610180602082540161012060006003818352015b82610120516020021115613494576134b6565b61012051850154610120516020028501525b8151600101808352811415613481575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6395d89b4160005114156135a65760018060c052602060c020610180602082540161012060006002818352015b8261012051602002111561353d5761355f565b61012051850154610120516020028501525b815160010180835281141561352a575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b63313ce56760005114156135c25760025460005260206000f350005b6370a0823160005114156135fc5760043560a01c156135e057600080fd5b600360043560e05260c052604060c0205460005260206000f350005b63dd62ed3e60005114156136545760043560a01c1561361a57600080fd5b60243560a01c1561362a57600080fd5b600460043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b6318160ddd60005114156136705760055460005260206000f350005b63fc0c546a600051141561368c5760065460005260206000f350005b635aa6e67560005114156136a85760075460005260206000f350005b63452a932060005114156136c45760085460005260206000f350005b6346d5587560005114156136e057600a5460005260206000f350005b6339ebf82360005114156137e65760043560a01c156136fe57600080fd5b600b60043560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c020015481525050602081019050808060028560c052602060c020015481525050602081019050808060038560c052602060c020015481525050602081019050808060048560c052602060c020015481525050602081019050808060058560c052602060c020015481525050602081019050808060068560c052602060c020015481525050602081019050808060078560c052602060c0200154815250506101009050905060c05260c051610140f39050005b63c822adda600051141561381b576004356014811061380457600080fd5b600c60c052602060c020015460005260206000f350005b633403c2fc600051141561383757600d5460005260206000f350005b63ecf70858600051141561385357600e5460005260206000f350005b6318a1c4b6600051141561386f57600f5460005260206000f350005b63fc7b9c18600051141561388b5760105460005260206000f350005b63c3535b5260005114156138a75760115460005260206000f350005b639ec5a89460005114156138c35760125460005260206000f350005b63a6f7f5d660005114156138df5760135460005260206000f350005b638778878260005114156138fb5760145460005260206000f350005b5b60006000fd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a8e7ad77c60ee6f30bac54e2e7c0617bd7b5a03e00000000000000000000000073f2f3a4ff97b6a6d7afc03c449f0e9a0c0d90ab00000000000000000000000073f2f3a4ff97b6a6d7afc03c449f0e9a0c0d90ab00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _token (address): 0xA8e7AD77C60eE6f30BaC54E2E7c0617Bd7B5A03E
Arg [1] : _governance (address): 0x73f2f3A4fF97B6A6d7afc03C449f0e9a0c0d90aB
Arg [2] : _rewards (address): 0x73f2f3A4fF97B6A6d7afc03C449f0e9a0c0d90aB
Arg [3] : _nameOverride (string):
Arg [4] : _symbolOverride (string):
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000a8e7ad77c60ee6f30bac54e2e7c0617bd7b5a03e
Arg [1] : 00000000000000000000000073f2f3a4ff97b6a6d7afc03c449f0e9a0c0d90ab
Arg [2] : 00000000000000000000000073f2f3a4ff97b6a6d7afc03c449f0e9a0c0d90ab
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.