Contract 0xc3a5b60d1d985e99de292125b8e75164b417b41a

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd0777862930381fcb8371662e1f4311622c2eda6d3b1b5d3f50a3bdd3c44ce46Reinvest204378672022-09-29 19:15:072 hrs 23 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023217834287 25.00001
0x046470477ae1fea0636b54a6e235ca47bc8fc1f0e2d15a0cbb3f70f4f0b35b0bReinvest204322472022-09-29 16:04:235 hrs 34 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023217834287 25.00001
0x8098be6399e199d1e6764cdfd4701021e4b8f7b226547ce487f278d86f9c275bReinvest204282542022-09-29 13:48:007 hrs 50 mins ago0xf84eedf2af82e62e35b213054605f56feca6f31b IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.0190359305 26.5
0xcb6d283a5335aac8164f649999d33b9eb1e539674a3bd39cc27c23429c8254afReinvest204282542022-09-29 13:48:007 hrs 50 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.0252232638 26.6
0xd003d14d1c5919967cc514da515a6554af6d2fb1f9c093e20be0b41aeb7325daReinvest204245692022-09-29 11:41:409 hrs 57 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.022790334116 25.00001
0x68ed069f853078e0bbd1e5f718ff03c901ae38aeaa2d22cbe1780a307f3b5dc8Withdraw204206742022-09-29 9:28:2712 hrs 10 mins ago0x566642f847a8e3f26a1a01168a6c35b03b474048 IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.011082312 27
0xb9a87e7266f295d4b0f4adbb9dfe2ec5e3022de2a0edb7ebebe454ab88b5166cReinvest204173802022-09-29 7:35:3814 hrs 3 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023706084482 25.00001
0x46a2613e2e72b030790f414f88297ee8d16ec31ec2c3ee91fbb4e31a13f5c445Reinvest204117962022-09-29 4:24:1317 hrs 14 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023445609378 25.00001
0xbbed8cdf6a267e033f83b21b1a537107a781a893c9aebb2b286ac924bfb4f82eReinvest204083922022-09-29 2:27:3419 hrs 11 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023217834287 25.00001
0x416233046ad1aaa3aee1b8443a040873e805fb7765bdff6a8c5a57a2c1f85d5eReinvest204027802022-09-28 23:15:4022 hrs 23 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.02285108414 25.00001
0xe1b7005b0f34a070cbebe9612071eddef14d06c64d471e2dfd18557a63cfcdfbWithdraw203976242022-09-28 20:19:161 day 1 hr ago0xf17668ff22c63e63475d5f7dbdf7585d51e52c76 IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.011330234 26.5
0x91afc4b16d265876484990fd858098b02332a98ef161e6deb1e932e6e771aedfReinvest203957652022-09-28 19:15:511 day 2 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023653609461 25.00001
0x89c840ebb437f5a0945da2e3a74ec01dd8bec34e90e4ae1aab68392cf66cc449Reinvest203919332022-09-28 17:04:151 day 4 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.024203584681 25.00001
0xef7f05ef1c3f3c52bad469ce9928664873b1a38e02d266c90b43b7b248bb3843Reinvest203877572022-09-28 14:40:501 day 6 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023653609461 25.00001
0x406932120ba37552c10fe946ea46c6d949facb4527546e13f568b82e249e90f2Reinvest203833112022-09-28 12:07:581 day 9 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.02407555963 25.00001
0xdc60145f2ba1ffc299ecb98a88141088e9552d6057154a0fd87a776ef6c155bcReinvest203789612022-09-28 9:38:531 day 12 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023645334458 25.00001
0x2897dec5e9ae5a7f2efb031988c27ff643de9320c73c7a0829e19d6504a12c2fReinvest203722102022-09-28 5:47:111 day 15 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023645334458 25.00001
0x8446aa5b291c76386526e9832d6834ac7e4b9f8f7aff516747c4783207cdd24eReinvest203674362022-09-28 3:02:461 day 18 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.024570334828 25.00001
0xc3e6515e154b3b2193147688790c4484a54005c08e9c0221c4ccad24f31347f4Reinvest203625412022-09-28 0:15:081 day 21 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023653609461 25.00001
0x6e05999421e667454e3b11d9a12f74d64d757742891ef680b55402d2d9474c07Reinvest203566902022-09-27 20:53:392 days 45 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023217834287 25.00001
0x5f8ab6f2231fa1b2f392842dbcbfd996ab59750653a41a059e3e61d1a462bdf1Reinvest203520532022-09-27 18:15:152 days 3 hrs ago0x8c005d22f6d524ec1c2145b523d370a1e9bdb700 IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.024586088578 27.2816825
0x9449a51b4c50c6e6440359cdd0d3fe05b2fd7196226972f08daf0796a715a824Deposit With Per...203519812022-09-27 18:12:482 days 3 hrs ago0x8c005d22f6d524ec1c2145b523d370a1e9bdb700 IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.013608947874 27.35225
0x0ef41e1dbcd4613fa4c5a3db8a8a074a99b82496e24a11b37d8fdcbd8ce95b9aReinvest203491122022-09-27 16:34:402 days 5 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023895331697 25.199586707
0x36c6f38b9db259fede5d9de42f039e574a0ea282d755288ce46d461df4e56e47Reinvest203454402022-09-27 14:29:212 days 7 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023278584311 25.00001
0x96103da518e7b620c8f97e0c89c2a4a681afbd9ad132d4cf6d9728569c44faa7Reinvest203416542022-09-27 12:19:382 days 9 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xc3a5b60d1d985e99de292125b8e75164b417b41a0 AVAX0.023706084482 25.00001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd0777862930381fcb8371662e1f4311622c2eda6d3b1b5d3f50a3bdd3c44ce46204378672022-09-29 19:15:072 hrs 23 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.676559533197071361 AVAX
0xd0777862930381fcb8371662e1f4311622c2eda6d3b1b5d3f50a3bdd3c44ce46204378672022-09-29 19:15:072 hrs 23 mins ago Wrapped AVAX 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.676559533197071361 AVAX
0xd0777862930381fcb8371662e1f4311622c2eda6d3b1b5d3f50a3bdd3c44ce46204378672022-09-29 19:15:072 hrs 23 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a Wrapped AVAX1.196078308993666831 AVAX
0xd0777862930381fcb8371662e1f4311622c2eda6d3b1b5d3f50a3bdd3c44ce46204378672022-09-29 19:15:072 hrs 23 mins ago 0xa974de60871907aafe3a4634766adb40df461c16 0xc3a5b60d1d985e99de292125b8e75164b417b41a1.196078308993666831 AVAX
0x046470477ae1fea0636b54a6e235ca47bc8fc1f0e2d15a0cbb3f70f4f0b35b0b204322472022-09-29 16:04:235 hrs 34 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.484678911144345401 AVAX
0x046470477ae1fea0636b54a6e235ca47bc8fc1f0e2d15a0cbb3f70f4f0b35b0b204322472022-09-29 16:04:235 hrs 34 mins ago Wrapped AVAX 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.484678911144345401 AVAX
0x046470477ae1fea0636b54a6e235ca47bc8fc1f0e2d15a0cbb3f70f4f0b35b0b204322472022-09-29 16:04:235 hrs 34 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a Wrapped AVAX0.855162558535384965 AVAX
0x046470477ae1fea0636b54a6e235ca47bc8fc1f0e2d15a0cbb3f70f4f0b35b0b204322472022-09-29 16:04:235 hrs 34 mins ago 0xa974de60871907aafe3a4634766adb40df461c16 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.855162558535384965 AVAX
0x8098be6399e199d1e6764cdfd4701021e4b8f7b226547ce487f278d86f9c275b204282542022-09-29 13:48:007 hrs 50 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.00113275444218406 AVAX
0x8098be6399e199d1e6764cdfd4701021e4b8f7b226547ce487f278d86f9c275b204282542022-09-29 13:48:007 hrs 50 mins ago Wrapped AVAX 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.00113275444218406 AVAX
0x8098be6399e199d1e6764cdfd4701021e4b8f7b226547ce487f278d86f9c275b204282542022-09-29 13:48:007 hrs 50 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a Wrapped AVAX0.002517232093742355 AVAX
0x8098be6399e199d1e6764cdfd4701021e4b8f7b226547ce487f278d86f9c275b204282542022-09-29 13:48:007 hrs 50 mins ago 0xa974de60871907aafe3a4634766adb40df461c16 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.002517232093742355 AVAX
0xcb6d283a5335aac8164f649999d33b9eb1e539674a3bd39cc27c23429c8254af204282542022-09-29 13:48:007 hrs 50 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.449655091198729171 AVAX
0xcb6d283a5335aac8164f649999d33b9eb1e539674a3bd39cc27c23429c8254af204282542022-09-29 13:48:007 hrs 50 mins ago Wrapped AVAX 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.449655091198729171 AVAX
0xcb6d283a5335aac8164f649999d33b9eb1e539674a3bd39cc27c23429c8254af204282542022-09-29 13:48:007 hrs 50 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a Wrapped AVAX0.792828129517491164 AVAX
0xcb6d283a5335aac8164f649999d33b9eb1e539674a3bd39cc27c23429c8254af204282542022-09-29 13:48:007 hrs 50 mins ago 0xa974de60871907aafe3a4634766adb40df461c16 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.792828129517491164 AVAX
0xd003d14d1c5919967cc514da515a6554af6d2fb1f9c093e20be0b41aeb7325da204245692022-09-29 11:41:409 hrs 57 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.879659867650520205 AVAX
0xd003d14d1c5919967cc514da515a6554af6d2fb1f9c093e20be0b41aeb7325da204245692022-09-29 11:41:409 hrs 57 mins ago Wrapped AVAX 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.879659867650520205 AVAX
0xd003d14d1c5919967cc514da515a6554af6d2fb1f9c093e20be0b41aeb7325da204245692022-09-29 11:41:409 hrs 57 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a Wrapped AVAX1.552116396444810674 AVAX
0xd003d14d1c5919967cc514da515a6554af6d2fb1f9c093e20be0b41aeb7325da204245692022-09-29 11:41:409 hrs 57 mins ago 0xa974de60871907aafe3a4634766adb40df461c16 0xc3a5b60d1d985e99de292125b8e75164b417b41a1.552116396444810674 AVAX
0xb9a87e7266f295d4b0f4adbb9dfe2ec5e3022de2a0edb7ebebe454ab88b5166c204173802022-09-29 7:35:3814 hrs 3 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.687014931996613934 AVAX
0xb9a87e7266f295d4b0f4adbb9dfe2ec5e3022de2a0edb7ebebe454ab88b5166c204173802022-09-29 7:35:3814 hrs 3 mins ago Wrapped AVAX 0xc3a5b60d1d985e99de292125b8e75164b417b41a0.687014931996613934 AVAX
0xb9a87e7266f295d4b0f4adbb9dfe2ec5e3022de2a0edb7ebebe454ab88b5166c204173802022-09-29 7:35:3814 hrs 3 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a Wrapped AVAX1.211315571066013983 AVAX
0xb9a87e7266f295d4b0f4adbb9dfe2ec5e3022de2a0edb7ebebe454ab88b5166c204173802022-09-29 7:35:3814 hrs 3 mins ago 0xa974de60871907aafe3a4634766adb40df461c16 0xc3a5b60d1d985e99de292125b8e75164b417b41a1.211315571066013983 AVAX
0x46a2613e2e72b030790f414f88297ee8d16ec31ec2c3ee91fbb4e31a13f5c445204117962022-09-29 4:24:1317 hrs 14 mins ago 0xc3a5b60d1d985e99de292125b8e75164b417b41a 0xa974de60871907aafe3a4634766adb40df461c160.420188399549148144 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YYAvaxJoeStrategy

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 17 : YYAvaxJoeStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./../VariableRewardsStrategy.sol";
import "./interfaces/IJoeChef.sol";
import "./../yak/interfaces/IgAvax.sol";
import "./../yak/interfaces/ISwap.sol";

contract YYAvaxJoeStrategy is VariableRewardsStrategy {
    uint256 public immutable PID;
    IJoeChef public immutable joeChef;
    ISwap public immutable withdrawalPool;
    address public immutable swapPairWavaxOther;

    address public constant JOE = 0x6e84a6216eA6dACC71eE8E6b0a5B7322EEbC0fDd;
    address public constant yyAVAX = 0xF7D9281e8e363584973F946201b82ba72C965D27;
    address public constant gAvax = 0x6026a85e11BD895c934Af02647E8C7b4Ea2D9808;

    constructor(
        string memory _name,
        address _depositToken,
        address _stakingContract,
        uint256 _pid,
        RewardSwapPairs[] memory _rewardSwapPairs,
        address _swapPairWavaxOther,
        address _withdrawalPool,
        address _timelock,
        StrategySettings memory _strategySettings
    ) VariableRewardsStrategy(_name, _depositToken, _rewardSwapPairs, _timelock, _strategySettings) {
        joeChef = IJoeChef(_stakingContract);
        PID = _pid;
        swapPairWavaxOther = _swapPairWavaxOther;
        withdrawalPool = ISwap(_withdrawalPool);
        IgAVAX(gAvax).setApprovalForAll(address(withdrawalPool), true);
    }

    receive() external payable {
        require(msg.sender == address(withdrawalPool) || msg.sender == address(WAVAX), "not allowed");
    }

    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function setAllowances() public onlyDev {
        IgAVAX(gAvax).setApprovalForAll(address(withdrawalPool), true);
    }

    function revokeAllowance() public onlyDev {
        IgAVAX(gAvax).setApprovalForAll(address(withdrawalPool), false);
    }

    function _depositToStakingContract(uint256 _amount) internal override {
        depositToken.approve(address(joeChef), _amount);
        joeChef.deposit(PID, _amount);
    }

    function _withdrawFromStakingContract(uint256 _amount) internal override returns (uint256 withdrawAmount) {
        joeChef.withdraw(PID, _amount);
        return _amount;
    }

    function _pendingRewards() internal view override returns (Reward[] memory) {
        (uint256 pendingJoe, , , uint256 pendingBonusToken) = joeChef.pendingTokens(PID, address(this));

        Reward[] memory pendingRewards = new Reward[](2);
        pendingRewards[0] = Reward({reward: address(JOE), amount: pendingJoe});
        pendingRewards[1] = Reward({
            reward: address(WAVAX),
            amount: pendingBonusToken > 0 ? withdrawalPool.calculateSwap(1, 0, pendingBonusToken) : 0
        });

        return pendingRewards;
    }

    function _getRewards() internal override {
        joeChef.deposit(PID, 0);
        uint256 yyAVAXBalance = IERC20(yyAVAX).balanceOf(address(this));
        if (yyAVAXBalance > 0) {
            withdrawalPool.swap{value: 0}(1, 0, yyAVAXBalance, 0, type(uint256).max);
        }
    }

    function _convertRewardTokenToDepositToken(uint256 _fromAmount) internal override returns (uint256 toAmount) {
        uint256 amountIn = _fromAmount / 2;

        address token0 = IPair(address(depositToken)).token0();
        address token1 = IPair(address(depositToken)).token1();

        uint256 amountOutToken0 = amountIn;
        if (address(WAVAX) != token0) {
            amountOutToken0 = token0 == yyAVAX
                ? _swapThroughWithdrawalPool(amountIn)
                : _swapThroughPair(amountIn, token0);
        }

        uint256 amountOutToken1 = amountIn;
        if (address(WAVAX) != token1) {
            amountOutToken1 = token1 == yyAVAX
                ? _swapThroughWithdrawalPool(amountIn)
                : _swapThroughPair(amountIn, token1);
        }

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

    function _swapThroughWithdrawalPool(uint256 _amountIn) internal returns (uint256) {
        WAVAX.withdraw(_amountIn);
        return withdrawalPool.swap{value: _amountIn}(0, 1, _amountIn, 0, type(uint256).max);
    }

    function _swapThroughPair(uint256 _amountIn, address _toToken) internal returns (uint256) {
        return DexLibrary.swap(_amountIn, address(WAVAX), _toToken, IPair(swapPairWavaxOther));
    }

    function totalDeposits() public view override returns (uint256 amount) {
        (amount, ) = joeChef.userInfo(PID, address(this));
    }

    function _emergencyWithdraw() internal override {
        depositToken.approve(address(joeChef), 0);
        joeChef.emergencyWithdraw(PID);
    }
}

File 2 of 17 : 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 3 of 17 : IJoeChef.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IJoeChef {
    function deposit(uint256 _pid, uint256 _amount) external;

    function withdraw(uint256 _pid, uint256 _amount) external;

    function emergencyWithdraw(uint256 _pid) external;

    function pendingTokens(uint256 _pid, address _user)
        external
        view
        returns (
            uint256 pendingJoe,
            address bonusTokenAddress,
            string memory bonusTokenSymbol,
            uint256 pendingBonusToken
        );

    function userInfo(uint256 pid, address user) external view returns (uint256 amount, uint256 rewardDebt);

    function poolInfo(uint256 pid)
        external
        view
        returns (
            address lpToken,
            uint256 accJoePerShare,
            uint256 lastRewardTimestamp,
            uint256 allocPoint,
            address rewarder
        );
}

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

// @note: operator stands for interface address
interface IgAVAX {
    function setApprovalForAll(address operator, bool approved) external;

    function pricePerShare(uint256 _id) external view returns (uint256);

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

    function isInterface(address operator, uint256 id) external view returns (bool);

    function isApprovedForAll(address account, address operator) external view returns (bool);
}

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

interface ISwap {
    // pool data view functions
    function getERC1155() external view returns (address);

    function getA() external view returns (uint256);

    function getAPrecise() external view returns (uint256);

    function getToken() external view returns (uint256);

    function getTokenBalance(uint8 index) external view returns (uint256);

    function getVirtualPrice() external view returns (uint256);

    function getDebt() external view returns (uint256);

    function getAdminBalance(uint256 index) external view returns (uint256);

    // min return calculation functions
    function calculateSwap(
        uint8 tokenIndexFrom,
        uint8 tokenIndexTo,
        uint256 dx
    ) external view returns (uint256);

    function calculateTokenAmount(uint256[] calldata amounts, bool deposit) external view returns (uint256);

    function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[] memory);

    function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex)
        external
        view
        returns (uint256 availableTokenAmount);

    // state modifying functions
    function initialize(
        address _gAvax,
        uint256 _pooledTokenId,
        string memory lpTokenName,
        string memory lpTokenSymbol,
        uint256 _a,
        uint256 _fee,
        uint256 _adminFee,
        address lpTokenTargetAddress
    ) external returns (address lpToken);

    function swap(
        uint8 tokenIndexFrom,
        uint8 tokenIndexTo,
        uint256 dx,
        uint256 minDy,
        uint256 deadline
    ) external payable returns (uint256);

    function addLiquidity(
        uint256[] calldata amounts,
        uint256 minToMint,
        uint256 deadline
    ) external payable returns (uint256);

    function removeLiquidity(
        uint256 amount,
        uint256[] calldata minAmounts,
        uint256 deadline
    ) external returns (uint256[] memory);

    function removeLiquidityOneToken(
        uint256 tokenAmount,
        uint8 tokenIndex,
        uint256 minAmount,
        uint256 deadline
    ) external returns (uint256);

    function removeLiquidityImbalance(
        uint256[] calldata amounts,
        uint256 maxBurnAmount,
        uint256 deadline
    ) external returns (uint256);

    function withdrawAdminFees() external;

    function setAdminFee(uint256 newAdminFee) external;

    function setSwapFee(uint256 newSwapFee) external;

    function rampA(uint256 futureA, uint256 futureTime) external;

    function stopRampA() external;
}

File 6 of 17 : 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 available 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 7 of 17 : 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 8 of 17 : 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 9 of 17 : 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 10 of 17 : 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 11 of 17 : 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 12 of 17 : 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 13 of 17 : 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 14 of 17 : 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 15 of 17 : 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;
    }
}

File 16 of 17 : 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 17 of 17 : 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);
            }
        }
    }
}

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":"_stakingContract","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"components":[{"internalType":"address","name":"reward","type":"address"},{"internalType":"address","name":"swapPair","type":"address"}],"internalType":"struct VariableRewardsStrategy.RewardSwapPairs[]","name":"_rewardSwapPairs","type":"tuple[]"},{"internalType":"address","name":"_swapPairWavaxOther","type":"address"},{"internalType":"address","name":"_withdrawalPool","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":"JOE","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"PID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"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":[],"name":"gAvax","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"joeChef","outputs":[{"internalType":"contract IJoeChef","name":"","type":"address"}],"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":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":[],"name":"revokeAllowance","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":[],"name":"setAllowances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportedRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapPairWavaxOther","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":"amount","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":"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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalPool","outputs":[{"internalType":"contract ISwap","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yyAVAX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101406040526009610100819052685969656c642059616b60b81b6101209081526200002f916000919062000a42565b506040805180820190915260038082526216549560ea1b60209092019182526200005c9160019162000a42565b503480156200006a57600080fd5b50604051620063d2380380620063d28339810160408190526200008d9162000c99565b888886848480600033600680546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020620063b2833981519152908290a3508051620000e090620002da565b6020810151620000f0906200036a565b6040810151620001009062000421565b5084516200011690600090602088019062000a42565b50600980546001600160a01b0386166001600160a01b031991821617909155600a8054821673b31f66aa3c1e785363f0875a1b74e27b85fd66c7179055600b8054909116732d580f9cf2fb2d09bc411532988f2afda4e7beff17905560005b8351811015620001e657620001d184828151811062000198576200019862000df9565b602002602001015160000151858381518110620001b957620001b962000df9565b602002602001015160200151620004d860201b60201c565b80620001dd8162000e25565b91505062000175565b50620001f3600162000661565b620001fe826200070b565b60408051600080825260208201527fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef234910160405180910390a1505050506001600160a01b0388811660a052608088905285811660e052841660c081905260405163a22cb46560e01b8152600481019190915260016024820152736026a85e11bd895c934af02647e8c7b4ea2d9808915063a22cb46590604401600060405180830381600087803b158015620002b257600080fd5b505af1158015620002c7573d6000803e3d6000fd5b5050505050505050505050505062000eb6565b6006546001600160a01b03163314620003295760405162461bcd60e51b815260206004820181905260248201526000805160206200639283398151915260448201526064015b60405180910390fd5b600c5460408051918252602082018390527f481f79ac3a523b6d6db3c5a720e190e986d1cc1b41adcdf50f9caef849901100910160405180910390a1600c55565b6006546001600160a01b03163314620003b55760405162461bcd60e51b8152602060048201819052602482015260008051602062006392833981519152604482015260640162000320565b612710620003d4601054836200080860201b62002a4f1790919060201c565b1115620003e057600080fd5b60115460408051918252602082018390527f2a42303d002f0ba6cfe8259c91d4684443fb0b3de286ba74991175d651726131910160405180910390a1601155565b6006546001600160a01b031633146200046c5760405162461bcd60e51b8152602060048201819052602482015260008051602062006392833981519152604482015260640162000320565b6127106200048b601154836200080860201b62002a4f1790919060201c565b11156200049757600080fd5b60105460408051918252602082018390527fe7f97d51d307dc44045597c9978bec0f842e6bb40d19b9444084cfa30d9ed4f2910160405180910390a1601055565b600a546001600160a01b0383811691161462000591576200051b8183600a60009054906101000a90046001600160a01b03166200081d60201b62002a5b1760201c565b62000591576040805162461bcd60e51b81526020600482015260248101919091527f5661726961626c655265776172647353747261746567793a3a5377617020706160448201527f697220646f6573206e6f7420636f6e7461696e2072657761726420746f6b656e606482015260840162000320565b6001600160a01b038083166000818152601260209081526040822080549486166001600160a01b03199586161790556013805460018181018355919093527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a09090920180549094169092179092556014546200061792909162002a4f62000808821b17901c565b601455604080516001600160a01b038085168252831660208201527f916e172c080569186aa7ea048268267257cf7cc49505908863f747bca8620f80910160405180910390a15050565b6006546001600160a01b03163314620006ac5760405162461bcd60e51b8152602060048201819052602482015260008051602062006392833981519152604482015260640162000320565b600e5481151560ff909116151503620006c457600080fd5b600e805460ff19168215159081179091556040519081527f7b014ed3854e7f5cb0218d58b3c6ae7d53a68bb0af2f67bfb029ea42c38a7e859060200160405180910390a150565b6006546001600160a01b03163314620007565760405162461bcd60e51b8152602060048201819052602482015260008051602062006392833981519152604482015260640162000320565b6001600160a01b038116620007bd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000320565b6006546040516001600160a01b03808416921690600080516020620063b283398151915290600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b600062000816828462000e41565b9392505050565b6000836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200085e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000884919062000e5c565b6001600160a01b0316836001600160a01b03161480620009195750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000904919062000e5c565b6001600160a01b0316836001600160a01b0316145b801562000a1b5750836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000960573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000986919062000e5c565b6001600160a01b0316826001600160a01b0316148062000a1b5750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015620009e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a06919062000e5c565b6001600160a01b0316826001600160a01b0316145b801562000a3a5750816001600160a01b0316836001600160a01b031614155b949350505050565b82805462000a509062000e7a565b90600052602060002090601f01602090048101928262000a74576000855562000abf565b82601f1062000a8f57805160ff191683800117855562000abf565b8280016001018555821562000abf579182015b8281111562000abf57825182559160200191906001019062000aa2565b5062000acd92915062000ad1565b5090565b5b8082111562000acd576000815560010162000ad2565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b038111828210171562000b235762000b2362000ae8565b60405290565b604051601f8201601f191681016001600160401b038111828210171562000b545762000b5462000ae8565b604052919050565b80516001600160a01b038116811462000b7457600080fd5b919050565b600082601f83011262000b8b57600080fd5b815160206001600160401b0382111562000ba95762000ba962000ae8565b62000bb9818360051b0162000b29565b82815260069290921b8401810191818101908684111562000bd957600080fd5b8286015b8481101562000c2f576040818903121562000bf85760008081fd5b62000c0262000afe565b62000c0d8262000b5c565b815262000c1c85830162000b5c565b8186015283529183019160400162000bdd565b509695505050505050565b60006060828403121562000c4d57600080fd5b604051606081016001600160401b038111828210171562000c725762000c7262000ae8565b80604052508091508251815260208301516020820152604083015160408201525092915050565b60008060008060008060008060006101608a8c03121562000cb957600080fd5b89516001600160401b038082111562000cd157600080fd5b818c0191508c601f83011262000ce657600080fd5b81518181111562000cfb5762000cfb62000ae8565b602062000d11601f8301601f1916820162000b29565b8281528f8284870101111562000d2657600080fd5b60005b8381101562000d4657858101830151828201840152820162000d29565b8381111562000d585760008385840101525b509c5062000d688e820162000b5c565b9b50505062000d7a60408d0162000b5c565b985060608c0151975060808c015191508082111562000d9857600080fd5b5062000da78c828d0162000b79565b95505062000db860a08b0162000b5c565b935062000dc860c08b0162000b5c565b925062000dd860e08b0162000b5c565b915062000dea8b6101008c0162000c3a565b90509295985092959850929598565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000e3a5762000e3a62000e0f565b5060010190565b6000821982111562000e575762000e5762000e0f565b500190565b60006020828403121562000e6f57600080fd5b620008168262000b5c565b600181811c9082168062000e8f57607f821691505b60208210810362000eb057634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161540f62000f8360003960008181610752015261473d015260008181610479015281816105d6015281816111d8015281816126c3015281816137c201528181613fb80152614813015260008181610a170152818161179001528181612f5d015281816134a00152818161356c0152818161361f01528181613ea101528181614478015261453201526000818161086c0152818161176101528181612f2d01528181613546015281816135e301528181613e740152614505015261540f6000f3fe6080604052600436106104695760003560e01c80638aff733d11610243578063bd079f5511610143578063e21ac825116100bb578063f23a6e611161008a578063f7c618c11161006f578063f7c618c114610e3e578063fdb5a03e14610e5e578063ffebad3014610e7357600080fd5b8063f23a6e6114610da8578063f2fde38b14610e1e57600080fd5b8063e21ac82514610d33578063e75ab04514610d53578063eab89a5a14610d73578063ed24911d14610d9357600080fd5b8063d505accf11610112578063dbd9a4d4116100f7578063dbd9a4d414610cb8578063dd62ed3e14610ccd578063dd8ce4d614610d1357600080fd5b8063d505accf14610c78578063da09c72c14610c9857600080fd5b8063bd079f5514610c0d578063c4b24a4614610c23578063c89039c514610c38578063cff1b6ef14610c5857600080fd5b80639e4e7318116101d6578063a9059cbb116101a5578063b52a321f1161018a578063b52a321f14610bbe578063b6b55f2514610bd8578063b9e57b8014610bf857600080fd5b8063a9059cbb14610b7e578063ac0d31ff14610b9e57600080fd5b80639e4e731814610ad4578063a4d5e67c14610b08578063a5534e7114610b28578063a8ae2b7c14610b5e57600080fd5b80638ea42f30116102125780638ea42f3014610a575780639291d56314610a7f57806395d89b4114610a9f57806399729ec114610ab457600080fd5b80638aff733d146109cf5780638b73e606146109e55780638ba8d34514610a055780638da5cb5b14610a3957600080fd5b806340b47e1a11610369578063715018a6116102e15780637d882097116102b0578063818372301161029557806381837230146109675780638570ff90146109875780638980f11f146109af57600080fd5b80637d882097146109255780637ecebe001461093a57600080fd5b8063715018a6146108c4578063789139bc146108d957806379085425146108ef5780637ae267731461090557600080fd5b80634e77ace5116103385780635ea682ea1161031d5780635ea682ea146108445780635eaec0e41461085a57806370a082311461088e57600080fd5b80634e77ace5146108045780634ebb79161461082457600080fd5b806340b47e1a14610774578063483c2ef0146107945780634a970be7146107c45780634bebd1e7146107e457600080fd5b806323b872dd116103fc57806330adf81f116103cb578063313ce567116103b0578063313ce567146107035780633bdc6e721461072a5780633c2a29a91461074057600080fd5b806330adf81f146106ba578063311c65e0146106ee57600080fd5b806323b872dd1461065a578063247d284b146105a45780632e1a7d4d1461067a5780632f4f21e21461069a57600080fd5b8063110560351161043857806311056035146105a457806313703b23146105c457806318160ddd1461061057806320606b701461062657600080fd5b806306fdde0314610510578063076771111461053b578063095ea7b31461055f5780630f23475d1461058f57600080fd5b3661050b57336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806104b857503373b31f66aa3c1e785363f0875a1b74e27b85fd66c7145b6105095760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561051c57600080fd5b50610525610e9b565b6040516105329190614c5f565b60405180910390f35b34801561054757600080fd5b50610551600f5481565b604051908152602001610532565b34801561056b57600080fd5b5061057f61057a366004614c87565b610f29565b6040519015158152602001610532565b34801561059b57600080fd5b50610551610f3f565b3480156105b057600080fd5b506105516105bf366004614cb3565b610f6a565b3480156105d057600080fd5b506105f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610532565b34801561061c57600080fd5b5061055160025481565b34801561063257600080fd5b506105517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b34801561066657600080fd5b5061057f610675366004614ccc565b610f7b565b34801561068657600080fd5b50610509610695366004614cb3565b61105f565b3480156106a657600080fd5b506105096106b5366004614c87565b611162565b3480156106c657600080fd5b506105517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156106fa57600080fd5b50610509611170565b34801561070f57600080fd5b50610718601281565b60405160ff9091168152602001610532565b34801561073657600080fd5b5061055160075481565b34801561074c57600080fd5b506105f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561078057600080fd5b5061050961078f366004614d0d565b611258565b3480156107a057600080fd5b5061057f6107af366004614d46565b60086020526000908152604090205460ff1681565b3480156107d057600080fd5b506105096107df366004614d79565b6112b3565b3480156107f057600080fd5b506105096107ff366004614d46565b611365565b34801561081057600080fd5b5061050961081f366004614dce565b611482565b34801561083057600080fd5b5061050961083f366004614cb3565b611529565b34801561085057600080fd5b5061055160115481565b34801561086657600080fd5b506105517f000000000000000000000000000000000000000000000000000000000000000081565b34801561089a57600080fd5b506105516108a9366004614d46565b6001600160a01b031660009081526004602052604090205490565b3480156108d057600080fd5b506105096115e3565b3480156108e557600080fd5b50610551600d5481565b3480156108fb57600080fd5b5061055160145481565b34801561091157600080fd5b50610509610920366004614d0d565b611675565b34801561093157600080fd5b50610551611739565b34801561094657600080fd5b50610551610955366004614d46565b60056020526000908152604090205481565b34801561097357600080fd5b50610509610982366004614cb3565b611808565b34801561099357600080fd5b506105f8736026a85e11bd895c934af02647e8c7b4ea2d980881565b3480156109bb57600080fd5b506105096109ca366004614c87565b611891565b3480156109db57600080fd5b5061055160105481565b3480156109f157600080fd5b50610509610a00366004614d46565b6119a7565b348015610a1157600080fd5b506105f87f000000000000000000000000000000000000000000000000000000000000000081565b348015610a4557600080fd5b506006546001600160a01b03166105f8565b348015610a6357600080fd5b506105f873f7d9281e8e363584973f946201b82ba72c965d2781565b348015610a8b57600080fd5b50610509610a9a366004614d46565b611b62565b348015610aab57600080fd5b50610525611c1c565b348015610ac057600080fd5b50610509610acf366004614cb3565b611c29565b348015610ae057600080fd5b506105517fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b348015610b1457600080fd5b50610509610b23366004614d46565b611cd5565b348015610b3457600080fd5b506105f8610b43366004614d46565b6012602052600090815260409020546001600160a01b031681565b348015610b6a57600080fd5b50610509610b79366004614cb3565b611f0b565b348015610b8a57600080fd5b5061057f610b99366004614c87565b611fb7565b348015610baa57600080fd5b50610509610bb9366004614deb565b611fc4565b348015610bca57600080fd5b50600e5461057f9060ff1681565b348015610be457600080fd5b50610509610bf3366004614cb3565b6121f4565b348015610c0457600080fd5b50610551612201565b348015610c1957600080fd5b50610551600c5481565b348015610c2f57600080fd5b50610551612246565b348015610c4457600080fd5b506009546105f8906001600160a01b031681565b348015610c6457600080fd5b50610509610c73366004614cb3565b6124b4565b348015610c8457600080fd5b50610509610c93366004614e10565b612548565b348015610ca457600080fd5b50600b546105f8906001600160a01b031681565b348015610cc457600080fd5b5061050961265b565b348015610cd957600080fd5b50610551610ce8366004614d0d565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b348015610d1f57600080fd5b50610551610d2e366004614cb3565b612713565b348015610d3f57600080fd5b50610509610d4e366004614cb3565b61274d565b348015610d5f57600080fd5b506105f8610d6e366004614cb3565b6127d6565b348015610d7f57600080fd5b50610551610d8e366004614cb3565b612800565b348015610d9f57600080fd5b50610551612834565b348015610db457600080fd5b50610ded610dc3366004614eed565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610532565b348015610e2a57600080fd5b50610509610e39366004614d46565b6128d4565b348015610e4a57600080fd5b50600a546105f8906001600160a01b031681565b348015610e6a57600080fd5b506105096129f4565b348015610e7f57600080fd5b506105f8736e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd81565b60008054610ea890614fa6565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed490614fa6565b8015610f215780601f10610ef657610100808354040283529160200191610f21565b820191906000526020600020905b815481529060010190602001808311610f0457829003601f168201915b505050505081565b6000610f36338484612c70565b50600192915050565b600080610f4a611739565b90506000610f5782612d7e565b9050610f638282612d91565b9250505090565b6000610f7582612d7e565b92915050565b6001600160a01b038316600081815260036020908152604080832033808552925282205491929091908214801590610fb557506000198114155b15611046576000610fe1856040518060600160405280602f8152602001615356602f9139849190612d9d565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b611051868686612dc9565b6001925050505b9392505050565b600061106a82612800565b9050600081116110e25760405162461bcd60e51b815260206004820152603060248201527f5661726961626c655265776172647353747261746567793a3a5769746864726160448201527f7720616d6f756e7420746f6f206c6f77000000000000000000000000000000006064820152608401610500565b60006110ed82612f05565b905060006110fa83612d7e565b905061111d3361110a8484612d91565b6009546001600160a01b03169190612fc7565b6111273385613033565b60405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250505050565b61116c8282613109565b5050565b600b546001600160a01b031633146111c15760405162461bcd60e51b81526020600482015260146024820152732cb0b5a9ba3930ba32b3bc9d1d37b7363ca232bb60611b6044820152606401610500565b60405163a22cb46560e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260006024820152736026a85e11bd895c934af02647e8c7b4ea2d98089063a22cb465906044015b600060405180830381600087803b15801561123e57600080fd5b505af1158015611252573d6000803e3d6000fd5b50505050565b600b546001600160a01b031633146112a95760405162461bcd60e51b81526020600482015260146024820152732cb0b5a9ba3930ba32b3bc9d1d37b7363ca232bb60611b6044820152606401610500565b61116c828261332a565b6009546040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c481018390526001600160a01b039091169063d505accf9060e401600060405180830381600087803b15801561133c57600080fd5b505af1158015611350573d6000803e3d6000fd5b5050505061135e3386613109565b5050505050565b6006546001600160a01b031633146113ad5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b6001600160a01b03811660009081526008602052604090205460ff16156114165760405162461bcd60e51b815260206004820152601c60248201527f5065726d697373696f6e65643a3a616c6c6f774465706f7369746f72000000006044820152606401610500565b6001600160a01b0381166000908152600860205260409020805460ff1916600190811790915560075461144891612a4f565b6007556040516001600160a01b038216907fc0a1035c16faf8d1304056d92c00edf028f87e62b8235a938f00af9e3c0312c590600090a250565b6006546001600160a01b031633146114ca5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b600e5481151560ff9091161515036114e157600080fd5b600e805460ff19168215159081179091556040519081527f7b014ed3854e7f5cb0218d58b3c6ae7d53a68bb0af2f67bfb029ea42c38a7e85906020015b60405180910390a150565b6006546001600160a01b031633146115715760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b6000811161157e57600080fd5b604051339082156108fc029083906000818181858888f193505050501580156115ab573d6000803e3d6000fd5b506040805160008152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910161151e565b6006546001600160a01b0316331461162b5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b6006546001600160a01b031633146116bd5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b60405163095ea7b360e01b81526001600160a01b0382811660048301526000602483015283169063095ea7b3906044016020604051808303816000875af115801561170c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117309190614fda565b61116c57600080fd5b6040517f93f1a40b0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906393f1a40b906044016040805180830381865afa1580156117de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118029190614ff7565b50919050565b6006546001600160a01b031633146118505760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b600c5460408051918252602082018390527f481f79ac3a523b6d6db3c5a720e190e986d1cc1b41adcdf50f9caef849901100910160405180910390a1600c55565b6006546001600160a01b031633146118d95760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b600081116118e657600080fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015611933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119579190614fda565b61196057600080fd5b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2891015b60405180910390a15050565b6006546001600160a01b031633146119ef5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b600060075411611a675760405162461bcd60e51b815260206004820152603460248201527f5065726d697373696f6e65643a3a72656d6f76654465706f7369746f722c206e60448201527f6f20616c6c6f776564206465706f7369746f72730000000000000000000000006064820152608401610500565b6001600160a01b03811660009081526008602052604090205460ff161515600114611afa5760405162461bcd60e51b815260206004820152602a60248201527f5065726d697373696f6e65643a3a72656d6f76654465706f7369746f722c206e60448201527f6f7420616c6c6f776564000000000000000000000000000000000000000000006064820152608401610500565b6001600160a01b0381166000908152600860205260409020805460ff19169055600754611b28906001612d91565b6007556040516001600160a01b038216907f0e86f6608b536e5339a25b65ff531f5ea91e1313d056ecd4752b35cbd16137d490600090a250565b600b546001600160a01b03163314611bb35760405162461bcd60e51b81526020600482015260146024820152732cb0b5a9ba3930ba32b3bc9d1d37b7363ca232bb60611b6044820152606401610500565b600b54604080516001600160a01b03928316815291831660208301527fa8e91499ed37682f43cffb045fcc7d379a91e8c9a14e6321877ee34dee564c00910160405180910390a1600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60018054610ea890614fa6565b6006546001600160a01b03163314611c715760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b612710611c8960105483612a4f90919063ffffffff16565b1115611c9457600080fd5b60115460408051918252602082018390527f2a42303d002f0ba6cfe8259c91d4684443fb0b3de286ba74991175d651726131910160405180910390a1601155565b600b546001600160a01b03163314611d265760405162461bcd60e51b81526020600482015260146024820152732cb0b5a9ba3930ba32b3bc9d1d37b7363ca232bb60611b6044820152606401610500565b6001600160a01b038116600090815260126020526040812080546001600160a01b0319169055805b601354811015611e1a5760138181548110611d6b57611d6b61501b565b6000918252602090912001546001600160a01b0390811690841603611e08576013805460019350611d9d908490615047565b81548110611dad57611dad61501b565b600091825260209091200154601380546001600160a01b039092169183908110611dd957611dd961501b565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80611e128161505e565b915050611d4e565b5080611e8e5760405162461bcd60e51b815260206004820152603460248201527f5661726961626c655265776172647353747261746567793a3a5265776172642060448201527f746f2064656c657465206e6f7420666f756e64210000000000000000000000006064820152608401610500565b6013805480611e9f57611e9f615077565b600082815260209020810160001990810180546001600160a01b0319169055019055601454611ecf906001612d91565b6014556040516001600160a01b03831681527f963b7c735475147a62c589c2d7cb8ec4b0a6b7af4f97373d79ebfa42ab8aa7dc9060200161199b565b6006546001600160a01b03163314611f535760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b612710611f6b60115483612a4f90919063ffffffff16565b1115611f7657600080fd5b60105460408051918252602082018390527fe7f97d51d307dc44045597c9978bec0f842e6bb40d19b9444084cfa30d9ed4f2910160405180910390a1601055565b6000610f36338484612dc9565b6006546001600160a01b0316331461200c5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612055573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612079919061508d565b9050612083613486565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156120cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f0919061508d565b9050836120fd8284612d91565b10156121975760405162461bcd60e51b815260206004820152604d60248201527f5661726961626c655265776172647353747261746567793a3a456d657267656e60448201527f6379207769746864726177206d696e696d756d2072657475726e20616d6f756e60648201527f74206e6f74207265616368656400000000000000000000000000000000000000608482015260a401610500565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef2346121c0611739565b6002546040805192835260208301919091520160405180910390a1600e5460ff161515600103611252576112526000611482565b6121fe3382613109565b50565b60008061220c612246565b9050600c54811061223e57612238612710612232601054846135a390919063ffffffff16565b906135af565b91505090565b600091505090565b6000806122516135bb565b6040516370a0823160e01b815230600482015290915060009073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a0823190602401602060405180830381865afa1580156122a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ca919061508d565b90506122d68147612a4f565b5060005b82518110156124ad5760008382815181106122f7576122f761501b565b602002602001015160000151905073b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b0316816001600160a01b031603612369576123628483815181106123475761234761501b565b60200260200101516020015184612a4f90919063ffffffff16565b925061249a565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156123b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d4919061508d565b905060006124088685815181106123ed576123ed61501b565b60200260200101516020015183612a4f90919063ffffffff16565b90506000601260008887815181106124225761242261501b565b602090810291909101810151516001600160a01b0390811683529082019290925260400160002054169050811580159061246457506001600160a01b03811615155b156124965761249361248c838673b31f66aa3c1e785363f0875a1b74e27b85fd66c78561385d565b8790612a4f565b95505b5050505b50806124a58161505e565b9150506122da565b5092915050565b6006546001600160a01b031633146124fc5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b801561250757600080fd5b600f5460408051918252602082018390527f3cc372f330f95ac9540626dc8a25f5bf21ba607215a5d58304cb804d446f104a910160405180910390a1600f55565b428410156125985760405162461bcd60e51b815260206004820152600f60248201527f7065726d69743a3a6578706972656400000000000000000000000000000000006044820152606401610500565b6001600160a01b038716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866125e58361505e565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050612646888286868661391b565b612651888888612c70565b5050505050505050565b600b546001600160a01b031633146126ac5760405162461bcd60e51b81526020600482015260146024820152732cb0b5a9ba3930ba32b3bc9d1d37b7363ca232bb60611b6044820152606401610500565b60405163a22cb46560e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260016024820152736026a85e11bd895c934af02647e8c7b4ea2d98089063a22cb46590604401611224565b6000612729612720611739565b600254906135a3565b600003612734575090565b610f7561273f611739565b6002546122329085906135a3565b6006546001600160a01b031633146127955760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b600d5460408051918252602082018390527fa5dae50539d56dfe1fb5273d883b0c39bc76750a25d036fc5fbd09ad8fd5f57f910160405180910390a1600d55565b601381815481106127e657600080fd5b6000918252602090912001546001600160a01b0316905081565b600061280d612720611739565b60000361281c57506000919050565b610f7560025461223261282d611739565b85906135a3565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60001b600060405161286991906150a6565b6040519081900390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6006546001600160a01b0316331461291c5760405162461bcd60e51b815260206004820181905260248201526000805160206153368339815191526044820152606401610500565b6001600160a01b0381166129985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610500565b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b323314612a435760405162461bcd60e51b815260206004820152601460248201527f59616b53747261746567793a3a6f6e6c79454f410000000000000000000000006044820152606401610500565b612a4d6000613a7b565b565b60006110588284615141565b6000836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612abf9190615159565b6001600160a01b0316836001600160a01b03161480612b505750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3b9190615159565b6001600160a01b0316836001600160a01b0316145b8015612c4a5750836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb99190615159565b6001600160a01b0316826001600160a01b03161480612c4a5750836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c359190615159565b6001600160a01b0316826001600160a01b0316145b8015612c685750816001600160a01b0316836001600160a01b031614155b949350505050565b6001600160a01b038316612cc65760405162461bcd60e51b815260206004820152601c60248201527f5f617070726f76653a3a6f776e6572207a65726f2061646472657373000000006044820152606401610500565b6001600160a01b038216612d1c5760405162461bcd60e51b815260206004820152601e60248201527f5f617070726f76653a3a7370656e646572207a65726f206164647265737300006044820152606401610500565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60008061105861271061223285846135a3565b60006110588284615047565b60008184841115612dc15760405162461bcd60e51b81526004016105009190614c5f565b505050900390565b6001600160a01b038216612e455760405162461bcd60e51b815260206004820152603460248201527f5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e7366657260448201527f20746f20746865207a65726f20616464726573730000000000000000000000006064820152608401610500565b612e82816040518060600160405280602e81526020016153ac602e91396001600160a01b0386166000908152600460205260409020549190612d9d565b6001600160a01b038085166000908152600460205260408082209390935590841681522054612eb19082612a4f565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612d719085815260200190565b6040517f441a3e700000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b158015612fa957600080fd5b505af1158015612fbd573d6000803e3d6000fd5b5093949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b17905261302e908490613bfe565b505050565b61307081604051806060016040528060278152602001615385602791396001600160a01b0385166000908152600460205260409020549190612d9d565b60046000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506130c08160405180606001604052806027815260200161530f602791396002549190612d9d565b6002556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b600e5460ff1615156001146131865760405162461bcd60e51b815260206004820152602a60248201527f5661726961626c655265776172647353747261746567793a3a4465706f73697460448201527f732064697361626c6564000000000000000000000000000000000000000000006064820152608401610500565b600d54156131b0576000613198612246565b9050600d548111156131ae576131ae6001613a7b565b505b6009546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015613220573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132449190614fda565b6132b65760405162461bcd60e51b815260206004820152603660248201527f5661726961626c655265776172647353747261746567793a3a4465706f73697460448201527f20746f6b656e207472616e73666572206661696c6564000000000000000000006064820152608401610500565b60006132c182612d7e565b90506132d9836132d4610d2e8585612d91565b613ce3565b6132e282613d67565b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161331d91815260200190565b60405180910390a2505050565b600a546001600160a01b038381169116146133cc57600a5461335890829084906001600160a01b0316612a5b565b6133cc576040805162461bcd60e51b81526020600482015260248101919091527f5661726961626c655265776172647353747261746567793a3a5377617020706160448201527f697220646f6573206e6f7420636f6e7461696e2072657761726420746f6b656e6064820152608401610500565b6001600160a01b03808316600081815260126020526040812080549385166001600160a01b03199485161790556013805460018181018355919092527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a090909101805490931690911790915560145461344391612a4f565b601455604080516001600160a01b038085168252831660208201527f916e172c080569186aa7ea048268267257cf7cc49505908863f747bca8620f80910161199b565b60095460405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af11580156134f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061351d9190614fda565b506040517f5312ea8e0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635312ea8e90602401611224565b60006110588284615176565b60006110588284615195565b6040517fffcd42630000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015230602482015260609060009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ffcd426390604401600060405180830381865afa158015613666573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261368e91908101906151b7565b9350505091506000600267ffffffffffffffff8111156136b0576136b0614e7e565b6040519080825280602002602001820160405280156136f557816020015b60408051808201909152600080825260208201528152602001906001900390816136ce5790505b5090506040518060400160405280736e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd6001600160a01b03168152602001848152508160008151811061373d5761373d61501b565b6020026020010181905250604051806040016040528073b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b0316815260200160008411613785576000613835565b6040517fa95b089f0000000000000000000000000000000000000000000000000000000081526001600482015260006024820152604481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a95b089f90606401602060405180830381865afa158015613811573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613835919061508d565b8152508160018151811061384b5761384b61501b565b60209081029190910101529392505050565b60008061386a8585613de6565b509050600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156138ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d2919061526a565b5091509150866001600160a01b0316836001600160a01b0316146138f257905b61390f88836001600160701b0316836001600160701b0316613e17565b98975050505050505050565b6000613925612834565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810186905260620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156139cb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590613a015750866001600160a01b0316816001600160a01b0316145b613a725760405162461bcd60e51b8152602060048201526024808201527f417263683a3a76616c69646174655369673a20696e76616c6964207369676e6160448201527f74757265000000000000000000000000000000000000000000000000000000006064820152608401610500565b50505050505050565b613a83613e65565b6000613a8d61402e565b905081613b0c57600c54811015613b0c5760405162461bcd60e51b815260206004820152603060248201527f5661726961626c655265776172647353747261746567793a3a5265696e76657360448201527f7420616d6f756e7420746f6f206c6f77000000000000000000000000000000006064820152608401610500565b6000613b29612710612232601154856135a390919063ffffffff16565b90508015613b4e57600b54600a54613b4e916001600160a01b03918216911683612fc7565b6000613b6b612710612232601054866135a390919063ffffffff16565b90508015613b8a57600a54613b8a906001600160a01b03163383612fc7565b6000613ba8613ba383613b9d8787612d91565b90612d91565b61426a565b9050613bb381613d67565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef234613bdc611739565b6002546040805192835260208301919091520160405180910390a15050505050565b6000613c53826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661444f9092919063ffffffff16565b80519091501561302e5780806020019051810190613c719190614fda565b61302e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610500565b600254613cf09082612a4f565b6002556001600160a01b038216600090815260046020526040902054613d169082612a4f565b6001600160a01b0383166000818152600460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906130fd9085815260200190565b60008111613ddd5760405162461bcd60e51b815260206004820152602d60248201527f5661726961626c655265776172647353747261746567793a3a5374616b65206160448201527f6d6f756e7420746f6f206c6f77000000000000000000000000000000000000006064820152608401610500565b6121fe8161445e565b600080826001600160a01b0316846001600160a01b031610613e09578284613e0c565b83835b915091509250929050565b600080613e26856103e56135a3565b90506000613e3482856135a3565b90506000613e4e83613e48886103e86135a3565b90612a4f565b9050613e5a82826135af565b979650505050505050565b604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152600060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015613eed57600080fd5b505af1158015613f01573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073f7d9281e8e363584973f946201b82ba72c965d2791506370a0823190602401602060405180830381865afa158015613f57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f7b919061508d565b905080156121fe576040516348b4aac360e11b815260016004820152600060248201819052604482018390526064820181905260001960848301527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391695586919060a40160206040518083038185885af1158015614009573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061116c919061508d565b6040516370a0823160e01b8152306004820152600090819073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a0823190602401602060405180830381865afa158015614082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140a6919061508d565b60135490915060005b81811015614262576000601382815481106140cc576140cc61501b565b6000918252602090912001546001600160a01b031690507fffffffffffffffffffffffff4ce09955c3e187ac9c0f78a5e48b1d847a02993981016141965747801561418f5773b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561416057600080fd5b505af1158015614174573d6000803e3d6000fd5b505050505061418c8186612a4f90919063ffffffff16565b94505b5050614250565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156141dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614201919061508d565b9050801561424d576001600160a01b0380831660009081526012602052604090205416801561424b57600a546142489061248c90849086906001600160a01b031685614592565b95505b505b50505b8061425a8161505e565b9150506140af565b509092915050565b600080614278600284615195565b90506000600960009054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156142cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142f39190615159565b90506000600960009054906101000a90046001600160a01b03166001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561434a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061436e9190615159565b90508273b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b038416146143d4576001600160a01b03831673f7d9281e8e363584973f946201b82ba72c965d27146143c8576143c3848461471f565b6143d1565b6143d184614761565b90505b8373b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b03841614614438576001600160a01b03831673f7d9281e8e363584973f946201b82ba72c965d271461442c57614427858461471f565b614435565b61443585614761565b90505b600954613e5a906001600160a01b0316838361488c565b6060612c688484600085614a81565b60095460405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490529091169063095ea7b3906044016020604051808303816000875af11580156144d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144f59190614fda565b50604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b15801561457e57600080fd5b505af115801561135e573d6000803e3d6000fd5b60008061459f8585613de6565b509050600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156145e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614607919061526a565b5091509150866001600160a01b0316836001600160a01b03161461462757905b6000806146478a856001600160701b0316856001600160701b0316613e17565b9050886001600160a01b0316856001600160a01b03161461466457905b6146786001600160a01b038a16888c612fc7565b604080516000815260208101918290527f022c0d9f000000000000000000000000000000000000000000000000000000009091526001600160a01b0388169063022c0d9f906146d090859085903090602481016152ba565b600060405180830381600087803b1580156146ea57600080fd5b505af11580156146fe573d6000803e3d6000fd5b5050505081811161470f5781614711565b805b9a9950505050505050505050565b60006110588373b31f66aa3c1e785363f0875a1b74e27b85fd66c7847f0000000000000000000000000000000000000000000000000000000000000000614592565b6040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810182905260009073b31f66aa3c1e785363f0875a1b74e27b85fd66c790632e1a7d4d90602401600060405180830381600087803b1580156147ca57600080fd5b505af11580156147de573d6000803e3d6000fd5b50506040516348b4aac360e11b81526000600482018190526001602483015260448201869052606482015260001960848201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063916955869150849060a40160206040518083038185885af1158015614867573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f75919061508d565b6000806000856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156148cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148f3919061526a565b5091509150600061491786846001600160701b0316846001600160701b0316614bbe565b9050848111156149445784905061494185836001600160701b0316856001600160701b0316614bbe565b95505b6149bb8787896001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015614987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149ab9190615159565b6001600160a01b03169190612fc7565b6149fe8782896001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015614987573d6000803e3d6000fd5b6040517f6a6278420000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03881690636a627842906024016020604051808303816000875af1158015614a5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e5a919061508d565b606082471015614af95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610500565b6001600160a01b0385163b614b505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610500565b600080866001600160a01b03168587604051614b6c91906152f2565b60006040518083038185875af1925050503d8060008114614ba9576040519150601f19603f3d011682016040523d82523d6000602084013e614bae565b606091505b5091509150613e5a828286614bce565b6000612c688361223286856135a3565b60608315614bdd575081611058565b825115614bed5782518084602001fd5b8160405162461bcd60e51b81526004016105009190614c5f565b60005b83811015614c22578181015183820152602001614c0a565b838111156112525750506000910152565b60008151808452614c4b816020860160208601614c07565b601f01601f19169290920160200192915050565b6020815260006110586020830184614c33565b6001600160a01b03811681146121fe57600080fd5b60008060408385031215614c9a57600080fd5b8235614ca581614c72565b946020939093013593505050565b600060208284031215614cc557600080fd5b5035919050565b600080600060608486031215614ce157600080fd5b8335614cec81614c72565b92506020840135614cfc81614c72565b929592945050506040919091013590565b60008060408385031215614d2057600080fd5b8235614d2b81614c72565b91506020830135614d3b81614c72565b809150509250929050565b600060208284031215614d5857600080fd5b813561105881614c72565b803560ff81168114614d7457600080fd5b919050565b600080600080600060a08688031215614d9157600080fd5b8535945060208601359350614da860408701614d63565b94979396509394606081013594506080013592915050565b80151581146121fe57600080fd5b600060208284031215614de057600080fd5b813561105881614dc0565b60008060408385031215614dfe57600080fd5b823591506020830135614d3b81614dc0565b600080600080600080600060e0888a031215614e2b57600080fd5b8735614e3681614c72565b96506020880135614e4681614c72565b95506040880135945060608801359350614e6260808901614d63565b925060a0880135915060c0880135905092959891949750929550565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614ebd57614ebd614e7e565b604052919050565b600067ffffffffffffffff821115614edf57614edf614e7e565b50601f01601f191660200190565b600080600080600060a08688031215614f0557600080fd5b8535614f1081614c72565b94506020860135614f2081614c72565b93506040860135925060608601359150608086013567ffffffffffffffff811115614f4a57600080fd5b8601601f81018813614f5b57600080fd5b8035614f6e614f6982614ec5565b614e94565b818152896020838501011115614f8357600080fd5b816020840160208301376000602083830101528093505050509295509295909350565b600181811c90821680614fba57607f821691505b60208210810361180257634e487b7160e01b600052602260045260246000fd5b600060208284031215614fec57600080fd5b815161105881614dc0565b6000806040838503121561500a57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561505957615059615031565b500390565b60006001820161507057615070615031565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561509f57600080fd5b5051919050565b600080835481600182811c9150808316806150c257607f831692505b602080841082036150e157634e487b7160e01b86526022600452602486fd5b8180156150f5576001811461510657615133565b60ff19861689528489019650615133565b60008a81526020902060005b8681101561512b5781548b820152908501908301615112565b505084890196505b509498975050505050505050565b6000821982111561515457615154615031565b500190565b60006020828403121561516b57600080fd5b815161105881614c72565b600081600019048311821515161561519057615190615031565b500290565b6000826151b257634e487b7160e01b600052601260045260246000fd5b500490565b600080600080608085870312156151cd57600080fd5b8451935060208501516151df81614c72565b604086015190935067ffffffffffffffff8111156151fc57600080fd5b8501601f8101871361520d57600080fd5b805161521b614f6982614ec5565b81815288602083850101111561523057600080fd5b615241826020830160208601614c07565b60609790970151959894975050505050565b80516001600160701b0381168114614d7457600080fd5b60008060006060848603121561527f57600080fd5b61528884615253565b925061529660208501615253565b9150604084015163ffffffff811681146152af57600080fd5b809150509250925092565b8481528360208201526001600160a01b03831660408201526080606082015260006152e86080830184614c33565b9695505050505050565b60008251615304818460208701614c07565b919091019291505056fe5f6275726e3a206275726e20616d6f756e74206578636565647320746f74616c20737570706c794f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727472616e7366657246726f6d3a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655f6275726e3a206275726e20616d6f756e7420657863656564732066726f6d2062616c616e63655f7472616e73666572546f6b656e733a207472616e7366657220657863656564732066726f6d2062616c616e6365a2646970667358221220d509a61d4ae4fbd9038e77f93f407d94ba73d9e2e1493affb3b6856c0e7fd4a064736f6c634300080d00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000512ab7ccf96af5512dbc2d4c93048f3f6a16608000000000000000000000000188bed1968b795d5c9022f6a0bb5931ac4c18f00000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f4003f4efbe8691b60249e6afbd307abe7758adb000000000000000000000000a974de60871907aafe3a4634766adb40df461c16000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e4400000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000002bc000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000001a5969656c642059616b3a204a4c5020555344432d7979415641580000000000000000000000000000000000000000000000000000000000000000000000000000

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

00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000512ab7ccf96af5512dbc2d4c93048f3f6a16608000000000000000000000000188bed1968b795d5c9022f6a0bb5931ac4c18f00000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f4003f4efbe8691b60249e6afbd307abe7758adb000000000000000000000000a974de60871907aafe3a4634766adb40df461c16000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e4400000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000002bc000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000001a5969656c642059616b3a204a4c5020555344432d7979415641580000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Yield Yak: JLP USDC-yyAVAX
Arg [1] : _depositToken (address): 0x0512ab7ccf96af5512dbc2d4c93048f3f6a16608
Arg [2] : _stakingContract (address): 0x188bed1968b795d5c9022f6a0bb5931ac4c18f00
Arg [3] : _pid (uint256): 76

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [1] : 0000000000000000000000000512ab7ccf96af5512dbc2d4c93048f3f6a16608
Arg [2] : 000000000000000000000000188bed1968b795d5c9022f6a0bb5931ac4c18f00
Arg [3] : 000000000000000000000000000000000000000000000000000000000000004c
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [5] : 000000000000000000000000f4003f4efbe8691b60249e6afbd307abe7758adb
Arg [6] : 000000000000000000000000a974de60871907aafe3a4634766adb40df461c16
Arg [7] : 000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e44
Arg [8] : 00000000000000000000000000000000000000000000000000005af3107a4000
Arg [9] : 00000000000000000000000000000000000000000000000000000000000002bc
Arg [10] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [11] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [12] : 5969656c642059616b3a204a4c5020555344432d797941564158000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000


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.