ETH Price: $3,523.56 (+1.05%)
Gas: 2 Gwei

Token

StakeDAO ETH Covered Call Strategy V2 (sdETHCoveredCallV2)
 

Overview

Max Total Supply

29.001725823612856588 sdETHCoveredCallV2

Holders

5

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
0 sdETHCoveredCallV2

Value
$0.00
0x0de5199779b43e13b3bec21e91117e18736bc1a8
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
OpynPerpVaultEth

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : OpynPerpVaultEth.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.2;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {IAction} from "../interfaces/IAction.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
import {IOldVault} from "../interfaces/IOldVault.sol";
import {IWETH} from "../interfaces/IWETH.sol";

contract OpynPerpVaultEth is
    ERC20Upgradeable,
    ReentrancyGuardUpgradeable,
    OwnableUpgradeable
{
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    enum VaultState {
        Locked,
        Unlocked,
        Emergency
    }

    /// @dev current state of the vault
    VaultState public state;

    /// @dev state of the vault before it was paused
    VaultState public stateBeforePause;

    /// @dev oldVault for migration
    IOldVault public oldVault;

    /// @dev 100%
    uint256 public constant BASE = 10000;

    /// @dev percentage of profits that will go to the fee recipient
    uint256 public performanceFeeInPercent = 100; // 1%

    /// @dev percentage of total asset charged as management fee every year
    uint256 public managementFeeInPercent = 0; // 0%

    /// @dev amount of asset that has been registered to be withdrawn. This amount will be reserved in the vault after the current round ends
    uint256 public withdrawQueueAmount;

    /// @dev amount of asset that has been deposited into the vault, but hasn't minted a share yet
    uint256 public pendingDeposit;

    /// @dev ERC20 asset which can be deposited into this strategy. Do not use anything but ERC20s.
    address public asset;

    /// @dev address to which all fees are sent
    address public feeRecipient;

    /// @dev actions that build up this strategy (vault)
    address[] public actions;

    /// @dev the timestamp at which the current round started
    uint256 public currentRoundStartTimestamp;

    /// @dev keep tracks of how much capital the current round start with
    uint256 public currentRoundStartingAmount;

    /// @dev cap for the vault
    uint256 public cap = 1000 ether;

    /// @dev the current round
    uint256 public round;

    /// @dev user's share in withdraw queue for a round
    mapping(address => mapping(uint256 => uint256))
        public userRoundQueuedWithdrawShares;

    /// @dev user's asset amount in deposit queue for a round
    mapping(address => mapping(uint256 => uint256))
        public userRoundQueuedDepositAmount;

    /// @dev total registered shares per round
    mapping(uint256 => uint256) public roundTotalQueuedWithdrawShares;

    /// @dev total asset recorded at end of each round
    mapping(uint256 => uint256) public roundTotalAsset;

    /// @dev total share supply recorded at end of each round
    mapping(uint256 => uint256) public roundTotalShare;

    /*=====================
     *       Events       *
     *====================*/

    event Deposit(
        address account,
        uint256 amountDeposited,
        uint256 shareMinted
    );

    event Withdraw(
        address account,
        uint256 amountWithdrawn,
        uint256 shareBurned
    );

    event WithdrawFromQueue(
        address account,
        uint256 amountWithdrawn,
        uint256 round
    );

    event Rollover(uint256[] allocations);

    event StateUpdated(VaultState state);

    event CapUpdated(uint256 newCap);

    /*=====================
     *     Modifiers      *
     *====================*/

    /**
     * @dev can only be executed in the unlocked state.
     */
    modifier onlyUnlocked() {
        require(state == VaultState.Unlocked, "!Unlocked");
        _;
    }

    /**
     * @dev can only be executed in the locked state.
     */
    modifier onlyLocked() {
        require(state == VaultState.Locked, "!Locked");
        _;
    }

    /**
     * @dev can only be executed in the unlocked state. Sets the state to 'Locked'
     */
    modifier lockState() {
        state = VaultState.Locked;
        emit StateUpdated(VaultState.Locked);
        _;
    }

    /**
     * @dev Sets the state to 'Unlocked'
     */
    modifier unlockState() {
        state = VaultState.Unlocked;
        emit StateUpdated(VaultState.Unlocked);
        _;
    }

    /**
     * @dev can only be executed if vault is not in the 'Emergency' state.
     */
    modifier notEmergency() {
        require(state != VaultState.Emergency, "Emergency");
        _;
    }

    /*=====================
     * External Functions *
     *====================*/

    /**
     * @notice function to init the vault
     * this will set the "action" for this strategy vault and won't be able to change
     * @param _asset The asset that this vault will manage. Cannot be changed after initializing.
     * @param _owner The address that will be the owner of this vault.
     * @param _feeRecipient The address to which all the fees will be sent. Cannot be changed after initializing.
     * @param _decimals of the _asset
     * @param _tokenName name of the share given to depositors of this vault
     * @param _tokenSymbol symbol of the share given to depositors of this vault
     * @param _actions array of addresses of the action contracts
     * @dev when choosing actions make sure they have similar lifecycles and expiries. if the actions can't all be closed at the
     * same time, composing them may lead to tricky interactions like user funds being stuck for longer in actions than expected.
     */
    function init(
        address _asset,
        address _owner,
        address _feeRecipient,
        uint8 _decimals,
        string memory _tokenName,
        string memory _tokenSymbol,
        address[] memory _actions,
        address _oldVault
    ) public initializer {
        __ReentrancyGuard_init();
        __ERC20_init(_tokenName, _tokenSymbol);
        _setupDecimals(_decimals);
        __Ownable_init();
        transferOwnership(_owner);

        asset = _asset;
        feeRecipient = _feeRecipient;

        // assign actions
        for (uint256 i = 0; i < _actions.length; i++) {
            // check all items before actions[i], does not equal to action[i]
            for (uint256 j = 0; j < i; j++) {
                require(_actions[i] != _actions[j], "duplicated action");
            }
            actions.push(_actions[i]);
        }

        state = VaultState.Unlocked;

        currentRoundStartTimestamp = block.timestamp;
        oldVault = IOldVault(_oldVault);
    }

    /**
     * @notice allows the owner to change the vault cap
     * @param _cap the new cap of the vault
     */
    function setCap(uint256 _cap) external onlyOwner {
        cap = _cap;
        emit CapUpdated(cap);
    }

    /**
     * @notice returns the total assets controlled by this vault, excluding pending deposit and withdraw
     */
    function totalUnderlyingControlled() external view returns (uint256) {
        return _netAssetsControlled();
    }

    /**
     * @notice returns how many shares a user can get if they deposit `_amount` of asset into the vault
     * @dev this number will change when someone registers a withdraw when the vault is locked
     * @param _amount amount of asset that the user will deposit
     */
    function getSharesByDepositAmount(uint256 _amount)
        external
        view
        returns (uint256)
    {
        return _getSharesByDepositAmount(_amount, _netAssetsControlled());
    }

    /**
     * @notice returns how much of the asset a user can get back if they burn `_shares` amount of shares. The
     * asset amount returned also takes into account fees charged.
     * @param _shares amount of shares the user will burn
     */
    function getWithdrawAmountByShares(uint256 _shares)
        external
        view
        returns (uint256)
    {
        return _getWithdrawAmountByShares(_shares);
    }

    /**
     * @notice Deposits ETH into the contract and mint vault shares.
     * @dev deposit into the weth then mint the shares to depositor, and emit the deposit event
     */
    function depositETH()
        external
        payable
        nonReentrant
        onlyUnlocked
        notEmergency
    {
        uint256 amount = msg.value;
        require(amount > 0, "O6");
        //deposit into weth
        IWETH(asset).deposit{value: amount}();
        // mint shares and emit event
        _deposit(amount);
    }

    /**
     * @notice deposits `amount` of the asset into the vault and issues shares
     * @dev deposit ERC20 asset and get shares. Direct deposits can only happen when the vault is unlocked.
     * @param _amount The amount of asset that is deposited.
     */
    function deposit(uint256 _amount) external onlyUnlocked notEmergency {
        IERC20(asset).safeTransferFrom(msg.sender, address(this), _amount);
        _deposit(_amount);
    }

    /**
     * @notice deposits `amount` of the asset into the vault without issuing shares
     * @dev deposits the ETH and turn into it to ERC20 asset and add into the pending queue. This is called when the vault is locked. Note that if
     * a user deposits before the start of the end of the current round, they will not be able to withdraw their
     * funds until the current round is over. They will also not be able to earn any premiums on their current deposit.
     */
    function registerDepositETH(address _shareRecipient)
        external
        payable
        nonReentrant
        notEmergency
        onlyLocked
    {
        uint256 amount = msg.value;
        require(amount > 0, "O6");
        //deposit into weth
        IWETH(asset).deposit{value: msg.value}();
        // mint shares and emit event
        _register(amount, _shareRecipient);
    }

    /**
     * @notice deposits `amount` of the asset into the vault without issuing shares
     * @dev deposits the ERC20 asset into the pending queue. This is called when the vault is locked. Note that if
     * a user deposits before the start of the end of the current round, they will not be able to withdraw their
     * funds until the current round is over. They will also not be able to earn any premiums on their current deposit.
     * @param _amount The amount of asset that is deposited.
     */
    function registerDeposit(uint256 _amount, address _shareRecipient)
        external
        onlyLocked
        notEmergency
    {
        IERC20(asset).safeTransferFrom(msg.sender, address(this), _amount);
        _register(_amount, _shareRecipient);
    }

    function _register(uint256 _amount, address _shareRecipient) internal {
        uint256 totalWithDepositedAmount = _totalAssets();
        require(totalWithDepositedAmount < cap, "Cap exceeded");
        userRoundQueuedDepositAmount[_shareRecipient][
            round
        ] = userRoundQueuedDepositAmount[_shareRecipient][round].add(_amount);
        pendingDeposit = pendingDeposit.add(_amount);
    }

    /**
     * @notice anyone can call this function to actually transfer the minted shares to the depositors
     * @dev this can only be called once closePosition is called to end the current round. The depositor needs a share
     * to be able to withdraw their assets in the future.
     * @param _depositor the address of the depositor
     * @param _round the round in which the depositor called `registerDeposit`
     */
    function claimShares(address _depositor, uint256 _round) external {
        require(_round < round, "Invalid round");
        uint256 amountDeposited = userRoundQueuedDepositAmount[_depositor][
            _round
        ];

        userRoundQueuedDepositAmount[_depositor][_round] = 0;

        uint256 equivalentShares = amountDeposited
            .mul(roundTotalShare[_round])
            .div(roundTotalAsset[_round]);

        // transfer shares from vault to user
        _transfer(address(this), _depositor, equivalentShares);
    }

    /**
     * @notice withdraws asset from vault using vault shares.
     * @dev The msg.sender needs to burn the vault shares to be able to withdraw. If the user called `registerDeposit`
     * without someone calling `claimShares` for them, they wont be able to withdraw. They need to have the shares in their wallet.
     * This can only be called when the vault is unlocked.
     * @param _shares is the number of vault shares to be burned
     */
    function withdraw(uint256 _shares)
        external
        nonReentrant
        onlyUnlocked
        notEmergency
    {
        uint256 withdrawAmount = _regularWithdraw(_shares);
        IERC20(asset).safeTransfer(msg.sender, withdrawAmount);
    }

    receive() external payable {}

    fallback() external payable {}

    /**
     * @notice migrate assets from old vault to this vault
     * @dev The msg.sender needs to have old vault tokens to be able to migrate to this vault.
     * @param _amount is the amount of the old vault tokens
     * @param minEth is the minimum amount expected to get while withdrawing from curve pool for the old vault withdraw function
     */
    function migrate(uint256 _amount, uint256 minEth)
        external
        payable
        onlyUnlocked
        notEmergency
        nonReentrant
    {
        IERC20(address(oldVault)).safeTransferFrom(
            msg.sender,
            address(this),
            _amount
        );
        oldVault.withdrawETH(_amount, minEth);
        _amount = address(this).balance;
        //deposit into weth
        IWETH(asset).deposit{value: _amount}();
        // mint shares and emit event
        _deposit(_amount);
    }

    /**
     * @notice allows someone to request to withdraw their assets once this round ends.
     * @dev assets can only be withdrawn after this round ends and closePosition is called. Calling this will burn the
     * shares right now but the assets will be transferred back to the user only when `withdrawFromQueue` is called.
     * This can only be called when the vault is locked.
     * @param _shares the amount of shares the user wants to cash out
     */
    function registerWithdraw(uint256 _shares) external onlyLocked {
        _burn(msg.sender, _shares);
        userRoundQueuedWithdrawShares[msg.sender][
            round
        ] = userRoundQueuedWithdrawShares[msg.sender][round].add(_shares);
        roundTotalQueuedWithdrawShares[round] = roundTotalQueuedWithdrawShares[
            round
        ].add(_shares);
    }

    /**
     * @notice allows the user to withdraw their promised assets from the withdraw queue at any time.
     * @dev the assets first need to be transferred to the withdraw queue which happens when the current round ends when
     * closePositions is called.
     * @param _round the round the user registered a queue withdraw
     */
    function withdrawFromQueue(uint256 _round)
        external
        nonReentrant
        notEmergency
    {
        uint256 withdrawAmount = _withdrawFromQueue(_round);
        IERC20(asset).safeTransfer(msg.sender, withdrawAmount);
    }

    /**
     * @notice allows anyone to close out the previous round by calling "closePositions" on all actions.
     * @dev this does the following:
     * 1. calls closePositions on all the actions withdraw the money from all the actions
     * 2. pay all the fees
     * 3. snapshots last round's shares and asset balances
     * 4. empties the pendingDeposits and pulls in those assets to be used in the next round
     * 5. sets aside assets from the main vault into the withdrawQueue
     * 6. ends the old round and unlocks the vault
     */
    function closePositions() public onlyLocked unlockState {
        // calls closePositions on all the actions and transfers the assets back into the vault
        _closeAndWithdraw();

        _payRoundFee();

        // records the net shares and assets in the current round and updates the pendingDeposits and withdrawQueue
        _snapshotShareAndAsset();

        round = round.add(1);
        currentRoundStartTimestamp = block.timestamp;
    }

    /**
     * @notice distributes funds to each action and locks the vault
     */
    function rollOver(uint256[] calldata _allocationPercentages)
        external
        virtual
        onlyOwner
        onlyUnlocked
        lockState
    {
        require(
            _allocationPercentages.length == actions.length,
            "INVALID_INPUT"
        );

        emit Rollover(_allocationPercentages);

        _distribute(_allocationPercentages);
    }

    /**
     * @notice sets the vault's state to "Emergency", which disables all withdrawals and deposits
     */
    function emergencyPause() external onlyOwner {
        stateBeforePause = state;
        state = VaultState.Emergency;
        emit StateUpdated(VaultState.Emergency);
    }

    /**
     * @notice sets the vault's state to whatever state it was before "Emergency"
     */
    function resumeFromPause() external onlyOwner {
        require(state == VaultState.Emergency, "!Emergency");
        state = stateBeforePause;
        emit StateUpdated(stateBeforePause);
    }

    /**
     * @notice sets the vault's perf fee
     */
    function setPerformanceFee(uint256 _percent) external onlyOwner {
        require(
            _percent >= 0 && _percent <= 10000,
            "% must be between 0 and 10000"
        );
        performanceFeeInPercent = _percent;
    }

    /**
     * @notice sets the vault's perf fee
     */
    function setFeeRecipient(address _recipient) external onlyOwner {
        feeRecipient = _recipient;
    }

    /**
     * @notice sets the vault's management fee
     */
    function setManagementFee(uint256 _percent) external onlyOwner {
        require(
            _percent >= 0 && _percent <= 10000,
            "% must be between 0 and 10000"
        );
        managementFeeInPercent = _percent;
    }

    /*=====================
     * Internal functions *
     *====================*/

    /**
     * @notice net assets controlled by this vault, which is effective balance + debts of actions
     */
    function _netAssetsControlled() internal view returns (uint256) {
        return _effectiveBalance().add(_totalDebt());
    }

    /**
     * @notice total assets controlled by the vault, including the pendingDeposits, withdrawQueue and debts of actions
     */
    function _totalAssets() internal view returns (uint256) {
        return IERC20(asset).balanceOf(address(this)).add(_totalDebt());
    }

    /**
     * @notice returns asset balance of the vault excluding assets registered to be withdrawn and the assets still in pendingDeposit.
     */
    function _effectiveBalance() internal view returns (uint256) {
        return
            IERC20(asset).balanceOf(address(this)).sub(pendingDeposit).sub(
                withdrawQueueAmount
            );
    }

    /**
     * @notice estimate amount of assets in all the actions
     * this function iterates through all actions and sum up the currentValue reported by each action.
     */
    function _totalDebt() internal view returns (uint256) {
        uint256 debt = 0;
        for (uint256 i = 0; i < actions.length; i++) {
            debt = debt.add(IAction(actions[i]).currentValue());
        }
        return debt;
    }

    /**
     * @notice mints the shares to depositor, and emits the deposit event
     */
    function _deposit(uint256 _amount) internal {
        // the asset is already deposited into the contract at this point, need to substract it from total
        uint256 netWithDepositedAmount = _netAssetsControlled();
        uint256 totalWithDepositedAmount = _totalAssets();
        require(totalWithDepositedAmount < cap, "Cap exceeded");
        uint256 netBeforeDeposit = netWithDepositedAmount.sub(_amount);

        uint256 share = _getSharesByDepositAmount(_amount, netBeforeDeposit);

        emit Deposit(msg.sender, _amount, share);

        _mint(msg.sender, share);
    }

    /**
     * @notice iterrate through each action, close position and withdraw funds
     */
    function _closeAndWithdraw() internal {
        for (uint8 i = 0; i < actions.length; i = i + 1) {
            // 1. close position. this should revert if any position is not ready to be closed.
            IAction(actions[i]).closePosition();

            // 2. withdraw assets
            uint256 actionBalance = IERC20(asset).balanceOf(actions[i]);
            if (actionBalance > 0)
                IERC20(asset).safeTransferFrom(
                    actions[i],
                    address(this),
                    actionBalance
                );
        }
    }

    /**
     * @notice distributes the effective balance to different actions
     * @dev the manager can keep a reserve in the vault by not distributing all the funds.
     */
    function _distribute(uint256[] memory _percentages) internal nonReentrant {
        uint256 totalBalance = _effectiveBalance();

        currentRoundStartingAmount = totalBalance;

        // keep track of total percentage to make sure we're summing up to 100%
        uint256 sumPercentage;
        for (uint8 i = 0; i < actions.length; i = i + 1) {
            sumPercentage = sumPercentage.add(_percentages[i]);
            require(sumPercentage <= BASE, "PERCENTAGE_SUM_EXCEED_MAX");

            uint256 newAmount = totalBalance.mul(_percentages[i]).div(BASE);

            if (newAmount > 0) {
                IERC20(asset).safeTransfer(actions[i], newAmount);
                IAction(actions[i]).rolloverPosition();
            }
        }

        require(sumPercentage == BASE, "PERCENTAGE_DOESNT_ADD_UP");
    }

    /**
     * @notice calculates withdraw amount from queued shares, returns withdraw amount to be handled by queueWithdraw or queueWithdrawETH
     * @param _round the round you registered a queue withdraw
     */
    function _withdrawFromQueue(uint256 _round) internal returns (uint256) {
        require(_round < round, "Invalid round");

        uint256 queuedShares = userRoundQueuedWithdrawShares[msg.sender][
            _round
        ];
        uint256 withdrawAmount = queuedShares.mul(roundTotalAsset[_round]).div(
            roundTotalShare[_round]
        );

        // remove user's queued shares
        userRoundQueuedWithdrawShares[msg.sender][_round] = 0;
        // decrease total asset we reserved for withdraw
        withdrawQueueAmount = withdrawQueueAmount.sub(withdrawAmount);

        emit WithdrawFromQueue(msg.sender, withdrawQueueAmount, _round);

        return withdrawAmount;
    }

    /**
     * @notice burn shares, return withdraw amount handle by withdraw or withdrawETH
     * @param _share amount of shares burn to withdraw asset.
     */
    function _regularWithdraw(uint256 _share) internal returns (uint256) {
        uint256 withdrawAmount = _getWithdrawAmountByShares(_share);

        _burn(msg.sender, _share);

        emit Withdraw(msg.sender, withdrawAmount, _share);

        return withdrawAmount;
    }

    /**
     * @notice return how many shares you can get if you deposit {_amount} asset
     * @param _amount amount of token depositing
     * @param _totalAssetAmount amount of asset already in the pool before deposit
     */
    function _getSharesByDepositAmount(
        uint256 _amount,
        uint256 _totalAssetAmount
    ) internal view returns (uint256) {
        uint256 shareSupply = totalSupply().add(
            roundTotalQueuedWithdrawShares[round]
        );

        uint256 shares = shareSupply == 0
            ? _amount
            : _amount.mul(shareSupply).div(_totalAssetAmount);
        return shares;
    }

    /**
     * @notice return how many asset you can get if you burn the number of shares
     */
    function _getWithdrawAmountByShares(uint256 _share)
        internal
        view
        returns (uint256)
    {
        uint256 effectiveShares = totalSupply();
        return _share.mul(_netAssetsControlled()).div(effectiveShares);
    }

    /**
     * @notice pay fee to fee recipient after we pull all assets back to the vault
     */
    function _payRoundFee() internal {
        // don't need to call totalAsset() because actions are empty now.
        uint256 newTotal = _effectiveBalance();
        uint256 profit;

        if (newTotal > currentRoundStartingAmount)
            profit = newTotal.sub(currentRoundStartingAmount);

        uint256 performanceFee = profit.mul(performanceFeeInPercent).div(BASE);

        uint256 managementFee = currentRoundStartingAmount
            .mul(managementFeeInPercent)
            .mul((block.timestamp.sub(currentRoundStartTimestamp)))
            .div(365 days)
            .div(BASE);
        uint256 totalFee = performanceFee.add(managementFee);
        if (totalFee > profit) totalFee = profit;

        currentRoundStartingAmount = 0;

        IERC20(asset).transfer(feeRecipient, totalFee);
    }

    /**
     * @notice snapshot last round's total shares and balance, excluding pending deposits.
     * @dev this function is called after withdrawing from action contracts and does the following:
     * 1. snapshots last round's shares and asset balances
     * 2. empties the pendingDeposits and pulls in those assets into the next round
     * 3. sets aside assets from the main vault into the withdrawQueue
     */
    function _snapshotShareAndAsset() internal {
        uint256 vaultBalance = _effectiveBalance();
        uint256 outStandingShares = totalSupply();
        uint256 sharesBurned = roundTotalQueuedWithdrawShares[round];

        uint256 totalShares = outStandingShares.add(sharesBurned);

        // store this round's balance and shares
        roundTotalShare[round] = totalShares;
        roundTotalAsset[round] = vaultBalance;

        // === Handle withdraw queue === //
        // withdrawQueueAmount was keeping track of total amount that should be reserved for withdraws, not including this round
        // add this round's reserved asset into withdrawQueueAmount, which will stay in the vault for withdraw

        uint256 roundReservedAsset = sharesBurned.mul(vaultBalance).div(
            totalShares
        );
        withdrawQueueAmount = withdrawQueueAmount.add(roundReservedAsset);

        // === Handle deposit queue === //
        // pendingDeposit is amount of deposit accepted in this round, which was in the vault all the time.
        // we will calculate how much shares this amount can mint, mint it at once to the vault,
        // and reset the pendingDeposit, so that this amount can be used in the next round.
        uint256 sharesToMint = pendingDeposit.mul(totalShares).div(
            vaultBalance
        );
        _mint(address(this), sharesToMint);
        pendingDeposit = 0;
    }
}

File 2 of 16 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
    uint256[49] private __gap;
}

File 3 of 16 : ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/ContextUpgradeable.sol";
import "./IERC20Upgradeable.sol";
import "../../math/SafeMathUpgradeable.sol";
import "../../proxy/Initializable.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {
    using SafeMathUpgradeable for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC20_init_unchained(name_, symbol_);
    }

    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
    uint256[44] private __gap;
}

File 4 of 16 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/Initializable.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
    uint256[49] private __gap;
}

File 5 of 16 : IAction.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.2;

interface IAction {
  /**
   * The function used to determin how much asset the current action is controlling.
   * this will impact the withdraw and deposit amount calculated from the vault.
   */
  function currentValue() external view returns (uint256);

  /**
   * The function for the vault to call at the end of each vault's round.
   * after calling this function, the vault will try to pull assets back from the action and enable withdraw.
   */
  function closePosition() external;

  /**
   * The function for the vault to call when the vault is ready to start the next round.
   * the vault will push assets to action before calling this function, but the amount can change compare to
   * the last round. So each action should check their asset balance instead of using any cached balance.
   *
   * Each action can also add additional checks and revert the `rolloverPosition` call if the action
   * is not ready to go into the next round.
   */
  function rolloverPosition() external;
}

File 6 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 7 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

File 8 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 9 of 16 : IOldVault.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.2;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IOldVault is IERC20 {
    function withdrawETH(uint256 _share, uint256 minEth) external;
}

File 10 of 16 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.2;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

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

  function withdraw(uint256) external;
}

File 11 of 16 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;

import "../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 12 of 16 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 16 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";

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

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

File 14 of 16 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 15 of 16 : SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathUpgradeable {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

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

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"CapUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountDeposited","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shareMinted","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"allocations","type":"uint256[]"}],"name":"Rollover","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum OpynPerpVaultEth.VaultState","name":"state","type":"uint8"}],"name":"StateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shareBurned","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"}],"name":"WithdrawFromQueue","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"actions","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_depositor","type":"address"},{"internalType":"uint256","name":"_round","type":"uint256"}],"name":"claimShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closePositions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentRoundStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRoundStartingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"emergencyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getSharesByDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"getWithdrawAmountByShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"address[]","name":"_actions","type":"address[]"},{"internalType":"address","name":"_oldVault","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"managementFeeInPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"minEth","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldVault","outputs":[{"internalType":"contract IOldVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFeeInPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_shareRecipient","type":"address"}],"name":"registerDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_shareRecipient","type":"address"}],"name":"registerDepositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"registerWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resumeFromPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_allocationPercentages","type":"uint256[]"}],"name":"rollOver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"round","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundTotalAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundTotalQueuedWithdrawShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundTotalShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setManagementFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"enum OpynPerpVaultEth.VaultState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateBeforePause","outputs":[{"internalType":"enum OpynPerpVaultEth.VaultState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnderlyingControlled","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRoundQueuedDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRoundQueuedWithdrawShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_round","type":"uint256"}],"name":"withdrawFromQueue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawQueueAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052606460ca55600060cb55683635c9adc5dea0000060d35534801561002757600080fd5b5061416c806100376000396000f3fe6080604052600436106103545760003560e01c806351858e27116101c657806395d89b41116100f7578063e2ee83f611610095578063f2fde38b1161006f578063f2fde38b146108fd578063f6326fb31461091d578063f64c6f3214610925578063fe56e2321461093a5761035b565b8063e2ee83f6146108a8578063e74b981b146108c8578063ec342ad0146108e85761035b565b8063a9059cbb116100d1578063a9059cbb14610833578063b6b55f2514610853578063c19d93fb14610873578063dd62ed3e146108885761035b565b806395d89b41146107e957806397859a31146107fe578063a457c2d7146108135761035b565b8063772b9ca611610164578063877ff9171161013e578063877ff9171461077d5780638d64fd601461079d5780638da5cb5b146107bf57806392f73fc0146107d45761035b565b8063772b9ca61461071d5780637dcb03131461073d57806383240f831461075d5761035b565b806370897b23116101a057806370897b23146106a857806370a08231146106c857806370cf046e146106e8578063715018a6146107085761035b565b806351858e271461066b57806357eb040c1461068057806367a73d53146106935761035b565b80632c98e25d116102a0578063395093511161023e5780634276799511610218578063427679951461060157806345d05c8e14610616578063469048401461063657806347786d371461064b5761035b565b806339509351146105ae5780633d0e5efe146105ce5780633e54bacb146105ee5761035b565b8063313ce5671161027a578063313ce56714610540578063355274ea146105625780633687e7a91461057757806338d52e0f1461058c5761035b565b80632c98e25d146104eb5780632ce5183f146105005780632e1a7d4d146105205761035b565b806318160ddd1161030d5780631f173706116102e75780631f1737061461047657806323b872dd146104965780632ae781fe146104b65780632c507048146104cb5761035b565b806318160ddd1461042c5780631c7d4707146104415780631d341f3c146104565761035b565b806306fdde031461035d578063076e34d61461038857806307d81151146103aa578063095ea7b3146103ca57806313edaab4146103f7578063146ca531146104175761035b565b3661035b57005b005b34801561036957600080fd5b5061037261095a565b60405161037f9190613c46565b60405180910390f35b34801561039457600080fd5b5061039d6109f0565b60405161037f9190613e84565b3480156103b657600080fd5b5061035b6103c5366004613b2c565b6109f6565b3480156103d657600080fd5b506103ea6103e5366004613a74565b610aab565b60405161037f9190613c27565b34801561040357600080fd5b5061039d610412366004613b2c565b610ac9565b34801561042357600080fd5b5061039d610ae4565b34801561043857600080fd5b5061039d610aea565b34801561044d57600080fd5b5061039d610af0565b34801561046257600080fd5b5061035b610471366004613961565b610af6565b34801561048257600080fd5b5061039d610491366004613a74565b610cf7565b3480156104a257600080fd5b506103ea6104b1366004613a39565b610d14565b3480156104c257600080fd5b5061039d610d9c565b3480156104d757600080fd5b5061035b6104e6366004613a9d565b610da2565b3480156104f757600080fd5b5061035b610eff565b34801561050c57600080fd5b5061035b61051b366004613a74565b610fec565b34801561052c57600080fd5b5061035b61053b366004613b2c565b611072565b34801561054c57600080fd5b5061055561114c565b60405161037f9190613e9b565b34801561056e57600080fd5b5061039d611155565b34801561058357600080fd5b5061039d61115b565b34801561059857600080fd5b506105a1611161565b60405161037f9190613b9f565b3480156105ba57600080fd5b506103ea6105c9366004613a74565b611170565b3480156105da57600080fd5b5061039d6105e9366004613a74565b6111be565b61035b6105fc366004613b7e565b6111db565b34801561060d57600080fd5b5061039d611383565b34801561062257600080fd5b5061035b610631366004613b5c565b611392565b34801561064257600080fd5b506105a1611415565b34801561065757600080fd5b5061035b610666366004613b2c565b611424565b34801561067757600080fd5b5061035b6114c6565b61035b61068e366004613915565b611577565b34801561069f57600080fd5b5061039d6116b4565b3480156106b457600080fd5b5061035b6106c3366004613b2c565b6116ba565b3480156106d457600080fd5b5061039d6106e3366004613915565b611743565b3480156106f457600080fd5b5061039d610703366004613b2c565b61175e565b34801561071457600080fd5b5061035b611769565b34801561072957600080fd5b5061039d610738366004613b2c565b611815565b34801561074957600080fd5b5061039d610758366004613b2c565b611827565b34801561076957600080fd5b506105a1610778366004613b2c565b611839565b34801561078957600080fd5b5061035b610798366004613b2c565b611863565b3480156107a957600080fd5b506107b26118ea565b60405161037f9190613c32565b3480156107cb57600080fd5b506105a16118f8565b3480156107e057600080fd5b506105a1611907565b3480156107f557600080fd5b5061037261191c565b34801561080a57600080fd5b5061035b61197d565b34801561081f57600080fd5b506103ea61082e366004613a74565b611a10565b34801561083f57600080fd5b506103ea61084e366004613a74565b611a78565b34801561085f57600080fd5b5061035b61086e366004613b2c565b611a8c565b34801561087f57600080fd5b506107b2611b11565b34801561089457600080fd5b5061039d6108a336600461392f565b611b1a565b3480156108b457600080fd5b5061039d6108c3366004613b2c565b611b45565b3480156108d457600080fd5b5061035b6108e3366004613915565b611b57565b3480156108f457600080fd5b5061039d611bdb565b34801561090957600080fd5b5061035b610918366004613915565b611be1565b61035b611ce4565b34801561093157600080fd5b5061039d611e28565b34801561094657600080fd5b5061035b610955366004613b2c565b611e2e565b60368054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109e65780601f106109bb576101008083540402835291602001916109e6565b820191906000526020600020905b8154815290600101906020018083116109c957829003601f168201915b5050505050905090565b60ca5481565b600060c95460ff166002811115610a0957fe5b14610a2f5760405162461bcd60e51b8152600401610a2690613db8565b60405180910390fd5b610a393382611eb7565b33600090815260d56020908152604080832060d4548452909152902054610a609082611fb3565b33600090815260d56020908152604080832060d480548552908352818420949094559254825260d790522054610a969082611fb3565b60d454600090815260d7602052604090205550565b6000610abf610ab861200d565b8484612011565b5060015b92915050565b6000610adc82610ad76120fd565b612118565b90505b919050565b60d45481565b60355490565b60d25481565b600054610100900460ff1680610b0f5750610b0f612160565b80610b1d575060005460ff16155b610b585760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015610b83576000805460ff1961ff0019909116610100171660011790555b610b8b612171565b610b95858561221a565b610b9e866122d0565b610ba66122e6565b610baf88611be1565b60ce80546001600160a01b03808c166001600160a01b03199283161790925560cf8054928a169290911691909117905560005b8351811015610caa5760005b81811015610c5657848181518110610c0257fe5b60200260200101516001600160a01b0316858381518110610c1f57fe5b60200260200101516001600160a01b03161415610c4e5760405162461bcd60e51b8152600401610a2690613e10565b600101610bee565b5060d0848281518110610c6557fe5b60209081029190910181015182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501610be2565b5060c980544260d155600160ff199091161762010000600160b01b031916620100006001600160a01b038516021790558015610cec576000805461ff00191690555b505050505050505050565b60d660209081526000928352604080842090915290825290205481565b6000610d21848484612383565b610d9184610d2d61200d565b610d8c85604051806060016040528060288152602001614036602891396001600160a01b038a16600090815260346020526040812090610d6b61200d565b6001600160a01b0316815260208101919091526040016000205491906124e0565b612011565b5060015b9392505050565b60cb5481565b610daa61200d565b6001600160a01b0316610dbb6118f8565b6001600160a01b031614610e04576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b600160c95460ff166002811115610e1757fe5b14610e345760405162461bcd60e51b8152600401610a2690613e61565b60c9805460ff19169055604051600080516020613ff583398151915290610e5d90600090613c32565b60405180910390a160d0548114610e865760405162461bcd60e51b8152600401610a2690613d37565b7f208d5f48745fe6e322f9885ee63d75875a3325c8c80eb378c080dff1659989cd8282604051610eb7929190613bed565b60405180910390a1610efb82828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061257792505050565b5050565b610f0761200d565b6001600160a01b0316610f186118f8565b6001600160a01b031614610f61576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b600260c95460ff166002811115610f7457fe5b14610f915760405162461bcd60e51b8152600401610a2690613c99565b60c9805460ff610100820416919060ff19166001836002811115610fb157fe5b0217905550600080516020613ff583398151915260c960019054906101000a900460ff16604051610fe29190613c32565b60405180910390a1565b60d454811061100d5760405162461bcd60e51b8152600401610a2690613cbd565b6001600160a01b038216600090815260d660209081526040808320848452825280832080549084905560d883528184205460d99093529083205490929161105f91611059908590612745565b9061279e565b905061106c308583612383565b50505050565b600260655414156110b8576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606555600160c95460ff1660028111156110d057fe5b146110ed5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff16600281111561110057fe5b141561111e5760405162461bcd60e51b8152600401610a2690613d95565b600061112982612805565b60ce54909150611143906001600160a01b0316338361285e565b50506001606555565b60385460ff1690565b60d35481565b60d15481565b60ce546001600160a01b031681565b6000610abf61117d61200d565b84610d8c856034600061118e61200d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611fb3565b60d560209081526000928352604080842090915290825290205481565b600160c95460ff1660028111156111ee57fe5b1461120b5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff16600281111561121e57fe5b141561123c5760405162461bcd60e51b8152600401610a2690613d95565b60026065541415611282576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b600260655560c9546112a5906201000090046001600160a01b03163330856128b0565b60c95460405163c7cdea3760e01b8152620100009091046001600160a01b03169063c7cdea37906112dc9085908590600401613e8d565b600060405180830381600087803b1580156112f657600080fd5b505af115801561130a573d6000803e3d6000fd5b5050505047915060ce60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561136157600080fd5b505af1158015611375573d6000803e3d6000fd5b50505050506111438261290a565b600061138d6120fd565b905090565b600060c95460ff1660028111156113a557fe5b146113c25760405162461bcd60e51b8152600401610a2690613db8565b600260c95460ff1660028111156113d557fe5b14156113f35760405162461bcd60e51b8152600401610a2690613d95565b60ce5461140b906001600160a01b03163330856128b0565b610efb82826129ab565b60cf546001600160a01b031681565b61142c61200d565b6001600160a01b031661143d6118f8565b6001600160a01b031614611486576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b60d38190556040517f3c8eb7c49d332f4c1e4d92a27cda93c31cc9452f7a408e0c6109fcddbc9946ea906114bb908390613e84565b60405180910390a150565b6114ce61200d565b6001600160a01b03166114df6118f8565b6001600160a01b031614611528576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b60c9805460ff8116919061ff00191661010083600281111561154657fe5b021790555060c9805460ff19166002908117909155604051600080516020613ff583398151915291610fe291613c32565b600260655414156115bd576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606581905560c95460ff1660028111156115d557fe5b14156115f35760405162461bcd60e51b8152600401610a2690613d95565b600060c95460ff16600281111561160657fe5b146116235760405162461bcd60e51b8152600401610a2690613db8565b34806116415760405162461bcd60e51b8152600401610a2690613d1b565b60ce60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050505061114381836129ab565b60cc5481565b6116c261200d565b6001600160a01b03166116d36118f8565b6001600160a01b03161461171c576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b61271081111561173e5760405162461bcd60e51b8152600401610a2690613dd9565b60ca55565b6001600160a01b031660009081526033602052604090205490565b6000610adc82612a43565b61177161200d565b6001600160a01b03166117826118f8565b6001600160a01b0316146117cb576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b6097546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3609780546001600160a01b0319169055565b60d96020526000908152604090205481565b60d86020526000908152604090205481565b60d0818154811061184957600080fd5b6000918252602090912001546001600160a01b0316905081565b600260655414156118a9576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606581905560c95460ff1660028111156118c157fe5b14156118df5760405162461bcd60e51b8152600401610a2690613d95565b600061112982612a66565b60c954610100900460ff1681565b6097546001600160a01b031690565b60c9546201000090046001600160a01b031681565b60378054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109e65780601f106109bb576101008083540402835291602001916109e6565b600060c95460ff16600281111561199057fe5b146119ad5760405162461bcd60e51b8152600401610a2690613db8565b60c9805460ff19166001908117909155604051600080516020613ff5833981519152916119d991613c32565b60405180910390a16119e9612b39565b6119f1612caf565b6119f9612de4565b60d454611a07906001611fb3565b60d4554260d155565b6000610abf611a1d61200d565b84610d8c856040518060600160405280602581526020016141126025913960346000611a4761200d565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906124e0565b6000610abf611a8561200d565b8484612383565b600160c95460ff166002811115611a9f57fe5b14611abc5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff166002811115611acf57fe5b1415611aed5760405162461bcd60e51b8152600401610a2690613d95565b60ce54611b05906001600160a01b03163330846128b0565b611b0e8161290a565b50565b60c95460ff1681565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60d76020526000908152604090205481565b611b5f61200d565b6001600160a01b0316611b706118f8565b6001600160a01b031614611bb9576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b60cf80546001600160a01b0319166001600160a01b0392909216919091179055565b61271081565b611be961200d565b6001600160a01b0316611bfa6118f8565b6001600160a01b031614611c43576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b6001600160a01b038116611c885760405162461bcd60e51b8152600401808060200182810382526026815260200180613f336026913960400191505060405180910390fd5b6097546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3609780546001600160a01b0319166001600160a01b0392909216919091179055565b60026065541415611d2a576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606555600160c95460ff166002811115611d4257fe5b14611d5f5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff166002811115611d7257fe5b1415611d905760405162461bcd60e51b8152600401610a2690613d95565b3480611dae5760405162461bcd60e51b8152600401610a2690613d1b565b60ce60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015611dfe57600080fd5b505af1158015611e12573d6000803e3d6000fd5b5050505050611e208161290a565b506001606555565b60cd5481565b611e3661200d565b6001600160a01b0316611e476118f8565b6001600160a01b031614611e90576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b612710811115611eb25760405162461bcd60e51b8152600401610a2690613dd9565b60cb55565b6001600160a01b038216611efc5760405162461bcd60e51b815260040180806020018281038252602181526020018061407e6021913960400191505060405180910390fd5b611f08826000836122cb565b611f4581604051806060016040528060228152602001613f11602291396001600160a01b03851660009081526033602052604090205491906124e0565b6001600160a01b038316600090815260336020526040902055603554611f6b9082612e92565b6035556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082820183811015610d95576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6001600160a01b0383166120565760405162461bcd60e51b81526004018080602001828103825260248152602001806140c46024913960400191505060405180910390fd5b6001600160a01b03821661209b5760405162461bcd60e51b8152600401808060200182810382526022815260200180613f596022913960400191505060405180910390fd5b6001600160a01b03808416600081815260346020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061138d61210a612eef565b612112612fa6565b90611fb3565b60d454600090815260d76020526040812054819061213890612112610aea565b90506000811561215557612150846110598785612745565b612157565b845b95945050505050565b600061216b3061303f565b15905090565b600054610100900460ff168061218a575061218a612160565b80612198575060005460ff16155b6121d35760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156121fe576000805460ff1961ff0019909116610100171660011790555b612206613045565b8015611b0e576000805461ff001916905550565b600054610100900460ff16806122335750612233612160565b80612241575060005460ff16155b61227c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156122a7576000805460ff1961ff0019909116610100171660011790555b6122af6130eb565b6122b9838361318b565b80156122cb576000805461ff00191690555b505050565b6038805460ff191660ff92909216919091179055565b600054610100900460ff16806122ff57506122ff612160565b8061230d575060005460ff16155b6123485760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015612373576000805460ff1961ff0019909116610100171660011790555b61237b6130eb565b612206613263565b6001600160a01b0383166123c85760405162461bcd60e51b815260040180806020018281038252602581526020018061409f6025913960400191505060405180910390fd5b6001600160a01b03821661240d5760405162461bcd60e51b8152600401808060200182810382526023815260200180613ece6023913960400191505060405180910390fd5b6124188383836122cb565b61245581604051806060016040528060268152602001613f7b602691396001600160a01b03861660009081526033602052604090205491906124e0565b6001600160a01b0380851660009081526033602052604080822093909355908416815220546124849082611fb3565b6001600160a01b0380841660008181526033602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561256f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561253457818101518382015260200161251c565b50505050905090810190601f1680156125615780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600260655414156125bd576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b600260655560006125cc612fa6565b60d281905590506000805b60d05460ff821610156127195761260d848260ff16815181106125f657fe5b602002602001015183611fb390919063ffffffff16565b91506127108211156126315760405162461bcd60e51b8152600401610a2690613ce4565b6000612662612710611059878560ff168151811061264b57fe5b60200260200101518761274590919063ffffffff16565b905080156127105761269f60d08360ff168154811061267d57fe5b60009182526020909120015460ce546001600160a01b0390811691168361285e565b60d08260ff16815481106126af57fe5b600091825260208220015460408051630fcbbccb60e41b815290516001600160a01b039092169263fcbbccb09260048084019382900301818387803b1580156126f757600080fd5b505af115801561270b573d6000803e3d6000fd5b505050505b506001016125d7565b50612710811461273b5760405162461bcd60e51b8152600401610a2690613d5e565b5050600160655550565b60008261275457506000610ac3565b8282028284828161276157fe5b0414610d955760405162461bcd60e51b81526004018080602001828103825260218152602001806140156021913960400191505060405180910390fd5b60008082116127f4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816127fd57fe5b049392505050565b60008061281183612a43565b905061281d3384611eb7565b7ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56833828560405161285093929190613bb3565b60405180910390a192915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526122cb90849061335c565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261106c90859061335c565b60006129146120fd565b9050600061292061340d565b905060d35481106129435760405162461bcd60e51b8152600401610a2690613e3b565b600061294f8385612e92565b9050600061295d8583612118565b90507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1533868360405161299293929190613bb3565b60405180910390a16129a4338261349a565b5050505050565b60006129b561340d565b905060d35481106129d85760405162461bcd60e51b8152600401610a2690613e3b565b6001600160a01b038216600090815260d66020908152604080832060d4548452909152902054612a089084611fb3565b6001600160a01b038316600090815260d66020908152604080832060d454845290915290205560cd54612a3b9084611fb3565b60cd55505050565b600080612a4e610aea565b9050610d9581611059612a5f6120fd565b8690612745565b600060d4548210612a895760405162461bcd60e51b8152600401610a2690613cbd565b33600090815260d56020908152604080832085845282528083205460d983528184205460d890935290832054909291612ac791611059908590612745565b33600090815260d56020908152604080832088845290915281205560cc54909150612af29082612e92565b60cc8190556040517f2752b54b0cee0996ce85f61566a16bf640f35b379d184dabfad432bd5943257b91612b2a913391908890613bb3565b60405180910390a19392505050565b60005b60d05460ff82161015611b0e5760d08160ff1681548110612b5957fe5b60009182526020822001546040805163c393d0e360e01b815290516001600160a01b039092169263c393d0e39260048084019382900301818387803b158015612ba157600080fd5b505af1158015612bb5573d6000803e3d6000fd5b505060ce5460d08054600094506001600160a01b0390921692506370a082319160ff8616908110612be257fe5b6000918252602090912001546040516001600160e01b031960e084901b168152612c18916001600160a01b031690600401613b9f565b60206040518083038186803b158015612c3057600080fd5b505afa158015612c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c689190613b44565b90508015612ca657612ca660d08360ff1681548110612c8357fe5b60009182526020909120015460ce546001600160a01b03908116911630846128b0565b50600101612b3c565b6000612cb9612fa6565b9050600060d254821115612cd85760d254612cd5908390612e92565b90505b6000612cf561271061105960ca548561274590919063ffffffff16565b90506000612d346127106110596301e13380611059612d1f60d15442612e9290919063ffffffff16565b60cb5460d254612d2e91612745565b90612745565b90506000612d428383611fb3565b905083811115612d4f5750825b600060d25560ce5460cf5460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92612d8a929116908590600401613bd4565b602060405180830381600087803b158015612da457600080fd5b505af1158015612db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddc9190613b0c565b505050505050565b6000612dee612fa6565b90506000612dfa610aea565b60d454600090815260d76020526040812054919250612e198383611fb3565b60d48054600090815260d9602090815260408083208590559254825260d89052908120869055909150612e50826110598588612745565b60cc54909150612e609082611fb3565b60cc5560cd54600090612e799087906110599086612745565b9050612e85308261349a565b5050600060cd5550505050565b600082821115612ee9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600080805b60d054811015612fa057612f9660d08281548110612f0e57fe5b6000918252602091829020015460408051630d3132df60e31b815290516001600160a01b039092169263698996f892600480840193829003018186803b158015612f5757600080fd5b505afa158015612f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8f9190613b44565b8390611fb3565b9150600101612ef4565b50905090565b60cc5460cd5460ce546040516370a0823160e01b815260009361138d939092613039926001600160a01b03909116906370a0823190612fe9903090600401613b9f565b60206040518083038186803b15801561300157600080fd5b505afa158015613015573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130399190613b44565b90612e92565b3b151590565b600054610100900460ff168061305e575061305e612160565b8061306c575060005460ff16155b6130a75760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156130d2576000805460ff1961ff0019909116610100171660011790555b60016065558015611b0e576000805461ff001916905550565b600054610100900460ff16806131045750613104612160565b80613112575060005460ff16155b61314d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015612206576000805460ff1961ff0019909116610100171660011790558015611b0e576000805461ff001916905550565b600054610100900460ff16806131a457506131a4612160565b806131b2575060005460ff16155b6131ed5760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015613218576000805460ff1961ff0019909116610100171660011790555b825161322b906036906020860190613764565b50815161323f906037906020850190613764565b506038805460ff1916601217905580156122cb576000805461ff0019169055505050565b600054610100900460ff168061327c575061327c612160565b8061328a575060005460ff16155b6132c55760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156132f0576000805460ff1961ff0019909116610100171660011790555b60006132fa61200d565b609780546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611b0e576000805461ff001916905550565b60006133b1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661358c9092919063ffffffff16565b8051909150156122cb578080602001905160208110156133d057600080fd5b50516122cb5760405162461bcd60e51b815260040180806020018281038252602a8152602001806140e8602a913960400191505060405180910390fd5b600061138d61341a612eef565b60ce546040516370a0823160e01b81526001600160a01b03909116906370a082319061344a903090600401613b9f565b60206040518083038186803b15801561346257600080fd5b505afa158015613476573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121129190613b44565b6001600160a01b0382166134f5576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b613501600083836122cb565b60355461350e9082611fb3565b6035556001600160a01b0382166000908152603360205260409020546135349082611fb3565b6001600160a01b03831660008181526033602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b606061359b84846000856135a3565b949350505050565b6060824710156135e45760405162461bcd60e51b8152600401808060200182810382526026815260200180613fa16026913960400191505060405180910390fd5b6135ed8561303f565b61363e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061367c5780518252601f19909201916020918201910161365d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146136de576040519150601f19603f3d011682016040523d82523d6000602084013e6136e3565b606091505b50915091506136f38282866136fe565b979650505050505050565b6060831561370d575081610d95565b82511561371d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561253457818101518382015260200161251c565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261379a57600085556137e0565b82601f106137b357805160ff19168380011785556137e0565b828001600101855582156137e0579182015b828111156137e05782518255916020019190600101906137c5565b506137ec9291506137f0565b5090565b5b808211156137ec57600081556001016137f1565b80356001600160a01b0381168114610adf57600080fd5b600082601f83011261382c578081fd5b8135602067ffffffffffffffff82111561384257fe5b808202613850828201613ea9565b83815282810190868401838801850189101561386a578687fd5b8693505b858410156138935761387f81613805565b83526001939093019291840191840161386e565b50979650505050505050565b600082601f8301126138af578081fd5b813567ffffffffffffffff8111156138c357fe5b6138d6601f8201601f1916602001613ea9565b8181528460208386010111156138ea578283fd5b816020850160208301379081016020019190915292915050565b803560ff81168114610adf57600080fd5b600060208284031215613926578081fd5b610d9582613805565b60008060408385031215613941578081fd5b61394a83613805565b915061395860208401613805565b90509250929050565b600080600080600080600080610100898b03121561397d578384fd5b61398689613805565b975061399460208a01613805565b96506139a260408a01613805565b95506139b060608a01613904565b9450608089013567ffffffffffffffff808211156139cc578586fd5b6139d88c838d0161389f565b955060a08b01359150808211156139ed578485fd5b6139f98c838d0161389f565b945060c08b0135915080821115613a0e578384fd5b50613a1b8b828c0161381c565b925050613a2a60e08a01613805565b90509295985092959890939650565b600080600060608486031215613a4d578283fd5b613a5684613805565b9250613a6460208501613805565b9150604084013590509250925092565b60008060408385031215613a86578182fd5b613a8f83613805565b946020939093013593505050565b60008060208385031215613aaf578182fd5b823567ffffffffffffffff80821115613ac6578384fd5b818501915085601f830112613ad9578384fd5b813581811115613ae7578485fd5b8660208083028501011115613afa578485fd5b60209290920196919550909350505050565b600060208284031215613b1d578081fd5b81518015158114610d95578182fd5b600060208284031215613b3d578081fd5b5035919050565b600060208284031215613b55578081fd5b5051919050565b60008060408385031215613b6e578182fd5b8235915061395860208401613805565b60008060408385031215613b90578182fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b03929092168252602082015260400190565b6020808252810182905260006001600160fb1b03831115613c0c578081fd5b60208302808560408501379190910160400190815292915050565b901515815260200190565b6020810160038310613c4057fe5b91905290565b6000602080835283518082850152825b81811015613c7257858101830151858201604001528201613c56565b81811115613c835783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600a908201526921456d657267656e637960b01b604082015260600190565b6020808252600d908201526c125b9d985b1a59081c9bdd5b99609a1b604082015260600190565b60208082526019908201527f50455243454e544147455f53554d5f4558434545445f4d415800000000000000604082015260600190565b602080825260029082015261279b60f11b604082015260600190565b6020808252600d908201526c1253959053125117d253941555609a1b604082015260600190565b60208082526018908201527f50455243454e544147455f444f45534e545f4144445f55500000000000000000604082015260600190565b602080825260099082015268456d657267656e637960b81b604082015260600190565b60208082526007908201526608531bd8dad95960ca1b604082015260600190565b6020808252601d908201527f25206d757374206265206265747765656e203020616e64203130303030000000604082015260600190565b602080825260119082015270323ab83634b1b0ba32b21030b1ba34b7b760791b604082015260600190565b6020808252600c908201526b10d85c08195e18d95959195960a21b604082015260600190565b60208082526009908201526808555b9b1bd8dad95960ba1b604082015260600190565b90815260200190565b918252602082015260400190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613ec557fe5b60405291905056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735265656e7472616e637947756172643a207265656e7472616e742063616c6c0045524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656423ad33ab6a13a00aa7d06cd167b2abd03dec86af3cf3cc91759dcd3ae8411887536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220852b9e49efda34fca7d5c97cc0cb9799e48ba1c7cf4386bd1991753b0d47354764736f6c63430007060033

Deployed Bytecode

0x6080604052600436106103545760003560e01c806351858e27116101c657806395d89b41116100f7578063e2ee83f611610095578063f2fde38b1161006f578063f2fde38b146108fd578063f6326fb31461091d578063f64c6f3214610925578063fe56e2321461093a5761035b565b8063e2ee83f6146108a8578063e74b981b146108c8578063ec342ad0146108e85761035b565b8063a9059cbb116100d1578063a9059cbb14610833578063b6b55f2514610853578063c19d93fb14610873578063dd62ed3e146108885761035b565b806395d89b41146107e957806397859a31146107fe578063a457c2d7146108135761035b565b8063772b9ca611610164578063877ff9171161013e578063877ff9171461077d5780638d64fd601461079d5780638da5cb5b146107bf57806392f73fc0146107d45761035b565b8063772b9ca61461071d5780637dcb03131461073d57806383240f831461075d5761035b565b806370897b23116101a057806370897b23146106a857806370a08231146106c857806370cf046e146106e8578063715018a6146107085761035b565b806351858e271461066b57806357eb040c1461068057806367a73d53146106935761035b565b80632c98e25d116102a0578063395093511161023e5780634276799511610218578063427679951461060157806345d05c8e14610616578063469048401461063657806347786d371461064b5761035b565b806339509351146105ae5780633d0e5efe146105ce5780633e54bacb146105ee5761035b565b8063313ce5671161027a578063313ce56714610540578063355274ea146105625780633687e7a91461057757806338d52e0f1461058c5761035b565b80632c98e25d146104eb5780632ce5183f146105005780632e1a7d4d146105205761035b565b806318160ddd1161030d5780631f173706116102e75780631f1737061461047657806323b872dd146104965780632ae781fe146104b65780632c507048146104cb5761035b565b806318160ddd1461042c5780631c7d4707146104415780631d341f3c146104565761035b565b806306fdde031461035d578063076e34d61461038857806307d81151146103aa578063095ea7b3146103ca57806313edaab4146103f7578063146ca531146104175761035b565b3661035b57005b005b34801561036957600080fd5b5061037261095a565b60405161037f9190613c46565b60405180910390f35b34801561039457600080fd5b5061039d6109f0565b60405161037f9190613e84565b3480156103b657600080fd5b5061035b6103c5366004613b2c565b6109f6565b3480156103d657600080fd5b506103ea6103e5366004613a74565b610aab565b60405161037f9190613c27565b34801561040357600080fd5b5061039d610412366004613b2c565b610ac9565b34801561042357600080fd5b5061039d610ae4565b34801561043857600080fd5b5061039d610aea565b34801561044d57600080fd5b5061039d610af0565b34801561046257600080fd5b5061035b610471366004613961565b610af6565b34801561048257600080fd5b5061039d610491366004613a74565b610cf7565b3480156104a257600080fd5b506103ea6104b1366004613a39565b610d14565b3480156104c257600080fd5b5061039d610d9c565b3480156104d757600080fd5b5061035b6104e6366004613a9d565b610da2565b3480156104f757600080fd5b5061035b610eff565b34801561050c57600080fd5b5061035b61051b366004613a74565b610fec565b34801561052c57600080fd5b5061035b61053b366004613b2c565b611072565b34801561054c57600080fd5b5061055561114c565b60405161037f9190613e9b565b34801561056e57600080fd5b5061039d611155565b34801561058357600080fd5b5061039d61115b565b34801561059857600080fd5b506105a1611161565b60405161037f9190613b9f565b3480156105ba57600080fd5b506103ea6105c9366004613a74565b611170565b3480156105da57600080fd5b5061039d6105e9366004613a74565b6111be565b61035b6105fc366004613b7e565b6111db565b34801561060d57600080fd5b5061039d611383565b34801561062257600080fd5b5061035b610631366004613b5c565b611392565b34801561064257600080fd5b506105a1611415565b34801561065757600080fd5b5061035b610666366004613b2c565b611424565b34801561067757600080fd5b5061035b6114c6565b61035b61068e366004613915565b611577565b34801561069f57600080fd5b5061039d6116b4565b3480156106b457600080fd5b5061035b6106c3366004613b2c565b6116ba565b3480156106d457600080fd5b5061039d6106e3366004613915565b611743565b3480156106f457600080fd5b5061039d610703366004613b2c565b61175e565b34801561071457600080fd5b5061035b611769565b34801561072957600080fd5b5061039d610738366004613b2c565b611815565b34801561074957600080fd5b5061039d610758366004613b2c565b611827565b34801561076957600080fd5b506105a1610778366004613b2c565b611839565b34801561078957600080fd5b5061035b610798366004613b2c565b611863565b3480156107a957600080fd5b506107b26118ea565b60405161037f9190613c32565b3480156107cb57600080fd5b506105a16118f8565b3480156107e057600080fd5b506105a1611907565b3480156107f557600080fd5b5061037261191c565b34801561080a57600080fd5b5061035b61197d565b34801561081f57600080fd5b506103ea61082e366004613a74565b611a10565b34801561083f57600080fd5b506103ea61084e366004613a74565b611a78565b34801561085f57600080fd5b5061035b61086e366004613b2c565b611a8c565b34801561087f57600080fd5b506107b2611b11565b34801561089457600080fd5b5061039d6108a336600461392f565b611b1a565b3480156108b457600080fd5b5061039d6108c3366004613b2c565b611b45565b3480156108d457600080fd5b5061035b6108e3366004613915565b611b57565b3480156108f457600080fd5b5061039d611bdb565b34801561090957600080fd5b5061035b610918366004613915565b611be1565b61035b611ce4565b34801561093157600080fd5b5061039d611e28565b34801561094657600080fd5b5061035b610955366004613b2c565b611e2e565b60368054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109e65780601f106109bb576101008083540402835291602001916109e6565b820191906000526020600020905b8154815290600101906020018083116109c957829003601f168201915b5050505050905090565b60ca5481565b600060c95460ff166002811115610a0957fe5b14610a2f5760405162461bcd60e51b8152600401610a2690613db8565b60405180910390fd5b610a393382611eb7565b33600090815260d56020908152604080832060d4548452909152902054610a609082611fb3565b33600090815260d56020908152604080832060d480548552908352818420949094559254825260d790522054610a969082611fb3565b60d454600090815260d7602052604090205550565b6000610abf610ab861200d565b8484612011565b5060015b92915050565b6000610adc82610ad76120fd565b612118565b90505b919050565b60d45481565b60355490565b60d25481565b600054610100900460ff1680610b0f5750610b0f612160565b80610b1d575060005460ff16155b610b585760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015610b83576000805460ff1961ff0019909116610100171660011790555b610b8b612171565b610b95858561221a565b610b9e866122d0565b610ba66122e6565b610baf88611be1565b60ce80546001600160a01b03808c166001600160a01b03199283161790925560cf8054928a169290911691909117905560005b8351811015610caa5760005b81811015610c5657848181518110610c0257fe5b60200260200101516001600160a01b0316858381518110610c1f57fe5b60200260200101516001600160a01b03161415610c4e5760405162461bcd60e51b8152600401610a2690613e10565b600101610bee565b5060d0848281518110610c6557fe5b60209081029190910181015182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501610be2565b5060c980544260d155600160ff199091161762010000600160b01b031916620100006001600160a01b038516021790558015610cec576000805461ff00191690555b505050505050505050565b60d660209081526000928352604080842090915290825290205481565b6000610d21848484612383565b610d9184610d2d61200d565b610d8c85604051806060016040528060288152602001614036602891396001600160a01b038a16600090815260346020526040812090610d6b61200d565b6001600160a01b0316815260208101919091526040016000205491906124e0565b612011565b5060015b9392505050565b60cb5481565b610daa61200d565b6001600160a01b0316610dbb6118f8565b6001600160a01b031614610e04576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b600160c95460ff166002811115610e1757fe5b14610e345760405162461bcd60e51b8152600401610a2690613e61565b60c9805460ff19169055604051600080516020613ff583398151915290610e5d90600090613c32565b60405180910390a160d0548114610e865760405162461bcd60e51b8152600401610a2690613d37565b7f208d5f48745fe6e322f9885ee63d75875a3325c8c80eb378c080dff1659989cd8282604051610eb7929190613bed565b60405180910390a1610efb82828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061257792505050565b5050565b610f0761200d565b6001600160a01b0316610f186118f8565b6001600160a01b031614610f61576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b600260c95460ff166002811115610f7457fe5b14610f915760405162461bcd60e51b8152600401610a2690613c99565b60c9805460ff610100820416919060ff19166001836002811115610fb157fe5b0217905550600080516020613ff583398151915260c960019054906101000a900460ff16604051610fe29190613c32565b60405180910390a1565b60d454811061100d5760405162461bcd60e51b8152600401610a2690613cbd565b6001600160a01b038216600090815260d660209081526040808320848452825280832080549084905560d883528184205460d99093529083205490929161105f91611059908590612745565b9061279e565b905061106c308583612383565b50505050565b600260655414156110b8576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606555600160c95460ff1660028111156110d057fe5b146110ed5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff16600281111561110057fe5b141561111e5760405162461bcd60e51b8152600401610a2690613d95565b600061112982612805565b60ce54909150611143906001600160a01b0316338361285e565b50506001606555565b60385460ff1690565b60d35481565b60d15481565b60ce546001600160a01b031681565b6000610abf61117d61200d565b84610d8c856034600061118e61200d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611fb3565b60d560209081526000928352604080842090915290825290205481565b600160c95460ff1660028111156111ee57fe5b1461120b5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff16600281111561121e57fe5b141561123c5760405162461bcd60e51b8152600401610a2690613d95565b60026065541415611282576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b600260655560c9546112a5906201000090046001600160a01b03163330856128b0565b60c95460405163c7cdea3760e01b8152620100009091046001600160a01b03169063c7cdea37906112dc9085908590600401613e8d565b600060405180830381600087803b1580156112f657600080fd5b505af115801561130a573d6000803e3d6000fd5b5050505047915060ce60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561136157600080fd5b505af1158015611375573d6000803e3d6000fd5b50505050506111438261290a565b600061138d6120fd565b905090565b600060c95460ff1660028111156113a557fe5b146113c25760405162461bcd60e51b8152600401610a2690613db8565b600260c95460ff1660028111156113d557fe5b14156113f35760405162461bcd60e51b8152600401610a2690613d95565b60ce5461140b906001600160a01b03163330856128b0565b610efb82826129ab565b60cf546001600160a01b031681565b61142c61200d565b6001600160a01b031661143d6118f8565b6001600160a01b031614611486576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b60d38190556040517f3c8eb7c49d332f4c1e4d92a27cda93c31cc9452f7a408e0c6109fcddbc9946ea906114bb908390613e84565b60405180910390a150565b6114ce61200d565b6001600160a01b03166114df6118f8565b6001600160a01b031614611528576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b60c9805460ff8116919061ff00191661010083600281111561154657fe5b021790555060c9805460ff19166002908117909155604051600080516020613ff583398151915291610fe291613c32565b600260655414156115bd576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606581905560c95460ff1660028111156115d557fe5b14156115f35760405162461bcd60e51b8152600401610a2690613d95565b600060c95460ff16600281111561160657fe5b146116235760405162461bcd60e51b8152600401610a2690613db8565b34806116415760405162461bcd60e51b8152600401610a2690613d1b565b60ce60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050505061114381836129ab565b60cc5481565b6116c261200d565b6001600160a01b03166116d36118f8565b6001600160a01b03161461171c576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b61271081111561173e5760405162461bcd60e51b8152600401610a2690613dd9565b60ca55565b6001600160a01b031660009081526033602052604090205490565b6000610adc82612a43565b61177161200d565b6001600160a01b03166117826118f8565b6001600160a01b0316146117cb576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b6097546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3609780546001600160a01b0319169055565b60d96020526000908152604090205481565b60d86020526000908152604090205481565b60d0818154811061184957600080fd5b6000918252602090912001546001600160a01b0316905081565b600260655414156118a9576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606581905560c95460ff1660028111156118c157fe5b14156118df5760405162461bcd60e51b8152600401610a2690613d95565b600061112982612a66565b60c954610100900460ff1681565b6097546001600160a01b031690565b60c9546201000090046001600160a01b031681565b60378054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109e65780601f106109bb576101008083540402835291602001916109e6565b600060c95460ff16600281111561199057fe5b146119ad5760405162461bcd60e51b8152600401610a2690613db8565b60c9805460ff19166001908117909155604051600080516020613ff5833981519152916119d991613c32565b60405180910390a16119e9612b39565b6119f1612caf565b6119f9612de4565b60d454611a07906001611fb3565b60d4554260d155565b6000610abf611a1d61200d565b84610d8c856040518060600160405280602581526020016141126025913960346000611a4761200d565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906124e0565b6000610abf611a8561200d565b8484612383565b600160c95460ff166002811115611a9f57fe5b14611abc5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff166002811115611acf57fe5b1415611aed5760405162461bcd60e51b8152600401610a2690613d95565b60ce54611b05906001600160a01b03163330846128b0565b611b0e8161290a565b50565b60c95460ff1681565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60d76020526000908152604090205481565b611b5f61200d565b6001600160a01b0316611b706118f8565b6001600160a01b031614611bb9576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b60cf80546001600160a01b0319166001600160a01b0392909216919091179055565b61271081565b611be961200d565b6001600160a01b0316611bfa6118f8565b6001600160a01b031614611c43576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b6001600160a01b038116611c885760405162461bcd60e51b8152600401808060200182810382526026815260200180613f336026913960400191505060405180910390fd5b6097546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3609780546001600160a01b0319166001600160a01b0392909216919091179055565b60026065541415611d2a576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b6002606555600160c95460ff166002811115611d4257fe5b14611d5f5760405162461bcd60e51b8152600401610a2690613e61565b600260c95460ff166002811115611d7257fe5b1415611d905760405162461bcd60e51b8152600401610a2690613d95565b3480611dae5760405162461bcd60e51b8152600401610a2690613d1b565b60ce60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015611dfe57600080fd5b505af1158015611e12573d6000803e3d6000fd5b5050505050611e208161290a565b506001606555565b60cd5481565b611e3661200d565b6001600160a01b0316611e476118f8565b6001600160a01b031614611e90576040805162461bcd60e51b8152602060048201819052602482015260008051602061405e833981519152604482015290519081900360640190fd5b612710811115611eb25760405162461bcd60e51b8152600401610a2690613dd9565b60cb55565b6001600160a01b038216611efc5760405162461bcd60e51b815260040180806020018281038252602181526020018061407e6021913960400191505060405180910390fd5b611f08826000836122cb565b611f4581604051806060016040528060228152602001613f11602291396001600160a01b03851660009081526033602052604090205491906124e0565b6001600160a01b038316600090815260336020526040902055603554611f6b9082612e92565b6035556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082820183811015610d95576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6001600160a01b0383166120565760405162461bcd60e51b81526004018080602001828103825260248152602001806140c46024913960400191505060405180910390fd5b6001600160a01b03821661209b5760405162461bcd60e51b8152600401808060200182810382526022815260200180613f596022913960400191505060405180910390fd5b6001600160a01b03808416600081815260346020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061138d61210a612eef565b612112612fa6565b90611fb3565b60d454600090815260d76020526040812054819061213890612112610aea565b90506000811561215557612150846110598785612745565b612157565b845b95945050505050565b600061216b3061303f565b15905090565b600054610100900460ff168061218a575061218a612160565b80612198575060005460ff16155b6121d35760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156121fe576000805460ff1961ff0019909116610100171660011790555b612206613045565b8015611b0e576000805461ff001916905550565b600054610100900460ff16806122335750612233612160565b80612241575060005460ff16155b61227c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156122a7576000805460ff1961ff0019909116610100171660011790555b6122af6130eb565b6122b9838361318b565b80156122cb576000805461ff00191690555b505050565b6038805460ff191660ff92909216919091179055565b600054610100900460ff16806122ff57506122ff612160565b8061230d575060005460ff16155b6123485760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015612373576000805460ff1961ff0019909116610100171660011790555b61237b6130eb565b612206613263565b6001600160a01b0383166123c85760405162461bcd60e51b815260040180806020018281038252602581526020018061409f6025913960400191505060405180910390fd5b6001600160a01b03821661240d5760405162461bcd60e51b8152600401808060200182810382526023815260200180613ece6023913960400191505060405180910390fd5b6124188383836122cb565b61245581604051806060016040528060268152602001613f7b602691396001600160a01b03861660009081526033602052604090205491906124e0565b6001600160a01b0380851660009081526033602052604080822093909355908416815220546124849082611fb3565b6001600160a01b0380841660008181526033602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561256f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561253457818101518382015260200161251c565b50505050905090810190601f1680156125615780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600260655414156125bd576040805162461bcd60e51b815260206004820152601f6024820152600080516020613ef1833981519152604482015290519081900360640190fd5b600260655560006125cc612fa6565b60d281905590506000805b60d05460ff821610156127195761260d848260ff16815181106125f657fe5b602002602001015183611fb390919063ffffffff16565b91506127108211156126315760405162461bcd60e51b8152600401610a2690613ce4565b6000612662612710611059878560ff168151811061264b57fe5b60200260200101518761274590919063ffffffff16565b905080156127105761269f60d08360ff168154811061267d57fe5b60009182526020909120015460ce546001600160a01b0390811691168361285e565b60d08260ff16815481106126af57fe5b600091825260208220015460408051630fcbbccb60e41b815290516001600160a01b039092169263fcbbccb09260048084019382900301818387803b1580156126f757600080fd5b505af115801561270b573d6000803e3d6000fd5b505050505b506001016125d7565b50612710811461273b5760405162461bcd60e51b8152600401610a2690613d5e565b5050600160655550565b60008261275457506000610ac3565b8282028284828161276157fe5b0414610d955760405162461bcd60e51b81526004018080602001828103825260218152602001806140156021913960400191505060405180910390fd5b60008082116127f4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816127fd57fe5b049392505050565b60008061281183612a43565b905061281d3384611eb7565b7ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56833828560405161285093929190613bb3565b60405180910390a192915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526122cb90849061335c565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261106c90859061335c565b60006129146120fd565b9050600061292061340d565b905060d35481106129435760405162461bcd60e51b8152600401610a2690613e3b565b600061294f8385612e92565b9050600061295d8583612118565b90507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1533868360405161299293929190613bb3565b60405180910390a16129a4338261349a565b5050505050565b60006129b561340d565b905060d35481106129d85760405162461bcd60e51b8152600401610a2690613e3b565b6001600160a01b038216600090815260d66020908152604080832060d4548452909152902054612a089084611fb3565b6001600160a01b038316600090815260d66020908152604080832060d454845290915290205560cd54612a3b9084611fb3565b60cd55505050565b600080612a4e610aea565b9050610d9581611059612a5f6120fd565b8690612745565b600060d4548210612a895760405162461bcd60e51b8152600401610a2690613cbd565b33600090815260d56020908152604080832085845282528083205460d983528184205460d890935290832054909291612ac791611059908590612745565b33600090815260d56020908152604080832088845290915281205560cc54909150612af29082612e92565b60cc8190556040517f2752b54b0cee0996ce85f61566a16bf640f35b379d184dabfad432bd5943257b91612b2a913391908890613bb3565b60405180910390a19392505050565b60005b60d05460ff82161015611b0e5760d08160ff1681548110612b5957fe5b60009182526020822001546040805163c393d0e360e01b815290516001600160a01b039092169263c393d0e39260048084019382900301818387803b158015612ba157600080fd5b505af1158015612bb5573d6000803e3d6000fd5b505060ce5460d08054600094506001600160a01b0390921692506370a082319160ff8616908110612be257fe5b6000918252602090912001546040516001600160e01b031960e084901b168152612c18916001600160a01b031690600401613b9f565b60206040518083038186803b158015612c3057600080fd5b505afa158015612c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c689190613b44565b90508015612ca657612ca660d08360ff1681548110612c8357fe5b60009182526020909120015460ce546001600160a01b03908116911630846128b0565b50600101612b3c565b6000612cb9612fa6565b9050600060d254821115612cd85760d254612cd5908390612e92565b90505b6000612cf561271061105960ca548561274590919063ffffffff16565b90506000612d346127106110596301e13380611059612d1f60d15442612e9290919063ffffffff16565b60cb5460d254612d2e91612745565b90612745565b90506000612d428383611fb3565b905083811115612d4f5750825b600060d25560ce5460cf5460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92612d8a929116908590600401613bd4565b602060405180830381600087803b158015612da457600080fd5b505af1158015612db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddc9190613b0c565b505050505050565b6000612dee612fa6565b90506000612dfa610aea565b60d454600090815260d76020526040812054919250612e198383611fb3565b60d48054600090815260d9602090815260408083208590559254825260d89052908120869055909150612e50826110598588612745565b60cc54909150612e609082611fb3565b60cc5560cd54600090612e799087906110599086612745565b9050612e85308261349a565b5050600060cd5550505050565b600082821115612ee9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600080805b60d054811015612fa057612f9660d08281548110612f0e57fe5b6000918252602091829020015460408051630d3132df60e31b815290516001600160a01b039092169263698996f892600480840193829003018186803b158015612f5757600080fd5b505afa158015612f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8f9190613b44565b8390611fb3565b9150600101612ef4565b50905090565b60cc5460cd5460ce546040516370a0823160e01b815260009361138d939092613039926001600160a01b03909116906370a0823190612fe9903090600401613b9f565b60206040518083038186803b15801561300157600080fd5b505afa158015613015573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130399190613b44565b90612e92565b3b151590565b600054610100900460ff168061305e575061305e612160565b8061306c575060005460ff16155b6130a75760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156130d2576000805460ff1961ff0019909116610100171660011790555b60016065558015611b0e576000805461ff001916905550565b600054610100900460ff16806131045750613104612160565b80613112575060005460ff16155b61314d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015612206576000805460ff1961ff0019909116610100171660011790558015611b0e576000805461ff001916905550565b600054610100900460ff16806131a457506131a4612160565b806131b2575060005460ff16155b6131ed5760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff16158015613218576000805460ff1961ff0019909116610100171660011790555b825161322b906036906020860190613764565b50815161323f906037906020850190613764565b506038805460ff1916601217905580156122cb576000805461ff0019169055505050565b600054610100900460ff168061327c575061327c612160565b8061328a575060005460ff16155b6132c55760405162461bcd60e51b815260040180806020018281038252602e815260200180613fc7602e913960400191505060405180910390fd5b600054610100900460ff161580156132f0576000805460ff1961ff0019909116610100171660011790555b60006132fa61200d565b609780546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611b0e576000805461ff001916905550565b60006133b1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661358c9092919063ffffffff16565b8051909150156122cb578080602001905160208110156133d057600080fd5b50516122cb5760405162461bcd60e51b815260040180806020018281038252602a8152602001806140e8602a913960400191505060405180910390fd5b600061138d61341a612eef565b60ce546040516370a0823160e01b81526001600160a01b03909116906370a082319061344a903090600401613b9f565b60206040518083038186803b15801561346257600080fd5b505afa158015613476573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121129190613b44565b6001600160a01b0382166134f5576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b613501600083836122cb565b60355461350e9082611fb3565b6035556001600160a01b0382166000908152603360205260409020546135349082611fb3565b6001600160a01b03831660008181526033602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b606061359b84846000856135a3565b949350505050565b6060824710156135e45760405162461bcd60e51b8152600401808060200182810382526026815260200180613fa16026913960400191505060405180910390fd5b6135ed8561303f565b61363e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061367c5780518252601f19909201916020918201910161365d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146136de576040519150601f19603f3d011682016040523d82523d6000602084013e6136e3565b606091505b50915091506136f38282866136fe565b979650505050505050565b6060831561370d575081610d95565b82511561371d5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561253457818101518382015260200161251c565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261379a57600085556137e0565b82601f106137b357805160ff19168380011785556137e0565b828001600101855582156137e0579182015b828111156137e05782518255916020019190600101906137c5565b506137ec9291506137f0565b5090565b5b808211156137ec57600081556001016137f1565b80356001600160a01b0381168114610adf57600080fd5b600082601f83011261382c578081fd5b8135602067ffffffffffffffff82111561384257fe5b808202613850828201613ea9565b83815282810190868401838801850189101561386a578687fd5b8693505b858410156138935761387f81613805565b83526001939093019291840191840161386e565b50979650505050505050565b600082601f8301126138af578081fd5b813567ffffffffffffffff8111156138c357fe5b6138d6601f8201601f1916602001613ea9565b8181528460208386010111156138ea578283fd5b816020850160208301379081016020019190915292915050565b803560ff81168114610adf57600080fd5b600060208284031215613926578081fd5b610d9582613805565b60008060408385031215613941578081fd5b61394a83613805565b915061395860208401613805565b90509250929050565b600080600080600080600080610100898b03121561397d578384fd5b61398689613805565b975061399460208a01613805565b96506139a260408a01613805565b95506139b060608a01613904565b9450608089013567ffffffffffffffff808211156139cc578586fd5b6139d88c838d0161389f565b955060a08b01359150808211156139ed578485fd5b6139f98c838d0161389f565b945060c08b0135915080821115613a0e578384fd5b50613a1b8b828c0161381c565b925050613a2a60e08a01613805565b90509295985092959890939650565b600080600060608486031215613a4d578283fd5b613a5684613805565b9250613a6460208501613805565b9150604084013590509250925092565b60008060408385031215613a86578182fd5b613a8f83613805565b946020939093013593505050565b60008060208385031215613aaf578182fd5b823567ffffffffffffffff80821115613ac6578384fd5b818501915085601f830112613ad9578384fd5b813581811115613ae7578485fd5b8660208083028501011115613afa578485fd5b60209290920196919550909350505050565b600060208284031215613b1d578081fd5b81518015158114610d95578182fd5b600060208284031215613b3d578081fd5b5035919050565b600060208284031215613b55578081fd5b5051919050565b60008060408385031215613b6e578182fd5b8235915061395860208401613805565b60008060408385031215613b90578182fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b03929092168252602082015260400190565b6020808252810182905260006001600160fb1b03831115613c0c578081fd5b60208302808560408501379190910160400190815292915050565b901515815260200190565b6020810160038310613c4057fe5b91905290565b6000602080835283518082850152825b81811015613c7257858101830151858201604001528201613c56565b81811115613c835783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600a908201526921456d657267656e637960b01b604082015260600190565b6020808252600d908201526c125b9d985b1a59081c9bdd5b99609a1b604082015260600190565b60208082526019908201527f50455243454e544147455f53554d5f4558434545445f4d415800000000000000604082015260600190565b602080825260029082015261279b60f11b604082015260600190565b6020808252600d908201526c1253959053125117d253941555609a1b604082015260600190565b60208082526018908201527f50455243454e544147455f444f45534e545f4144445f55500000000000000000604082015260600190565b602080825260099082015268456d657267656e637960b81b604082015260600190565b60208082526007908201526608531bd8dad95960ca1b604082015260600190565b6020808252601d908201527f25206d757374206265206265747765656e203020616e64203130303030000000604082015260600190565b602080825260119082015270323ab83634b1b0ba32b21030b1ba34b7b760791b604082015260600190565b6020808252600c908201526b10d85c08195e18d95959195960a21b604082015260600190565b60208082526009908201526808555b9b1bd8dad95960ba1b604082015260600190565b90815260200190565b918252602082015260400190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613ec557fe5b60405291905056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735265656e7472616e637947756172643a207265656e7472616e742063616c6c0045524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656423ad33ab6a13a00aa7d06cd167b2abd03dec86af3cf3cc91759dcd3ae8411887536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220852b9e49efda34fca7d5c97cc0cb9799e48ba1c7cf4386bd1991753b0d47354764736f6c63430007060033

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

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