Contract 0xb8f531c0d3c53b1760bcb7f57d87762fd25c4977

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6a357019d896f3a2496b4e0f95a979bc486f7e5af0c083ba51680d8c459f8fb0Reinvest258913732023-02-06 3:15:148 hrs 37 mins ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.075652633758 34.900020002
0x612ee462b26e54b854fe9337d7d2f11d6112b0ceed220ed8467227a405bfb8ffReinvest258913722023-02-06 3:15:138 hrs 37 mins ago0x6b88d2cd69579b2cedc514e2dfaea082e011c477 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.067418516274 31.600020002
0x37166ee4a44c3dbc82bbe1bfaa1ce970b66bfbe7e12da121918c25d54956f18dWithdraw258318592023-02-04 17:46:551 day 18 hrs ago0x68b1c5deaf2b5de25d7eed4e6d453acb0502177d IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.051360233 26.5
0x7f47c798e87e8b07c0d3c61b45305db878dbc0b2ec5b41e890501d831796dcd1Reinvest258233752023-02-04 13:03:151 day 22 hrs ago0xdaa99a4826b3d0e9998cb55c8c648c53a5be677e IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0604317476 28.1
0xc7c32fa1b41e705926528c86b58120753645fee9c1d32ac3ce2bfe6c32471853Reinvest257905422023-02-03 18:31:242 days 17 hrs ago0x6b88d2cd69579b2cedc514e2dfaea082e011c477 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.053765693012 25.00002
0x64657eb6dc72a313ca243a1d05ce1b96decbb926baeb728077f7975d3f9743a6Deposit257384002023-02-02 13:25:053 days 22 hrs ago0x0bccd4a3bb6325daf4a32d0243a2f693bcc6fb61 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.019482217 26.5
0x52a616bf306d6d14c403dd972e5a7da60b895056ef829b4f8c7a0804ebd530baDeposit256682812023-01-31 22:32:015 days 13 hrs ago0x7f82cfeae517b780370e653eb6e59e5ea464e6fb IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.019482058 26.5
0x92e69316840e347a17fa69229f25e9ce7718a0cc847dcb0c3d59d29f54c6894dDeposit256184602023-01-30 18:08:586 days 17 hrs ago0x188f21519bea307d59ae58c676facb0cddd22a71 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.021541830
0x63435a775fbfd827d840fd1930ab6fc64b84a59dc4c3ac6472e13303efe5ab17Deposit256026402023-01-30 9:23:007 days 2 hrs ago0x5a6f23f9ae82024685d11739c4e76077d6167f97 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0198493227
0xc4d08df512391ba077d274cda49a71e8b52e2751b5a430c5b3292d7df4c2a82eWithdraw255830592023-01-29 22:20:267 days 13 hrs ago0x6d15eff7c4d740c4683a23abeb432f0a1b255a12 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.049616268 26.5
0x04bf508a66cf7e9c27cbe81daf9c12c349f6c9d893470df9c22ca04cecdf3318Withdraw255777802023-01-29 19:22:207 days 16 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.05136207984 26.94
0xcd6ef2c50f12e88be4153436776635619ee5182e214fb3acf6fff0a569e1dd3cReinvest255777562023-01-29 19:21:327 days 16 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0564732755 26.5
0x7a988103980bb0100b1aa631f2efac13cf6f021d4f3696b81a94e403947ba6beReinvest255777142023-01-29 19:20:087 days 16 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0560162565 26.5
0x88de5e2dcfe3471288b92101c653b2f816e24cc0854aff0fc92510bffef63b1bDeposit255776732023-01-29 19:18:477 days 16 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0190286165 26.5
0xf716a9abc0870ec8df9837282fc28afce6810b5b8c453f8d35079eaa136eb72cDeposit255677502023-01-29 13:45:187 days 22 hrs ago0xc3f78b00724b34fa120deb9c69b93c7a87beeb46 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0185748305 26.5
0x2dcd71fb8749fcfae623f724af0f015be30eb159de6cc8147fb09fd99429ccc0Deposit255675782023-01-29 13:39:347 days 22 hrs ago0xc3f78b00724b34fa120deb9c69b93c7a87beeb46 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0184424895 26.5
0x27430ca18d7bbecfdc76b677656ecc092f756d73d6c276adf2a752e452ec85f1Deposit255131792023-01-28 7:00:099 days 4 hrs ago0x2903a1185c1d30fda8e59d63b8119ea40aabbc9e IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0188716305 26.5
0x2357d6407c22ce0e10dc6d2764e4817c234db105746f50c46a168da5892c503aWithdraw254491962023-01-26 18:48:3310 days 17 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.05275456545 27.425
0x162b1f3ea81062490c15e226972c62d2d47891c027fd9370eabe864ff0711e6cReinvest254491692023-01-26 18:47:3910 days 17 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.024259637 26.5
0xb2faf191357cd77cb3fe98dcdce30a16bbdf4f8baa1dc918b23357a8e0e545d9Reinvest254491692023-01-26 18:47:3910 days 17 hrs ago0x6b88d2cd69579b2cedc514e2dfaea082e011c477 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.056019012502 26.500000001
0xffc2ef06dfcdac05d9b16aa2cc60cf735264be520133d68837c13f75ebb8027aDeposit254491342023-01-26 18:46:3010 days 17 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.019446836776 27.082430012
0x34b1fc3a1dc576ff7d7952961354d12aab95b774b3a773f7b8c3095f1d79a1c9Withdraw254255072023-01-26 5:29:5911 days 6 hrs ago0xbd38148857373b1f9472a8f287336bcafe2178b5 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.053947766282 29.272459082
0xb4f81bf1fa3a20364b984d18fb6ef179b2d194126c2d16874d4af8bc0af0b33dWithdraw252944362023-01-23 2:57:0214 days 8 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.0491678615 26.5
0x6e695d5da51534524f3cf24ca251497d9d97311d70068936cb586e45152c6d26Reinvest252944212023-01-23 2:56:3214 days 8 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.055117933 26.5
0xf27e2cd6b2a16c2a092fca4ef8ed6a232da7486e6ac1f0cc08658e77c47f4c3fDeposit252943942023-01-23 2:55:3514 days 8 hrs ago0x8773785f6cc947fefa1703cb9a4323167aaced68 IN  0xb8f531c0d3c53b1760bcb7f57d87762fd25c49770 AVAX0.050515908816 27.082430012
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlatypusStrategy

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : PlatypusStrategy.sol
// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity 0.7.3;

import "../interfaces/IMasterPlatypus.sol";
import "../interfaces/IPlatypusPool.sol";
import "../interfaces/IPlatypusVoterProxy.sol";
import "../interfaces/IPlatypusAsset.sol";
import "../interfaces/IERC20.sol";
import "../interfaces/IPair.sol";
import "../interfaces/IWAVAX.sol";
import "../lib/DexLibrary.sol";
import "../lib/SafeERC20.sol";
import "../lib/DSMath.sol";
import "../YakStrategyV2.sol";

contract PlatypusStrategy is YakStrategyV2 {
    using SafeMath for uint256;
    using DSMath for uint256;
    using SafeERC20 for IERC20;

    struct SwapPairs {
        address swapPairToken; // swap rewardToken to depositToken
        address swapPairPoolReward;
        address swapPairExtraReward;
    }

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

    IWAVAX private constant WAVAX = IWAVAX(0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7);
    uint256 internal constant WAD = 10**18;
    uint256 internal constant RAY = 10**27;

    IMasterPlatypus public immutable masterchef;
    IPlatypusAsset public immutable asset;
    IPlatypusPool public pool;
    IPlatypusVoterProxy public proxy;
    uint256 public maxSlippage;
    address private swapPairToken;
    uint256 public immutable PID;
    address private poolRewardToken;
    IPair private swapPairPoolReward;
    address public swapPairExtraReward;
    address public extraToken;

    constructor(
        string memory _name,
        address _depositToken,
        address _poolRewardToken,
        SwapPairs memory swapPairs,
        uint256 _maxSlippage,
        address _pool,
        address _stakingContract,
        address _voterProxy,
        uint256 _pid,
        address _timelock,
        StrategySettings memory _strategySettings
    ) {
        name = _name;
        depositToken = IERC20(_depositToken);
        rewardToken = IERC20(address(WAVAX));
        PID = _pid;
        devAddr = 0x2D580F9CF2fB2D09BC411532988F2aFdA4E7BefF;

        masterchef = IMasterPlatypus(_stakingContract);
        pool = IPlatypusPool(_pool);
        asset = IPlatypusAsset(pool.assetOf(_depositToken));
        proxy = IPlatypusVoterProxy(_voterProxy);
        maxSlippage = _maxSlippage;

        assignSwapPairSafely(swapPairs.swapPairToken, _poolRewardToken, swapPairs.swapPairPoolReward);
        _setExtraRewardSwapPair(swapPairs.swapPairExtraReward);
        updateMinTokensToReinvest(_strategySettings.minTokensToReinvest);
        updateAdminFee(_strategySettings.adminFeeBips);
        updateDevFee(_strategySettings.devFeeBips);
        updateReinvestReward(_strategySettings.reinvestRewardBips);
        updateDepositsEnabled(true);
        transferOwnership(_timelock);
        emit Reinvest(0, 0);
    }

    function setPlatypusVoterProxy(address _voterProxy) external onlyOwner {
        proxy = IPlatypusVoterProxy(_voterProxy);
    }

    /**
     * @notice Update max slippage for withdrawal
     * @dev Function name matches interface for FeeCollector
     */
    function updateMaxSwapSlippage(uint256 slippageBips) public onlyDev {
        maxSlippage = slippageBips;
    }

    /**
     * @notice Approve tokens for use in Strategy
     * @dev Deprecated; approvals should be handled in context of staking
     */
    function setAllowances() public override onlyOwner {
        revert("setAllowances::deprecated");
    }

    /**
     * @notice Update extra reward swap pair (if applicable)
     * @dev Function name matches interface for FeeCollector
     */
    function setExtraRewardSwapPair(address _extraTokenSwapPair) external onlyDev {
        _setExtraRewardSwapPair(_extraTokenSwapPair);
    }

    function assignSwapPairSafely(
        address _swapPairToken,
        address _poolRewardToken,
        address _swapPairPoolReward
    ) private {
        require(
            DexLibrary.checkSwapPairCompatibility(IPair(_swapPairToken), address(depositToken), address(rewardToken)),
            "swap token does not match deposit and reward token"
        );
        swapPairToken = _swapPairToken;

        if (_poolRewardToken != address(rewardToken)) {
            DexLibrary.checkSwapPairCompatibility(IPair(_swapPairPoolReward), address(rewardToken), _poolRewardToken);
        }
        poolRewardToken = _poolRewardToken;
        swapPairPoolReward = IPair(_swapPairPoolReward);
    }

    function _setExtraRewardSwapPair(address _extraTokenSwapPair) internal {
        if (_extraTokenSwapPair > address(0)) {
            if (IPair(_extraTokenSwapPair).token0() == address(rewardToken)) {
                extraToken = IPair(_extraTokenSwapPair).token1();
            } else if (IPair(_extraTokenSwapPair).token1() == address(rewardToken)) {
                extraToken = IPair(_extraTokenSwapPair).token0();
            } else {
                revert("PlatypusStrategy::_setExtraRewardSwapPair Swap pair does not contain reward token");
            }
            swapPairExtraReward = _extraTokenSwapPair;
        } else {
            swapPairExtraReward = address(0);
            extraToken = address(0);
        }
    }

    /**
     * @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, "PlatypusStrategy::_deposit");
        if (MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST > 0) {
            (
                uint256 poolTokenAmount,
                uint256 extraTokenAmount,
                uint256 rewardTokenBalance,
                uint256 estimatedTotalReward
            ) = _checkReward();
            if (estimatedTotalReward > MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST) {
                _reinvest(rewardTokenBalance, poolTokenAmount, extraTokenAmount);
            }
        } else {
            proxy.claimReward(address(masterchef), PID);
        }
        depositToken.safeTransferFrom(msg.sender, address(this), amount);
        uint256 depositFee = _calculateDepositFee(amount);
        _mint(account, getSharesForDepositTokens(amount.sub(depositFee)));
        _stakeDepositTokens(amount, depositFee);
        emit Deposit(account, amount.sub(depositFee));
    }

    function _depositMasterchef(
        uint256 _pid,
        uint256 _amount,
        uint256 _depositFee
    ) internal {
        depositToken.safeTransfer(address(proxy), _amount);
        proxy.deposit(
            _pid,
            address(masterchef),
            address(pool),
            address(depositToken),
            address(asset),
            _amount,
            _depositFee
        );
    }

    function withdraw(uint256 amount) external override {
        uint256 depositTokenAmount = getDepositTokensForShares(amount);
        require(depositTokenAmount > 0, "PlatypusStrategy::withdraw");
        proxy.claimReward(address(masterchef), PID);
        uint256 withdrawalAmount = proxy.withdraw(
            PID,
            address(masterchef),
            address(pool),
            address(depositToken),
            address(asset),
            maxSlippage,
            depositTokenAmount
        );
        depositToken.safeTransfer(msg.sender, withdrawalAmount);
        _burn(msg.sender, amount);
        emit Withdraw(msg.sender, depositTokenAmount);
    }

    function reinvest() external override onlyEOA {
        (
            uint256 poolTokenAmount,
            uint256 extraTokenAmount,
            uint256 rewardTokenBalance,
            uint256 estimatedTotalReward
        ) = _checkReward();
        require(estimatedTotalReward >= MIN_TOKENS_TO_REINVEST, "PlatypusStrategy::reinvest");
        _reinvest(rewardTokenBalance, poolTokenAmount, extraTokenAmount);
    }

    function _convertPoolTokensIntoReward(uint256 poolTokenAmount) private returns (uint256) {
        if (address(rewardToken) == poolRewardToken) {
            return poolTokenAmount;
        }
        return DexLibrary.swap(poolTokenAmount, address(poolRewardToken), address(rewardToken), swapPairPoolReward);
    }

    function _convertExtraTokensIntoReward(uint256 rewardTokenBalance, uint256 extraTokenAmount)
        internal
        returns (uint256)
    {
        if (extraTokenAmount > 0) {
            if (swapPairExtraReward > address(0)) {
                return DexLibrary.swap(extraTokenAmount, extraToken, address(rewardToken), IPair(swapPairExtraReward));
            }

            uint256 avaxBalance = address(this).balance;
            if (avaxBalance > 0) {
                WAVAX.deposit{value: avaxBalance}();
            }
            return WAVAX.balanceOf(address(this)).sub(rewardTokenBalance);
        }
        return 0;
    }

    /**
     * @notice Reinvest rewards from staking contract to deposit tokens
     * @dev Reverts if the expected amount of tokens are not returned from `MasterChef`
     */
    function _reinvest(
        uint256 rewardTokenBalance,
        uint256 poolTokenAmount,
        uint256 extraTokenAmount
    ) private {
        proxy.claimReward(address(masterchef), PID);
        uint256 amount = rewardTokenBalance.add(_convertPoolTokensIntoReward(poolTokenAmount));
        amount.add(_convertExtraTokensIntoReward(rewardTokenBalance, extraTokenAmount));

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

        uint256 depositFee = _calculateDepositFee(depositTokenAmount);
        _stakeDepositTokens(depositTokenAmount, depositFee);

        emit Reinvest(totalDeposits(), totalSupply);
    }

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

    function _stakeDepositTokens(uint256 amount, uint256 depositFee) private {
        require(amount.sub(depositFee) > 0, "PlatypusStrategy::_stakeDepositTokens");
        _depositMasterchef(PID, amount, depositFee);
    }

    function checkReward() public view override returns (uint256) {
        (, , , uint256 estimatedTotalReward) = _checkReward();
        return estimatedTotalReward;
    }

    function _checkReward()
        internal
        view
        returns (
            uint256 _poolTokenAmount,
            uint256 _extraTokenAmount,
            uint256 _rewardTokenBalance,
            uint256 _estimatedTotalReward
        )
    {
        uint256 poolTokenBalance = IERC20(poolRewardToken).balanceOf(address(this));
        (uint256 pendingPoolTokenAmount, uint256 pendingExtraTokenAmount, address extraTokenAddress) = _pendingRewards(
            PID
        );
        uint256 poolTokenAmount = poolTokenBalance.add(pendingPoolTokenAmount);

        uint256 pendingRewardTokenAmount = poolRewardToken != address(rewardToken)
            ? DexLibrary.estimateConversionThroughPair(
                poolTokenAmount,
                poolRewardToken,
                address(rewardToken),
                swapPairPoolReward
            )
            : pendingPoolTokenAmount;
        uint256 pendingExtraTokenRewardAmount = 0;
        if (extraTokenAddress > address(0)) {
            if (extraTokenAddress == address(WAVAX)) {
                pendingExtraTokenRewardAmount = pendingExtraTokenAmount;
            } else if (swapPairExtraReward > address(0)) {
                pendingExtraTokenAmount = pendingExtraTokenAmount.add(IERC20(extraToken).balanceOf(address(this)));
                pendingExtraTokenRewardAmount = DexLibrary.estimateConversionThroughPair(
                    pendingExtraTokenAmount,
                    extraTokenAddress,
                    address(rewardToken),
                    IPair(swapPairExtraReward)
                );
            }
        }
        uint256 rewardTokenBalance = rewardToken.balanceOf(address(this)).add(pendingExtraTokenRewardAmount);
        uint256 estimatedTotalReward = rewardTokenBalance.add(pendingRewardTokenAmount);
        return (poolTokenAmount, pendingExtraTokenAmount, rewardTokenBalance, estimatedTotalReward);
    }

    function _pendingRewards(uint256 _pid)
        internal
        view
        returns (
            uint256,
            uint256,
            address
        )
    {
        (uint256 pendingPtp, uint256 pendingBonusToken, address bonusTokenAddress) = proxy.pendingRewards(
            address(masterchef),
            _pid
        );
        uint256 reinvestFeeBips = proxy.reinvestFeeBips();
        uint256 boostFee = pendingPtp.mul(reinvestFeeBips).div(BIPS_DIVISOR);

        return (pendingPtp.sub(boostFee), pendingBonusToken, bonusTokenAddress);
    }

    function _calculateDepositFee(uint256 amount) internal view returns (uint256 fee) {
        return
            _depositFee(
                pool.getSlippageParamK(),
                pool.getSlippageParamN(),
                pool.getC1(),
                pool.getXThreshold(),
                asset.cash(),
                asset.liability(),
                amount
            );
    }

    function _depositFee(
        uint256 k,
        uint256 n,
        uint256 c1,
        uint256 xThreshold,
        uint256 cash,
        uint256 liability,
        uint256 amount
    ) internal pure returns (uint256) {
        // cover case where the asset has no liquidity yet
        if (liability == 0) {
            return 0;
        }

        uint256 covBefore = cash.wdiv(liability);
        if (covBefore <= 10**18) {
            return 0;
        }

        uint256 covAfter = (cash.add(amount)).wdiv(liability.add(amount));
        uint256 slippageBefore = _slippageFunc(k, n, c1, xThreshold, covBefore);
        uint256 slippageAfter = _slippageFunc(k, n, c1, xThreshold, covAfter);

        // (Li + Di) * g(cov_after) - Li * g(cov_before)
        return ((liability.add(amount)).wmul(slippageAfter)).sub(liability.wmul(slippageBefore));
    }

    function _slippageFunc(
        uint256 k,
        uint256 n,
        uint256 c1,
        uint256 xThreshold,
        uint256 x
    ) internal pure returns (uint256) {
        if (x < xThreshold) {
            return c1.sub(x);
        } else {
            return k.wdiv((((x.mul(RAY)).div(WAD)).rpow(n).mul(WAD)).div(RAY)); // k / (x ** n)
        }
    }

    /**
     * @notice Estimate recoverable balance after withdraw fee
     * @return deposit tokens after withdraw fee
     */
    function estimateDeployedBalance() external view override returns (uint256) {
        uint256 balance = totalDeposits();
        if (balance == 0) {
            return 0;
        }
        (uint256 expectedAmount, , ) = pool.quotePotentialWithdraw(address(depositToken), balance);
        return expectedAmount;
    }

    function totalDeposits() public view override returns (uint256) {
        uint256 depositBalance = proxy.poolBalance(address(masterchef), PID);
        return depositBalance;
    }

    function rescueDeployedFunds(uint256 minReturnAmountAccepted, bool disableDeposits) external override onlyOwner {
        uint256 balanceBefore = depositToken.balanceOf(address(this));
        proxy.emergencyWithdraw(PID, address(masterchef), address(pool), address(depositToken), address(asset));
        uint256 balanceAfter = depositToken.balanceOf(address(this));
        require(balanceAfter.sub(balanceBefore) >= minReturnAmountAccepted, "PlatypusStrategy::rescueDeployedFunds");
        emit Reinvest(totalDeposits(), totalSupply);
        if (DEPOSITS_ENABLED == true && disableDeposits == true) {
            updateDepositsEnabled(false);
        }
    }
}

File 2 of 19 : IMasterPlatypus.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

interface IMasterPlatypus {
    function poolLength() external view returns (uint256);

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

    function rewarderBonusTokenInfo(uint256 _pid)
        external
        view
        returns (address bonusTokenAddress, string memory bonusTokenSymbol);

    function massUpdatePools() external;

    function updatePool(uint256 _pid) external;

    function deposit(uint256 _pid, uint256 _amount) external returns (uint256, uint256);

    function multiClaim(uint256[] memory _pids)
        external
        returns (
            uint256,
            uint256[] memory,
            uint256[] memory
        );

    function withdraw(uint256 _pid, uint256 _amount) external returns (uint256, uint256);

    function emergencyWithdraw(uint256 _pid) external;

    function migrate(uint256[] calldata _pids) external;

    function depositFor(
        uint256 _pid,
        uint256 _amount,
        address _user
    ) external;

    function updateFactor(address _user, uint256 _newVePtpBalance) external;

    function userInfo(uint256 _pid, address _user)
        external
        view
        returns (
            uint256 _amount,
            uint256 _rewardDebt,
            uint256 _factor
        );

    function poolInfo(uint256 _pid)
        external
        view
        returns (
            address _lpToken,
            uint256 _allocPoint,
            uint256 _lastRewardTimestamp,
            uint256 _accPtpPerShare,
            address _rewarder,
            uint256 _sumOfFactors,
            uint256 _accPtpPerFactorShare
        );
}

File 3 of 19 : IPlatypusPool.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

interface IPlatypusPool {
    function assetOf(address token) external view returns (address);

    function deposit(
        address to,
        uint256 amount,
        address token,
        uint256 deadline
    ) external returns (uint256);

    function withdraw(
        address token,
        uint256 liquidity,
        uint256 minimumAmount,
        address to,
        uint256 deadline
    ) external returns (uint256);

    function getHaircutRate() external view returns (uint256);

    function quotePotentialWithdraw(address token, uint256 liquidity)
        external
        view
        returns (
            uint256,
            uint256,
            bool
        );

    function getC1() external view returns (uint256);

    function getXThreshold() external view returns (uint256);

    function getSlippageParamK() external view returns (uint256);

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

File 4 of 19 : IPlatypusVoterProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

import "./IPlatypusVoter.sol";

interface IPlatypusVoterProxy {
    function withdraw(
        uint256 _pid,
        address _stakingContract,
        address _pool,
        address _token,
        address _asset,
        uint256 _maxSlippage,
        uint256 _amount
    ) external returns (uint256);

    function emergencyWithdraw(
        uint256 _pid,
        address _stakingContract,
        address _pool,
        address _token,
        address _asset
    ) external;

    function deposit(
        uint256 _pid,
        address _stakingContract,
        address _pool,
        address _token,
        address _asset,
        uint256 _amount,
        uint256 _depositFee
    ) external;

    function pendingRewards(address _stakingContract, uint256 _pid)
        external
        view
        returns (
            uint256,
            uint256,
            address
        );

    function poolBalance(address _stakingContract, uint256 _pid) external view returns (uint256);

    function platypusVoter() external view returns (IPlatypusVoter);

    function claimReward(address _stakingContract, uint256 _pid) external;

    function approveStrategy(address _stakingContract, address _strategy) external;

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

File 5 of 19 : IPlatypusAsset.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

interface IPlatypusAsset {
    function cash() external view returns (uint256);

    function liability() external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function pool() external view returns (address);

    function underlyingToken() external view returns (address);
}

File 6 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

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 7 of 19 : IPair.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

import "./IERC20.sol";

interface IPair is IERC20 {
    function token0() external pure returns (address);
    function token1() external pure returns (address);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function mint(address to) external returns (uint liquidity);
    function sync() external;
}

File 8 of 19 : IWAVAX.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

interface IWAVAX {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function balanceOf(address owner) external view returns (uint); 
    function withdraw(uint) external;
    function approve(address to, uint value) external returns (bool);
}

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

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

library DexLibrary {
    using SafeMath for uint;
    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(uint amountIn, address fromToken, address toToken, IPair pair) internal returns (uint) {
        (address token0,) = sortTokens(fromToken, toToken);
        (uint112 reserve0, uint112 reserve1,) = pair.getReserves();
        if (token0 != fromToken) (reserve0, reserve1) = (reserve1, reserve0);
        uint amountOut1 = 0;
        uint amountOut2 = getAmountOut(amountIn, reserve0, reserve1);
        if (token0 != fromToken) (amountOut1, amountOut2) = (amountOut2, amountOut1);
        safeTransfer(fromToken, 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(uint amountIn, address fromToken, address toToken, IPair swapPair) internal view returns (uint) {
        (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(uint amount, address rewardToken, address depositToken, IPair swapPairToken0, IPair swapPairToken1) internal returns (uint) {
        uint amountIn = amount.div(2);
        require(amountIn > 0, "DexLibrary::_convertRewardTokensToDepositTokens");

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

        address token1 = IPair(depositToken).token1();
        uint 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, uint maxAmountIn0, uint maxAmountIn1) internal returns (uint) {
        (uint112 reserve0, uint112 reserve1,) = IPair(address(depositToken)).getReserves();
        uint amountIn1 = _quoteLiquidityAmountOut(maxAmountIn0, reserve0, reserve1);
        if (amountIn1 > maxAmountIn1) {
            amountIn1 = maxAmountIn1;
            maxAmountIn0 = _quoteLiquidityAmountOut(maxAmountIn1, reserve1, reserve0);
        }

        safeTransfer(IPair(depositToken).token0(), depositToken, maxAmountIn0);
        safeTransfer(IPair(depositToken).token1(), 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(uint amountIn, uint reserve0, uint reserve1) private pure returns (uint) {
        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(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint) {
        uint amountInWithFee = amountIn.mul(997);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        return numerator.div(denominator);
    }

    /**
     * @notice Safely transfer using an anonymous ERC20 token
     * @dev Requires token to return true on transfer
     * @param token address
     * @param to recipient address
     * @param value amount
     */
    function safeTransfer(address token, address to, uint256 value) internal {
        require(IERC20(token).transfer(to, value), "DexLibrary::TRANSFER_FROM_FAILED");
    }
}

File 10 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../interfaces/IERC20.sol";
import "./SafeMath.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 SafeMath for uint256;
    using Address for address;

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

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

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

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

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

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

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

File 11 of 19 : DSMath.sol
/// math.sol -- mixin for inline numerical wizardry

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: MIT

import "./SafeMath.sol";

pragma solidity 0.7.3;

library DSMath {
    using SafeMath for uint256;

    uint256 public constant WAD = 10**18;
    uint256 public constant RAY = 10**27;

    //rounds to zero if x*y < WAD / 2
    function wmul(uint256 x, uint256 y) internal pure returns (uint256) {
        return ((x.mul(y)).add((WAD.div(2)))).div(WAD);
    }

    //rounds to zero if x*y < WAD / 2
    function wdiv(uint256 x, uint256 y) internal pure returns (uint256) {
        return ((x.mul(WAD)).add((y.div(2)))).div(y);
    }

    function reciprocal(uint256 x) internal pure returns (uint256) {
        return wdiv(WAD, x);
    }

    // This famous algorithm is called "exponentiation by squaring"
    // and calculates x^n with x as fixed-point and n as regular unsigned.
    //
    // It's O(log n), instead of O(n) for naive repeated multiplication.
    //
    // These facts are why it works:
    //
    //  If n is even, then x^n = (x^2)^(n/2).
    //  If n is odd,  then x^n = x * x^(n-1),
    //   and applying the equation for even x gives
    //    x^n = x * (x^2)^((n-1) / 2).
    //
    //  Also, EVM division is flooring and
    //    floor[(n-1) / 2] = floor[n / 2].
    //
    function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) {
        z = n.mod(2) != 0 ? x : RAY;

        for (n = n.div(2); n != 0; n = n.div(2)) {
            x = rmul(x, x);

            if (n.mod(2) != 0) {
                z = rmul(z, x);
            }
        }
    }

    //rounds to zero if x*y < WAD / 2
    function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = ((x.mul(y)).add((RAY.div(2)))).div(RAY);
    }
}

File 12 of 19 : YakStrategyV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

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 uint;


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

    uint public MIN_TOKENS_TO_REINVEST;
    uint public MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST;
    bool public DEPOSITS_ENABLED;

    uint public REINVEST_REWARD_BIPS;
    uint public ADMIN_FEE_BIPS;
    uint public DEV_FEE_BIPS;

    uint constant internal BIPS_DIVISOR = 10000;
    uint constant internal MAX_UINT = uint(-1);

    event Deposit(address indexed account, uint amount);
    event Withdraw(address indexed account, uint amount);
    event Reinvest(uint newTotalDeposits, uint newTotalSupply);
    event Recovered(address token, uint amount);
    event UpdateAdminFee(uint oldValue, uint newValue);
    event UpdateDevFee(uint oldValue, uint newValue);
    event UpdateReinvestReward(uint oldValue, uint newValue);
    event UpdateMinTokensToReinvest(uint oldValue, uint newValue);
    event UpdateMaxTokensToDepositWithoutReinvest(uint oldValue, uint 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");
        _;
    }

    /**
     * @notice Approve tokens for use in Strategy
     * @dev Should use modifier `onlyOwner` to avoid griefing
     */
    function setAllowances() public virtual;

    /**
     * @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(uint 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(uint amount, uint 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, uint amount) external virtual;

    /**
     * @notice Redeem receipt tokens for deposit tokens
     * @param amount receipt tokens
     */
    function withdraw(uint 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 (uint) {
        uint unclaimedRewards = checkReward();
        if (unclaimedRewards >= MIN_TOKENS_TO_REINVEST) {
            return unclaimedRewards.mul(REINVEST_REWARD_BIPS).div(BIPS_DIVISOR);
        }
        return 0;
    }

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

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

    /**
     * @notice Rescue all available deployed deposit tokens back to Strategy
     * @param minReturnAmountAccepted min deposit tokens to receive
     * @param disableDeposits bool
     */
    function rescueDeployedFunds(uint 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 virtual view returns (uint);
    /**
     * @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(uint amount) public view returns (uint) {
        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(uint amount) public view returns (uint) {
        if (totalSupply.mul(totalDeposits()) == 0) {
            return 0;
        }
        return amount.mul(totalDeposits()).div(totalSupply);
    }

    /**
     * @notice Update reinvest min threshold
     * @param newValue threshold
     */
    function updateMinTokensToReinvest(uint 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(uint newValue) public onlyOwner {
        emit UpdateMaxTokensToDepositWithoutReinvest(MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST, newValue);
        MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST = newValue;
    }

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

    /**
     * @notice Update admin fee
     * @param newValue fee in BIPS
     */
    function updateAdminFee(uint newValue) public onlyOwner {
        require(newValue.add(DEV_FEE_BIPS).add(REINVEST_REWARD_BIPS) <= BIPS_DIVISOR);
        emit UpdateAdminFee(ADMIN_FEE_BIPS, newValue);
        ADMIN_FEE_BIPS = newValue;
    }

    /**
     * @notice Update reinvest reward
     * @param newValue fee in BIPS
     */
    function updateReinvestReward(uint newValue) public onlyOwner {
        require(newValue.add(ADMIN_FEE_BIPS).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, uint 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(uint amount) external onlyOwner {
        require(amount > 0);
        msg.sender.transfer(amount);
        emit Recovered(address(0), amount);
    }
}

File 13 of 19 : IPlatypusVoter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

interface IPlatypusVoter {
    function execute(
        address to,
        uint256 value,
        bytes calldata data
    ) external returns (bool, bytes memory);

    function vePTPBalance() external view returns (uint256);

    function wrapAvaxBalance() external returns (uint256);

    function depositsEnabled() external view returns (bool);

    function deposit(uint256 _amount) external;

    function depositFromBalance(uint256 _value) external;

    function setVoterProxy(address _voterProxy) external;

    function claimVePTP() external;
}

File 14 of 19 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

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

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @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, string memory errorMessage) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, errorMessage);

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts 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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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 mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 15 of 19 : Address.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 16 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

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 17 of 19 : Permissioned.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

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

abstract contract Permissioned is Ownable {
    using SafeMath for uint;

    uint 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 18 of 19 : YakERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma experimental ABIEncoderV2;

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 => uint) 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 (uint) {
        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 (uint) {
        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 != uint256(-1)) {
            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 pure returns (uint) {
        uint256 chainId;
        assembly { chainId := chainid() }
        return chainId;
    }
}

File 19 of 19 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

/*
 * @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 msg.sender;
    }

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

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_depositToken","type":"address"},{"internalType":"address","name":"_poolRewardToken","type":"address"},{"components":[{"internalType":"address","name":"swapPairToken","type":"address"},{"internalType":"address","name":"swapPairPoolReward","type":"address"},{"internalType":"address","name":"swapPairExtraReward","type":"address"}],"internalType":"struct PlatypusStrategy.SwapPairs","name":"swapPairs","type":"tuple"},{"internalType":"uint256","name":"_maxSlippage","type":"uint256"},{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_stakingContract","type":"address"},{"internalType":"address","name":"_voterProxy","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_timelock","type":"address"},{"components":[{"internalType":"uint256","name":"minTokensToReinvest","type":"uint256"},{"internalType":"uint256","name":"adminFeeBips","type":"uint256"},{"internalType":"uint256","name":"devFeeBips","type":"uint256"},{"internalType":"uint256","name":"reinvestRewardBips","type":"uint256"}],"internalType":"struct PlatypusStrategy.StrategySettings","name":"_strategySettings","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateAdminFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValue","type":"address"},{"indexed":false,"internalType":"address","name":"newValue","type":"address"}],"name":"UpdateDevAddr","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateDevFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateMaxTokensToDepositWithoutReinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateMinTokensToReinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"UpdateReinvestReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ADMIN_FEE_BIPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSITS_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEV_FEE_BIPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_TOKENS_TO_REINVEST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"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":[],"name":"asset","outputs":[{"internalType":"contract IPlatypusAsset","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"extraToken","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":"masterchef","outputs":[{"internalType":"contract IMasterPlatypus","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfAllowedDepositors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract IPlatypusPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxy","outputs":[{"internalType":"contract IPlatypusVoterProxy","name":"","type":"address"}],"stateMutability":"view","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minReturnAmountAccepted","type":"uint256"},{"internalType":"bool","name":"disableDeposits","type":"bool"}],"name":"rescueDeployedFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"revokeAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"setAllowances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_extraTokenSwapPair","type":"address"}],"name":"setExtraRewardSwapPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_voterProxy","type":"address"}],"name":"setPlatypusVoterProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapPairExtraReward","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"updateAdminFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":"slippageBips","type":"uint256"}],"name":"updateMaxSwapSlippage","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"}]

610120604052600960e0819052685969656c642059616b60b81b6101009081526200002e916000919062000cf7565b506040805180820190915260038082526216549560ea1b60209092019182526200005b9160019162000cf7565b503480156200006957600080fd5b5060405162006173380380620061738339810160408190526200008c9162000e9c565b600062000098620002de565b600680546001600160a01b0319166001600160a01b0383169081179091556040519192509060009060008051602062006153833981519152908290a3508a51620000ea9060009060208e019062000cf7565b50600980546001600160a01b03808d166001600160a01b031992831617909255600a8054821673b31f66aa3c1e785363f0875a1b74e27b85fd66c717905560c0859052600b80548216732d580f9cf2fb2d09bc411532988f2afda4e7beff1790556001600160601b0319606088901b1660805260128054898416921691909117908190556040516371f9621160e01b81529116906371f962119062000194908d9060040162001000565b60206040518083038186803b158015620001ad57600080fd5b505afa158015620001c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e8919062000e7f565b60601b6001600160601b03191660a052601380546001600160a01b0319166001600160a01b0386161790556014879055875160208901516200022d91908b90620002e2565b60408801516200023d90620003c2565b80516200024a9062000628565b60208101516200025a90620006b0565b60408101516200026a906200077e565b60608101516200027a9062000838565b620002866001620008f2565b62000291826200099a565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef234600080604051620002c59291906200101f565b60405180910390a15050505050505050505050620011cc565b3390565b600954600a546200030e9185916001600160a01b03918216911662000a54602090811b620020a417901c565b620003365760405162461bcd60e51b81526004016200032d9062001121565b60405180910390fd5b601580546001600160a01b0319166001600160a01b0385811691909117909155600a5481169083161462000393576200039181600a60009054906101000a90046001600160a01b03168462000a5460201b620020a41760201c565b505b601680546001600160a01b039384166001600160a01b0319918216179091556017805492909316911617905550565b6001600160a01b038116156200060857600a5460408051630dfe168160e01b815290516001600160a01b0392831692841691630dfe1681916004808301926020929190829003018186803b1580156200041a57600080fd5b505afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000455919062000e7f565b6001600160a01b031614156200050057806001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156200049f57600080fd5b505afa158015620004b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004da919062000e7f565b601980546001600160a01b0319166001600160a01b0392909216919091179055620005e7565b600a546040805163d21220a760e01b815290516001600160a01b039283169284169163d21220a7916004808301926020929190829003018186803b1580156200054857600080fd5b505afa1580156200055d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000583919062000e7f565b6001600160a01b03161415620005cd57806001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156200049f57600080fd5b60405162461bcd60e51b81526004016200032d906200102d565b601880546001600160a01b0319166001600160a01b03831617905562000625565b601880546001600160a01b03199081169091556019805490911690555b50565b62000632620002de565b6001600160a01b03166200064562000cb9565b6001600160a01b0316146200066e5760405162461bcd60e51b81526004016200032d9062001173565b7f481f79ac3a523b6d6db3c5a720e190e986d1cc1b41adcdf50f9caef849901100600c5482604051620006a39291906200101f565b60405180910390a1600c55565b620006ba620002de565b6001600160a01b0316620006cd62000cb9565b6001600160a01b031614620006f65760405162461bcd60e51b81526004016200032d9062001173565b61271062000730600f546200071c6011548562000cc860201b620022f51790919060201c565b62000cc860201b620022f51790919060201c565b11156200073c57600080fd5b7f3cc372f330f95ac9540626dc8a25f5bf21ba607215a5d58304cb804d446f104a60105482604051620007719291906200101f565b60405180910390a1601055565b62000788620002de565b6001600160a01b03166200079b62000cb9565b6001600160a01b031614620007c45760405162461bcd60e51b81526004016200032d9062001173565b612710620007ea600f546200071c6010548562000cc860201b620022f51790919060201c565b1115620007f657600080fd5b7f2a42303d002f0ba6cfe8259c91d4684443fb0b3de286ba74991175d651726131601154826040516200082b9291906200101f565b60405180910390a1601155565b62000842620002de565b6001600160a01b03166200085562000cb9565b6001600160a01b0316146200087e5760405162461bcd60e51b81526004016200032d9062001173565b612710620008a46011546200071c6010548562000cc860201b620022f51790919060201c565b1115620008b057600080fd5b7fe7f97d51d307dc44045597c9978bec0f842e6bb40d19b9444084cfa30d9ed4f2600f5482604051620008e59291906200101f565b60405180910390a1600f55565b620008fc620002de565b6001600160a01b03166200090f62000cb9565b6001600160a01b031614620009385760405162461bcd60e51b81526004016200032d9062001173565b600e5460ff16151581151514156200094f57600080fd5b600e805460ff19168215151790556040517f7b014ed3854e7f5cb0218d58b3c6ae7d53a68bb0af2f67bfb029ea42c38a7e85906200098f90839062001014565b60405180910390a150565b620009a4620002de565b6001600160a01b0316620009b762000cb9565b6001600160a01b031614620009e05760405162461bcd60e51b81526004016200032d9062001173565b6001600160a01b03811662000a095760405162461bcd60e51b81526004016200032d90620010a4565b6006546040516001600160a01b038084169216906000805160206200615383398151915290600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a9057600080fd5b505afa15801562000aa5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000acb919062000e7f565b6001600160a01b0316836001600160a01b0316148062000b705750836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801562000b2057600080fd5b505afa15801562000b35573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b5b919062000e7f565b6001600160a01b0316836001600160a01b0316145b801562000c925750836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bb257600080fd5b505afa15801562000bc7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bed919062000e7f565b6001600160a01b0316826001600160a01b0316148062000c925750836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801562000c4257600080fd5b505afa15801562000c57573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c7d919062000e7f565b6001600160a01b0316826001600160a01b0316145b801562000cb15750816001600160a01b0316836001600160a01b031614155b949350505050565b6006546001600160a01b031690565b60008282018381101562000cf05760405162461bcd60e51b81526004016200032d90620010ea565b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000d3a57805160ff191683800117855562000d6a565b8280016001018555821562000d6a579182015b8281111562000d6a57825182559160200191906001019062000d4d565b5062000d7892915062000d7c565b5090565b5b8082111562000d78576000815560010162000d7d565b80516001600160a01b038116811462000dab57600080fd5b919050565b60006080828403121562000dc2578081fd5b604051608081016001600160401b038111828210171562000ddf57fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201525092915050565b60006060828403121562000e22578081fd5b604051606081016001600160401b038111828210171562000e3f57fe5b60405290508062000e508362000d93565b815262000e606020840162000d93565b602082015262000e736040840162000d93565b60408201525092915050565b60006020828403121562000e91578081fd5b62000cf08262000d93565b60008060008060008060008060008060006102008c8e03121562000ebe578687fd5b8b516001600160401b038082111562000ed5578889fd5b818e0191508e601f83011262000ee9578889fd5b81518181111562000ef657fe5b62000f0b601f8201601f1916602001620011a8565b91508082528f602082850101111562000f2257898afd5b895b8181101562000f425760208185018101518483018201520162000f24565b8181111562000f54578a602083850101525b5050809c50505062000f6960208d0162000d93565b995062000f7960408d0162000d93565b985062000f8a8d60608e0162000e10565b975060c08c0151965062000fa160e08d0162000d93565b955062000fb26101008d0162000d93565b945062000fc36101208d0162000d93565b93506101408c0151925062000fdc6101608d0162000d93565b915062000fee8d6101808e0162000db0565b90509295989b509295989b9093969950565b6001600160a01b0391909116815260200190565b901515815260200190565b918252602082015260400190565b60208082526051908201527f506c61747970757353747261746567793a3a5f7365744578747261526577617260408201527f6453776170506169722053776170207061697220646f6573206e6f7420636f6e6060820152703a30b4b7103932bbb0b932103a37b5b2b760791b608082015260a00190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526032908201527f7377617020746f6b656e20646f6573206e6f74206d61746368206465706f73696040820152713a1030b732103932bbb0b932103a37b5b2b760711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6040518181016001600160401b0381118282101715620011c457fe5b604052919050565b60805160601c60a05160601c60c051614eeb6200126860003980610ab05280610b575280610fcd52806111e7528061198b52806126ed5280612ba95280612ef85280613524525080610ba25280610cc252806119d5528061334e52806133df5280613af0525080610a8e5280610b7952806111c552806119ad528061202052806126cb5280612ed652806135cf5280613ac65250614eeb6000f3fe608060405234801561001057600080fd5b50600436106103eb5760003560e01c80638c04166f1161021a578063bd079f5511610135578063dd8ce4d6116100c8578063ed24911d11610097578063f7c618c11161007c578063f7c618c114610781578063fb1db27814610789578063fdb5a03e14610791576103eb565b8063ed24911d14610766578063f2fde38b1461076e576103eb565b8063dd8ce4d614610725578063e21ac82514610738578063eab89a5a1461074b578063ec5568891461075e576103eb565b8063d505accf11610104578063d505accf146106ef578063da09c72c14610702578063dbd9a4d41461070a578063dd62ed3e14610712576103eb565b8063bd079f55146106c4578063c4b24a46146106cc578063c89039c5146106d4578063cff1b6ef146106dc576103eb565b8063a1a4ddeb116101ad578063ac0d31ff1161017c578063ac0d31ff1461068e578063b52a321f146106a1578063b6b55f25146106a9578063b9e57b80146106bc576103eb565b8063a1a4ddeb1461064d578063a8ae2b7c14610655578063a9059cbb14610668578063abff19631461067b576103eb565b806395d89b41116101e957806395d89b411461061757806399729ec11461061f5780639e4e7318146106325780639f0237b11461063a576103eb565b80638c04166f146105ec5780638da5cb5b146105f4578063909ac8f4146105fc5780639291d56314610604576103eb565b80634bebd1e71161030a5780637ae267731161029d5780638432e8941161026c5780638432e894146105ab5780638980f11f146105be5780638aff733d146105d15780638b73e606146105d9576103eb565b80637ae267731461056a5780637d8820971461057d5780637ecebe00146105855780638183723014610598576103eb565b80635eaec0e4116102d95780635eaec0e41461053f57806370a0823114610547578063715018a61461055a578063789139bc14610562576103eb565b80634bebd1e7146104fe5780634e77ace5146105115780634ebb7916146105245780635ea682ea14610537576103eb565b80632e1a7d4d1161038257806338d52e0f1161035157806338d52e0f146104c85780633bdc6e72146104d0578063483c2ef0146104d85780634a970be7146104eb576103eb565b80632e1a7d4d146104835780632f4f21e21461049857806330adf81f146104ab578063313ce567146104b3576103eb565b806316f0115b116103be57806316f0115b1461044b57806318160ddd1461046057806320606b701461046857806323b872dd14610470576103eb565b806306fdde03146103f0578063076771111461040e578063095ea7b3146104235780630f23475d14610443575b600080fd5b6103f8610799565b60405161040591906145c5565b60405180910390f35b610416610827565b604051610405919061453e565b6104366104313660046141f4565b61082d565b6040516104059190614533565b610416610844565b61045361090e565b6040516104059190614487565b61041661091d565b610416610923565b61043661047e366004614147565b610947565b6104966104913660046142a5565b610a30565b005b6104966104a63660046141f4565b610c89565b610416610c97565b6104bb610cbb565b6040516104059190614dad565b610453610cc0565b610416610ce4565b6104366104e63660046140d7565b610cea565b6104966104f9366004614353565b610cff565b61049661050c3660046140d7565b610d97565b61049661051f36600461421f565b610e7b565b6104966105323660046142a5565b610f19565b610416610fc5565b610416610fcb565b6104166105553660046140d7565b610fef565b61049661100e565b610416611097565b61049661057836600461410f565b61109d565b61041661117f565b6104166105933660046140d7565b611265565b6104966105a63660046142a5565b611277565b6104966105b93660046140d7565b6112f6565b6104966105cc3660046141f4565b61132c565b61041661143e565b6104966105e73660046140d7565b611444565b61041661154a565b610453611550565b61045361155f565b6104966106123660046140d7565b61156e565b6103f8611601565b61049661062d3660046142a5565b61165b565b610416611709565b6104966106483660046140d7565b61172d565b61045361178e565b6104966106633660046142a5565b61179d565b6104366106763660046141f4565b611845565b6104966106893660046142a5565b611852565b61049661069c3660046142d5565b611881565b610436611b4d565b6104966106b73660046142a5565b611b56565b610416611b60565b610416611ba7565b610416611bad565b610453611bc1565b6104966106ea3660046142a5565b611bd0565b6104966106fd366004614187565b611c78565b610453611d2d565b610496611d3c565b61041661072036600461410f565b611d93565b6104166107333660046142a5565b611dbe565b6104966107463660046142a5565b611df8565b6104166107593660046142a5565b611e77565b610453611ea8565b610416611eb7565b61049661077c3660046140d7565b611f4e565b61045361200f565b61045361201e565b610496612042565b6000805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561081f5780601f106107f45761010080835404028352916020019161081f565b820191906000526020600020905b81548152906001019060200180831161080257829003601f168201915b505050505081565b60105481565b600061083a33848461231a565b5060015b92915050565b60008061084f61117f565b90508061086057600091505061090b565b6012546009546040517f907448ed0000000000000000000000000000000000000000000000000000000081526000926001600160a01b039081169263907448ed926108b3929091169086906004016144dc565b60606040518083038186803b1580156108cb57600080fd5b505afa1580156108df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109039190614326565b509093505050505b90565b6012546001600160a01b031681565b60025481565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6001600160a01b03831660008181526003602090815260408083203380855292528220549192909190821480159061098157506000198114155b15610a175760006109ad856040518060600160405280602f8152602001614e32602f91398491906123ce565b6001600160a01b03808916600081815260036020908152604080832094891680845294909152908190208490555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610a0d90859061453e565b60405180910390a3505b610a228686866123fa565b6001925050505b9392505050565b6000610a3b82611e77565b905060008111610a665760405162461bcd60e51b8152600401610a5d90614bfb565b60405180910390fd5b6013546040516305d38c7160e21b81526001600160a01b039091169063174e31c490610ad8907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906004016144dc565b600060405180830381600087803b158015610af257600080fd5b505af1158015610b06573d6000803e3d6000fd5b50506013546012546009546014546040517fa530882e000000000000000000000000000000000000000000000000000000008152600096506001600160a01b03948516955063a530882e94610bcd947f0000000000000000000000000000000000000000000000000000000000000000947f000000000000000000000000000000000000000000000000000000000000000094918316939216917f000000000000000000000000000000000000000000000000000000000000000091908b90600401614d29565b602060405180830381600087803b158015610be757600080fd5b505af1158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f91906142bd565b600954909150610c39906001600160a01b031633836124de565b610c433384612566565b336001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610c7c919061453e565b60405180910390a2505050565b610c938282612640565b5050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b7f000000000000000000000000000000000000000000000000000000000000000081565b60075481565b60086020526000908152604090205460ff1681565b6009546040517fd505accf0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063d505accf90610d5490339030908a908a908a908a908a9060040161449b565b600060405180830381600087803b158015610d6e57600080fd5b505af1158015610d82573d6000803e3d6000fd5b50505050610d903386612640565b5050505050565b610d9f6127cf565b6001600160a01b0316610db0611550565b6001600160a01b031614610dd65760405162461bcd60e51b8152600401610a5d90614a8d565b6001600160a01b03811660009081526008602052604090205460ff1615610e0f5760405162461bcd60e51b8152600401610a5d9061489a565b6001600160a01b0381166000908152600860205260409020805460ff19166001908117909155600754610e41916122f5565b6007556040516001600160a01b038216907fc0a1035c16faf8d1304056d92c00edf028f87e62b8235a938f00af9e3c0312c590600090a250565b610e836127cf565b6001600160a01b0316610e94611550565b6001600160a01b031614610eba5760405162461bcd60e51b8152600401610a5d90614a8d565b600e5460ff1615158115151415610ed057600080fd5b600e805460ff19168215151790556040517f7b014ed3854e7f5cb0218d58b3c6ae7d53a68bb0af2f67bfb029ea42c38a7e8590610f0e908390614533565b60405180910390a150565b610f216127cf565b6001600160a01b0316610f32611550565b6001600160a01b031614610f585760405162461bcd60e51b8152600401610a5d90614a8d565b60008111610f6557600080fd5b604051339082156108fc029083906000818181858888f19350505050158015610f92573d6000803e3d6000fd5b507f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28600082604051610f0e9291906144dc565b60115481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0381166000908152600460205260409020545b919050565b6110166127cf565b6001600160a01b0316611027611550565b6001600160a01b03161461104d5760405162461bcd60e51b8152600401610a5d90614a8d565b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b600d5481565b6110a56127cf565b6001600160a01b03166110b6611550565b6001600160a01b0316146110dc5760405162461bcd60e51b8152600401610a5d90614a8d565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0383169063095ea7b3906111249084906000906004016144dc565b602060405180830381600087803b15801561113e57600080fd5b505af1158015611152573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611176919061423b565b610c9357600080fd5b6013546040517f01e1c48d00000000000000000000000000000000000000000000000000000000815260009182916001600160a01b03909116906301e1c48d9061120f907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906004016144dc565b60206040518083038186803b15801561122757600080fd5b505afa15801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f91906142bd565b91505090565b60056020526000908152604090205481565b61127f6127cf565b6001600160a01b0316611290611550565b6001600160a01b0316146112b65760405162461bcd60e51b8152600401610a5d90614a8d565b7f481f79ac3a523b6d6db3c5a720e190e986d1cc1b41adcdf50f9caef849901100600c54826040516112e9929190614d67565b60405180910390a1600c55565b600b546001600160a01b031633146113205760405162461bcd60e51b8152600401610a5d90614b8d565b611329816127d3565b50565b6113346127cf565b6001600160a01b0316611345611550565b6001600160a01b03161461136b5760405162461bcd60e51b8152600401610a5d90614a8d565b6000811161137857600080fd5b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb906113a690339085906004016144dc565b602060405180830381600087803b1580156113c057600080fd5b505af11580156113d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f8919061423b565b61140157600080fd5b7f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2882826040516114329291906144dc565b60405180910390a15050565b600f5481565b61144c6127cf565b6001600160a01b031661145d611550565b6001600160a01b0316146114835760405162461bcd60e51b8152600401610a5d90614a8d565b6000600754116114a55760405162461bcd60e51b8152600401610a5d90614783565b6001600160a01b03811660009081526008602052604090205460ff1615156001146114e25760405162461bcd60e51b8152600401610a5d90614908565b6001600160a01b0381166000908152600860205260409020805460ff19169055600754611510906001612a56565b6007556040516001600160a01b038216907f0e86f6608b536e5339a25b65ff531f5ea91e1313d056ecd4752b35cbd16137d490600090a250565b60145481565b6006546001600160a01b031690565b6018546001600160a01b031681565b600b546001600160a01b031633146115985760405162461bcd60e51b8152600401610a5d90614b8d565b600b546040517fa8e91499ed37682f43cffb045fcc7d379a91e8c9a14e6321877ee34dee564c00916115d7916001600160a01b039091169084906144f5565b60405180910390a1600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561081f5780601f106107f45761010080835404028352916020019161081f565b6116636127cf565b6001600160a01b0316611674611550565b6001600160a01b03161461169a5760405162461bcd60e51b8152600401610a5d90614a8d565b6127106116be600f546116b8601054856122f590919063ffffffff16565b906122f5565b11156116c957600080fd5b7f2a42303d002f0ba6cfe8259c91d4684443fb0b3de286ba74991175d651726131601154826040516116fc929190614d67565b60405180910390a1601155565b7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b6117356127cf565b6001600160a01b0316611746611550565b6001600160a01b03161461176c5760405162461bcd60e51b8152600401610a5d90614a8d565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6019546001600160a01b031681565b6117a56127cf565b6001600160a01b03166117b6611550565b6001600160a01b0316146117dc5760405162461bcd60e51b8152600401610a5d90614a8d565b6127106117fa6011546116b8601054856122f590919063ffffffff16565b111561180557600080fd5b7fe7f97d51d307dc44045597c9978bec0f842e6bb40d19b9444084cfa30d9ed4f2600f5482604051611838929190614d67565b60405180910390a1600f55565b600061083a3384846123fa565b600b546001600160a01b0316331461187c5760405162461bcd60e51b8152600401610a5d90614b8d565b601455565b6118896127cf565b6001600160a01b031661189a611550565b6001600160a01b0316146118c05760405162461bcd60e51b8152600401610a5d90614a8d565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a08231906118f1903090600401614487565b60206040518083038186803b15801561190957600080fd5b505afa15801561191d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194191906142bd565b6013546012546009546040517f02eb6f7e0000000000000000000000000000000000000000000000000000000081529394506001600160a01b03928316936302eb6f7e936119fd937f0000000000000000000000000000000000000000000000000000000000000000937f0000000000000000000000000000000000000000000000000000000000000000939183169216907f000000000000000000000000000000000000000000000000000000000000000090600401614cfb565b600060405180830381600087803b158015611a1757600080fd5b505af1158015611a2b573d6000803e3d6000fd5b50506009546040516370a0823160e01b8152600093506001600160a01b0390911691506370a0823190611a62903090600401614487565b60206040518083038186803b158015611a7a57600080fd5b505afa158015611a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab291906142bd565b905083611abf8284612a56565b1015611add5760405162461bcd60e51b8152600401610a5d906145d8565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef234611b0661117f565b600254604051611b17929190614d67565b60405180910390a1600e5460ff1615156001148015611b3857506001831515145b15611b4757611b476000610e7b565b50505050565b600e5460ff1681565b6113293382612640565b600080611b6b611bad565b9050600c548110611b9f57611b97612710611b91600f5484612a9890919063ffffffff16565b90612ad2565b91505061090b565b600091505090565b600c5481565b600080611bb8612b14565b94505050505090565b6009546001600160a01b031681565b611bd86127cf565b6001600160a01b0316611be9611550565b6001600160a01b031614611c0f5760405162461bcd60e51b8152600401610a5d90614a8d565b612710611c2d600f546116b8601154856122f590919063ffffffff16565b1115611c3857600080fd5b7f3cc372f330f95ac9540626dc8a25f5bf21ba607215a5d58304cb804d446f104a60105482604051611c6b929190614d67565b60405180910390a1601055565b42841015611c985760405162461bcd60e51b8152600401610a5d906148d1565b6001600160a01b03871660009081526005602090815260408083208054600181019091559051611cf3927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92918c9101614547565b604051602081830303815290604052805190602001209050611d188882868686612dd4565b611d2388888861231a565b5050505050505050565b600b546001600160a01b031681565b611d446127cf565b6001600160a01b0316611d55611550565b6001600160a01b031614611d7b5760405162461bcd60e51b8152600401610a5d90614a8d565b60405162461bcd60e51b8152600401610a5d90614b56565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6000611dd4611dcb61117f565b60025490612a98565b611ddf575080611009565b61083e611dea61117f565b600254611b91908590612a98565b611e006127cf565b6001600160a01b0316611e11611550565b6001600160a01b031614611e375760405162461bcd60e51b8152600401610a5d90614a8d565b7fa5dae50539d56dfe1fb5273d883b0c39bc76750a25d036fc5fbd09ad8fd5f57f600d5482604051611e6a929190614d67565b60405180910390a1600d55565b6000611e84611dcb61117f565b611e9057506000611009565b61083e600254611b91611ea161117f565b8590612a98565b6013546001600160a01b031681565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60001b6000604051611eec91906143e1565b6040519081900390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6611f1e612eaa565b30604051602001611f3395949392919061457b565b60405160208183030381529060405280519060200120905090565b611f566127cf565b6001600160a01b0316611f67611550565b6001600160a01b031614611f8d5760405162461bcd60e51b8152600401610a5d90614a8d565b6001600160a01b038116611fb35760405162461bcd60e51b8152600401610a5d906146b8565b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b3233146120615760405162461bcd60e51b8152600401610a5d90614715565b60008060008061206f612b14565b9350935093509350600c548110156120995760405162461bcd60e51b8152600401610a5d9061499c565b611b47828585612eae565b6000836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120df57600080fd5b505afa1580156120f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211791906140f3565b6001600160a01b0316836001600160a01b031614806121b75750836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561216a57600080fd5b505afa15801561217e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a291906140f3565b6001600160a01b0316836001600160a01b0316145b80156122cf5750836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156121f757600080fd5b505afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222f91906140f3565b6001600160a01b0316826001600160a01b031614806122cf5750836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561228257600080fd5b505afa158015612296573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ba91906140f3565b6001600160a01b0316826001600160a01b0316145b80156122ed5750816001600160a01b0316836001600160a01b031614155b949350505050565b600082820183811015610a295760405162461bcd60e51b8152600401610a5d9061474c565b6001600160a01b0383166123405760405162461bcd60e51b8152600401610a5d90614ac2565b6001600160a01b0382166123665760405162461bcd60e51b8152600401610a5d90614c8f565b6001600160a01b0380841660008181526003602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906123c190859061453e565b60405180910390a3505050565b600081848411156123f25760405162461bcd60e51b8152600401610a5d91906145c5565b505050900390565b6001600160a01b0382166124205760405162461bcd60e51b8152600401610a5d90614af9565b61245d816040518060600160405280602e8152602001614e88602e91396001600160a01b03861660009081526004602052604090205491906123ce565b6001600160a01b03808516600090815260046020526040808220939093559084168152205461248c90826122f5565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906123c190859061453e565b6125618363a9059cbb60e01b84846040516024016124fd9291906144dc565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261307f565b505050565b6125a381604051806060016040528060278152602001614e61602791396001600160a01b03851660009081526004602052604090205491906123ce565b60046000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506125f381604051806060016040528060278152602001614e0b6027913960025491906123ce565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061263490859061453e565b60405180910390a35050565b600e5460ff1615156001146126675760405162461bcd60e51b8152600401610a5d90614965565b600d54156126a35760008060008061267d612b14565b9350935093509350600d5481111561269a5761269a828585612eae565b50505050612748565b6013546040516305d38c7160e21b81526001600160a01b039091169063174e31c490612715907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906004016144dc565b600060405180830381600087803b15801561272f57600080fd5b505af1158015612743573d6000803e3d6000fd5b505050505b600954612760906001600160a01b031633308461310e565b600061276b8261312f565b90506127838361277e6107338585612a56565b613474565b61278d82826134f6565b6001600160a01b0383167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c6127c28484612a56565b604051610c7c919061453e565b3390565b6001600160a01b03811615612a3757600a54604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516001600160a01b0392831692841691630dfe1681916004808301926020929190829003018186803b15801561284257600080fd5b505afa158015612856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061287a91906140f3565b6001600160a01b0316141561291f57806001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156128c257600080fd5b505afa1580156128d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fa91906140f3565b601980546001600160a01b0319166001600160a01b0392909216919091179055612a17565b600a54604080517fd21220a700000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169284169163d21220a7916004808301926020929190829003018186803b15801561297f57600080fd5b505afa158015612993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129b791906140f3565b6001600160a01b031614156129ff57806001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156128c257600080fd5b60405162461bcd60e51b8152600401610a5d90614635565b601880546001600160a01b0319166001600160a01b038316179055611329565b601880546001600160a01b031990811690915560198054909116905550565b6000610a2983836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506123ce565b600082612aa75750600061083e565b82820282848281612ab457fe5b0414610a295760405162461bcd60e51b8152600401610a5d90614a30565b6000610a2983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061354a565b6016546040516370a0823160e01b815260009182918291829182916001600160a01b0316906370a0823190612b4d903090600401614487565b60206040518083038186803b158015612b6557600080fd5b505afa158015612b79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9d91906142bd565b90506000806000612bcd7f0000000000000000000000000000000000000000000000000000000000000000613581565b919450925090506000612be085856122f5565b600a546016549192506000916001600160a01b0390811691161415612c055784612c2a565b601654600a54601754612c2a9285926001600160a01b03918216929082169116613707565b905060006001600160a01b03841615612d29576001600160a01b03841673b31f66aa3c1e785363f0875a1b74e27b85fd66c71415612c69575083612d29565b6018546001600160a01b031615612d29576019546040516370a0823160e01b8152612d03916001600160a01b0316906370a0823190612cac903090600401614487565b60206040518083038186803b158015612cc457600080fd5b505afa158015612cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfc91906142bd565b86906122f5565b600a54601854919650612d2691879187916001600160a01b039182169116613707565b90505b600a546040516370a0823160e01b8152600091612db09184916001600160a01b0316906370a0823190612d60903090600401614487565b60206040518083038186803b158015612d7857600080fd5b505afa158015612d8c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b891906142bd565b90506000612dbe82856122f5565b949d969c50909a50929850939650505050505050565b6000612dde611eb7565b85604051602001612df0929190614451565b604051602081830303815290604052805190602001209050600060018286868660405160008152602001604052604051612e2d94939291906145a7565b6020604051602081039080840390855afa158015612e4f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590612e855750866001600160a01b0316816001600160a01b0316145b612ea15760405162461bcd60e51b8152600401610a5d906147e0565b50505050505050565b4690565b6013546040516305d38c7160e21b81526001600160a01b039091169063174e31c490612f20907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906004016144dc565b600060405180830381600087803b158015612f3a57600080fd5b505af1158015612f4e573d6000803e3d6000fd5b505050506000612f67612f60846137e2565b85906122f5565b9050612f7d612f76858461382a565b82906122f5565b506000612f9b612710611b9160115485612a9890919063ffffffff16565b90508015612fc057600b54600a54612fc0916001600160a01b039182169116836124de565b6000612fdd612710611b91600f5486612a9890919063ffffffff16565b90508015612ffc57600a54612ffc906001600160a01b031633836124de565b600061301a6130158361300f8787612a56565b90612a56565b61397d565b905060006130278261312f565b905061303382826134f6565b7fc7606d21ac05cd309191543e409f0845c016120563783d70e4f41419dc0ef23461305c61117f565b60025460405161306d929190614d67565b60405180910390a15050505050505050565b60606130d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139a59092919063ffffffff16565b80519091501561256157808060200190518101906130f2919061423b565b6125615760405162461bcd60e51b8152600401610a5d90614c32565b611b47846323b872dd60e01b8585856040516024016124fd9392919061450f565b600061083e601260009054906101000a90046001600160a01b03166001600160a01b03166355af008a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561318257600080fd5b505afa158015613196573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ba91906142bd565b601260009054906101000a90046001600160a01b03166001600160a01b0316637727c6556040518163ffffffff1660e01b815260040160206040518083038186803b15801561320857600080fd5b505afa15801561321c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324091906142bd565b601260009054906101000a90046001600160a01b03166001600160a01b031663a76f54d26040518163ffffffff1660e01b815260040160206040518083038186803b15801561328e57600080fd5b505afa1580156132a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c691906142bd565b601260009054906101000a90046001600160a01b03166001600160a01b0316637a1c36d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561331457600080fd5b505afa158015613328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061334c91906142bd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663961be3916040518163ffffffff1660e01b815260040160206040518083038186803b1580156133a557600080fd5b505afa1580156133b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133dd91906142bd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663705727b56040518163ffffffff1660e01b815260040160206040518083038186803b15801561343657600080fd5b505afa15801561344a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346e91906142bd565b886139b4565b60025461348190826122f5565b6002556001600160a01b0382166000908152600460205260409020546134a790826122f5565b6001600160a01b0383166000818152600460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061263490859061453e565b60006135028383612a56565b1161351f5760405162461bcd60e51b8152600401610a5d906149d3565b610c937f00000000000000000000000000000000000000000000000000000000000000008383613a60565b6000818361356b5760405162461bcd60e51b8152600401610a5d91906145c5565b50600083858161357757fe5b0495945050505050565b6013546040517f6099ecb2000000000000000000000000000000000000000000000000000000008152600091829182918291829182916001600160a01b0390911690636099ecb2906135f9907f0000000000000000000000000000000000000000000000000000000000000000908b906004016144dc565b60606040518083038186803b15801561361157600080fd5b505afa158015613625573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364991906142f9565b9250925092506000601360009054906101000a90046001600160a01b03166001600160a01b0316638583b7fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561369f57600080fd5b505afa1580156136b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d791906142bd565b905060006136eb612710611b918785612a98565b90506136f78582612a56565b9993985091965091945050505050565b6000806137148585613b4a565b509050600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561375357600080fd5b505afa158015613767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061378b9190614257565b5091509150866001600160a01b0316836001600160a01b0316146137ab57905b6137d688836dffffffffffffffffffffffffffff16836dffffffffffffffffffffffffffff16613b7b565b98975050505050505050565b601654600a546000916001600160a01b0391821691161415613805575080611009565b601654600a5460175461083e9285926001600160a01b03918216929082169116613bb8565b60008115613974576018546001600160a01b03161561386f57601954600a546018546138689285926001600160a01b03918216929082169116613bb8565b905061083e565b4780156138df5773b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156138c557600080fd5b505af11580156138d9573d6000803e3d6000fd5b50505050505b6040516370a0823160e01b815261396c90859073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a082319061391c903090600401614487565b60206040518083038186803b15801561393457600080fd5b505afa158015613948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061300f91906142bd565b91505061083e565b50600092915050565b600a5460095460155460009261083e9285926001600160a01b03928316929182169116613bb8565b60606122ed8484600085613d59565b6000826139c357506000613a55565b60006139cf8585613e0f565b9050670de0b6b3a764000081116139ea576000915050613a55565b6000613a096139f986866122f5565b613a0388876122f5565b90613e0f565b90506000613a1a8b8b8b8b87613e35565b90506000613a2b8c8c8c8c87613e35565b9050613a4e613a3a8884613e9b565b61300f83613a488b8b6122f5565b90613e9b565b9450505050505b979650505050505050565b601354600954613a7d916001600160a01b039182169116846124de565b6013546012546009546040517f529ebc7d0000000000000000000000000000000000000000000000000000000081526001600160a01b039384169363529ebc7d93613b1c9389937f00000000000000000000000000000000000000000000000000000000000000009392831692909116907f0000000000000000000000000000000000000000000000000000000000000000908a908a90600401614d29565b600060405180830381600087803b158015613b3657600080fd5b505af1158015612ea1573d6000803e3d6000fd5b600080826001600160a01b0316846001600160a01b031610613b6d578284613b70565b83835b915091509250929050565b600080613b8a856103e5612a98565b90506000613b988285612a98565b90506000613bac836116b8886103e8612a98565b9050613a558282612ad2565b600080613bc58585613b4a565b509050600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613c0457600080fd5b505afa158015613c18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c3c9190614257565b5091509150866001600160a01b0316836001600160a01b031614613c5c57905b600080613c8a8a856dffffffffffffffffffffffffffff16856dffffffffffffffffffffffffffff16613b7b565b9050886001600160a01b0316856001600160a01b031614613ca757905b613cb289888c613ec1565b604080516000815260208101918290527f022c0d9f000000000000000000000000000000000000000000000000000000009091526001600160a01b0388169063022c0d9f90613d0a9085908590309060248101614d75565b600060405180830381600087803b158015613d2457600080fd5b505af1158015613d38573d6000803e3d6000fd5b50505050818111613d495781613d4b565b805b9a9950505050505050505050565b606082471015613d7b5760405162461bcd60e51b8152600401610a5d9061483d565b613d8485613f5d565b613da05760405162461bcd60e51b8152600401610a5d90614bc4565b60006060866001600160a01b03168587604051613dbd91906143c5565b60006040518083038185875af1925050503d8060008114613dfa576040519150601f19603f3d011682016040523d82523d6000602084013e613dff565b606091505b5091509150613a55828286613f63565b6000610a2982611b91613e23826002612ad2565b6116b887670de0b6b3a7640000612a98565b600082821015613e5057613e498483612a56565b9050613e92565b613e49613e8b6b033b2e3c9fd0803ce8000000611b91670de0b6b3a7640000613e858a613e7f83858b88612a98565b90613f9c565b90612a98565b8790613e0f565b95945050505050565b6000610a29670de0b6b3a7640000611b91613eb7826002612ad2565b6116b88787612a98565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb90613eef90859085906004016144dc565b602060405180830381600087803b158015613f0957600080fd5b505af1158015613f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f41919061423b565b6125615760405162461bcd60e51b8152600401610a5d90614cc6565b3b151590565b60608315613f72575081610a29565b825115613f825782518084602001fd5b8160405162461bcd60e51b8152600401610a5d91906145c5565b6000613fa9826002614012565b613fbf576b033b2e3c9fd0803ce8000000613fc1565b825b9050613fce826002612ad2565b91505b811561083e57613fe18384614054565b9250613fee826002614012565b1561400057613ffd8184614054565b90505b61400b826002612ad2565b9150613fd1565b6000610a2983836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250614074565b6000610a296b033b2e3c9fd0803ce8000000611b91613eb7826002612ad2565b600081836140955760405162461bcd60e51b8152600401610a5d91906145c5565b5082848161409f57fe5b06949350505050565b80516dffffffffffffffffffffffffffff8116811461100957600080fd5b803560ff8116811461100957600080fd5b6000602082840312156140e8578081fd5b8135610a2981614de7565b600060208284031215614104578081fd5b8151610a2981614de7565b60008060408385031215614121578081fd5b823561412c81614de7565b9150602083013561413c81614de7565b809150509250929050565b60008060006060848603121561415b578081fd5b833561416681614de7565b9250602084013561417681614de7565b929592945050506040919091013590565b600080600080600080600060e0888a0312156141a1578283fd5b87356141ac81614de7565b965060208801356141bc81614de7565b955060408801359450606088013593506141d8608089016140c6565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215614206578182fd5b823561421181614de7565b946020939093013593505050565b600060208284031215614230578081fd5b8135610a2981614dfc565b60006020828403121561424c578081fd5b8151610a2981614dfc565b60008060006060848603121561426b578283fd5b614274846140a8565b9250614282602085016140a8565b9150604084015163ffffffff8116811461429a578182fd5b809150509250925092565b6000602082840312156142b6578081fd5b5035919050565b6000602082840312156142ce578081fd5b5051919050565b600080604083850312156142e7578182fd5b82359150602083013561413c81614dfc565b60008060006060848603121561430d578283fd5b8351925060208401519150604084015161429a81614de7565b60008060006060848603121561433a578081fd5b8351925060208401519150604084015161429a81614dfc565b600080600080600060a0868803121561436a578283fd5b8535945060208601359350614381604087016140c6565b94979396509394606081013594506080013592915050565b600081518084526143b1816020860160208601614dbb565b601f01601f19169290920160200192915050565b600082516143d7818460208701614dbb565b9190910192915050565b6000808354600180821660008114614400576001811461441757614446565b60ff198316865260028304607f1686019350614446565b600283048786526020808720875b8381101561443e5781548a820152908501908201614425565b505050860193505b509195945050505050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252610a296020830184614399565b60208082526025908201527f506c61747970757353747261746567793a3a7265736375654465706c6f79656460408201527f46756e6473000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526051908201527f506c61747970757353747261746567793a3a5f7365744578747261526577617260408201527f6453776170506169722053776170207061697220646f6573206e6f7420636f6e60608201527f7461696e2072657761726420746f6b656e000000000000000000000000000000608082015260a00190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f59616b53747261746567793a3a6f6e6c79454f41000000000000000000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526034908201527f5065726d697373696f6e65643a3a72656d6f76654465706f7369746f722c206e60408201527f6f20616c6c6f776564206465706f7369746f7273000000000000000000000000606082015260800190565b60208082526024908201527f417263683a3a76616c69646174655369673a20696e76616c6964207369676e6160408201527f7475726500000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f5065726d697373696f6e65643a3a616c6c6f774465706f7369746f7200000000604082015260600190565b6020808252600f908201527f7065726d69743a3a657870697265640000000000000000000000000000000000604082015260600190565b6020808252602a908201527f5065726d697373696f6e65643a3a72656d6f76654465706f7369746f722c206e60408201527f6f7420616c6c6f77656400000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f506c61747970757353747261746567793a3a5f6465706f736974000000000000604082015260600190565b6020808252601a908201527f506c61747970757353747261746567793a3a7265696e76657374000000000000604082015260600190565b60208082526025908201527f506c61747970757353747261746567793a3a5f7374616b654465706f7369745460408201527f6f6b656e73000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527f5f617070726f76653a3a6f776e6572207a65726f206164647265737300000000604082015260600190565b60208082526034908201527f5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e7366657260408201527f20746f20746865207a65726f2061646472657373000000000000000000000000606082015260800190565b60208082526019908201527f736574416c6c6f77616e6365733a3a6465707265636174656400000000000000604082015260600190565b60208082526014908201527f59616b53747261746567793a3a6f6e6c79446576000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601a908201527f506c61747970757353747261746567793a3a7769746864726177000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f5f617070726f76653a3a7370656e646572207a65726f20616464726573730000604082015260600190565b6020808252818101527f4465784c6962726172793a3a5452414e534645525f46524f4d5f4641494c4544604082015260600190565b9485526001600160a01b03938416602086015291831660408501528216606084015216608082015260a00190565b9687526001600160a01b03958616602088015293851660408701529184166060860152909216608084015260a083019190915260c082015260e00190565b918252602082015260400190565b60008582528460208301526001600160a01b038416604083015260806060830152614da36080830184614399565b9695505050505050565b60ff91909116815260200190565b60005b83811015614dd6578181015183820152602001614dbe565b83811115611b475750506000910152565b6001600160a01b038116811461132957600080fd5b801515811461132957600080fdfe5f6275726e3a206275726e20616d6f756e74206578636565647320746f74616c20737570706c797472616e7366657246726f6d3a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655f6275726e3a206275726e20616d6f756e7420657863656564732066726f6d2062616c616e63655f7472616e73666572546f6b656e733a207472616e7366657220657863656564732066726f6d2062616c616e6365a264697066735822122091db55dc41a3ba5347aa2a66c2497a51a49713fa460a50a3b2f68c6a9eaa59ef64736f6c634300070300338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000002b2c81e08f1af8835a78bb2a90ae924ace0ea4be00000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c80000000000000000000000004b946c91c2b1a7d7c40fb3c130cdfbaf8389094d000000000000000000000000cdfd91eea657cc2701117fe9711c9a4f61feed23000000000000000000000000e530dc2095ef5653205cf5ea79f8979a7028065c00000000000000000000000000000000000000000000000000000000000000640000000000000000000000004658ea7e9960d6158a261104aaa160cc953bb6ba00000000000000000000000068c5f4374228beedfa078e77b5ed93c28a2f713e0000000000000000000000003969003d42976b021170ed82b1da5cd6675969d5000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e44000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bc000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000195969656c642059616b3a20506c61747970757320734156415800000000000000

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

00000000000000000000000000000000000000000000000000000000000002000000000000000000000000002b2c81e08f1af8835a78bb2a90ae924ace0ea4be00000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c80000000000000000000000004b946c91c2b1a7d7c40fb3c130cdfbaf8389094d000000000000000000000000cdfd91eea657cc2701117fe9711c9a4f61feed23000000000000000000000000e530dc2095ef5653205cf5ea79f8979a7028065c00000000000000000000000000000000000000000000000000000000000000640000000000000000000000004658ea7e9960d6158a261104aaa160cc953bb6ba00000000000000000000000068c5f4374228beedfa078e77b5ed93c28a2f713e0000000000000000000000003969003d42976b021170ed82b1da5cd6675969d5000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e44000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bc000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000195969656c642059616b3a20506c61747970757320734156415800000000000000

-----Decoded View---------------
Arg [0] : _name (string): Yield Yak: Platypus sAVAX
Arg [1] : _depositToken (address): 0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be
Arg [2] : _poolRewardToken (address): 0x22d4002028f537599be9f666d1c4fa138522f9c8
Arg [3] : swapPairs (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [4] : _maxSlippage (uint256): 100
Arg [5] : _pool (address): 0x4658ea7e9960d6158a261104aaa160cc953bb6ba
Arg [6] : _stakingContract (address): 0x68c5f4374228beedfa078e77b5ed93c28a2f713e
Arg [7] : _voterProxy (address): 0x3969003d42976b021170ed82b1da5cd6675969d5
Arg [8] : _pid (uint256): 13
Arg [9] : _timelock (address): 0xdcedf06fd33e1d7b6eb4b309f779a0e9d3172e44
Arg [10] : _strategySettings (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [1] : 0000000000000000000000002b2c81e08f1af8835a78bb2a90ae924ace0ea4be
Arg [2] : 00000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8
Arg [3] : 0000000000000000000000004b946c91c2b1a7d7c40fb3c130cdfbaf8389094d
Arg [4] : 000000000000000000000000cdfd91eea657cc2701117fe9711c9a4f61feed23
Arg [5] : 000000000000000000000000e530dc2095ef5653205cf5ea79f8979a7028065c
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [7] : 0000000000000000000000004658ea7e9960d6158a261104aaa160cc953bb6ba
Arg [8] : 00000000000000000000000068c5f4374228beedfa078e77b5ed93c28a2f713e
Arg [9] : 0000000000000000000000003969003d42976b021170ed82b1da5cd6675969d5
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [11] : 000000000000000000000000dcedf06fd33e1d7b6eb4b309f779a0e9d3172e44
Arg [12] : 000000000000000000000000000000000000000000000000002386f26fc10000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [14] : 00000000000000000000000000000000000000000000000000000000000002bc
Arg [15] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [17] : 5969656c642059616b3a20506c61747970757320734156415800000000000000


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.