Contract 0xd0f41b1c9338eb9d374c83cc76b684ba3bb71557

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1628a191ea4aba14e30e9e0d02ed584578662664ce12d1757063c15ef0bae836Deposit259080222023-02-06 12:39:2211 mins ago0x5697a1f10436756acac30d03d483d52e5f7c0ccf IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.063404854 26.5
0x77d09c03894f75a9629f6fd8183d36ff408241d56f1bb519baa8d948cf9d7a6fDeposit258877242023-02-06 1:11:3011 hrs 39 mins ago0x6214dde38866e3363f95d1d1858a93719b97f692 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.11792963915 27.425
0x17844b773a266dc80c7504594330ee7f8136c3dafe570a5b6a619ca4dc891e98Deposit258821682023-02-05 22:03:1514 hrs 47 mins ago0xf4ff9028539a2925bb329d2b28f0299d317d3d4d IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.04637167403 26.8236
0xc532563203db5c69fbb16d4c3994827b582ff63fed841e4d1b7b8bbd010e1138Deposit258802732023-02-05 20:59:2015 hrs 51 mins ago0xebfa66664f2bf6fbe43d897cacaad8bc2cbb4a29 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0646804364 27.425
0x7324b29b3982716c3d5619f914404da4326c48f520e22dcf8d627552021f5737Withdraw258768662023-02-05 19:04:3317 hrs 46 mins ago0x3896df97302ca1a92b26d027923f61fa9e30616f IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.042581453675 27.425
0xdb25f66549f793058b164b8eaa7785ccd01bf4557c11a34c505b54ef345cf627Deposit258703252023-02-05 15:24:3621 hrs 26 mins ago0xf4ff9028539a2925bb329d2b28f0299d317d3d4d IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.1141095565 26.5
0xb7cc6bd0b8e22e531223451be1b4dac766d84fcff5ff0f958279469716e74f5aWithdraw258593322023-02-05 9:17:311 day 3 hrs ago0xb4740ddbec2e97b4c978aaf21612a611cbf98257 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0411452515 26.5
0x4cfd1d331ff610b84ac1cd2fe200f007eb23bbd0a092bef9e5b647b7fc28b273Deposit258572922023-02-05 8:08:581 day 4 hrs ago0xab35672080f71cf3e49ad17e5a9aab5088789178 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.06221136959 26.41
0x59dea43dcbdfd93e637fe852a49c4ac79a310fe2b1b48824e54be93829e74f48Withdraw258523202023-02-05 5:19:081 day 7 hrs ago0x9e9fca8212355ce0a26d6a96f227750b189efd9a IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0402389515 26.5
0x67b0cae3656be137296a2751703b64ceebe510cbb82d146a42d178aa3a2fa284Withdraw258515862023-02-05 4:53:561 day 7 hrs ago0x485dd57129ac2b6f8a62378164e009f290e02876 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0402386335 26.5
0xbfe8555bd344c983e146c212d59a406d398d1a976bcc4f27c95830b29e73e4f5Withdraw258509292023-02-05 4:31:411 day 8 hrs ago0x404d73cc97ffb2285b11d6b52b8b632a6aad9267 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.039479726 26
0x3d62026d4b689e241ace127551619ab94351db716f996c7f293628d6c1b83e32Withdraw258421322023-02-04 23:34:021 day 13 hrs ago0xcc88915ba06809931875cf4af1c21c34d7b1d48c IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0397779045 26.5
0x572aa075825a3b68d7dfced89e17299088aa2ee5e66113f0fa1b74ad508a9a60Withdraw258404722023-02-04 22:37:341 day 14 hrs ago0x71ae2f25f3b8be836d3703bbaecf6ebe6acdb86d IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.040266266089 26.825346
0xeb177afce15d4cb8f747081f467c26b986584a26352b4245da5e43f47016645eDeposit258367732023-02-04 20:32:101 day 16 hrs ago0xcc88915ba06809931875cf4af1c21c34d7b1d48c IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0656180423 27.425
0x58bf8846da0c57844eeb130fe36e8b701da1f7c2351d5b899cc6eb0ececc0210Withdraw258297252023-02-04 16:35:231 day 20 hrs ago0x92185038b394320c4d12dba117298ff8bca3a540 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.043198609103 27.822699999
0x378faf049516c293a35f4001bf9406714ddfdbc8eeb9fa71d3358d78b7a5600cReinvest258204082023-02-04 11:23:312 days 1 hr ago0x8fca758253476ede949aff970743337c7982d73e IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0500515835 26.5
0xfd4a77f752ae352ab74dc1830f01a51cb9b83d3b09ac9b51e5c8bcd10765ec3fWithdraw258200202023-02-04 11:10:342 days 1 hr ago0xad6fad0340f9e35afa15c9e0064cf4d13f3313ed IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.040825105 26.5
0x4f3c66a7355677e92c562f6a10161474993f196a69416e7068322fb5d1dffc81Deposit258095832023-02-04 5:14:442 days 7 hrs ago0x8c085e85cabf6700866dba60b2e8bd5b57c55587 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.074401842982 31.54776675
0x67723063c4acfbdd08f6f351c008ced935fc7181db0837c16d3a4ac4a6a3819dWithdraw258052762023-02-04 2:47:032 days 10 hrs ago0x8d7cb646468e0ad5f0d1209b15b57365bdb4e7ad IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.03978354862 26.41
0x71469a1ae775f2d4d6511d1654fd1d281587fdae20a4e5fa29ceee086f63ac2dTransfer258046592023-02-04 2:26:132 days 10 hrs ago0x1cfac383fe30df0e0482a577ccaddbb30f7e0c48 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.001371587 26.5
0x5ec4476bd348d58a2911a6a2f47f659c5603dbfe2ee1d901a42167e333bf6761Deposit257984722023-02-03 22:57:332 days 13 hrs ago0xb602db4ddaa85b2f8495dba4fe6a9950178047ca IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0476291475 27.5
0x8069a2d1c66c17038b41a44014c745841415537d41fdcb1454809cedfdbb5bdcDeposit257957552023-02-03 21:26:122 days 15 hrs ago0xa395c12c8c1cdc021f0f13cfd6a8828e164927b9 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.045392152 26
0xd21c1d959bb2ba1a8a853d3462b7a410674897eb984bda24c4af1b23ba2d8715Deposit257937812023-02-03 20:19:542 days 16 hrs ago0x70714ac0e1ec1f65e4db8b22e89e3b4ea3baad20 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.0629504055 26.5
0xeefc237136f361e25f832f1f1d249568f459a9c84887b6b8c7e3afd39f22ce31Deposit257845402023-02-03 15:13:332 days 21 hrs ago0x5697a1f10436756acac30d03d483d52e5f7c0ccf IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.062951704 26.5
0x3cf2347b1ca3e1013a4c4ece440ff9e03ce841a902d7217f5a45eb4b75957e8cDeposit257687852023-02-03 6:22:363 days 6 hrs ago0x9e9266e2c5aa7e0fe3d81ba3f3352ce651766f72 IN  0xd0f41b1c9338eb9d374c83cc76b684ba3bb715570 AVAX0.096220917 26.5
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VectorStrategyForSAV2

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 18 : VectorStrategyForSAV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "../VariableRewardsStrategyForSA.sol";
import "../../lib/SafeERC20.sol";
import "../../lib/SafeMath.sol";
import "../../interfaces/IBoosterFeeCollector.sol";

import "./interfaces/IVectorMainStaking.sol";
import "./interfaces/IVectorPoolHelperV2.sol";

contract VectorStrategyForSAV2 is VariableRewardsStrategyForSA {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IERC20 private constant PTP = IERC20(0x22d4002028f537599bE9f666d1c4Fa138522f9c8);
    IERC20 private constant VTX = IERC20(0x5817D4F0b62A59b17f75207DA1848C2cE75e7AF4);

    IVectorMainStaking public immutable vectorMainStaking;
    IBoosterFeeCollector public boosterFeeCollector;

    constructor(
        string memory _name,
        address _depositToken,
        address _swapPairDepositToken,
        RewardSwapPairs[] memory _rewardSwapPairs,
        address _stakingContract,
        address _boosterFeeCollector,
        address _timelock,
        StrategySettings memory _strategySettings
    )
        VariableRewardsStrategyForSA(
            _name,
            _depositToken,
            _swapPairDepositToken,
            _rewardSwapPairs,
            _timelock,
            _strategySettings
        )
    {
        vectorMainStaking = IVectorMainStaking(_stakingContract);
        boosterFeeCollector = IBoosterFeeCollector(_boosterFeeCollector);
    }

    function updateBoosterFeeCollector(address _collector) public onlyOwner {
        boosterFeeCollector = IBoosterFeeCollector(_collector);
    }

    function _depositToStakingContract(uint256 _amount) internal override {
        IVectorPoolHelperV2 vectorPoolHelper = _vectorPoolHelper();
        depositToken.approve(address(vectorPoolHelper.mainStaking()), _amount);
        vectorPoolHelper.deposit(_amount);
        depositToken.approve(address(vectorPoolHelper.mainStaking()), 0);
    }

    function _withdrawFromStakingContract(uint256 _amount) internal override returns (uint256 _withdrawAmount) {
        uint256 balanceBefore = depositToken.balanceOf(address(this));
        _vectorPoolHelper().withdraw(_amount, 0);
        uint256 balanceAfter = depositToken.balanceOf(address(this));
        return balanceAfter.sub(balanceBefore);
    }

    function _emergencyWithdraw() internal override {
        IVectorPoolHelperV2 vectorPoolHelper = _vectorPoolHelper();
        depositToken.approve(address(vectorPoolHelper), 0);
        vectorPoolHelper.withdraw(totalDeposits(), 0);
    }

    function _pendingRewards() internal view override returns (Reward[] memory) {
        IVectorPoolHelperV2 vectorPoolHelper = _vectorPoolHelper();
        uint256 count = rewardCount;
        Reward[] memory pendingRewards = new Reward[](count);
        (uint256 pendingVTX, uint256 pendingPTP) = vectorPoolHelper.earned(address(PTP));
        uint256 boostFee = boosterFeeCollector.calculateBoostFee(address(this), pendingPTP);
        pendingRewards[0] = Reward({reward: address(PTP), amount: pendingPTP.sub(boostFee)});
        pendingRewards[1] = Reward({reward: address(VTX), amount: pendingVTX});
        uint256 offset = 2;
        for (uint256 i = 0; i < count; i++) {
            address rewardToken = supportedRewards[i];
            if (rewardToken == address(PTP) || rewardToken == address(VTX)) {
                continue;
            }
            (, uint256 pendingAdditionalReward) = vectorPoolHelper.earned(address(rewardToken));
            pendingRewards[offset] = Reward({reward: rewardToken, amount: pendingAdditionalReward});
            offset++;
        }
        return pendingRewards;
    }

    function _getRewards() internal override {
        uint256 ptpBalanceBefore = PTP.balanceOf(address(this));
        _vectorPoolHelper().getReward();
        uint256 amount = PTP.balanceOf(address(this)).sub(ptpBalanceBefore);
        uint256 boostFee = boosterFeeCollector.calculateBoostFee(address(this), amount);
        PTP.safeTransfer(address(boosterFeeCollector), boostFee);
    }

    function totalDeposits() public view override returns (uint256) {
        return _vectorPoolHelper().depositTokenBalance(address(this));
    }

    function _vectorPoolHelper() private view returns (IVectorPoolHelperV2) {
        (, , , , , , , , address helper) = vectorMainStaking.getPoolInfo(address(depositToken));
        return IVectorPoolHelperV2(helper);
    }
}

File 2 of 18 : VariableRewardsStrategyForSA.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "../interfaces/IPair.sol";
import "../lib/DexLibrary.sol";
import "./VariableRewardsStrategy.sol";

/**
 * @notice Adapter strategy for VariableRewardsStrategy with SA deposit.
 */
abstract contract VariableRewardsStrategyForSA is VariableRewardsStrategy {
    address private swapPairDepositToken;

    constructor(
        string memory _name,
        address _depositToken,
        address _swapPairDepositToken,
        RewardSwapPairs[] memory _rewardSwapPairs,
        address _timelock,
        StrategySettings memory _strategySettings
    ) VariableRewardsStrategy(_name, _depositToken, _rewardSwapPairs, _timelock, _strategySettings) {
        assignSwapPairSafely(_swapPairDepositToken);
    }

    function assignSwapPairSafely(address _swapPairDepositToken) private {
        require(
            DexLibrary.checkSwapPairCompatibility(
                IPair(_swapPairDepositToken),
                address(depositToken),
                address(rewardToken)
            ),
            "VariableRewardsStrategyForSA::swapPairDepositToken does not match deposit and reward token"
        );
        swapPairDepositToken = _swapPairDepositToken;
    }

    function _convertRewardTokenToDepositToken(uint256 fromAmount)
        internal
        virtual
        override
        returns (uint256 toAmount)
    {
        toAmount = DexLibrary.swap(
            fromAmount,
            address(rewardToken),
            address(depositToken),
            IPair(swapPairDepositToken)
        );
    }
}

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

pragma solidity 0.8.13;

import "../interfaces/IERC20.sol";
import "./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 4 of 18 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity 0.8.13;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

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

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

File 5 of 18 : IBoosterFeeCollector.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IBoosterFeeCollector {
    function setBoostFee(address _strategy, uint256 _boostFeeBips) external;

    function setPaused(bool _paused) external;

    function calculateBoostFee(address _strategy, uint256 _amount) external view returns (uint256);

    function compound() external;

    function sweepTokens(address tokenAddress, uint256 tokenAmount) external;
}

File 6 of 18 : IVectorMainStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IVectorMainStaking {
    /// @notice Get the information of a pool
    /// @param _address the address of the deposit token to fetch information for
    /// @return pid the pid of the pool
    /// @return isActive true if the pool is active
    /// @return token the deposit Token
    /// @return lp the address of the PTP Lp token
    /// @return sizeLp the total number of LP tokens of this pool
    /// @return receipt - the address of the receipt token of this pool
    /// @return size the total number of stable staked by this pool
    /// @return rewards_addr the address of the rewarder
    /// @return helper the address of the poolHelper
    function getPoolInfo(address _address)
        external
        view
        returns (
            uint256 pid,
            bool isActive,
            address token,
            address lp,
            uint256 sizeLp,
            address receipt,
            uint256 size,
            address rewards_addr,
            address helper
        );
}

File 7 of 18 : IVectorPoolHelperV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IVectorPoolHelperV2 {
    function depositTokenBalance(address _account) external view returns (uint256);

    function mainStaking() external view returns (address);

    function masterVtx() external view returns (address);

    function stakingToken() external view returns (address);

    function earned(address token) external view returns (uint256 vtxAmount, uint256 tokenAmount);

    function deposit(uint256 _amount) external;

    function stake(uint256 _amount) external;

    function withdraw(uint256 amount, uint256 minAmount) external;

    function getReward() external;
}

File 8 of 18 : IPair.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./IERC20.sol";

interface IPair is IERC20 {
    function token0() external pure returns (address);

    function token1() external pure returns (address);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function mint(address to) external returns (uint256 liquidity);

    function sync() external;
}

File 9 of 18 : DexLibrary.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./SafeMath.sol";
import "./SafeERC20.sol";
import "../interfaces/IPair.sol";
import "../interfaces/IWAVAX.sol";

library DexLibrary {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    bytes private constant zeroBytes = new bytes(0);
    IWAVAX private constant WAVAX = IWAVAX(0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7);

    /**
     * @notice Swap directly through a Pair
     * @param amountIn input amount
     * @param fromToken address
     * @param toToken address
     * @param pair Pair used for swap
     * @return output amount
     */
    function swap(
        uint256 amountIn,
        address fromToken,
        address toToken,
        IPair pair
    ) internal returns (uint256) {
        (address token0, ) = sortTokens(fromToken, toToken);
        (uint112 reserve0, uint112 reserve1, ) = pair.getReserves();
        if (token0 != fromToken) (reserve0, reserve1) = (reserve1, reserve0);
        uint256 amountOut1 = 0;
        uint256 amountOut2 = getAmountOut(amountIn, reserve0, reserve1);
        if (token0 != fromToken) (amountOut1, amountOut2) = (amountOut2, amountOut1);
        IERC20(fromToken).safeTransfer(address(pair), amountIn);
        pair.swap(amountOut1, amountOut2, address(this), zeroBytes);
        return amountOut2 > amountOut1 ? amountOut2 : amountOut1;
    }

    function checkSwapPairCompatibility(
        IPair pair,
        address tokenA,
        address tokenB
    ) internal pure returns (bool) {
        return
            (tokenA == pair.token0() || tokenA == pair.token1()) &&
            (tokenB == pair.token0() || tokenB == pair.token1()) &&
            tokenA != tokenB;
    }

    function estimateConversionThroughPair(
        uint256 amountIn,
        address fromToken,
        address toToken,
        IPair swapPair
    ) internal view returns (uint256) {
        (address token0, ) = sortTokens(fromToken, toToken);
        (uint112 reserve0, uint112 reserve1, ) = swapPair.getReserves();
        if (token0 != fromToken) (reserve0, reserve1) = (reserve1, reserve0);
        return getAmountOut(amountIn, reserve0, reserve1);
    }

    /**
     * @notice Converts reward tokens to deposit tokens
     * @dev No price checks enforced
     * @param amount reward tokens
     * @return deposit tokens
     */
    function convertRewardTokensToDepositTokens(
        uint256 amount,
        address rewardToken,
        address depositToken,
        IPair swapPairToken0,
        IPair swapPairToken1
    ) internal returns (uint256) {
        uint256 amountIn = amount.div(2);
        require(amountIn > 0, "DexLibrary::_convertRewardTokensToDepositTokens");

        address token0 = IPair(depositToken).token0();
        uint256 amountOutToken0 = amountIn;
        if (rewardToken != token0) {
            amountOutToken0 = DexLibrary.swap(amountIn, rewardToken, token0, swapPairToken0);
        }

        address token1 = IPair(depositToken).token1();
        uint256 amountOutToken1 = amountIn;
        if (rewardToken != token1) {
            amountOutToken1 = DexLibrary.swap(amountIn, rewardToken, token1, swapPairToken1);
        }

        return DexLibrary.addLiquidity(depositToken, amountOutToken0, amountOutToken1);
    }

    /**
     * @notice Add liquidity directly through a Pair
     * @dev Checks adding the max of each token amount
     * @param depositToken address
     * @param maxAmountIn0 amount token0
     * @param maxAmountIn1 amount token1
     * @return liquidity tokens
     */
    function addLiquidity(
        address depositToken,
        uint256 maxAmountIn0,
        uint256 maxAmountIn1
    ) internal returns (uint256) {
        (uint112 reserve0, uint112 reserve1, ) = IPair(address(depositToken)).getReserves();
        uint256 amountIn1 = _quoteLiquidityAmountOut(maxAmountIn0, reserve0, reserve1);
        if (amountIn1 > maxAmountIn1) {
            amountIn1 = maxAmountIn1;
            maxAmountIn0 = _quoteLiquidityAmountOut(maxAmountIn1, reserve1, reserve0);
        }

        IERC20(IPair(depositToken).token0()).safeTransfer(depositToken, maxAmountIn0);
        IERC20(IPair(depositToken).token1()).safeTransfer(depositToken, amountIn1);
        return IPair(depositToken).mint(address(this));
    }

    /**
     * @notice Quote liquidity amount out
     * @param amountIn input tokens
     * @param reserve0 size of input asset reserve
     * @param reserve1 size of output asset reserve
     * @return liquidity tokens
     */
    function _quoteLiquidityAmountOut(
        uint256 amountIn,
        uint256 reserve0,
        uint256 reserve1
    ) private pure returns (uint256) {
        return amountIn.mul(reserve1).div(reserve0);
    }

    /**
     * @notice Given two tokens, it'll return the tokens in the right order for the tokens pair
     * @dev TokenA must be different from TokenB, and both shouldn't be address(0), no validations
     * @param tokenA address
     * @param tokenB address
     * @return sorted tokens
     */
    function sortTokens(address tokenA, address tokenB) internal pure returns (address, address) {
        return tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
    }

    /**
     * @notice Given an input amount of an asset and pair reserves, returns maximum output amount of the other asset
     * @dev Assumes swap fee is 0.30%
     * @param amountIn input asset
     * @param reserveIn size of input asset reserve
     * @param reserveOut size of output asset reserve
     * @return maximum output amount
     */
    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256) {
        uint256 amountInWithFee = amountIn.mul(997);
        uint256 numerator = amountInWithFee.mul(reserveOut);
        uint256 denominator = reserveIn.mul(1000).add(amountInWithFee);
        return numerator.div(denominator);
    }
}

File 10 of 18 : VariableRewardsStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "../YakStrategyV2.sol";
import "../interfaces/IPair.sol";
import "../lib/DexLibrary.sol";
import "../lib/SafeERC20.sol";

/**
 * @notice VariableRewardsStrategy
 */
abstract contract VariableRewardsStrategy is YakStrategyV2 {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IWAVAX internal constant WAVAX = IWAVAX(0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7);

    struct Reward {
        address reward;
        uint256 amount;
    }

    struct RewardSwapPairs {
        address reward;
        address swapPair;
    }

    // reward -> swapPair
    mapping(address => address) public rewardSwapPairs;
    address[] public supportedRewards;
    uint256 public rewardCount;

    event AddReward(address rewardToken, address swapPair);
    event RemoveReward(address rewardToken);

    constructor(
        string memory _name,
        address _depositToken,
        RewardSwapPairs[] memory _rewardSwapPairs,
        address _timelock,
        StrategySettings memory _strategySettings
    ) YakStrategyV2(_strategySettings) {
        name = _name;
        depositToken = IERC20(_depositToken);
        rewardToken = IERC20(address(WAVAX));
        devAddr = 0x2D580F9CF2fB2D09BC411532988F2aFdA4E7BefF;

        for (uint256 i = 0; i < _rewardSwapPairs.length; i++) {
            _addReward(_rewardSwapPairs[i].reward, _rewardSwapPairs[i].swapPair);
        }

        updateDepositsEnabled(true);
        transferOwnership(_timelock);
        emit Reinvest(0, 0);
    }

    function addReward(address _rewardToken, address _swapPair) public onlyDev {
        _addReward(_rewardToken, _swapPair);
    }

    function _addReward(address _rewardToken, address _swapPair) internal {
        if (_rewardToken != address(rewardToken)) {
            require(
                DexLibrary.checkSwapPairCompatibility(IPair(_swapPair), _rewardToken, address(rewardToken)),
                "VariableRewardsStrategy::Swap pair does not contain reward token"
            );
        }
        rewardSwapPairs[_rewardToken] = _swapPair;
        supportedRewards.push(_rewardToken);
        rewardCount = rewardCount.add(1);
        emit AddReward(_rewardToken, _swapPair);
    }

    function removeReward(address _rewardToken) public onlyDev {
        delete rewardSwapPairs[_rewardToken];
        bool found = false;
        for (uint256 i = 0; i < supportedRewards.length; i++) {
            if (_rewardToken == supportedRewards[i]) {
                found = true;
                supportedRewards[i] = supportedRewards[supportedRewards.length - 1];
            }
        }
        require(found, "VariableRewardsStrategy::Reward to delete not found!");
        supportedRewards.pop();
        rewardCount = rewardCount.sub(1);
        emit RemoveReward(_rewardToken);
    }

    function calculateDepositFee(uint256 _amount) public view returns (uint256) {
        return _calculateDepositFee(_amount);
    }

    function calculateWithdrawFee(uint256 _amount) public view returns (uint256) {
        return _calculateWithdrawFee(_amount);
    }

    /**
     * @notice Deposit tokens to receive receipt tokens
     * @param _amount Amount of tokens to deposit
     */
    function deposit(uint256 _amount) external override {
        _deposit(msg.sender, _amount);
    }

    /**
     * @notice Deposit using Permit
     * @param _amount Amount of tokens to deposit
     * @param _deadline The time at which to expire the signature
     * @param _v The recovery byte of the signature
     * @param _r Half of the ECDSA signature pair
     * @param _s Half of the ECDSA signature pair
     */
    function depositWithPermit(
        uint256 _amount,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external override {
        depositToken.permit(msg.sender, address(this), _amount, _deadline, _v, _r, _s);
        _deposit(msg.sender, _amount);
    }

    function depositFor(address _account, uint256 _amount) external override {
        _deposit(_account, _amount);
    }

    function _deposit(address _account, uint256 _amount) internal {
        require(DEPOSITS_ENABLED == true, "VariableRewardsStrategy::Deposits disabled");
        if (MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST > 0) {
            uint256 estimatedTotalReward = checkReward();
            if (estimatedTotalReward > MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST) {
                _reinvest(true);
            }
        }
        require(
            depositToken.transferFrom(msg.sender, address(this), _amount),
            "VariableRewardsStrategy::Deposit token transfer failed"
        );
        uint256 depositFee = _calculateDepositFee(_amount);
        _mint(_account, getSharesForDepositTokens(_amount.sub(depositFee)));
        _stakeDepositTokens(_amount);
        emit Deposit(_account, _amount);
    }

    /**
     * @notice Withdraw fee bips from underlying farm
     */
    function _getDepositFeeBips() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @notice Calculate deposit fee of underlying farm
     * @dev Override if deposit fee is calculated dynamically
     */
    function _calculateDepositFee(uint256 _amount) internal view virtual returns (uint256) {
        uint256 depositFeeBips = _getDepositFeeBips();
        return _amount.mul(depositFeeBips).div(_bip());
    }

    function withdraw(uint256 _amount) external override {
        uint256 depositTokenAmount = getDepositTokensForShares(_amount);
        require(depositTokenAmount > 0, "VariableRewardsStrategy::Withdraw amount too low");
        uint256 withdrawAmount = _withdrawFromStakingContract(depositTokenAmount);
        uint256 withdrawFee = _calculateWithdrawFee(depositTokenAmount);
        depositToken.safeTransfer(msg.sender, withdrawAmount.sub(withdrawFee));
        _burn(msg.sender, _amount);
        emit Withdraw(msg.sender, depositTokenAmount);
    }

    /**
     * @notice Withdraw fee bips from underlying farm
     * @dev Important: Do not override if withdraw fee is deducted from the amount returned by _withdrawFromStakingContract
     */
    function _getWithdrawFeeBips() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @notice Calculate withdraw fee of underlying farm
     * @dev Override if withdraw fee is calculated dynamically
     * @dev Important: Do not override if withdraw fee is deducted from the amount returned by _withdrawFromStakingContract
     */
    function _calculateWithdrawFee(uint256 _amount) internal view virtual returns (uint256) {
        uint256 withdrawFeeBips = _getWithdrawFeeBips();
        return _amount.mul(withdrawFeeBips).div(_bip());
    }

    function reinvest() external override onlyEOA {
        _reinvest(false);
    }

    function _convertRewardsIntoWAVAX() private returns (uint256) {
        uint256 avaxAmount = WAVAX.balanceOf(address(this));
        uint256 count = supportedRewards.length;
        for (uint256 i = 0; i < count; i++) {
            address reward = supportedRewards[i];
            if (reward == address(WAVAX)) {
                uint256 balance = address(this).balance;
                if (balance > 0) {
                    WAVAX.deposit{value: balance}();
                    avaxAmount = avaxAmount.add(balance);
                }
                continue;
            }
            uint256 amount = IERC20(reward).balanceOf(address(this));
            if (amount > 0) {
                address swapPair = rewardSwapPairs[reward];
                if (swapPair > address(0)) {
                    avaxAmount = avaxAmount.add(DexLibrary.swap(amount, reward, address(rewardToken), IPair(swapPair)));
                }
            }
        }
        return avaxAmount;
    }

    /**
     * @notice Reinvest rewards from staking contract to deposit tokens
     * @dev Reverts if the expected amount of tokens are not returned from the staking contract
     */
    function _reinvest(bool userDeposit) private {
        _getRewards();
        uint256 amount = _convertRewardsIntoWAVAX();
        if (!userDeposit) {
            require(amount >= MIN_TOKENS_TO_REINVEST, "VariableRewardsStrategy::Reinvest amount too low");
        }

        uint256 devFee = amount.mul(DEV_FEE_BIPS).div(BIPS_DIVISOR);
        if (devFee > 0) {
            rewardToken.safeTransfer(devAddr, devFee);
        }

        uint256 reinvestFee = amount.mul(REINVEST_REWARD_BIPS).div(BIPS_DIVISOR);
        if (reinvestFee > 0) {
            rewardToken.safeTransfer(msg.sender, reinvestFee);
        }

        uint256 depositTokenAmount = _convertRewardTokenToDepositToken(amount.sub(devFee).sub(reinvestFee));

        _stakeDepositTokens(depositTokenAmount);
        emit Reinvest(totalDeposits(), totalSupply);
    }

    function _stakeDepositTokens(uint256 _amount) private {
        require(_amount > 0, "VariableRewardsStrategy::Stake amount too low");
        _depositToStakingContract(_amount);
    }

    function checkReward() public view override returns (uint256) {
        Reward[] memory rewards = _pendingRewards();
        uint256 estimatedTotalReward = WAVAX.balanceOf(address(this));
        estimatedTotalReward.add(address(this).balance);
        for (uint256 i = 0; i < rewards.length; i++) {
            address reward = rewards[i].reward;
            if (reward == address(WAVAX)) {
                estimatedTotalReward = estimatedTotalReward.add(rewards[i].amount);
            } else {
                uint256 balance = IERC20(reward).balanceOf(address(this));
                uint256 amount = balance.add(rewards[i].amount);
                address swapPair = rewardSwapPairs[rewards[i].reward];
                if (amount > 0 && swapPair > address(0)) {
                    estimatedTotalReward = estimatedTotalReward.add(
                        DexLibrary.estimateConversionThroughPair(amount, reward, address(WAVAX), IPair(swapPair))
                    );
                }
            }
        }
        return estimatedTotalReward;
    }

    /**
     * @notice Estimate recoverable balance after withdraw fee
     * @return deposit tokens after withdraw fee
     */
    function estimateDeployedBalance() external view override returns (uint256) {
        uint256 depositBalance = totalDeposits();
        uint256 withdrawFee = _calculateWithdrawFee(depositBalance);
        return depositBalance.sub(withdrawFee);
    }

    function rescueDeployedFunds(
        uint256 _minReturnAmountAccepted,
        bool /*_disableDeposits*/
    ) external override onlyOwner {
        uint256 balanceBefore = depositToken.balanceOf(address(this));
        _emergencyWithdraw();
        uint256 balanceAfter = depositToken.balanceOf(address(this));
        require(
            balanceAfter.sub(balanceBefore) >= _minReturnAmountAccepted,
            "VariableRewardsStrategy::Emergency withdraw minimum return amount not reached"
        );
        emit Reinvest(totalDeposits(), totalSupply);
        if (DEPOSITS_ENABLED == true) {
            updateDepositsEnabled(false);
        }
    }

    function _bip() internal view virtual returns (uint256) {
        return 10000;
    }

    /* VIRTUAL */
    function _convertRewardTokenToDepositToken(uint256 _fromAmount) internal virtual returns (uint256 toAmount);

    function _depositToStakingContract(uint256 _amount) internal virtual;

    function _withdrawFromStakingContract(uint256 _amount) internal virtual returns (uint256 withdrawAmount);

    function _emergencyWithdraw() internal virtual;

    function _getRewards() internal virtual;

    function _pendingRewards() internal view virtual returns (Reward[] memory);
}

File 11 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IERC20 {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

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

    function transfer(address recipient, uint256 amount) external returns (bool);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 12 of 18 : IWAVAX.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IWAVAX {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

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

    function withdraw(uint256) external;

    function approve(address to, uint256 value) external returns (bool);
}

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

pragma solidity 0.8.13;

/**
 * @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);
            }
        }
    }
}

File 14 of 18 : YakStrategyV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./lib/SafeMath.sol";
import "./lib/Ownable.sol";
import "./lib/Permissioned.sol";
import "./interfaces/IERC20.sol";
import "./YakERC20.sol";

/**
 * @notice YakStrategy should be inherited by new strategies
 */
abstract contract YakStrategyV2 is YakERC20, Ownable, Permissioned {
    using SafeMath for uint256;

    struct StrategySettings {
        uint256 minTokensToReinvest;
        uint256 devFeeBips;
        uint256 reinvestRewardBips;
    }

    IERC20 public depositToken;
    IERC20 public rewardToken;
    address public devAddr;

    uint256 public MIN_TOKENS_TO_REINVEST;
    uint256 public MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST;
    bool public DEPOSITS_ENABLED;

    uint256 public ADMIN_FEE_BIPS;
    uint256 public REINVEST_REWARD_BIPS;
    uint256 public DEV_FEE_BIPS;

    uint256 internal constant BIPS_DIVISOR = 10000;
    uint256 internal constant MAX_UINT = type(uint256).max;

    event Deposit(address indexed account, uint256 amount);
    event Withdraw(address indexed account, uint256 amount);
    event Reinvest(uint256 newTotalDeposits, uint256 newTotalSupply);
    event Recovered(address token, uint256 amount);
    event UpdateAdminFee(uint256 oldValue, uint256 newValue);
    event UpdateDevFee(uint256 oldValue, uint256 newValue);
    event UpdateReinvestReward(uint256 oldValue, uint256 newValue);
    event UpdateMinTokensToReinvest(uint256 oldValue, uint256 newValue);
    event UpdateMaxTokensToDepositWithoutReinvest(uint256 oldValue, uint256 newValue);
    event UpdateDevAddr(address oldValue, address newValue);
    event DepositsEnabled(bool newValue);

    /**
     * @notice Throws if called by smart contract
     */
    modifier onlyEOA() {
        require(tx.origin == msg.sender, "YakStrategy::onlyEOA");
        _;
    }

    /**
     * @notice Only called by dev
     */
    modifier onlyDev() {
        require(msg.sender == devAddr, "YakStrategy::onlyDev");
        _;
    }

    constructor(StrategySettings memory _strategySettings) {
        updateMinTokensToReinvest(_strategySettings.minTokensToReinvest);
        updateDevFee(_strategySettings.devFeeBips);
        updateReinvestReward(_strategySettings.reinvestRewardBips);
    }

    /**
     * @notice Revoke token allowance
     * @param token address
     * @param spender address
     */
    function revokeAllowance(address token, address spender) external onlyOwner {
        require(IERC20(token).approve(spender, 0));
    }

    /**
     * @notice Deposit and deploy deposits tokens to the strategy
     * @dev Must mint receipt tokens to `msg.sender`
     * @param amount deposit tokens
     */
    function deposit(uint256 amount) external virtual;

    /**
     * @notice Deposit using Permit
     * @dev Should revert for tokens without Permit
     * @param amount Amount of tokens to deposit
     * @param deadline The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function depositWithPermit(
        uint256 amount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external virtual;

    /**
     * @notice Deposit on behalf of another account
     * @dev Must mint receipt tokens to `account`
     * @param account address to receive receipt tokens
     * @param amount deposit tokens
     */
    function depositFor(address account, uint256 amount) external virtual;

    /**
     * @notice Redeem receipt tokens for deposit tokens
     * @param amount receipt tokens
     */
    function withdraw(uint256 amount) external virtual;

    /**
     * @notice Reinvest reward tokens into deposit tokens
     */
    function reinvest() external virtual;

    /**
     * @notice Estimate reinvest reward
     * @return reward tokens
     */
    function estimateReinvestReward() external view returns (uint256) {
        uint256 unclaimedRewards = checkReward();
        if (unclaimedRewards >= MIN_TOKENS_TO_REINVEST) {
            return unclaimedRewards.mul(REINVEST_REWARD_BIPS).div(BIPS_DIVISOR);
        }
        return 0;
    }

    /**
     * @notice Reward tokens avialable to strategy, including balance
     * @return reward tokens
     */
    function checkReward() public view virtual returns (uint256);

    /**
     * @notice Estimated deposit token balance deployed by strategy, excluding balance
     * @return deposit tokens
     */
    function estimateDeployedBalance() external view virtual returns (uint256);

    /**
     * @notice Rescue all available deployed deposit tokens back to Strategy
     * @param minReturnAmountAccepted min deposit tokens to receive
     * @param disableDeposits bool
     */
    function rescueDeployedFunds(uint256 minReturnAmountAccepted, bool disableDeposits) external virtual;

    /**
     * @notice This function returns a snapshot of last available quotes
     * @return total deposits available on the contract
     */
    function totalDeposits() public view virtual returns (uint256);

    /**
     * @notice Calculate receipt tokens for a given amount of deposit tokens
     * @dev If contract is empty, use 1:1 ratio
     * @dev Could return zero shares for very low amounts of deposit tokens
     * @param amount deposit tokens
     * @return receipt tokens
     */
    function getSharesForDepositTokens(uint256 amount) public view returns (uint256) {
        if (totalSupply.mul(totalDeposits()) == 0) {
            return amount;
        }
        return amount.mul(totalSupply).div(totalDeposits());
    }

    /**
     * @notice Calculate deposit tokens for a given amount of receipt tokens
     * @param amount receipt tokens
     * @return deposit tokens
     */
    function getDepositTokensForShares(uint256 amount) public view returns (uint256) {
        if (totalSupply.mul(totalDeposits()) == 0) {
            return 0;
        }
        return amount.mul(totalDeposits()).div(totalSupply);
    }

    /**
     * @notice Update reinvest min threshold
     * @param newValue threshold
     */
    function updateMinTokensToReinvest(uint256 newValue) public onlyOwner {
        emit UpdateMinTokensToReinvest(MIN_TOKENS_TO_REINVEST, newValue);
        MIN_TOKENS_TO_REINVEST = newValue;
    }

    /**
     * @notice Update reinvest max threshold before a deposit
     * @param newValue threshold
     */
    function updateMaxTokensToDepositWithoutReinvest(uint256 newValue) public onlyOwner {
        emit UpdateMaxTokensToDepositWithoutReinvest(MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST, newValue);
        MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST = newValue;
    }

    /**
     * @notice Update admin fee
     * @dev Deprecated; Kept for compatibility
     * @param newValue fee in BIPS; required to be 0
     */
    function updateAdminFee(uint256 newValue) public onlyOwner {
        require(newValue == 0);
        emit UpdateAdminFee(ADMIN_FEE_BIPS, newValue);
        ADMIN_FEE_BIPS = newValue;
    }

    /**
     * @notice Update developer fee
     * @param newValue fee in BIPS
     */
    function updateDevFee(uint256 newValue) public onlyOwner {
        require(newValue.add(REINVEST_REWARD_BIPS) <= BIPS_DIVISOR);
        emit UpdateDevFee(DEV_FEE_BIPS, newValue);
        DEV_FEE_BIPS = newValue;
    }

    /**
     * @notice Update reinvest reward
     * @param newValue fee in BIPS
     */
    function updateReinvestReward(uint256 newValue) public onlyOwner {
        require(newValue.add(DEV_FEE_BIPS) <= BIPS_DIVISOR);
        emit UpdateReinvestReward(REINVEST_REWARD_BIPS, newValue);
        REINVEST_REWARD_BIPS = newValue;
    }

    /**
     * @notice Enable/disable deposits
     * @param newValue bool
     */
    function updateDepositsEnabled(bool newValue) public onlyOwner {
        require(DEPOSITS_ENABLED != newValue);
        DEPOSITS_ENABLED = newValue;
        emit DepositsEnabled(newValue);
    }

    /**
     * @notice Update devAddr
     * @param newValue address
     */
    function updateDevAddr(address newValue) public onlyDev {
        emit UpdateDevAddr(devAddr, newValue);
        devAddr = newValue;
    }

    /**
     * @notice Recover ERC20 from contract
     * @param tokenAddress token address
     * @param tokenAmount amount to recover
     */
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(tokenAmount > 0);
        require(IERC20(tokenAddress).transfer(msg.sender, tokenAmount));
        emit Recovered(tokenAddress, tokenAmount);
    }

    /**
     * @notice Recover AVAX from contract
     * @param amount amount
     */
    function recoverAVAX(uint256 amount) external onlyOwner {
        require(amount > 0);
        payable(msg.sender).transfer(amount);
        emit Recovered(address(0), amount);
    }
}

File 15 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 16 of 18 : Permissioned.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./Ownable.sol";
import "./SafeMath.sol";

abstract contract Permissioned is Ownable {
    using SafeMath for uint256;

    uint256 public numberOfAllowedDepositors;
    mapping(address => bool) public allowedDepositors;

    event AllowDepositor(address indexed account);
    event RemoveDepositor(address indexed account);

    modifier onlyAllowedDeposits() {
        if (numberOfAllowedDepositors > 0) {
            require(allowedDepositors[msg.sender] == true, "Permissioned::onlyAllowedDeposits, not allowed");
        }
        _;
    }

    /**
     * @notice Add an allowed depositor
     * @param depositor address
     */
    function allowDepositor(address depositor) external onlyOwner {
        require(allowedDepositors[depositor] == false, "Permissioned::allowDepositor");
        allowedDepositors[depositor] = true;
        numberOfAllowedDepositors = numberOfAllowedDepositors.add(1);
        emit AllowDepositor(depositor);
    }

    /**
     * @notice Remove an allowed depositor
     * @param depositor address
     */
    function removeDepositor(address depositor) external onlyOwner {
        require(numberOfAllowedDepositors > 0, "Permissioned::removeDepositor, no allowed depositors");
        require(allowedDepositors[depositor] == true, "Permissioned::removeDepositor, not allowed");
        allowedDepositors[depositor] = false;
        numberOfAllowedDepositors = numberOfAllowedDepositors.sub(1);
        emit RemoveDepositor(depositor);
    }
}

File 17 of 18 : YakERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./lib/SafeMath.sol";
import "./interfaces/IERC20.sol";

abstract contract YakERC20 {
    using SafeMath for uint256;

    string public name = "Yield Yak";
    string public symbol = "YRT";
    uint8 public constant decimals = 18;
    uint256 public totalSupply;

    mapping(address => mapping(address => uint256)) internal allowances;
    mapping(address => uint256) internal balances;

    /// @dev keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")
    bytes32 public constant DOMAIN_TYPEHASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;

    /// @dev keccak256("1");
    bytes32 public constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;

    /// @dev keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    mapping(address => uint256) public nonces;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor() {}

    /**
     * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`
     * @param account The address of the account holding the funds
     * @param spender The address of the account spending the funds
     * @return The number of tokens approved
     */
    function allowance(address account, address spender) external view returns (uint256) {
        return allowances[account][spender];
    }

    /**
     * @notice Approve `spender` to transfer up to `amount` from `src`
     * @dev This will overwrite the approval amount for `spender`
     * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
     * It is recommended to use increaseAllowance and decreaseAllowance instead
     * @param spender The address of the account which may transfer tokens
     * @param amount The number of tokens that are approved (2^256-1 means infinite)
     * @return Whether or not the approval succeeded
     */
    function approve(address spender, uint256 amount) external returns (bool) {
        _approve(msg.sender, spender, amount);
        return true;
    }

    /**
     * @notice Get the number of tokens held by the `account`
     * @param account The address of the account to get the balance of
     * @return The number of tokens held
     */
    function balanceOf(address account) external view returns (uint256) {
        return balances[account];
    }

    /**
     * @notice Transfer `amount` tokens from `msg.sender` to `dst`
     * @param dst The address of the destination account
     * @param amount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transfer(address dst, uint256 amount) external returns (bool) {
        _transferTokens(msg.sender, dst, amount);
        return true;
    }

    /**
     * @notice Transfer `amount` tokens from `src` to `dst`
     * @param src The address of the source account
     * @param dst The address of the destination account
     * @param amount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transferFrom(
        address src,
        address dst,
        uint256 amount
    ) external returns (bool) {
        address spender = msg.sender;
        uint256 spenderAllowance = allowances[src][spender];

        if (spender != src && spenderAllowance != type(uint256).max) {
            uint256 newAllowance = spenderAllowance.sub(amount, "transferFrom: transfer amount exceeds allowance");
            allowances[src][spender] = newAllowance;

            emit Approval(src, spender, newAllowance);
        }

        _transferTokens(src, dst, amount);
        return true;
    }

    /**
     * @notice Approval implementation
     * @param owner The address of the account which owns tokens
     * @param spender The address of the account which may transfer tokens
     * @param amount The number of tokens that are approved (2^256-1 means infinite)
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal {
        require(owner != address(0), "_approve::owner zero address");
        require(spender != address(0), "_approve::spender zero address");
        allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @notice Transfer implementation
     * @param from The address of the account which owns tokens
     * @param to The address of the account which is receiving tokens
     * @param value The number of tokens that are being transferred
     */
    function _transferTokens(
        address from,
        address to,
        uint256 value
    ) internal {
        require(to != address(0), "_transferTokens: cannot transfer to the zero address");

        balances[from] = balances[from].sub(value, "_transferTokens: transfer exceeds from balance");
        balances[to] = balances[to].add(value);
        emit Transfer(from, to, value);
    }

    function _mint(address to, uint256 value) internal {
        totalSupply = totalSupply.add(value);
        balances[to] = balances[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint256 value) internal {
        balances[from] = balances[from].sub(value, "_burn: burn amount exceeds from balance");
        totalSupply = totalSupply.sub(value, "_burn: burn amount exceeds total supply");
        emit Transfer(from, address(0), value);
    }

    /**
     * @notice Triggers an approval from owner to spender
     * @param owner The address to approve from
     * @param spender The address to be approved
     * @param value The number of tokens that are approved (2^256-1 means infinite)
     * @param deadline The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        require(deadline >= block.timestamp, "permit::expired");

        bytes32 encodeData = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline));
        _validateSignedData(owner, encodeData, v, r, s);

        _approve(owner, spender, value);
    }

    /**
     * @notice Recovers address from signed data and validates the signature
     * @param signer Address that signed the data
     * @param encodeData Data signed by the address
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function _validateSignedData(
        address signer,
        bytes32 encodeData,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal view {
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", getDomainSeparator(), encodeData));
        address recoveredAddress = ecrecover(digest, v, r, s);
        // Explicitly disallow authorizations for address(0) as ecrecover returns address(0) on malformed messages
        require(recoveredAddress != address(0) && recoveredAddress == signer, "Arch::validateSig: invalid signature");
    }

    /**
     * @notice EIP-712 Domain separator
     * @return Separator
     */
    function getDomainSeparator() public view returns (bytes32) {
        return
            keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), VERSION_HASH, _getChainId(), address(this)));
    }

    /**
     * @notice Current id of the chain where this contract is deployed
     * @return Chain id
     */
    function _getChainId() internal view returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }
}

File 18 of 18 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

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

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

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_depositToken","type":"address"},{"internalType":"address","name":"_swapPairDepositToken","type":"address"},{"components":[{"internalType":"address","name":"reward","type":"address"},{"internalType":"address","name":"swapPair","type":"address"}],"internalType":"struct VariableRewardsStrategy.RewardSwapPairs[]","name":"_rewardSwapPairs","type":"tuple[]"},{"internalType":"address","name":"_stakingContract","type":"address"},{"internalType":"address","name":"_boosterFeeCollector","type":"address"},{"internalType":"address","name":"_timelock","type":"address"},{"components":[{"internalType":"uint256","name":"minTokensToReinvest","type":"uint256"},{"internalType":"uint256","name":"devFeeBips","type":"uint256"},{"internalType":"uint256","name":"reinvestRewardBips","type":"uint256"}],"internalType":"struct YakStrategyV2.StrategySettings","name":"_strategySettings","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"address","name":"swapPair","type":"address"}],"name":"AddReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"AllowDepositor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newValue","type":"bool"}],"name":"DepositsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTotalDeposits","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalSupply","type":"uint256"}],"name":"Reinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RemoveDepositor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"}],"name":"RemoveReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateAdminFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValue","type":"address"},{"indexed":false,"internalType":"address","name":"newValue","type":"address"}],"name":"UpdateDevAddr","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateDevFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateMaxTokensToDepositWithoutReinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateMinTokensToReinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateReinvestReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ADMIN_FEE_BIPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSITS_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEV_FEE_BIPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_TOKENS_TO_REINVEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REINVEST_REWARD_BIPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_swapPair","type":"address"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"}],"name":"allowDepositor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedDepositors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boosterFeeCollector","outputs":[{"internalType":"contract IBoosterFeeCollector","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateDepositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"estimateDeployedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"estimateReinvestReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getDepositTokensForShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getSharesForDepositTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfAllowedDepositors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"}],"name":"removeDepositor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"removeReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minReturnAmountAccepted","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"name":"rescueDeployedFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"revokeAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardSwapPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportedRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateAdminFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collector","type":"address"}],"name":"updateBoosterFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newValue","type":"bool"}],"name":"updateDepositsEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newValue","type":"address"}],"name":"updateDevAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateDevFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateMaxTokensToDepositWithoutReinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateMinTokensToReinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateReinvestReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vectorMainStaking","outputs":[{"internalType":"contract IVectorMainStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e0604052600960a0819052685969656c642059616b60b81b60c09081526200002c916000919062000ada565b506040805180820190915260038082526216549560ea1b6020909201918252620000599160019162000ada565b503480156200006757600080fd5b5060405162005a2e38038062005a2e8339810160408190526200008a9162000d31565b878787878585858584848480600033600680546001600160a01b0319166001600160a01b0383169081179091556040519192509060009060008051602062005a0e833981519152908290a3508051620000e3906200028a565b6020810151620000f3906200031a565b60408101516200010390620003d1565b5084516200011990600090602088019062000ada565b50600980546001600160a01b0386166001600160a01b031991821617909155600a8054821673b31f66aa3c1e785363f0875a1b74e27b85fd66c7179055600b8054909116732d580f9cf2fb2d09bc411532988f2afda4e7beff17905560005b8351811015620001e957620001d48482815181106200019b576200019b62000e87565b602002602001015160000151858381518110620001bc57620001bc62000e87565b6020026020010151602001516200048860201b60201c565b80620001e08162000eb3565b91505062000178565b50620001f6600162000611565b6200020182620006bb565b60408051600080825260208201527fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef234910160405180910390a150505050506200025084620007b860201b60201c565b505050506001600160a01b039586166080525050601680546001600160a01b03191693909416929092179092555062000f44945050505050565b6006546001600160a01b03163314620002d95760405162461bcd60e51b81526020600482018190526024820152600080516020620059ee83398151915260448201526064015b60405180910390fd5b600c5460408051918252602082018390527f481f79ac3a523b6d6db3c5a720e190e986d1cc1b41adcdf50f9caef849901100910160405180910390a1600c55565b6006546001600160a01b03163314620003655760405162461bcd60e51b81526020600482018190526024820152600080516020620059ee8339815191526044820152606401620002d0565b6127106200038460105483620008a060201b620023241790919060201c565b11156200039057600080fd5b60115460408051918252602082018390527f2a42303d002f0ba6cfe8259c91d4684443fb0b3de286ba74991175d651726131910160405180910390a1601155565b6006546001600160a01b031633146200041c5760405162461bcd60e51b81526020600482018190526024820152600080516020620059ee8339815191526044820152606401620002d0565b6127106200043b60115483620008a060201b620023241790919060201c565b11156200044757600080fd5b60105460408051918252602082018390527fe7f97d51d307dc44045597c9978bec0f842e6bb40d19b9444084cfa30d9ed4f2910160405180910390a1601055565b600a546001600160a01b038381169116146200054157620004cb8183600a60009054906101000a90046001600160a01b0316620008b560201b620023301760201c565b62000541576040805162461bcd60e51b81526020600482015260248101919091527f5661726961626c655265776172647353747261746567793a3a5377617020706160448201527f697220646f6573206e6f7420636f6e7461696e2072657761726420746f6b656e6064820152608401620002d0565b6001600160a01b038083166000818152601260209081526040822080549486166001600160a01b03199586161790556013805460018181018355919093527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0909092018054909416909217909255601454620005c792909162002324620008a0821b17901c565b601455604080516001600160a01b038085168252831660208201527f916e172c080569186aa7ea048268267257cf7cc49505908863f747bca8620f80910160405180910390a15050565b6006546001600160a01b031633146200065c5760405162461bcd60e51b81526020600482018190526024820152600080516020620059ee8339815191526044820152606401620002d0565b600e5481151560ff9091161515036200067457600080fd5b600e805460ff19168215159081179091556040519081527f7b014ed3854e7f5cb0218d58b3c6ae7d53a68bb0af2f67bfb029ea42c38a7e859060200160405180910390a150565b6006546001600160a01b03163314620007065760405162461bcd60e51b81526020600482018190526024820152600080516020620059ee8339815191526044820152606401620002d0565b6001600160a01b0381166200076d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620002d0565b6006546040516001600160a01b0380841692169060008051602062005a0e83398151915290600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b600954600a54620007e49183916001600160a01b039182169116620008b5602090811b6200233017901c565b6200087e5760405162461bcd60e51b815260206004820152605a60248201527f5661726961626c65526577617264735374726174656779466f7253413a3a737760448201527f6170506169724465706f736974546f6b656e20646f6573206e6f74206d61746360648201527f68206465706f73697420616e642072657761726420746f6b656e000000000000608482015260a401620002d0565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6000620008ae828462000ecf565b9392505050565b6000836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008f6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200091c919062000eea565b6001600160a01b0316836001600160a01b03161480620009b15750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000976573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200099c919062000eea565b6001600160a01b0316836001600160a01b0316145b801562000ab35750836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015620009f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a1e919062000eea565b6001600160a01b0316826001600160a01b0316148062000ab35750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000a78573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a9e919062000eea565b6001600160a01b0316826001600160a01b0316145b801562000ad25750816001600160a01b0316836001600160a01b031614155b949350505050565b82805462000ae89062000f08565b90600052602060002090601f01602090048101928262000b0c576000855562000b57565b82601f1062000b2757805160ff191683800117855562000b57565b8280016001018555821562000b57579182015b8281111562000b5757825182559160200191906001019062000b3a565b5062000b6592915062000b69565b5090565b5b8082111562000b65576000815560010162000b6a565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b038111828210171562000bbb5762000bbb62000b80565b60405290565b604051601f8201601f191681016001600160401b038111828210171562000bec5762000bec62000b80565b604052919050565b80516001600160a01b038116811462000c0c57600080fd5b919050565b600082601f83011262000c2357600080fd5b815160206001600160401b0382111562000c415762000c4162000b80565b62000c51818360051b0162000bc1565b82815260069290921b8401810191818101908684111562000c7157600080fd5b8286015b8481101562000cc7576040818903121562000c905760008081fd5b62000c9a62000b96565b62000ca58262000bf4565b815262000cb485830162000bf4565b8186015283529183019160400162000c75565b509695505050505050565b60006060828403121562000ce557600080fd5b604051606081016001600160401b038111828210171562000d0a5762000d0a62000b80565b80604052508091508251815260208301516020820152604083015160408201525092915050565b600080600080600080600080610140898b03121562000d4f57600080fd5b88516001600160401b038082111562000d6757600080fd5b818b0191508b601f83011262000d7c57600080fd5b81518181111562000d915762000d9162000b80565b602062000da7601f8301601f1916820162000bc1565b8281528e8284870101111562000dbc57600080fd5b60005b8381101562000ddc57858101830151828201840152820162000dbf565b8381111562000dee5760008385840101525b509b5062000dfe8d820162000bf4565b9a50505062000e1060408c0162000bf4565b975060608b015191508082111562000e2757600080fd5b5062000e368b828c0162000c11565b95505062000e4760808a0162000bf4565b935062000e5760a08a0162000bf4565b925062000e6760c08a0162000bf4565b915062000e788a60e08b0162000cd2565b90509295985092959890939650565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000ec85762000ec862000e9d565b5060010190565b6000821982111562000ee55762000ee562000e9d565b500190565b60006020828403121562000efd57600080fd5b620008ae8262000bf4565b600181811c9082168062000f1d57607f821691505b60208210810362000f3e57634e487b7160e01b600052602260045260246000fd5b50919050565b608051614a8762000f676000396000818161061e0152612e4b0152614a876000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c806381837230116101ff578063b9e57b801161011a578063dd8ce4d6116100ad578063ed24911d1161007c578063ed24911d14610887578063f2fde38b1461088f578063f7c618c1146108a2578063fdb5a03e146108b557600080fd5b8063dd8ce4d61461083b578063e21ac8251461084e578063e75ab04514610861578063eab89a5a1461087457600080fd5b8063cff1b6ef116100e9578063cff1b6ef146107c9578063d505accf146107dc578063da09c72c146107ef578063dd62ed3e1461080257600080fd5b8063b9e57b801461079d578063bd079f55146107a5578063c4b24a46146107ae578063c89039c5146107b657600080fd5b80639e4e731811610192578063a9059cbb11610161578063a9059cbb14610757578063ac0d31ff1461076a578063b52a321f1461077d578063b6b55f251461078a57600080fd5b80639e4e7318146106e1578063a4d5e67c14610708578063a5534e711461071b578063a8ae2b7c1461074457600080fd5b80638da5cb5b116101ce5780638da5cb5b146106a25780639291d563146106b357806395d89b41146106c657806399729ec1146106ce57600080fd5b806381837230146106605780638980f11f146106735780638aff733d146106865780638b73e6061461068f57600080fd5b806340b47e1a116102ef57806370a08231116102825780637ae26773116102515780637ae26773146105fe5780637d882097146106115780637e08c185146106195780637ecebe001461064057600080fd5b806370a08231146105bb578063715018a6146105e4578063789139bc146105ec57806379085425146105f557600080fd5b80634e77ace5116102be5780634e77ace5146105795780634ebb79161461058c5780635ea682ea1461059f5780636c8b4b52146105a857600080fd5b806340b47e1a1461051d578063483c2ef0146105305780634a970be7146105535780634bebd1e71461056657600080fd5b806320606b70116103675780632f4f21e2116103365780632f4f21e2146104c057806330adf81f146104d3578063313ce567146104fa5780633bdc6e721461051457600080fd5b806320606b701461047157806323b872dd14610498578063247d284b146104555780632e1a7d4d146104ab57600080fd5b80630f23475d116103a35780630f23475d146104225780630fccc4001461042a578063110560351461045557806318160ddd1461046857600080fd5b806306fdde03146103ca57806307677111146103e8578063095ea7b3146103ff575b600080fd5b6103d26108bd565b6040516103df91906143d2565b60405180910390f35b6103f1600f5481565b6040519081526020016103df565b61041261040d3660046143fa565b61094b565b60405190151581526020016103df565b6103f1610961565b60165461043d906001600160a01b031681565b6040516001600160a01b0390911681526020016103df565b6103f1610463366004614426565b61098c565b6103f160025481565b6103f17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6104126104a636600461443f565b61099d565b6104be6104b9366004614426565b610a81565b005b6104be6104ce3660046143fa565b610b89565b6103f17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b610502601281565b60405160ff90911681526020016103df565b6103f160075481565b6104be61052b366004614480565b610b97565b61041261053e3660046144b9565b60086020526000908152604090205460ff1681565b6104be6105613660046144ec565b610bfb565b6104be6105743660046144b9565b610cad565b6104be610587366004614541565b610dca565b6104be61059a366004614426565b610e71565b6103f160115481565b6104be6105b63660046144b9565b610f2b565b6103f16105c93660046144b9565b6001600160a01b031660009081526004602052604090205490565b6104be610f95565b6103f1600d5481565b6103f160145481565b6104be61060c366004614480565b611027565b6103f16110eb565b61043d7f000000000000000000000000000000000000000000000000000000000000000081565b6103f161064e3660046144b9565b60056020526000908152604090205481565b6104be61066e366004614426565b61117d565b6104be6106813660046143fa565b611206565b6103f160105481565b6104be61069d3660046144b9565b61131c565b6006546001600160a01b031661043d565b6104be6106c13660046144b9565b6114d7565b6103d261159a565b6104be6106dc366004614426565b6115a7565b6103f17fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b6104be6107163660046144b9565b611653565b61043d6107293660046144b9565b6012602052600090815260409020546001600160a01b031681565b6104be610752366004614426565b611892565b6104126107653660046143fa565b61193e565b6104be61077836600461455e565b61194b565b600e546104129060ff1681565b6104be610798366004614426565b611b81565b6103f1611b8e565b6103f1600c5481565b6103f1611bd3565b60095461043d906001600160a01b031681565b6104be6107d7366004614426565b611e41565b6104be6107ea366004614583565b611ed5565b600b5461043d906001600160a01b031681565b6103f1610810366004614480565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6103f1610849366004614426565b611fe8565b6104be61085c366004614426565b612022565b61043d61086f366004614426565b6120ab565b6103f1610882366004614426565b6120d5565b6103f1612109565b6104be61089d3660046144b9565b6121a9565b600a5461043d906001600160a01b031681565b6104be6122c9565b600080546108ca906145f1565b80601f01602080910402602001604051908101604052809291908181526020018280546108f6906145f1565b80156109435780601f1061091857610100808354040283529160200191610943565b820191906000526020600020905b81548152906001019060200180831161092657829003601f168201915b505050505081565b6000610958338484612545565b50600192915050565b60008061096c6110eb565b9050600061097982612653565b90506109858282612666565b9250505090565b600061099782612653565b92915050565b6001600160a01b0383166000818152600360209081526040808320338085529252822054919290919082148015906109d757506000198114155b15610a68576000610a03856040518060600160405280602f81526020016149ce602f9139849190612672565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b610a7386868661269e565b6001925050505b9392505050565b6000610a8c826120d5565b905060008111610b095760405162461bcd60e51b815260206004820152603060248201527f5661726961626c655265776172647353747261746567793a3a5769746864726160448201527f7720616d6f756e7420746f6f206c6f770000000000000000000000000000000060648201526084015b60405180910390fd5b6000610b14826127da565b90506000610b2183612653565b9050610b4433610b318484612666565b6009546001600160a01b0316919061294c565b610b4e33856129b8565b60405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250505050565b610b938282612a8e565b5050565b600b546001600160a01b03163314610bf15760405162461bcd60e51b815260206004820152601460248201527f59616b53747261746567793a3a6f6e6c794465760000000000000000000000006044820152606401610b00565b610b938282612caf565b6009546040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c481018390526001600160a01b039091169063d505accf9060e401600060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b50505050610ca63386612a8e565b5050505050565b6006546001600160a01b03163314610cf55760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6001600160a01b03811660009081526008602052604090205460ff1615610d5e5760405162461bcd60e51b815260206004820152601c60248201527f5065726d697373696f6e65643a3a616c6c6f774465706f7369746f72000000006044820152606401610b00565b6001600160a01b0381166000908152600860205260409020805460ff19166001908117909155600754610d9091612324565b6007556040516001600160a01b038216907fc0a1035c16faf8d1304056d92c00edf028f87e62b8235a938f00af9e3c0312c590600090a250565b6006546001600160a01b03163314610e125760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b600e5481151560ff909116151503610e2957600080fd5b600e805460ff19168215159081179091556040519081527f7b014ed3854e7f5cb0218d58b3c6ae7d53a68bb0af2f67bfb029ea42c38a7e85906020015b60405180910390a150565b6006546001600160a01b03163314610eb95760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b60008111610ec657600080fd5b604051339082156108fc029083906000818181858888f19350505050158015610ef3573d6000803e3d6000fd5b506040805160008152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289101610e66565b6006546001600160a01b03163314610f735760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314610fdd5760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6006546001600160a01b0316331461106f5760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b60405163095ea7b360e01b81526001600160a01b0382811660048301526000602483015283169063095ea7b3906044016020604051808303816000875af11580156110be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e2919061462b565b610b9357600080fd5b60006110f5612e0b565b6040517fa4e7f6760000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03919091169063a4e7f67690602401602060405180830381865afa158015611154573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111789190614648565b905090565b6006546001600160a01b031633146111c55760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b600c5460408051918252602082018390527f481f79ac3a523b6d6db3c5a720e190e986d1cc1b41adcdf50f9caef849901100910160405180910390a1600c55565b6006546001600160a01b0316331461124e5760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6000811161125b57600080fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156112a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cc919061462b565b6112d557600080fd5b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2891015b60405180910390a15050565b6006546001600160a01b031633146113645760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6000600754116113dc5760405162461bcd60e51b815260206004820152603460248201527f5065726d697373696f6e65643a3a72656d6f76654465706f7369746f722c206e60448201527f6f20616c6c6f776564206465706f7369746f72730000000000000000000000006064820152608401610b00565b6001600160a01b03811660009081526008602052604090205460ff16151560011461146f5760405162461bcd60e51b815260206004820152602a60248201527f5065726d697373696f6e65643a3a72656d6f76654465706f7369746f722c206e60448201527f6f7420616c6c6f776564000000000000000000000000000000000000000000006064820152608401610b00565b6001600160a01b0381166000908152600860205260409020805460ff1916905560075461149d906001612666565b6007556040516001600160a01b038216907f0e86f6608b536e5339a25b65ff531f5ea91e1313d056ecd4752b35cbd16137d490600090a250565b600b546001600160a01b031633146115315760405162461bcd60e51b815260206004820152601460248201527f59616b53747261746567793a3a6f6e6c794465760000000000000000000000006044820152606401610b00565b600b54604080516001600160a01b03928316815291831660208301527fa8e91499ed37682f43cffb045fcc7d379a91e8c9a14e6321877ee34dee564c00910160405180910390a1600b80546001600160a01b0319166001600160a01b0392909216919091179055565b600180546108ca906145f1565b6006546001600160a01b031633146115ef5760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6127106116076010548361232490919063ffffffff16565b111561161257600080fd5b60115460408051918252602082018390527f2a42303d002f0ba6cfe8259c91d4684443fb0b3de286ba74991175d651726131910160405180910390a1601155565b600b546001600160a01b031633146116ad5760405162461bcd60e51b815260206004820152601460248201527f59616b53747261746567793a3a6f6e6c794465760000000000000000000000006044820152606401610b00565b6001600160a01b038116600090815260126020526040812080546001600160a01b0319169055805b6013548110156117a157601381815481106116f2576116f2614661565b6000918252602090912001546001600160a01b039081169084160361178f57601380546001935061172490849061468d565b8154811061173457611734614661565b600091825260209091200154601380546001600160a01b03909216918390811061176057611760614661565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80611799816146a4565b9150506116d5565b50806118155760405162461bcd60e51b815260206004820152603460248201527f5661726961626c655265776172647353747261746567793a3a5265776172642060448201527f746f2064656c657465206e6f7420666f756e64210000000000000000000000006064820152608401610b00565b6013805480611826576118266146bd565b600082815260209020810160001990810180546001600160a01b0319169055019055601454611856906001612666565b6014556040516001600160a01b03831681527f963b7c735475147a62c589c2d7cb8ec4b0a6b7af4f97373d79ebfa42ab8aa7dc90602001611310565b6006546001600160a01b031633146118da5760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6127106118f26011548361232490919063ffffffff16565b11156118fd57600080fd5b60105460408051918252602082018390527fe7f97d51d307dc44045597c9978bec0f842e6bb40d19b9444084cfa30d9ed4f2910160405180910390a1601055565b600061095833848461269e565b6006546001600160a01b031633146119935760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156119dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a009190614648565b9050611a0a612ec7565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a779190614648565b905083611a848284612666565b1015611b1e5760405162461bcd60e51b815260206004820152604d60248201527f5661726961626c655265776172647353747261746567793a3a456d657267656e60448201527f6379207769746864726177206d696e696d756d2072657475726e20616d6f756e60648201527f74206e6f74207265616368656400000000000000000000000000000000000000608482015260a401610b00565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef234611b476110eb565b6002546040805192835260208301919091520160405180910390a1600e5460ff161515600103611b7b57611b7b6000610dca565b50505050565b611b8b3382612a8e565b50565b600080611b99611bd3565b9050600c548110611bcb57611bc5612710611bbf60105484612fce90919063ffffffff16565b90612fda565b91505090565b600091505090565b600080611bde612fe6565b6040516370a0823160e01b815230600482015290915060009073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a0823190602401602060405180830381865afa158015611c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c579190614648565b9050611c638147612324565b5060005b8251811015611e3a576000838281518110611c8457611c84614661565b602002602001015160000151905073b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b0316816001600160a01b031603611cf657611cef848381518110611cd457611cd4614661565b6020026020010151602001518461232490919063ffffffff16565b9250611e27565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611d3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d619190614648565b90506000611d95868581518110611d7a57611d7a614661565b6020026020010151602001518361232490919063ffffffff16565b9050600060126000888781518110611daf57611daf614661565b602090810291909101810151516001600160a01b03908116835290820192909252604001600020541690508115801590611df157506001600160a01b03811615155b15611e2357611e20611e19838673b31f66aa3c1e785363f0875a1b74e27b85fd66c785613354565b8790612324565b95505b5050505b5080611e32816146a4565b915050611c67565b5092915050565b6006546001600160a01b03163314611e895760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b8015611e9457600080fd5b600f5460408051918252602082018390527f3cc372f330f95ac9540626dc8a25f5bf21ba607215a5d58304cb804d446f104a910160405180910390a1600f55565b42841015611f255760405162461bcd60e51b815260206004820152600f60248201527f7065726d69743a3a6578706972656400000000000000000000000000000000006044820152606401610b00565b6001600160a01b038716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a919086611f72836146a4565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050611fd38882868686613420565b611fde888888612545565b5050505050505050565b6000611ffe611ff56110eb565b60025490612fce565b600003612009575090565b6109976120146110eb565b600254611bbf908590612fce565b6006546001600160a01b0316331461206a5760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b600d5460408051918252602082018390527fa5dae50539d56dfe1fb5273d883b0c39bc76750a25d036fc5fbd09ad8fd5f57f910160405180910390a1600d55565b601381815481106120bb57600080fd5b6000918252602090912001546001600160a01b0316905081565b60006120e2611ff56110eb565b6000036120f157506000919050565b610997600254611bbf6121026110eb565b8590612fce565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60001b600060405161213e91906146d3565b6040519081900390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6006546001600160a01b031633146121f15760405162461bcd60e51b815260206004820181905260248201526000805160206149ae8339815191526044820152606401610b00565b6001600160a01b03811661226d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b00565b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b3233146123185760405162461bcd60e51b815260206004820152601460248201527f59616b53747261746567793a3a6f6e6c79454f410000000000000000000000006044820152606401610b00565b6123226000613580565b565b6000610a7a828461476e565b6000836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015612370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123949190614786565b6001600160a01b0316836001600160a01b031614806124255750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124109190614786565b6001600160a01b0316836001600160a01b0316145b801561251f5750836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561246a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248e9190614786565b6001600160a01b0316826001600160a01b0316148061251f5750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250a9190614786565b6001600160a01b0316826001600160a01b0316145b801561253d5750816001600160a01b0316836001600160a01b031614155b949350505050565b6001600160a01b03831661259b5760405162461bcd60e51b815260206004820152601c60248201527f5f617070726f76653a3a6f776e6572207a65726f2061646472657373000000006044820152606401610b00565b6001600160a01b0382166125f15760405162461bcd60e51b815260206004820152601e60248201527f5f617070726f76653a3a7370656e646572207a65726f206164647265737300006044820152606401610b00565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600080610a7a612710611bbf8584612fce565b6000610a7a828461468d565b600081848411156126965760405162461bcd60e51b8152600401610b0091906143d2565b505050900390565b6001600160a01b03821661271a5760405162461bcd60e51b815260206004820152603460248201527f5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e7366657260448201527f20746f20746865207a65726f20616464726573730000000000000000000000006064820152608401610b00565b612757816040518060600160405280602e8152602001614a24602e91396001600160a01b0386166000908152600460205260409020549190612672565b6001600160a01b0380851660009081526004602052604080822093909355908416815220546127869082612324565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906126469085815260200190565b6009546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612827573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284b9190614648565b9050612855612e0b565b6040517f441a3e7000000000000000000000000000000000000000000000000000000000815260048101859052600060248201526001600160a01b03919091169063441a3e7090604401600060405180830381600087803b1580156128b957600080fd5b505af11580156128cd573d6000803e3d6000fd5b50506009546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa15801561291c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129409190614648565b905061253d8183612666565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526129b3908490613703565b505050565b6129f5816040518060600160405280602781526020016149fd602791396001600160a01b0385166000908152600460205260409020549190612672565b60046000846001600160a01b03166001600160a01b0316815260200190815260200160002081905550612a4581604051806060016040528060278152602001614987602791396002549190612672565b6002556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b600e5460ff161515600114612b0b5760405162461bcd60e51b815260206004820152602a60248201527f5661726961626c655265776172647353747261746567793a3a4465706f73697460448201527f732064697361626c6564000000000000000000000000000000000000000000006064820152608401610b00565b600d5415612b35576000612b1d611bd3565b9050600d54811115612b3357612b336001613580565b505b6009546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015612ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bc9919061462b565b612c3b5760405162461bcd60e51b815260206004820152603660248201527f5661726961626c655265776172647353747261746567793a3a4465706f73697460448201527f20746f6b656e207472616e73666572206661696c6564000000000000000000006064820152608401610b00565b6000612c4682612653565b9050612c5e83612c596108498585612666565b6137e8565b612c678261386c565b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c83604051612ca291815260200190565b60405180910390a2505050565b600a546001600160a01b03838116911614612d5157600a54612cdd90829084906001600160a01b0316612330565b612d51576040805162461bcd60e51b81526020600482015260248101919091527f5661726961626c655265776172647353747261746567793a3a5377617020706160448201527f697220646f6573206e6f7420636f6e7461696e2072657761726420746f6b656e6064820152608401610b00565b6001600160a01b03808316600081815260126020526040812080549385166001600160a01b03199485161790556013805460018181018355919092527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0909091018054909316909117909155601454612dc891612324565b601455604080516001600160a01b038085168252831660208201527f916e172c080569186aa7ea048268267257cf7cc49505908863f747bca8620f809101611310565b6009546040517f06bfa9380000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015260009182917f0000000000000000000000000000000000000000000000000000000000000000909116906306bfa9389060240161012060405180830381865afa158015612e95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eb991906147a3565b9a9950505050505050505050565b6000612ed1612e0b565b60095460405163095ea7b360e01b81526001600160a01b0380841660048301526000602483015292935091169063095ea7b3906044016020604051808303816000875af1158015612f26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4a919061462b565b50806001600160a01b031663441a3e70612f626110eb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b168152600481019190915260006024820152604401600060405180830381600087803b158015612fba57600080fd5b505af1158015610ca6573d6000803e3d6000fd5b6000610a7a8284614849565b6000610a7a8284614868565b60606000612ff2612e0b565b60145490915060008167ffffffffffffffff8111156130135761301361488a565b60405190808252806020026020018201604052801561305857816020015b60408051808201909152600080825260208201528152602001906001900390816130315790505b506040516246613160e11b81527322d4002028f537599be9f666d1c4fa138522f9c8600482015290915060009081906001600160a01b03861690628cc262906024016040805180830381865afa1580156130b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130da91906148a0565b601654604051633cb6bbcb60e21b8152306004820152602481018390529294509092506000916001600160a01b039091169063f2daef2c90604401602060405180830381865afa158015613132573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131569190614648565b604080518082019091527322d4002028f537599be9f666d1c4fa138522f9c88152909150602081016131888484612666565b8152508460008151811061319e5761319e614661565b60200260200101819052506040518060400160405280735817d4f0b62a59b17f75207da1848c2ce75e7af46001600160a01b0316815260200184815250846001815181106131ee576131ee614661565b6020908102919091010152600260005b868110156133475760006013828154811061321b5761321b614661565b6000918252602090912001546001600160a01b031690507322d4002028f537599be9f666d1c4fa138522f9c881148061327057506001600160a01b038116735817d4f0b62a59b17f75207da1848c2ce75e7af4145b1561327b5750613335565b6040516246613160e11b81526001600160a01b038281166004830152600091908b1690628cc262906024016040805180830381865afa1580156132c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132e691906148a0565b9150506040518060400160405280836001600160a01b031681526020018281525088858151811061331957613319614661565b6020026020010181905250838061332f906146a4565b94505050505b8061333f816146a4565b9150506131fe565b5093979650505050505050565b60008061336185856138eb565b509050600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156133a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c991906148e2565b5091509150866001600160a01b0316836001600160a01b0316146133e957905b61341488836dffffffffffffffffffffffffffff16836dffffffffffffffffffffffffffff1661391c565b98975050505050505050565b600061342a612109565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810186905260620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156134d0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906135065750866001600160a01b0316816001600160a01b0316145b6135775760405162461bcd60e51b8152602060048201526024808201527f417263683a3a76616c69646174655369673a20696e76616c6964207369676e6160448201527f74757265000000000000000000000000000000000000000000000000000000006064820152608401610b00565b50505050505050565b61358861396a565b6000613592613b60565b90508161361157600c548110156136115760405162461bcd60e51b815260206004820152603060248201527f5661726961626c655265776172647353747261746567793a3a5265696e76657360448201527f7420616d6f756e7420746f6f206c6f77000000000000000000000000000000006064820152608401610b00565b600061362e612710611bbf60115485612fce90919063ffffffff16565b9050801561365357600b54600a54613653916001600160a01b0391821691168361294c565b6000613670612710611bbf60105486612fce90919063ffffffff16565b9050801561368f57600a5461368f906001600160a01b0316338361294c565b60006136ad6136a8836136a28787612666565b90612666565b613d9c565b90506136b88161386c565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef2346136e16110eb565b6002546040805192835260208301919091520160405180910390a15050505050565b6000613758826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613dc49092919063ffffffff16565b8051909150156129b35780806020019051810190613776919061462b565b6129b35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b00565b6002546137f59082612324565b6002556001600160a01b03821660009081526004602052604090205461381b9082612324565b6001600160a01b0383166000818152600460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612a829085815260200190565b600081116138e25760405162461bcd60e51b815260206004820152602d60248201527f5661726961626c655265776172647353747261746567793a3a5374616b65206160448201527f6d6f756e7420746f6f206c6f77000000000000000000000000000000000000006064820152608401610b00565b611b8b81613dd3565b600080826001600160a01b0316846001600160a01b03161061390e578284613911565b83835b915091509250929050565b60008061392b856103e5612fce565b905060006139398285612fce565b905060006139538361394d886103e8612fce565b90612324565b905061395f8282612fda565b979650505050505050565b6040516370a0823160e01b81523060048201526000907322d4002028f537599be9f666d1c4fa138522f9c8906370a0823190602401602060405180830381865afa1580156139bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139e09190614648565b90506139ea612e0b565b6001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613a2457600080fd5b505af1158015613a38573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015260009250613ab8915083907322d4002028f537599be9f666d1c4fa138522f9c8906370a0823190602401602060405180830381865afa158015613a94573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136a29190614648565b601654604051633cb6bbcb60e21b8152306004820152602481018390529192506000916001600160a01b039091169063f2daef2c90604401602060405180830381865afa158015613b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b319190614648565b6016549091506129b3907322d4002028f537599be9f666d1c4fa138522f9c8906001600160a01b03168361294c565b6040516370a0823160e01b8152306004820152600090819073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a0823190602401602060405180830381865afa158015613bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bd89190614648565b60135490915060005b81811015613d9457600060138281548110613bfe57613bfe614661565b6000918252602090912001546001600160a01b031690507fffffffffffffffffffffffff4ce09955c3e187ac9c0f78a5e48b1d847a0299398101613cc857478015613cc15773b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015613c9257600080fd5b505af1158015613ca6573d6000803e3d6000fd5b5050505050613cbe818661232490919063ffffffff16565b94505b5050613d82565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d339190614648565b90508015613d7f576001600160a01b03808316600090815260126020526040902054168015613d7d57600a54613d7a90611e1990849086906001600160a01b031685614071565b95505b505b50505b80613d8c816146a4565b915050613be1565b509092915050565b600a546009546015546000926109979285926001600160a01b03928316929182169116614071565b606061253d8484600085614209565b6000613ddd612e0b565b9050600960009054906101000a90046001600160a01b03166001600160a01b031663095ea7b3826001600160a01b0316631208e15b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e659190614786565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015613eca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613eee919061462b565b506040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b0382169063b6b55f2590602401600060405180830381600087803b158015613f4a57600080fd5b505af1158015613f5e573d6000803e3d6000fd5b50505050600960009054906101000a90046001600160a01b03166001600160a01b031663095ea7b3826001600160a01b0316631208e15b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613fc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fe89190614786565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152600060248201526044016020604051808303816000875af115801561404d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129b3919061462b565b60008061407e85856138eb565b509050600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156140c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e691906148e2565b5091509150866001600160a01b0316836001600160a01b03161461410657905b6000806141348a856dffffffffffffffffffffffffffff16856dffffffffffffffffffffffffffff1661391c565b9050886001600160a01b0316856001600160a01b03161461415157905b6141656001600160a01b038a16888c61294c565b604080516000815260208101918290527f022c0d9f000000000000000000000000000000000000000000000000000000009091526001600160a01b0388169063022c0d9f906141bd9085908590309060248101614932565b600060405180830381600087803b1580156141d757600080fd5b505af11580156141eb573d6000803e3d6000fd5b505050508181116141fc5781612eb9565b9998505050505050505050565b6060824710156142815760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610b00565b6001600160a01b0385163b6142d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b00565b600080866001600160a01b031685876040516142f4919061496a565b60006040518083038185875af1925050503d8060008114614331576040519150601f19603f3d011682016040523d82523d6000602084013e614336565b606091505b509150915061395f82828660608315614350575081610a7a565b8251156143605782518084602001fd5b8160405162461bcd60e51b8152600401610b0091906143d2565b60005b8381101561439557818101518382015260200161437d565b83811115611b7b5750506000910152565b600081518084526143be81602086016020860161437a565b601f01601f19169290920160200192915050565b602081526000610a7a60208301846143a6565b6001600160a01b0381168114611b8b57600080fd5b6000806040838503121561440d57600080fd5b8235614418816143e5565b946020939093013593505050565b60006020828403121561443857600080fd5b5035919050565b60008060006060848603121561445457600080fd5b833561445f816143e5565b9250602084013561446f816143e5565b929592945050506040919091013590565b6000806040838503121561449357600080fd5b823561449e816143e5565b915060208301356144ae816143e5565b809150509250929050565b6000602082840312156144cb57600080fd5b8135610a7a816143e5565b803560ff811681146144e757600080fd5b919050565b600080600080600060a0868803121561450457600080fd5b853594506020860135935061451b604087016144d6565b94979396509394606081013594506080013592915050565b8015158114611b8b57600080fd5b60006020828403121561455357600080fd5b8135610a7a81614533565b6000806040838503121561457157600080fd5b8235915060208301356144ae81614533565b600080600080600080600060e0888a03121561459e57600080fd5b87356145a9816143e5565b965060208801356145b9816143e5565b955060408801359450606088013593506145d5608089016144d6565b925060a0880135915060c0880135905092959891949750929550565b600181811c9082168061460557607f821691505b60208210810361462557634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561463d57600080fd5b8151610a7a81614533565b60006020828403121561465a57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561469f5761469f614677565b500390565b6000600182016146b6576146b6614677565b5060010190565b634e487b7160e01b600052603160045260246000fd5b600080835481600182811c9150808316806146ef57607f831692505b6020808410820361470e57634e487b7160e01b86526022600452602486fd5b818015614722576001811461473357614760565b60ff19861689528489019650614760565b60008a81526020902060005b868110156147585781548b82015290850190830161473f565b505084890196505b509498975050505050505050565b6000821982111561478157614781614677565b500190565b60006020828403121561479857600080fd5b8151610a7a816143e5565b60008060008060008060008060006101208a8c0312156147c257600080fd5b8951985060208a01516147d481614533565b60408b01519098506147e5816143e5565b60608b01519097506147f6816143e5565b60808b015160a08c0151919750955061480e816143e5565b60c08b015160e08c01519195509350614826816143e5565b6101008b0151909250614838816143e5565b809150509295985092959850929598565b600081600019048311821515161561486357614863614677565b500290565b60008261488557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156148b357600080fd5b505080516020909101519092909150565b80516dffffffffffffffffffffffffffff811681146144e757600080fd5b6000806000606084860312156148f757600080fd5b614900846148c4565b925061490e602085016148c4565b9150604084015163ffffffff8116811461492757600080fd5b809150509250925092565b8481528360208201526001600160a01b038316604082015260806060820152600061496060808301846143a6565b9695505050505050565b6000825161497c81846020870161437a565b919091019291505056fe5f6275726e3a206275726e20616d6f756e74206578636565647320746f74616c20737570706c794f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727472616e7366657246726f6d3a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655f6275726e3a206275726e20616d6f756e7420657863656564732066726f6d2062616c616e63655f7472616e73666572546f6b656e733a207472616e7366657220657863656564732066726f6d2062616c616e6365a26469706673582212207153b270f1943ee2f5828e6eb12b8b39fcf3dbe2ee89cb954812b192365280f464736f6c634300080d00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e000000000000000000000000000000000000000000000000000000000000001400000000000000000000000002b2c81e08f1af8835a78bb2a90ae924ace0ea4be0000000000000000000000004b946c91c2b1a7d7c40fb3c130cdfbaf8389094d00000000000000000000000000000000000000000000000000000000000001800000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5000000000000000000000000a1cfc90a52ba3453a78f460b8be1fcde068e29e7000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e4400000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000000175969656c642059616b3a20566563746f72207341564158000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8000000000000000000000000cdfd91eea657cc2701117fe9711c9a4f61feed230000000000000000000000005817d4f0b62a59b17f75207da1848c2ce75e7af40000000000000000000000009ef0c12b787f90f59cbbe0b611b82d30cab929290000000000000000000000008729438eb15e2c8b576fcc6aecda6a148776c0f5000000000000000000000000e530dc2095ef5653205cf5ea79f8979a7028065c

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

00000000000000000000000000000000000000000000000000000000000001400000000000000000000000002b2c81e08f1af8835a78bb2a90ae924ace0ea4be0000000000000000000000004b946c91c2b1a7d7c40fb3c130cdfbaf8389094d00000000000000000000000000000000000000000000000000000000000001800000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5000000000000000000000000a1cfc90a52ba3453a78f460b8be1fcde068e29e7000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e4400000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000000175969656c642059616b3a20566563746f72207341564158000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8000000000000000000000000cdfd91eea657cc2701117fe9711c9a4f61feed230000000000000000000000005817d4f0b62a59b17f75207da1848c2ce75e7af40000000000000000000000009ef0c12b787f90f59cbbe0b611b82d30cab929290000000000000000000000008729438eb15e2c8b576fcc6aecda6a148776c0f5000000000000000000000000e530dc2095ef5653205cf5ea79f8979a7028065c

-----Decoded View---------------
Arg [0] : _name (string): Yield Yak: Vector sAVAX
Arg [1] : _depositToken (address): 0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be
Arg [2] : _swapPairDepositToken (address): 0x4b946c91c2b1a7d7c40fb3c130cdfbaf8389094d
Arg [3] : _rewardSwapPairs (tuple[]): System.Object,System.Object,System.Object
Arg [4] : _stakingContract (address): 0x8b3d9f0017fa369cd8c164d0cc078bf4ca588ae5
Arg [5] : _boosterFeeCollector (address): 0xa1cfc90a52ba3453a78f460b8be1fcde068e29e7
Arg [6] : _timelock (address): 0xdcedf06fd33e1d7b6eb4b309f779a0e9d3172e44
Arg [7] : _strategySettings (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000002b2c81e08f1af8835a78bb2a90ae924ace0ea4be
Arg [2] : 0000000000000000000000004b946c91c2b1a7d7c40fb3c130cdfbaf8389094d
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [4] : 0000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5
Arg [5] : 000000000000000000000000a1cfc90a52ba3453a78f460b8be1fcde068e29e7
Arg [6] : 000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e44
Arg [7] : 00000000000000000000000000000000000000000000000000005af3107a4000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [9] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [11] : 5969656c642059616b3a20566563746f72207341564158000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 00000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8
Arg [14] : 000000000000000000000000cdfd91eea657cc2701117fe9711c9a4f61feed23
Arg [15] : 0000000000000000000000005817d4f0b62a59b17f75207da1848c2ce75e7af4
Arg [16] : 0000000000000000000000009ef0c12b787f90f59cbbe0b611b82d30cab92929
Arg [17] : 0000000000000000000000008729438eb15e2c8b576fcc6aecda6a148776c0f5
Arg [18] : 000000000000000000000000e530dc2095ef5653205cf5ea79f8979a7028065c


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.