ETH Price: $3,063.54 (-1.29%)

Contract

0x8b05279b2892cbB0dC542d35EAFB49d05eFF3Be9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Harvest175553222023-06-25 8:30:59512 days ago1687681859IN
0x8b05279b...05eFF3Be9
0 ETH0.0208749513.48498022
Harvest175363552023-06-22 16:30:59514 days ago1687451459IN
0x8b05279b...05eFF3Be9
0 ETH0.0294781220.33305063
Harvest175164702023-06-19 21:30:59517 days ago1687210259IN
0x8b05279b...05eFF3Be9
0 ETH0.0208448313.62266102
Harvest174953782023-06-16 22:30:59520 days ago1686954659IN
0x8b05279b...05eFF3Be9
0 ETH0.0320788322.2263415
Harvest174761262023-06-14 5:30:47523 days ago1686720647IN
0x8b05279b...05eFF3Be9
0 ETH0.0225545715.6210794
Harvest174571772023-06-11 13:30:47526 days ago1686490247IN
0x8b05279b...05eFF3Be9
0 ETH0.0295440518.82167251
Harvest174376562023-06-08 19:30:47528 days ago1686252647IN
0x8b05279b...05eFF3Be9
0 ETH0.0365361824.51068342
Harvest174199472023-06-06 7:30:59531 days ago1686036659IN
0x8b05279b...05eFF3Be9
0 ETH0.031806521.40474106
Harvest174022322023-06-03 19:30:59533 days ago1685820659IN
0x8b05279b...05eFF3Be9
0 ETH0.0348030223.16698504
Harvest173856742023-06-01 11:30:47536 days ago1685619047IN
0x8b05279b...05eFF3Be9
0 ETH0.0493618232.8631001
Harvest173685042023-05-30 1:30:59538 days ago1685410259IN
0x8b05279b...05eFF3Be9
0 ETH0.037241323.90720429
Harvest173503992023-05-27 12:30:47541 days ago1685190647IN
0x8b05279b...05eFF3Be9
0 ETH0.0410155229.24053408
Harvest173343972023-05-25 6:30:47543 days ago1684996247IN
0x8b05279b...05eFF3Be9
0 ETH0.0498611932.54071815
Harvest173184042023-05-23 0:30:47545 days ago1684801847IN
0x8b05279b...05eFF3Be9
0 ETH0.0511169235.96235307
Harvest173030142023-05-20 20:30:47547 days ago1684614647IN
0x8b05279b...05eFF3Be9
0 ETH0.0430410731.15047368
Harvest172846782023-05-18 6:32:35550 days ago1684391555IN
0x8b05279b...05eFF3Be9
0 ETH0.0619187240
Harvest172646052023-05-15 10:31:11553 days ago1684146671IN
0x8b05279b...05eFF3Be9
0 ETH0.0579376840
Harvest172487092023-05-13 4:30:59555 days ago1683952259IN
0x8b05279b...05eFF3Be9
0 ETH0.0626740
Harvest172179942023-05-08 19:57:59559 days ago1683575879IN
0x8b05279b...05eFF3Be9
0 ETH0.17213111108.66918324
Harvest171621452023-04-30 23:30:59567 days ago1682897459IN
0x8b05279b...05eFF3Be9
0 ETH0.0583352337.73779506
Harvest171470152023-04-28 20:30:59569 days ago1682713859IN
0x8b05279b...05eFF3Be9
0 ETH0.0544313239.75268556
Harvest171304812023-04-26 12:44:47572 days ago1682513087IN
0x8b05279b...05eFF3Be9
0 ETH0.0552315439.87250174
Harvest171167782023-04-24 14:35:47573 days ago1682346947IN
0x8b05279b...05eFF3Be9
0 ETH0.0546562440
Harvest171029222023-04-22 15:57:59575 days ago1682179079IN
0x8b05279b...05eFF3Be9
0 ETH0.0458332533.24425239
Harvest171028432023-04-22 15:42:11575 days ago1682178131IN
0x8b05279b...05eFF3Be9
0 ETH0.0605271735.53705296
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
175718162023-06-27 16:17:23509 days ago1687882643
0x8b05279b...05eFF3Be9
4.73835317 ETH
175718162023-06-27 16:17:23509 days ago1687882643
0x8b05279b...05eFF3Be9
1.18458829 ETH
175718162023-06-27 16:17:23509 days ago1687882643
0x8b05279b...05eFF3Be9
5.45992279 ETH
175718162023-06-27 16:17:23509 days ago1687882643
0x8b05279b...05eFF3Be9
0.46301867 ETH
175553222023-06-25 8:30:59512 days ago1687681859
0x8b05279b...05eFF3Be9
6.03780186 ETH
175553222023-06-25 8:30:59512 days ago1687681859
0x8b05279b...05eFF3Be9
1.50945046 ETH
175553222023-06-25 8:30:59512 days ago1687681859
0x8b05279b...05eFF3Be9
6.96972043 ETH
175553222023-06-25 8:30:59512 days ago1687681859
0x8b05279b...05eFF3Be9
0.57753189 ETH
175363552023-06-22 16:30:59514 days ago1687451459
0x8b05279b...05eFF3Be9
5.9327843 ETH
175363552023-06-22 16:30:59514 days ago1687451459
0x8b05279b...05eFF3Be9
1.48319607 ETH
175363552023-06-22 16:30:59514 days ago1687451459
0x8b05279b...05eFF3Be9
6.80287154 ETH
175363552023-06-22 16:30:59514 days ago1687451459
0x8b05279b...05eFF3Be9
0.61310883 ETH
175164702023-06-19 21:30:59517 days ago1687210259
0x8b05279b...05eFF3Be9
5.99939294 ETH
175164702023-06-19 21:30:59517 days ago1687210259
0x8b05279b...05eFF3Be9
1.49984823 ETH
175164702023-06-19 21:30:59517 days ago1687210259
0x8b05279b...05eFF3Be9
6.89429403 ETH
175164702023-06-19 21:30:59517 days ago1687210259
0x8b05279b...05eFF3Be9
0.60494714 ETH
174953782023-06-16 22:30:59520 days ago1686954659
0x8b05279b...05eFF3Be9
6.00447924 ETH
174953782023-06-16 22:30:59520 days ago1686954659
0x8b05279b...05eFF3Be9
1.50111981 ETH
174953782023-06-16 22:30:59520 days ago1686954659
0x8b05279b...05eFF3Be9
6.87157132 ETH
174953782023-06-16 22:30:59520 days ago1686954659
0x8b05279b...05eFF3Be9
0.63402773 ETH
174761262023-06-14 5:30:47523 days ago1686720647
0x8b05279b...05eFF3Be9
5.94446223 ETH
174761262023-06-14 5:30:47523 days ago1686720647
0x8b05279b...05eFF3Be9
1.48611555 ETH
174761262023-06-14 5:30:47523 days ago1686720647
0x8b05279b...05eFF3Be9
6.81557966 ETH
174761262023-06-14 5:30:47523 days ago1686720647
0x8b05279b...05eFF3Be9
0.61499813 ETH
174571772023-06-11 13:30:47526 days ago1686490247
0x8b05279b...05eFF3Be9
5.82936196 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrategyPETHConvex

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 16 : StrategyPETHConvex.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "../../../interfaces/ICurve.sol";
import "../../../interfaces/I3CRVZap.sol";
import "../../../interfaces/IBooster.sol";
import "../../../interfaces/IBaseRewardPool.sol";

import "../../../interfaces/IPETHVaultForDAO.sol";

import "../../../interfaces/IStrategy.sol";

/// @title JPEG'd PEWTH Convex autocompounding strategy
/// @notice This strategy autocompounds Convex rewards from the PETH/ETH Curve pool.
/// @dev The strategy deposits either ETH or PETH in the Curve pool depending on which one has lower liquidity.
/// The strategy sells reward tokens for ETH. If the pool has less PETH than ETH, this contract uses the
/// ETH to mint PETH
contract StrategyPETHConvex is AccessControl, IStrategy {
    using SafeERC20 for IERC20;
    using SafeERC20 for ICurve;

    event Harvested(uint256 wantEarned);

    struct Rate {
        uint128 numerator;
        uint128 denominator;
    }

    /// @param booster Convex Booster's address
    /// @param baseRewardPool Convex BaseRewardPool's address
    /// @param pid The Convex pool id for PETH/ETH LP tokens
    struct ConvexConfig {
        IBooster booster;
        IBaseRewardPool baseRewardPool;
        uint256 pid;
    }

    /// @param lp The curve LP token
    /// @param ethIndex The eth index in the curve LP pool
    struct CurveConfig {
        ICurve lp;
        uint256 ethIndex;
    }

    /// @param vault The strategy's vault
    /// @param ethVault The JPEG'd ETH vault address
    struct StrategyConfig {
        address vault;
        IPETHVaultForDAO ethVault;
    }

    struct StrategyTokens {
        ICurve want;
        IERC20 peth;
        IERC20 cvx;
        IERC20 crv;
    }

    bytes32 public constant STRATEGIST_ROLE = keccak256("STRATEGIST_ROLE");

    StrategyTokens public strategyTokens;

    address public feeRecipient;

    CurveConfig public cvxEth;
    CurveConfig public crvEth;
    CurveConfig public pethEth;

    ConvexConfig public convexConfig;
    StrategyConfig public strategyConfig;

    /// @notice The performance fee to be sent to the DAO/strategists
    Rate public performanceFee;

    /// @notice lifetime strategy earnings denominated in `want` token
    uint256 public earned;

    /// @param _strategyTokens tokens relevant to this strategy
    /// @param _feeAddress The fee recipient address
    /// @param _cvxEth See {CurveSwapConfig}
    /// @param _crvEth See {CurveSwapConfig}
    /// @param _convexConfig See {ConvexConfig} struct
    /// @param _strategyConfig See {StrategyConfig} struct
    /// @param _performanceFee The rate of ETH to be sent to the DAO/strategists
    constructor(
        StrategyTokens memory _strategyTokens,
        address _feeAddress,
        CurveConfig memory _cvxEth,
        CurveConfig memory _crvEth,
        CurveConfig memory _pethEth,
        ConvexConfig memory _convexConfig,
        StrategyConfig memory _strategyConfig,
        Rate memory _performanceFee
    ) {
        require(address(_strategyTokens.want) != address(0), "INVALID_WANT");
        require(address(_strategyTokens.peth) != address(0), "INVALID_PETH");

        require(address(_strategyTokens.cvx) != address(0), "INVALID_CVX");
        require(address(_strategyTokens.crv) != address(0), "INVALID_CRV");

        require(address(_cvxEth.lp) != address(0), "INVALID_CVXETH_LP");
        require(address(_crvEth.lp) != address(0), "INVALID_CRVETH_LP");
        require(address(_pethEth.lp) != address(0), "INVALID_PETHETH_LP");
        require(_cvxEth.ethIndex < 2, "INVALID_ETH_INDEX");
        require(_crvEth.ethIndex < 2, "INVALID_ETH_INDEX");
        require(_pethEth.ethIndex < 2, "INVALID_ETH_INDEX");

        require(
            address(_convexConfig.booster) != address(0),
            "INVALID_CONVEX_BOOSTER"
        );
        require(
            address(_convexConfig.baseRewardPool) != address(0),
            "INVALID_CONVEX_BASE_REWARD_POOL"
        );
        require(address(_strategyConfig.vault) != address(0), "INVALID_VAULT");
        require(
            address(_strategyConfig.ethVault) != address(0),
            "INVALID_ETH_VAULT"
        );

        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        setFeeRecipient(_feeAddress);
        setPerformanceFee(_performanceFee);

        strategyTokens = _strategyTokens;

        feeRecipient = _feeAddress;

        cvxEth = _cvxEth;
        crvEth = _crvEth;
        pethEth = _pethEth;

        convexConfig = _convexConfig;
        strategyConfig = _strategyConfig;

        _strategyTokens.want.safeApprove(
            address(_convexConfig.booster),
            type(uint256).max
        );
        _strategyTokens.cvx.safeApprove(address(_cvxEth.lp), type(uint256).max);
        _strategyTokens.crv.safeApprove(address(_crvEth.lp), type(uint256).max);
        _strategyTokens.peth.safeApprove(
            address(_pethEth.lp),
            type(uint256).max
        );
    }

    modifier onlyVault() {
        require(msg.sender == address(strategyConfig.vault), "NOT_VAULT");
        _;
    }

    receive() external payable {
    }

    /// @notice Allows the DAO to set the performance fee
    /// @param _performanceFee The new performance fee
    function setPerformanceFee(Rate memory _performanceFee)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(
            _performanceFee.denominator != 0 &&
                _performanceFee.denominator >= _performanceFee.numerator,
            "INVALID_RATE"
        );
        performanceFee = _performanceFee;
    }

    /// @notice Allows the DAO to set the ETH vault
    /// @param _vault The new ETH vault
    function setETHVault(address _vault)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(_vault != address(0), "INVALID_ETH_VAULT");
        strategyConfig.ethVault = IPETHVaultForDAO(_vault);
    }

    function setFeeRecipient(address _newRecipient)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(_newRecipient != address(0), "INVALID_FEE_RECIPIENT");

        feeRecipient = _newRecipient;
    }

    /// @return The amount of `want` tokens held by this contract
    function heldAssets() public view returns (uint256) {
        return strategyTokens.want.balanceOf(address(this));
    }

    /// @return The amount of `want` tokens deposited in the Convex pool by this contract
    function depositedAssets() public view returns (uint256) {
        return convexConfig.baseRewardPool.balanceOf(address(this));
    }

    /// @return The total amount of `want` tokens this contract manages (held + deposited)
    function totalAssets() external view override returns (uint256) {
        return heldAssets() + depositedAssets();
    }

    /// @notice Allows anyone to deposit the total amount of `want` tokens in this contract into Convex
    function deposit() public override {
        ConvexConfig memory convex = convexConfig;
        convex.booster.depositAll(convex.pid, true);
    }

    /// @notice Controller only function that allows to withdraw non-strategy tokens (e.g tokens sent accidentally).
    /// CVX and CRV can be withdrawn with this function.
    function withdraw(address _to, address _asset)
        external
        override
        onlyRole(STRATEGIST_ROLE)
    {
        require(_to != address(0), "INVALID_ADDRESS");
        require(address(strategyTokens.want) != _asset, "want");
        require(address(strategyTokens.peth) != _asset, "peth");

        uint256 balance = IERC20(_asset).balanceOf(address(this));
        IERC20(_asset).safeTransfer(_to, balance);
    }

    /// @notice Allows the controller to withdraw `want` tokens. Normally used with a vault withdrawal
    /// @param _to The address to send the tokens to
    /// @param _amount The amount of `want` tokens to withdraw
    function withdraw(address _to, uint256 _amount)
        external
        override
        onlyVault
    {
        ICurve _want = strategyTokens.want;

        uint256 balance = _want.balanceOf(address(this));
        //if the contract doesn't have enough want, withdraw from Convex
        if (balance < _amount) {
            unchecked {
                convexConfig.baseRewardPool.withdrawAndUnwrap(
                    _amount - balance,
                    false
                );
            }
        }

        _want.safeTransfer(_to, _amount);
    }

    /// @notice Allows the controller to withdraw all `want` tokens. Normally used when migrating strategies
    function withdrawAll() external override onlyVault {
        ICurve _want = strategyTokens.want;

        convexConfig.baseRewardPool.withdrawAllAndUnwrap(true);

        uint256 balance = _want.balanceOf(address(this));
        _want.safeTransfer(msg.sender, balance);
    }

    /// @notice Allows members of the `STRATEGIST_ROLE` to compound Convex rewards into Curve
    /// @param minOutCurve The minimum amount of `want` tokens to receive
    function harvest(uint256 minOutCurve) external onlyRole(STRATEGIST_ROLE) {
        convexConfig.baseRewardPool.getReward(address(this), true);
        
        uint256 ethBalance;
        //Prevent `Stack too deep` errors
        {
            uint256 cvxBalance = strategyTokens.cvx.balanceOf(address(this));
            if (cvxBalance > 0) {
                CurveConfig memory _cvxEth = cvxEth;
                //minOut is not needed here, we already have it on the Curve deposit
                _cvxEth.lp.exchange(
                    1 - _cvxEth.ethIndex,
                    _cvxEth.ethIndex,
                    cvxBalance,
                    0,
                    true
                );
            }

            uint256 crvBalance = strategyTokens.crv.balanceOf(address(this));
            if (crvBalance > 0) {
                CurveConfig memory _crvEth = crvEth;
                //minOut is not needed here, we already have it on the Curve deposit
                _crvEth.lp.exchange(
                    1 - _crvEth.ethIndex,
                    _crvEth.ethIndex,
                    crvBalance,
                    0,
                    true
                );
            }

            ethBalance = address(this).balance;
            require(ethBalance != 0, "NOOP");

        }

        StrategyConfig memory strategy = strategyConfig;

        //take the performance fee
        uint256 fee = (ethBalance * performanceFee.numerator) /
            performanceFee.denominator;

        (bool success, bytes memory result) = feeRecipient.call{value: fee}("");
        if (!success) {
            assembly {
                revert(add(result, 32), mload(result))
            }
        }
        
        unchecked {
            ethBalance -= fee;
        }

        ICurve _want = strategyTokens.want;
        CurveConfig memory _pethEth = pethEth;

        uint256 pethCurveBalance = _want.balances(1 - _pethEth.ethIndex);
        uint256 ethCurveBalance = _want.balances(_pethEth.ethIndex);

        //The curve pool has 2 tokens, we are doing a single asset deposit with either PETH or ETH
        uint256[2] memory liquidityAmounts = [uint256(0), 0];
        if (ethCurveBalance > pethCurveBalance) {
            //if there's more ETH than PETH in the pool, use ETH as collateral to mint PETH
            //and deposit it into the Curve pool
            strategy.ethVault.deposit{value: ethBalance}();

            strategy.ethVault.borrow(ethBalance);
            liquidityAmounts[1 - _pethEth.ethIndex] = ethBalance;
        } else {
            //if there's more PETH than ETH in the pool, deposit ETH
            liquidityAmounts[_pethEth.ethIndex] = ethBalance;
        }

        _pethEth.lp.add_liquidity{value: liquidityAmounts[_pethEth.ethIndex]}(liquidityAmounts, minOutCurve);

        uint256 wantBalance = heldAssets();

        deposit();

        earned += wantBalance;
        emit Harvested(wantBalance);
    }
}

File 2 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 16 : ICurve.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

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

interface ICurve is IERC20 {
    function balances(uint256 index) external view returns (uint256);
    function exchange(uint256 i, uint256 j, uint256 _dx, uint256 _min_dy) external payable returns (uint256);
    function exchange(uint256 i, uint256 j, uint256 _dx, uint256 _min_dy, bool use_eth) external payable returns (uint256);
    function add_liquidity(uint256[2] calldata _amounts, uint256 _min_mint_amount) external payable returns (uint256);
}

File 6 of 16 : I3CRVZap.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface I3CRVZap {
    function add_liquidity(address _pool, uint256[4] calldata _deposit_amounts, uint256 _min_mint_amount) external returns (uint256);
}

File 7 of 16 : IBooster.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface IBooster {
    function depositAll(uint256 _pid, bool _stake) external returns (bool);
    function earmarkRewards(uint256 _pid) external returns(bool);
}

File 8 of 16 : IBaseRewardPool.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface IBaseRewardPool {
    function withdrawAndUnwrap(uint256 amount, bool claim)
        external
        returns (bool);

    function withdrawAllAndUnwrap(bool claim) external;

    function getReward(address _account, bool _claimExtras)
        external
        returns (bool);

    function donate(uint256 _amount) external returns(bool);

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

    function extraRewards(uint256) external view returns (address);

    function extraRewardsLength() external view returns (uint256);

    function rewardToken() external view returns (address);

    function earned(address account) external view returns (uint256);
}

File 9 of 16 : IPETHVaultForDAO.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface IPETHVaultForDAO {

    function deposit() external payable;

    function borrow(uint256 amount) external;

    function repay(uint256 amount) external;
    
    function withdraw(uint256 amount) external;
}

File 10 of 16 : IStrategy.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;

interface IStrategy {
    function deposit() external;

    function withdraw(address _to, address _asset) external;

    function withdraw(address _to, uint256 _amount) external;

    function withdrawAll() external;

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

File 11 of 16 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 12 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 13 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 14 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 15 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 16 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"contract ICurve","name":"want","type":"address"},{"internalType":"contract IERC20","name":"peth","type":"address"},{"internalType":"contract IERC20","name":"cvx","type":"address"},{"internalType":"contract IERC20","name":"crv","type":"address"}],"internalType":"struct StrategyPETHConvex.StrategyTokens","name":"_strategyTokens","type":"tuple"},{"internalType":"address","name":"_feeAddress","type":"address"},{"components":[{"internalType":"contract ICurve","name":"lp","type":"address"},{"internalType":"uint256","name":"ethIndex","type":"uint256"}],"internalType":"struct StrategyPETHConvex.CurveConfig","name":"_cvxEth","type":"tuple"},{"components":[{"internalType":"contract ICurve","name":"lp","type":"address"},{"internalType":"uint256","name":"ethIndex","type":"uint256"}],"internalType":"struct StrategyPETHConvex.CurveConfig","name":"_crvEth","type":"tuple"},{"components":[{"internalType":"contract ICurve","name":"lp","type":"address"},{"internalType":"uint256","name":"ethIndex","type":"uint256"}],"internalType":"struct StrategyPETHConvex.CurveConfig","name":"_pethEth","type":"tuple"},{"components":[{"internalType":"contract IBooster","name":"booster","type":"address"},{"internalType":"contract IBaseRewardPool","name":"baseRewardPool","type":"address"},{"internalType":"uint256","name":"pid","type":"uint256"}],"internalType":"struct StrategyPETHConvex.ConvexConfig","name":"_convexConfig","type":"tuple"},{"components":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"contract IPETHVaultForDAO","name":"ethVault","type":"address"}],"internalType":"struct StrategyPETHConvex.StrategyConfig","name":"_strategyConfig","type":"tuple"},{"components":[{"internalType":"uint128","name":"numerator","type":"uint128"},{"internalType":"uint128","name":"denominator","type":"uint128"}],"internalType":"struct StrategyPETHConvex.Rate","name":"_performanceFee","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"wantEarned","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STRATEGIST_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexConfig","outputs":[{"internalType":"contract IBooster","name":"booster","type":"address"},{"internalType":"contract IBaseRewardPool","name":"baseRewardPool","type":"address"},{"internalType":"uint256","name":"pid","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crvEth","outputs":[{"internalType":"contract ICurve","name":"lp","type":"address"},{"internalType":"uint256","name":"ethIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cvxEth","outputs":[{"internalType":"contract ICurve","name":"lp","type":"address"},{"internalType":"uint256","name":"ethIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositedAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minOutCurve","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"heldAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint128","name":"numerator","type":"uint128"},{"internalType":"uint128","name":"denominator","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pethEth","outputs":[{"internalType":"contract ICurve","name":"lp","type":"address"},{"internalType":"uint256","name":"ethIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setETHVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint128","name":"numerator","type":"uint128"},{"internalType":"uint128","name":"denominator","type":"uint128"}],"internalType":"struct StrategyPETHConvex.Rate","name":"_performanceFee","type":"tuple"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategyConfig","outputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"contract IPETHVaultForDAO","name":"ethVault","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategyTokens","outputs":[{"internalType":"contract ICurve","name":"want","type":"address"},{"internalType":"contract IERC20","name":"peth","type":"address"},{"internalType":"contract IERC20","name":"cvx","type":"address"},{"internalType":"contract IERC20","name":"crv","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_asset","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620035963803806200359683398101604081905262000034916200101a565b87516001600160a01b0316620000805760405162461bcd60e51b815260206004820152600c60248201526b1253959053125117d5d0539560a21b60448201526064015b60405180910390fd5b60208801516001600160a01b0316620000cb5760405162461bcd60e51b815260206004820152600c60248201526b0929cac82989288bea08aa8960a31b604482015260640162000077565b60408801516001600160a01b0316620001155760405162461bcd60e51b815260206004820152600b60248201526a0929cac82989288be86acb60ab1b604482015260640162000077565b60608801516001600160a01b03166200015f5760405162461bcd60e51b815260206004820152600b60248201526a24a72b20a624a22fa1a92b60a91b604482015260640162000077565b85516001600160a01b0316620001ac5760405162461bcd60e51b81526020600482015260116024820152700494e56414c49445f4356584554485f4c5607c1b604482015260640162000077565b84516001600160a01b0316620001f95760405162461bcd60e51b81526020600482015260116024820152700494e56414c49445f4352564554485f4c5607c1b604482015260640162000077565b83516001600160a01b0316620002475760405162461bcd60e51b81526020600482015260126024820152710494e56414c49445f504554484554485f4c560741b604482015260640162000077565b6002866020015110620002915760405162461bcd60e51b81526020600482015260116024820152700929cac82989288be8aa890be929c888ab607b1b604482015260640162000077565b6002856020015110620002db5760405162461bcd60e51b81526020600482015260116024820152700929cac82989288be8aa890be929c888ab607b1b604482015260640162000077565b6002846020015110620003255760405162461bcd60e51b81526020600482015260116024820152700929cac82989288be8aa890be929c888ab607b1b604482015260640162000077565b82516001600160a01b03166200037e5760405162461bcd60e51b815260206004820152601660248201527f494e56414c49445f434f4e5645585f424f4f5354455200000000000000000000604482015260640162000077565b60208301516001600160a01b0316620003da5760405162461bcd60e51b815260206004820152601f60248201527f494e56414c49445f434f4e5645585f424153455f5245574152445f504f4f4c00604482015260640162000077565b81516001600160a01b0316620004235760405162461bcd60e51b815260206004820152600d60248201526c1253959053125117d590555315609a1b604482015260640162000077565b60208201516001600160a01b0316620004735760405162461bcd60e51b81526020600482015260116024820152701253959053125117d1551217d590555315607a1b604482015260640162000077565b620004806000336200064c565b6200048b876200065c565b6200049681620006e5565b8751600180546001600160a01b03199081166001600160a01b039384169081179092556020808c01516002805484169186169190911790556040808d015160038054851691871691909117905560608d01516004805485169187169190911790556005805484168d87161790558a516006805485169187169190911790558a8201516007558951600880548516918716919091179055898201516009558851600a8054851691871691909117905588820151600b558751600c8054851682881617905588830151600d8054861691881691909117905590880151600e558651600f805485169187169190911790558682015160108054909416951694909417909155620005b192906000199062000789811b620016fa17901c565b620005e086600001516000198a604001516001600160a01b03166200078960201b620016fa179092919060201c565b6200060f85600001516000198a606001516001600160a01b03166200078960201b620016fa179092919060201c565b6200063e84600001516000198a602001516001600160a01b03166200078960201b620016fa179092919060201c565b50505050505050506200132e565b620006588282620008e8565b5050565b60006200066a813362000988565b6001600160a01b038216620006c25760405162461bcd60e51b815260206004820152601560248201527f494e56414c49445f4645455f524543495049454e540000000000000000000000604482015260640162000077565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000620006f3813362000988565b60208201516001600160801b0316158015906200072a575081600001516001600160801b031682602001516001600160801b031610155b620007675760405162461bcd60e51b815260206004820152600c60248201526b494e56414c49445f5241544560a01b604482015260640162000077565b5080516020909101516001600160801b03908116600160801b02911617601155565b801580620008175750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015620007da57600080fd5b505afa158015620007ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000815919062001128565b155b6200088b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000077565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620008e391859162000a2316565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000658576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620009443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200065857620009d2816001600160a01b0316601462000b0160201b6200186d1760201c565b620009e88360206200186d62000b01821b17811c565b604051602001620009fb9291906200115f565b60408051601f198184030181529082905262461bcd60e51b82526200007791600401620011d8565b600062000a7f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662000cfd60201b62001a63179092919060201c565b805190915015620008e3578080602001905181019062000aa0919062000ff8565b620008e35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000077565b6060600062000b1283600262001290565b62000b1f90600262001275565b6001600160401b0381111562000b4557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801562000b70576020820181803683370190505b509050600360fc1b8160008151811062000b9a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000bd857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600062000bfe84600262001290565b62000c0b90600162001275565b90505b600181111562000ca5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000c4f57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811062000c7457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9362000c9d81620012e5565b905062000c0e565b50831562000cf65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000077565b9392505050565b606062000d0e848460008562000d16565b949350505050565b60608247101562000d795760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000077565b6001600160a01b0385163b62000dd25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000077565b600080866001600160a01b0316858760405162000df0919062001141565b60006040518083038185875af1925050503d806000811462000e2f576040519150601f19603f3d011682016040523d82523d6000602084013e62000e34565b606091505b50909250905062000e4782828662000e52565b979650505050505050565b6060831562000e6357508162000cf6565b82511562000e745782518084602001fd5b8160405162461bcd60e51b8152600401620000779190620011d8565b805162000e9d8162001315565b919050565b60006060828403121562000eb4578081fd5b604051606081016001600160401b038111828210171562000ee357634e487b7160e01b83526041600452602483fd5b8060405250809150825162000ef88162001315565b8152602083015162000f0a8162001315565b6020820152604092830151920191909152919050565b60006040828403121562000f32578081fd5b62000f3c6200120d565b9050815162000f4b8162001315565b808252506020820151602082015292915050565b60006040828403121562000f71578081fd5b62000f7b6200120d565b905062000f888262000fe0565b815262000f986020830162000fe0565b602082015292915050565b60006040828403121562000fb5578081fd5b62000fbf6200120d565b9050815162000fce8162001315565b8152602082015162000f988162001315565b80516001600160801b038116811462000e9d57600080fd5b6000602082840312156200100a578081fd5b8151801515811462000cf6578182fd5b600080600080600080600080888a0361024081121562001038578485fd5b608081121562001046578485fd5b506200105162001244565b89516200105e8162001315565b815260208a0151620010708162001315565b602082015260408a0151620010858162001315565b604082015260608a01516200109a8162001315565b60608201529750620010af60808a0162000e90565b9650620010c08a60a08b0162000f20565b9550620010d18a60e08b0162000f20565b9450620010e38a6101208b0162000f20565b9350620010f58a6101608b0162000ea2565b9250620011078a6101c08b0162000fa3565b9150620011198a6102008b0162000f5f565b90509295985092959890939650565b6000602082840312156200113a578081fd5b5051919050565b6000825162001155818460208701620012b2565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162001199816017850160208801620012b2565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620011cc816028840160208801620012b2565b01602801949350505050565b6020815260008251806020840152620011f9816040850160208701620012b2565b601f01601f19169190910160400192915050565b604080519081016001600160401b03811182821017156200123e57634e487b7160e01b600052604160045260246000fd5b60405290565b604051608081016001600160401b03811182821017156200123e57634e487b7160e01b600052604160045260246000fd5b600082198211156200128b576200128b620012ff565b500190565b6000816000190483118215151615620012ad57620012ad620012ff565b500290565b60005b83811015620012cf578181015183820152602001620012b5565b83811115620012df576000848401525b50505050565b600081620012f757620012f7620012ff565b506000190190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146200132b57600080fd5b50565b612258806200133e6000396000f3fe6080604052600436106101bb5760003560e01c80639c57e847116100ec578063d547741f1161008a578063e74b981b11610064578063e74b981b146105f4578063f3fef3a314610614578063f76ed5c914610634578063f940e3851461065457600080fd5b8063d547741f1461059e578063d6f19262146105be578063ddc63262146105d457600080fd5b8063a85658db116100c6578063a85658db14610521578063aa7a2ff814610541578063b5ba717314610565578063d0e30db01461058957600080fd5b80639c57e84714610487578063a217fddf146104d8578063a378a324146104ed57600080fd5b80634690484011610159578063861b303011610133578063861b30301461037d578063877887821461039257806391d14854146103dd5780639b4943041461042157600080fd5b806346904840146102ed578063805f857314610325578063853828b61461036857600080fd5b8063248a9ca311610195578063248a9ca314610266578063257c5908146102965780632f2ff15d146102ab57806336568abe146102cd57600080fd5b806301e1d114146101c757806301ffc9a7146101ef57806307a86eff1461021f57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101dc610674565b6040519081526020015b60405180910390f35b3480156101fb57600080fd5b5061020f61020a366004611fad565b610695565b60405190151581526020016101e6565b34801561022b57600080fd5b50600f54601054610246916001600160a01b03908116911682565b604080516001600160a01b039384168152929091166020830152016101e6565b34801561027257600080fd5b506101dc610281366004611f73565b60009081526020819052604090206001015490565b3480156102a257600080fd5b506101dc6106cc565b3480156102b757600080fd5b506102cb6102c6366004611f8b565b610749565b005b3480156102d957600080fd5b506102cb6102e8366004611f8b565b610774565b3480156102f957600080fd5b5060055461030d906001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b34801561033157600080fd5b50600654600754610349916001600160a01b03169082565b604080516001600160a01b0390931683526020830191909152016101e6565b34801561037457600080fd5b506102cb610805565b34801561038957600080fd5b506101dc610941565b34801561039e57600080fd5b506011546103bd906001600160801b0380821691600160801b90041682565b604080516001600160801b039384168152929091166020830152016101e6565b3480156103e957600080fd5b5061020f6103f8366004611f8b565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561042d57600080fd5b50600154600254600354600454610454936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016101e6565b34801561049357600080fd5b50600c54600d54600e546104b2926001600160a01b0390811692169083565b604080516001600160a01b039485168152939092166020840152908201526060016101e6565b3480156104e457600080fd5b506101dc600081565b3480156104f957600080fd5b506101dc7f17a8e30262c1f919c33056d877a3c22b95c2f5e4dac44683c1c2323cd79fbdb081565b34801561052d57600080fd5b506102cb61053c366004611fd5565b610972565b34801561054d57600080fd5b50600854600954610349916001600160a01b03169082565b34801561057157600080fd5b50600a54600b54610349916001600160a01b03169082565b34801561059557600080fd5b506102cb610a22565b3480156105aa57600080fd5b506102cb6105b9366004611f8b565b610ac9565b3480156105ca57600080fd5b506101dc60125481565b3480156105e057600080fd5b506102cb6105ef366004611f73565b610aef565b34801561060057600080fd5b506102cb61060f366004611ede565b6112c5565b34801561062057600080fd5b506102cb61062f366004611f2a565b611357565b34801561064057600080fd5b506102cb61064f366004611ede565b6114c9565b34801561066057600080fd5b506102cb61066f366004611ef8565b61155b565b600061067e610941565b6106866106cc565b610690919061215b565b905090565b60006001600160e01b03198216637965db0b60e01b14806106c657506301ffc9a760e01b6001600160e01b03198316145b92915050565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024015b60206040518083038186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610690919061203b565b6000828152602081905260409020600101546107658133611a7a565b61076f8383611af8565b505050565b6001600160a01b03811633146107f75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6108018282611b96565b5050565b600f546001600160a01b0316331461084b5760405162461bcd60e51b81526020600482015260096024820152681393d517d59055531560ba1b60448201526064016107ee565b60018054600d546040516324f81cd160e11b815260048101939093526001600160a01b03918216929116906349f039a290602401600060405180830381600087803b15801561089957600080fd5b505af11580156108ad573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b03841691506370a082319060240160206040518083038186803b1580156108f357600080fd5b505afa158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b919061203b565b90506108016001600160a01b0383163383611c15565b600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024016106f9565b600061097e8133611a7a565b60208201516001600160801b0316158015906109b4575081600001516001600160801b031682602001516001600160801b031610155b610a005760405162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f52415445000000000000000000000000000000000000000060448201526064016107ee565b5080516020909101516001600160801b03908116600160801b02911617601155565b60408051606081018252600c546001600160a01b03908116808352600d549091166020830152600e54828401819052925163303acfe760e11b815260048101939093526001602484015290916360759fce90604401602060405180830381600087803b158015610a9157600080fd5b505af1158015610aa5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108019190611f53565b600082815260208190526040902060010154610ae58133611a7a565b61076f8383611b96565b7f17a8e30262c1f919c33056d877a3c22b95c2f5e4dac44683c1c2323cd79fbdb0610b1a8133611a7a565b600d54604051637050ccd960e01b8152306004820152600160248201526001600160a01b0390911690637050ccd990604401602060405180830381600087803b158015610b6657600080fd5b505af1158015610b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9e9190611f53565b506003546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015610be757600080fd5b505afa158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f919061203b565b90508015610cee57604080518082019091526006546001600160a01b03168082526007546020830181905263394747c590610c5b9060016121b2565b60208401516040516001600160e01b031960e085901b1681526004810192909252602482015260448101859052600060648201526001608482015260a401602060405180830381600087803b158015610cb357600080fd5b505af1158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb919061203b565b50505b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a082319060240160206040518083038186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6f919061203b565b90508015610e3e57604080518082019091526008546001600160a01b03168082526009546020830181905263394747c590610dab9060016121b2565b60208401516040516001600160e01b031960e085901b1681526004810192909252602482015260448101859052600060648201526001608482015260a401602060405180830381600087803b158015610e0357600080fd5b505af1158015610e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3b919061203b565b50505b47925082610e775760405162461bcd60e51b81526004016107ee9060208082526004908201526304e4f4f560e41b604082015260600190565b505060408051808201909152600f546001600160a01b0390811682526010541660208201526011546000906001600160801b03600160801b8204811691610ebf911685612193565b610ec99190612173565b60055460405191925060009182916001600160a01b03169084908381818185875af1925050503d8060008114610f1b576040519150601f19603f3d011682016040523d82523d6000602084013e610f20565b606091505b509150915081610f3257805160208201fd5b6001805460408051808201909152600a546001600160a01b039081168252600b5460208301819052988790039892169290916000918491634903b0d191610f7991906121b2565b6040518263ffffffff1660e01b8152600401610f9791815260200190565b60206040518083038186803b158015610faf57600080fd5b505afa158015610fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe7919061203b565b90506000836001600160a01b0316634903b0d184602001516040518263ffffffff1660e01b815260040161101d91815260200190565b60206040518083038186803b15801561103557600080fd5b505afa158015611049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106d919061203b565b60408051808201909152600080825260208201529091508282111561117f5788602001516001600160a01b031663d0e30db08b6040518263ffffffff1660e01b81526004016000604051808303818588803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b50505060208b015160405163317afabb60e21b8152600481018e90526001600160a01b03909116925063c5ebeaec9150602401600060405180830381600087803b15801561112c57600080fd5b505af1158015611140573d6000803e3d6000fd5b5050505089818560200151600161115791906121b2565b6002811061117557634e487b7160e01b600052603260045260246000fd5b60200201526111aa565b89818560200151600281106111a457634e487b7160e01b600052603260045260246000fd5b60200201525b83600001516001600160a01b0316630b4c7e4d828660200151600281106111e157634e487b7160e01b600052603260045260246000fd5b6020020151838f6040518463ffffffff1660e01b81526004016112059291906120f0565b6020604051808303818588803b15801561121e57600080fd5b505af1158015611232573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611257919061203b565b5060006112626106cc565b905061126c610a22565b806012600082825461127e919061215b565b90915550506040518181527f8e55ccfc9778ff8eba1646d765cf1982537ce0f9257054a17b48aad7452501839060200160405180910390a150505050505050505050505050565b60006112d18133611a7a565b6001600160a01b0382166113275760405162461bcd60e51b815260206004820152601560248201527f494e56414c49445f4645455f524543495049454e54000000000000000000000060448201526064016107ee565b506005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600f546001600160a01b0316331461139d5760405162461bcd60e51b81526020600482015260096024820152681393d517d59055531560ba1b60448201526064016107ee565b6001546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a082319060240160206040518083038186803b1580156113e557600080fd5b505afa1580156113f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141d919061203b565b9050828110156114af57600d54604051636197390160e11b81528285036004820152600060248201526001600160a01b039091169063c32e720290604401602060405180830381600087803b15801561147557600080fd5b505af1158015611489573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ad9190611f53565b505b6114c36001600160a01b0383168585611c15565b50505050565b60006114d58133611a7a565b6001600160a01b03821661152b5760405162461bcd60e51b815260206004820152601160248201527f494e56414c49445f4554485f5641554c5400000000000000000000000000000060448201526064016107ee565b506010805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b7f17a8e30262c1f919c33056d877a3c22b95c2f5e4dac44683c1c2323cd79fbdb06115868133611a7a565b6001600160a01b0383166115dc5760405162461bcd60e51b815260206004820152600f60248201527f494e56414c49445f41444452455353000000000000000000000000000000000060448201526064016107ee565b6001546001600160a01b03838116911614156116235760405162461bcd60e51b81526004016107ee906020808252600490820152631dd85b9d60e21b604082015260600190565b6002546001600160a01b038381169116141561166a5760405162461bcd60e51b81526004016107ee906020808252600490820152630e0cae8d60e31b604082015260600190565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b1580156116ac57600080fd5b505afa1580156116c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e4919061203b565b90506114c36001600160a01b0384168583611c15565b8015806117835750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561174957600080fd5b505afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611781919061203b565b155b6117f55760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016107ee565b6040516001600160a01b03831660248201526044810182905261076f90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611c45565b6060600061187c836002612193565b61188790600261215b565b67ffffffffffffffff8111156118ad57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156118d7576020820181803683370190505b509050600360fc1b8160008151811061190057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061193d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611961846002612193565b61196c90600161215b565b90505b6001811115611a0d577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106119bb57634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106119df57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611a06816121f5565b905061196f565b508315611a5c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107ee565b9392505050565b6060611a728484600085611d2a565b949350505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661080157611ab6816001600160a01b0316601461186d565b611ac183602061186d565b604051602001611ad292919061206f565b60408051601f198184030181529082905262461bcd60e51b82526107ee91600401612128565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610801576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611b523390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610801576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03831660248201526044810182905261076f90849063a9059cbb60e01b90606401611821565b6000611c9a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a639092919063ffffffff16565b80519091501561076f5780806020019051810190611cb89190611f53565b61076f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107ee565b606082471015611da25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107ee565b6001600160a01b0385163b611df95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107ee565b600080866001600160a01b03168587604051611e159190612053565b60006040518083038185875af1925050503d8060008114611e52576040519150601f19603f3d011682016040523d82523d6000602084013e611e57565b606091505b5091509150611e67828286611e72565b979650505050505050565b60608315611e81575081611a5c565b825115611e915782518084602001fd5b8160405162461bcd60e51b81526004016107ee9190612128565b80356001600160a01b0381168114611ec257600080fd5b919050565b80356001600160801b0381168114611ec257600080fd5b600060208284031215611eef578081fd5b611a5c82611eab565b60008060408385031215611f0a578081fd5b611f1383611eab565b9150611f2160208401611eab565b90509250929050565b60008060408385031215611f3c578182fd5b611f4583611eab565b946020939093013593505050565b600060208284031215611f64578081fd5b81518015158114611a5c578182fd5b600060208284031215611f84578081fd5b5035919050565b60008060408385031215611f9d578182fd5b82359150611f2160208401611eab565b600060208284031215611fbe578081fd5b81356001600160e01b031981168114611a5c578182fd5b600060408284031215611fe6578081fd5b6040516040810181811067ffffffffffffffff8211171561201557634e487b7160e01b83526041600452602483fd5b60405261202183611ec7565b815261202f60208401611ec7565b60208201529392505050565b60006020828403121561204c578081fd5b5051919050565b600082516120658184602087016121c9565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120a78160178501602088016121c9565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516120e48160288401602088016121c9565b01602801949350505050565b60608101818460005b60028110156121185781518352602092830192909101906001016120f9565b5050508260408301529392505050565b60208152600082518060208401526121478160408501602087016121c9565b601f01601f19169190910160400192915050565b6000821982111561216e5761216e61220c565b500190565b60008261218e57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156121ad576121ad61220c565b500290565b6000828210156121c4576121c461220c565b500390565b60005b838110156121e45781810151838201526020016121cc565b838111156114c35750506000910152565b6000816122045761220461220c565b506000190190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fac926cade6ee1bc3c34333d12a3db4ea4d65b2246f51f058929a80540cc01eb64736f6c634300080400330000000000000000000000009848482da3ee3076165ce6497eda906e66bb85c5000000000000000000000000836a808d4828586a69364065a1e064609f5078c70000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000d2436479caa12aaaeafef89081a5967f602fcaa3000000000000000000000000b576491f1e6e5e62f1d8f26062ee822b40b0e0d400000000000000000000000000000000000000000000000000000000000000000000000000000000000000008301ae4fc9c624d1d396cbdaa1ed877821d7c51100000000000000000000000000000000000000000000000000000000000000000000000000000000000000009848482da3ee3076165ce6497eda906e66bb85c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31000000000000000000000000b235205e1096e0ad221fb7621a2e2cbab875be75000000000000000000000000000000000000000000000000000000000000007a00000000000000000000000056d1b6ac326e152c9faad749f1f4f9737a049d46000000000000000000000000548cab89ebf34509ae562bc8ce8d5cdb4f08c3ad00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x6080604052600436106101bb5760003560e01c80639c57e847116100ec578063d547741f1161008a578063e74b981b11610064578063e74b981b146105f4578063f3fef3a314610614578063f76ed5c914610634578063f940e3851461065457600080fd5b8063d547741f1461059e578063d6f19262146105be578063ddc63262146105d457600080fd5b8063a85658db116100c6578063a85658db14610521578063aa7a2ff814610541578063b5ba717314610565578063d0e30db01461058957600080fd5b80639c57e84714610487578063a217fddf146104d8578063a378a324146104ed57600080fd5b80634690484011610159578063861b303011610133578063861b30301461037d578063877887821461039257806391d14854146103dd5780639b4943041461042157600080fd5b806346904840146102ed578063805f857314610325578063853828b61461036857600080fd5b8063248a9ca311610195578063248a9ca314610266578063257c5908146102965780632f2ff15d146102ab57806336568abe146102cd57600080fd5b806301e1d114146101c757806301ffc9a7146101ef57806307a86eff1461021f57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101dc610674565b6040519081526020015b60405180910390f35b3480156101fb57600080fd5b5061020f61020a366004611fad565b610695565b60405190151581526020016101e6565b34801561022b57600080fd5b50600f54601054610246916001600160a01b03908116911682565b604080516001600160a01b039384168152929091166020830152016101e6565b34801561027257600080fd5b506101dc610281366004611f73565b60009081526020819052604090206001015490565b3480156102a257600080fd5b506101dc6106cc565b3480156102b757600080fd5b506102cb6102c6366004611f8b565b610749565b005b3480156102d957600080fd5b506102cb6102e8366004611f8b565b610774565b3480156102f957600080fd5b5060055461030d906001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b34801561033157600080fd5b50600654600754610349916001600160a01b03169082565b604080516001600160a01b0390931683526020830191909152016101e6565b34801561037457600080fd5b506102cb610805565b34801561038957600080fd5b506101dc610941565b34801561039e57600080fd5b506011546103bd906001600160801b0380821691600160801b90041682565b604080516001600160801b039384168152929091166020830152016101e6565b3480156103e957600080fd5b5061020f6103f8366004611f8b565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561042d57600080fd5b50600154600254600354600454610454936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016101e6565b34801561049357600080fd5b50600c54600d54600e546104b2926001600160a01b0390811692169083565b604080516001600160a01b039485168152939092166020840152908201526060016101e6565b3480156104e457600080fd5b506101dc600081565b3480156104f957600080fd5b506101dc7f17a8e30262c1f919c33056d877a3c22b95c2f5e4dac44683c1c2323cd79fbdb081565b34801561052d57600080fd5b506102cb61053c366004611fd5565b610972565b34801561054d57600080fd5b50600854600954610349916001600160a01b03169082565b34801561057157600080fd5b50600a54600b54610349916001600160a01b03169082565b34801561059557600080fd5b506102cb610a22565b3480156105aa57600080fd5b506102cb6105b9366004611f8b565b610ac9565b3480156105ca57600080fd5b506101dc60125481565b3480156105e057600080fd5b506102cb6105ef366004611f73565b610aef565b34801561060057600080fd5b506102cb61060f366004611ede565b6112c5565b34801561062057600080fd5b506102cb61062f366004611f2a565b611357565b34801561064057600080fd5b506102cb61064f366004611ede565b6114c9565b34801561066057600080fd5b506102cb61066f366004611ef8565b61155b565b600061067e610941565b6106866106cc565b610690919061215b565b905090565b60006001600160e01b03198216637965db0b60e01b14806106c657506301ffc9a760e01b6001600160e01b03198316145b92915050565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024015b60206040518083038186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610690919061203b565b6000828152602081905260409020600101546107658133611a7a565b61076f8383611af8565b505050565b6001600160a01b03811633146107f75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6108018282611b96565b5050565b600f546001600160a01b0316331461084b5760405162461bcd60e51b81526020600482015260096024820152681393d517d59055531560ba1b60448201526064016107ee565b60018054600d546040516324f81cd160e11b815260048101939093526001600160a01b03918216929116906349f039a290602401600060405180830381600087803b15801561089957600080fd5b505af11580156108ad573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b03841691506370a082319060240160206040518083038186803b1580156108f357600080fd5b505afa158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b919061203b565b90506108016001600160a01b0383163383611c15565b600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024016106f9565b600061097e8133611a7a565b60208201516001600160801b0316158015906109b4575081600001516001600160801b031682602001516001600160801b031610155b610a005760405162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f52415445000000000000000000000000000000000000000060448201526064016107ee565b5080516020909101516001600160801b03908116600160801b02911617601155565b60408051606081018252600c546001600160a01b03908116808352600d549091166020830152600e54828401819052925163303acfe760e11b815260048101939093526001602484015290916360759fce90604401602060405180830381600087803b158015610a9157600080fd5b505af1158015610aa5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108019190611f53565b600082815260208190526040902060010154610ae58133611a7a565b61076f8383611b96565b7f17a8e30262c1f919c33056d877a3c22b95c2f5e4dac44683c1c2323cd79fbdb0610b1a8133611a7a565b600d54604051637050ccd960e01b8152306004820152600160248201526001600160a01b0390911690637050ccd990604401602060405180830381600087803b158015610b6657600080fd5b505af1158015610b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9e9190611f53565b506003546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015610be757600080fd5b505afa158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f919061203b565b90508015610cee57604080518082019091526006546001600160a01b03168082526007546020830181905263394747c590610c5b9060016121b2565b60208401516040516001600160e01b031960e085901b1681526004810192909252602482015260448101859052600060648201526001608482015260a401602060405180830381600087803b158015610cb357600080fd5b505af1158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb919061203b565b50505b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a082319060240160206040518083038186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6f919061203b565b90508015610e3e57604080518082019091526008546001600160a01b03168082526009546020830181905263394747c590610dab9060016121b2565b60208401516040516001600160e01b031960e085901b1681526004810192909252602482015260448101859052600060648201526001608482015260a401602060405180830381600087803b158015610e0357600080fd5b505af1158015610e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3b919061203b565b50505b47925082610e775760405162461bcd60e51b81526004016107ee9060208082526004908201526304e4f4f560e41b604082015260600190565b505060408051808201909152600f546001600160a01b0390811682526010541660208201526011546000906001600160801b03600160801b8204811691610ebf911685612193565b610ec99190612173565b60055460405191925060009182916001600160a01b03169084908381818185875af1925050503d8060008114610f1b576040519150601f19603f3d011682016040523d82523d6000602084013e610f20565b606091505b509150915081610f3257805160208201fd5b6001805460408051808201909152600a546001600160a01b039081168252600b5460208301819052988790039892169290916000918491634903b0d191610f7991906121b2565b6040518263ffffffff1660e01b8152600401610f9791815260200190565b60206040518083038186803b158015610faf57600080fd5b505afa158015610fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe7919061203b565b90506000836001600160a01b0316634903b0d184602001516040518263ffffffff1660e01b815260040161101d91815260200190565b60206040518083038186803b15801561103557600080fd5b505afa158015611049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106d919061203b565b60408051808201909152600080825260208201529091508282111561117f5788602001516001600160a01b031663d0e30db08b6040518263ffffffff1660e01b81526004016000604051808303818588803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b50505060208b015160405163317afabb60e21b8152600481018e90526001600160a01b03909116925063c5ebeaec9150602401600060405180830381600087803b15801561112c57600080fd5b505af1158015611140573d6000803e3d6000fd5b5050505089818560200151600161115791906121b2565b6002811061117557634e487b7160e01b600052603260045260246000fd5b60200201526111aa565b89818560200151600281106111a457634e487b7160e01b600052603260045260246000fd5b60200201525b83600001516001600160a01b0316630b4c7e4d828660200151600281106111e157634e487b7160e01b600052603260045260246000fd5b6020020151838f6040518463ffffffff1660e01b81526004016112059291906120f0565b6020604051808303818588803b15801561121e57600080fd5b505af1158015611232573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611257919061203b565b5060006112626106cc565b905061126c610a22565b806012600082825461127e919061215b565b90915550506040518181527f8e55ccfc9778ff8eba1646d765cf1982537ce0f9257054a17b48aad7452501839060200160405180910390a150505050505050505050505050565b60006112d18133611a7a565b6001600160a01b0382166113275760405162461bcd60e51b815260206004820152601560248201527f494e56414c49445f4645455f524543495049454e54000000000000000000000060448201526064016107ee565b506005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600f546001600160a01b0316331461139d5760405162461bcd60e51b81526020600482015260096024820152681393d517d59055531560ba1b60448201526064016107ee565b6001546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a082319060240160206040518083038186803b1580156113e557600080fd5b505afa1580156113f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141d919061203b565b9050828110156114af57600d54604051636197390160e11b81528285036004820152600060248201526001600160a01b039091169063c32e720290604401602060405180830381600087803b15801561147557600080fd5b505af1158015611489573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ad9190611f53565b505b6114c36001600160a01b0383168585611c15565b50505050565b60006114d58133611a7a565b6001600160a01b03821661152b5760405162461bcd60e51b815260206004820152601160248201527f494e56414c49445f4554485f5641554c5400000000000000000000000000000060448201526064016107ee565b506010805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b7f17a8e30262c1f919c33056d877a3c22b95c2f5e4dac44683c1c2323cd79fbdb06115868133611a7a565b6001600160a01b0383166115dc5760405162461bcd60e51b815260206004820152600f60248201527f494e56414c49445f41444452455353000000000000000000000000000000000060448201526064016107ee565b6001546001600160a01b03838116911614156116235760405162461bcd60e51b81526004016107ee906020808252600490820152631dd85b9d60e21b604082015260600190565b6002546001600160a01b038381169116141561166a5760405162461bcd60e51b81526004016107ee906020808252600490820152630e0cae8d60e31b604082015260600190565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b1580156116ac57600080fd5b505afa1580156116c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e4919061203b565b90506114c36001600160a01b0384168583611c15565b8015806117835750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561174957600080fd5b505afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611781919061203b565b155b6117f55760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016107ee565b6040516001600160a01b03831660248201526044810182905261076f90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152611c45565b6060600061187c836002612193565b61188790600261215b565b67ffffffffffffffff8111156118ad57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156118d7576020820181803683370190505b509050600360fc1b8160008151811061190057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061193d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611961846002612193565b61196c90600161215b565b90505b6001811115611a0d577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106119bb57634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106119df57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611a06816121f5565b905061196f565b508315611a5c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107ee565b9392505050565b6060611a728484600085611d2a565b949350505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661080157611ab6816001600160a01b0316601461186d565b611ac183602061186d565b604051602001611ad292919061206f565b60408051601f198184030181529082905262461bcd60e51b82526107ee91600401612128565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610801576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611b523390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610801576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516001600160a01b03831660248201526044810182905261076f90849063a9059cbb60e01b90606401611821565b6000611c9a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a639092919063ffffffff16565b80519091501561076f5780806020019051810190611cb89190611f53565b61076f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107ee565b606082471015611da25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107ee565b6001600160a01b0385163b611df95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107ee565b600080866001600160a01b03168587604051611e159190612053565b60006040518083038185875af1925050503d8060008114611e52576040519150601f19603f3d011682016040523d82523d6000602084013e611e57565b606091505b5091509150611e67828286611e72565b979650505050505050565b60608315611e81575081611a5c565b825115611e915782518084602001fd5b8160405162461bcd60e51b81526004016107ee9190612128565b80356001600160a01b0381168114611ec257600080fd5b919050565b80356001600160801b0381168114611ec257600080fd5b600060208284031215611eef578081fd5b611a5c82611eab565b60008060408385031215611f0a578081fd5b611f1383611eab565b9150611f2160208401611eab565b90509250929050565b60008060408385031215611f3c578182fd5b611f4583611eab565b946020939093013593505050565b600060208284031215611f64578081fd5b81518015158114611a5c578182fd5b600060208284031215611f84578081fd5b5035919050565b60008060408385031215611f9d578182fd5b82359150611f2160208401611eab565b600060208284031215611fbe578081fd5b81356001600160e01b031981168114611a5c578182fd5b600060408284031215611fe6578081fd5b6040516040810181811067ffffffffffffffff8211171561201557634e487b7160e01b83526041600452602483fd5b60405261202183611ec7565b815261202f60208401611ec7565b60208201529392505050565b60006020828403121561204c578081fd5b5051919050565b600082516120658184602087016121c9565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120a78160178501602088016121c9565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516120e48160288401602088016121c9565b01602801949350505050565b60608101818460005b60028110156121185781518352602092830192909101906001016120f9565b5050508260408301529392505050565b60208152600082518060208401526121478160408501602087016121c9565b601f01601f19169190910160400192915050565b6000821982111561216e5761216e61220c565b500190565b60008261218e57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156121ad576121ad61220c565b500290565b6000828210156121c4576121c461220c565b500390565b60005b838110156121e45781810151838201526020016121cc565b838111156114c35750506000910152565b6000816122045761220461220c565b506000190190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fac926cade6ee1bc3c34333d12a3db4ea4d65b2246f51f058929a80540cc01eb64736f6c63430008040033

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

0000000000000000000000009848482da3ee3076165ce6497eda906e66bb85c5000000000000000000000000836a808d4828586a69364065a1e064609f5078c70000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000d2436479caa12aaaeafef89081a5967f602fcaa3000000000000000000000000b576491f1e6e5e62f1d8f26062ee822b40b0e0d400000000000000000000000000000000000000000000000000000000000000000000000000000000000000008301ae4fc9c624d1d396cbdaa1ed877821d7c51100000000000000000000000000000000000000000000000000000000000000000000000000000000000000009848482da3ee3076165ce6497eda906e66bb85c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31000000000000000000000000b235205e1096e0ad221fb7621a2e2cbab875be75000000000000000000000000000000000000000000000000000000000000007a00000000000000000000000056d1b6ac326e152c9faad749f1f4f9737a049d46000000000000000000000000548cab89ebf34509ae562bc8ce8d5cdb4f08c3ad00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : _strategyTokens (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : _feeAddress (address): 0xd2436479caA12AaAeAFef89081a5967f602FcAa3
Arg [2] : _cvxEth (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [3] : _crvEth (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [4] : _pethEth (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [5] : _convexConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [6] : _strategyConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [7] : _performanceFee (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000009848482da3ee3076165ce6497eda906e66bb85c5
Arg [1] : 000000000000000000000000836a808d4828586a69364065a1e064609f5078c7
Arg [2] : 0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b
Arg [3] : 000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52
Arg [4] : 000000000000000000000000d2436479caa12aaaeafef89081a5967f602fcaa3
Arg [5] : 000000000000000000000000b576491f1e6e5e62f1d8f26062ee822b40b0e0d4
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000008301ae4fc9c624d1d396cbdaa1ed877821d7c511
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000009848482da3ee3076165ce6497eda906e66bb85c5
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31
Arg [12] : 000000000000000000000000b235205e1096e0ad221fb7621a2e2cbab875be75
Arg [13] : 000000000000000000000000000000000000000000000000000000000000007a
Arg [14] : 00000000000000000000000056d1b6ac326e152c9faad749f1f4f9737a049d46
Arg [15] : 000000000000000000000000548cab89ebf34509ae562bc8ce8d5cdb4f08c3ad
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000064


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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