Contract 0x27095F7907C1c2381a9C11610924D1bbbFe4Ce5F 13

 

Contract Overview

Yieldification: ETH Rewards
Balance:
0.040796442027247817 ETH

ETH Value:
$152.89 (@ $3,747.69/ETH)
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x66d35e49fc55cd4679f21a7d2c42a3f25b060b5158d5b994fe1fd734ab53637aClaim Reward1550523642023-11-28 23:18:31183 days 13 hrs ago0xc43a2910a917385f9563c43708e45ab7f7fec6b6 IN  Yieldification: ETH Rewards0 ETH0.00007372 0.1
0x8376acef555cd48eca5b13232b4ff2fc454669f7338c5723190165bbf1480bdcClaim Reward1444928282023-10-27 11:46:13216 days 42 mins ago0x5360a6bbea6636ec5a898813b13298711c65e6ac IN  Yieldification: ETH Rewards0 ETH0.00003374 0.1
0x181b6c4e8dcb8ad48ee13bb4c35aff077ee2e5302317058dcde13bc8018c371dClaim Reward1197167362023-08-09 13:31:36294 days 22 hrs ago0x0e057a28e36e327e54e591ab078479ef566b6643 IN  Yieldification: ETH Rewards0 ETH0.0000595 0.1
0xb625c3fbfa47797d91cba0ec966a6b65ba9fd86f154f3e7afa8c771fd3b59c89Claim Reward1028146482023-06-19 16:59:14345 days 19 hrs ago0x6671219099ea6ccc75eb3f4f4200d46a97b09a19 IN  Yieldification: ETH Rewards0 ETH0.00005107 0.1
0x2a8c1675045d7e8b5b563711c110b729852a90205cca88236e3cf86347ecd13eClaim Reward836983082023-04-24 5:13:25402 days 7 hrs ago0x4e0104144c5f8d50e2dc0b54a967bd7d7a8091c7 IN  Yieldification: ETH Rewards0 ETH0.00006541 0.1
0x02c83763fe0696c2d66e81aa098e9dd80da1d96cbc15c98d739ce14c108bdb79Claim Reward821048062023-04-19 13:39:38406 days 22 hrs ago0x941b6117f7059c484d66e8f24ed38cb40a1667cd IN  Yieldification: ETH Rewards0 ETH0.00008972 0.1
0x7c399729178f58ae028a272302e9e05a6c444f70845ecddc49562d9a78875cf2Claim Reward810574482023-04-16 12:58:29409 days 23 hrs ago0x2cc0ffa03147307d9aa53cbadc8bac0217d43cc7 IN  Yieldification: ETH Rewards0 ETH0.00003676 0.1
0x5a8317b934a8dea9c588ba2ca6c7adbc1744945d3a4e9134f1095a345ecdbacbClaim Reward589240922023-02-07 22:36:48477 days 13 hrs ago0x35d8a2e395cb1e8654d88e00cd420212d13d2853 IN  Yieldification: ETH Rewards0 ETH0.00006862 0.1
0xc1d21be445f970820e434fad5dcf10ac2886937e951ba493194877e6d69c90f3Claim Reward489740522022-12-26 11:08:53521 days 1 hr ago0x9277c7b599ad19a52d8d4f10f7799d73d9d2731e IN  Yieldification: ETH Rewards0 ETH0.00002454 0.1
0x7d5d0b279a09c830c9070143cc74f51e2c9df72adccb1b3d61cf02e550477106Claim Reward484510072022-12-24 8:40:33523 days 3 hrs ago0x6fcd4ab6d348dbee0c36f3a851d1537d293ec474 IN  Yieldification: ETH Rewards0 ETH0.00002512 0.1
0xaf446a12019e96e37d345db12d59e3c95427dbeee4c9ae8565cddff83dc81d1eClaim Reward480800722022-12-22 16:25:16524 days 20 hrs ago0x4bed4d237309875ff744ba7cb8eb1f99bef4e109 IN  Yieldification: ETH Rewards0 ETH0.0000371 0.1
0x9760309a66e245277a19d517124cee8e02c58cd8a4137a4a2a2cb5be41ee99e6Claim Reward452745362022-12-11 10:21:07536 days 2 hrs ago0x2134635a9fe88fa5a880152dda5011f5d2f0a672 IN  Yieldification: ETH Rewards0 ETH0.00002316 0.1
0x8765c016169bc28f6d275c08cbf01beff1b604417e467cea3784a45b499b8b3cClaim Reward444111022022-12-07 18:00:15539 days 18 hrs ago0xb3a8177a08f74c1626569e9f42045d30521b1aac IN  Yieldification: ETH Rewards0 ETH0.000024960.1
0x7613e1b075119118766cccfcceb3ffda2e22d2e1a2d23350b08fac682982bb57Claim Reward426615722022-12-01 9:18:05546 days 3 hrs ago0x6394c5b991b7d5352ee36bbeb5497ff307e510f5 IN  Yieldification: ETH Rewards0 ETH0.00001988 0.1
0xa5610a9b15ae29aa9041b20b4035323ccdbb9048a4af60e0ac5bd5daefeef2ddClaim Reward425801022022-12-01 1:11:14546 days 11 hrs ago0x3392258d8dced39951e9119b03af80cc2cba83f7 IN  Yieldification: ETH Rewards0 ETH0.000019510.1
0xde82e8af7458d84ebc4bb6466a4630c8326fe0c68fc427b337be37dd34f44646Claim Reward423950152022-11-30 9:19:45547 days 3 hrs ago0xfa806cebacbc70264e37c0deaa774a39dd53f5b1 IN  Yieldification: ETH Rewards0 ETH0.00001965 0.1
0xfd6063dc38fcafa31d0c32eb74b922d3b14208c8320584986a68670c8c6b6e3eClaim Reward408797542022-11-24 16:57:49552 days 19 hrs ago0x539bec82b81d3c0ec23b3649c0dc7cad396b40af IN  Yieldification: ETH Rewards0 ETH0.00002817 0.1
0xd5d4dd733546e9ebce363423f22616cdf831be5796948e78335b225db91beb00Claim Reward389514932022-11-18 3:12:50559 days 9 hrs ago0x3fe5cd6e7fee9de073f056d61a11d2bd8a78d44e IN  Yieldification: ETH Rewards0 ETH0.000021170.1
0x9c12e68590970adb35e8c9d1c42b9aa5bcfe604526d9deb1aa2c6e4c6176102dClaim Reward383116182022-11-15 13:58:24561 days 22 hrs ago0x145e881bb4f39422d38fb2aa2e85b7b3129fff4d IN  Yieldification: ETH Rewards0 ETH0.0000283 0.1
0xaee9ca0faa553124a706ca73225edd40c58b978368170dbcecb9f7a998408259Claim Reward375089502022-11-12 13:30:27564 days 22 hrs ago0xe017988866d1a4b7f0db8c86edd72f7d7dad2a38 IN  Yieldification: ETH Rewards0 ETH0.0000209 0.1
0xf2f60793b2edb8931c00760a39ea154e65c65c82c20906290aa326eb2e35b006Claim Reward373919682022-11-12 3:41:02565 days 8 hrs ago0xa73573657b8019c9b2ce0fea88a9c3735688f4c9 IN  Yieldification: ETH Rewards0 ETH0.00002382 0.1
0x5b30a79a2781b19a3d7bb4fa92920c4f4c98995570afdfc5c3b313d5f00bbf17Claim Reward373782032022-11-12 2:25:48565 days 10 hrs ago0x4a7858c47c2a86376e513662de7a69e8905a66e2 IN  Yieldification: ETH Rewards0 ETH0.0000233 0.1
0xecf90674a95f00038e25afed35c8544b33a5c8fdf96339f276cedcd985152fd9Claim Reward372769702022-11-11 17:29:53565 days 18 hrs ago0x63469491fac6abe931e4d0bdf09584316a1a2dbb IN  Yieldification: ETH Rewards0 ETH0.00005209 0.1
0x8e767c86dbcf1210b59f559fba545025c4b6fe5c332c253d09f066faa9c8a7e8Claim Reward367046502022-11-09 19:26:41567 days 17 hrs ago0x685fbb97f53c25a534c2f391cd31120eade4a7d2 IN  Yieldification: ETH Rewards0 ETH0.0000996 0.1
0x700f34a25c8b9fd21acf0438fcb3fe3538f68e20ebff2307f5b826247dc20dd8Claim Reward362738572022-11-08 10:07:00569 days 2 hrs ago0xd80b0ea8f0dace58ddb8ddc15e6fe003521ca7d3 IN  Yieldification: ETH Rewards0 ETH0.000020410.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xddaf111364bfceb17936b9486f210fabdb14f85ac5cbf1b674fc86ecf74feae92037157372024-04-22 16:41:3337 days 19 hrs ago Yieldification: ETH Rewards0x92d87b289e5359b0b646b571da5e2f352572b1900.000516955025210813 ETH
0x3339d28df1e2071e0b2abc7a0d92c16edbd7810ee435fa367e1ed30a0f0fa3851916377842024-03-18 11:50:2873 days 38 mins ago Yieldification: ETH Rewards0xf23a4f1f31b30bab9417a8672fd30896376ad2320.001215365564056248 ETH
0x6ae72f50db7e4d333dffbe961c2ac00f80d687e0dc1f275536e31d5fafab542d1794216732024-02-10 19:29:26109 days 16 hrs ago Yieldification: ETH Rewards0x10d972b795ed7085beab58ebff06d501ce69d0cc0.012458400769111905 ETH
0xb87436c5131fc2e3a23a41f0dfad2aa3018fe003437de1493a25f97431e188c11710182312024-01-16 12:17:42135 days 11 mins ago Yieldification: ETH Rewards0x2518301bc7ba1682825336afa522387c455a062a0.000282715048436512 ETH
0x73b62632a2dabd19d64c9499459b47c71400a01cce766423c248aa99d604de7f1602424882023-12-15 5:22:34167 days 7 hrs ago Yieldification: ETH Rewards0x777e18fb39d61c407d01caffc8c08b9db31794b90.000597618996803908 ETH
0x66d35e49fc55cd4679f21a7d2c42a3f25b060b5158d5b994fe1fd734ab53637a1550523642023-11-28 23:18:31183 days 13 hrs ago Yieldification: ETH Rewards0xc43a2910a917385f9563c43708e45ab7f7fec6b60.00302972489553047 ETH
0xc5533ec1f5f7c8e65d85acc73a4368e5dbc0e516a4861fc2b5e9c697a74ae5571543093502023-11-26 15:12:48185 days 21 hrs ago Yieldification: ETH Rewards0xd0b188a3092222a6d8942536edae9a3ba559be6a0.000194359558809406 ETH
0xefc70e8e41550d4e515aab057c01def26512293156f09667b6b54d9c2dfdb5e01491912192023-11-11 0:33:54201 days 11 hrs ago Yieldification: ETH Rewards0x4a253ce067875220f44938997dd58b93d02cb1450.00260735070932434 ETH
0x18c5d6917753d8c5a2d7f4620ee8c9d470342a3e24cf22365bb9ca6a09c84aeb1459961452023-11-01 8:39:48211 days 3 hrs ago Yieldification: ETH Rewards0x9c4b88fbe06b6b1e461d9d294ecb7fb0c841db4f0.000092673389151026 ETH
0xb0ea4dd5ef060e54c950a88f64527d13d75e81c93f3cbc08ad27ea02a338b20b1454776722023-10-30 17:21:50212 days 19 hrs ago Yieldification: ETH Rewards0xd5e30c317cb6d41d832b66e2b59f5582a97a01650.000460001487332929 ETH
0x8376acef555cd48eca5b13232b4ff2fc454669f7338c5723190165bbf1480bdc1444928282023-10-27 11:46:13216 days 42 mins ago Yieldification: ETH Rewards0x5360a6bbea6636ec5a898813b13298711c65e6ac0.023027955178690553 ETH
0x181b6c4e8dcb8ad48ee13bb4c35aff077ee2e5302317058dcde13bc8018c371d1197167362023-08-09 13:31:36294 days 22 hrs ago Yieldification: ETH Rewards0x0e057a28e36e327e54e591ab078479ef566b66430.001327102268848827 ETH
0xb625c3fbfa47797d91cba0ec966a6b65ba9fd86f154f3e7afa8c771fd3b59c891028146482023-06-19 16:59:14345 days 19 hrs ago Yieldification: ETH Rewards0x6671219099ea6ccc75eb3f4f4200d46a97b09a190.021745416118518296 ETH
0x1db5ae9dabfedb4fc700562ba26481e3873f98689c09745563b3fd729c662004929708962023-05-21 15:03:57374 days 21 hrs ago Yieldification: ETH Rewards0x4f321ad6ddc21ebcf9ee7213d2b41895196b6a9b0.000417934727905383 ETH
0x2a8c1675045d7e8b5b563711c110b729852a90205cca88236e3cf86347ecd13e836983082023-04-24 5:13:25402 days 7 hrs ago Yieldification: ETH Rewards0x4e0104144c5f8d50e2dc0b54a967bd7d7a8091c70.000648756369685077 ETH
0x02c83763fe0696c2d66e81aa098e9dd80da1d96cbc15c98d739ce14c108bdb79821048062023-04-19 13:39:38406 days 22 hrs ago Yieldification: ETH Rewards0x941b6117f7059c484d66e8f24ed38cb40a1667cd0.006213293916628824 ETH
0xa3973f0e7a34fc33eeb7aa24dcaec015ffe4ed85acbd8b3385f536bac814fe06807879172023-04-15 18:06:33410 days 18 hrs ago Yieldification: ETH Rewards0xf3154c58930a67685db1559147d5ef439b8230f60.002575888299920374 ETH
0xf4c700cf7fd8d88ac94352ee9928ac9505e310bc0f6434fcaff93b8118a293b8756834742023-03-31 18:45:25425 days 17 hrs ago Yieldification: ETH Rewards0x3bb31c139aebefdce1d1c142362525babea05d370.001817081948706925 ETH
0xe8a0b382059577f8b7405327785b6243c4915afc64f2e803341b4756a0efb0e9729633822023-03-23 21:52:03433 days 14 hrs ago Yieldification: ETH Rewards0xa2786f918752b8082429ceb92150c0624ea285430.000126444308205269 ETH
0x249f6a23277646e6d9d7a12fdaa2c3b4d080b4cfa3c0c2fc70cbae45d8ec1bfe720096672023-03-21 5:02:23436 days 7 hrs ago Yieldification: sYDF Token Yieldification: ETH Rewards0 ETH
0x8b4ded695d3ab0e1673cae999dfdaf1b99283b5a0ac422f95474b4999901f32e719045372023-03-20 21:38:04436 days 14 hrs ago Yieldification: sYDF Token Yieldification: ETH Rewards0 ETH
0x8b4ded695d3ab0e1673cae999dfdaf1b99283b5a0ac422f95474b4999901f32e719045372023-03-20 21:38:04436 days 14 hrs ago Yieldification: sYDF Token Yieldification: ETH Rewards0 ETH
0xab2590f5ca6f59980e9980ddd2d5783d5142f3bb4f61e29eededf0b28e2a68a7718796832023-03-20 19:52:37436 days 16 hrs ago Yieldification: slYDF Token Yieldification: ETH Rewards0 ETH
0xab2590f5ca6f59980e9980ddd2d5783d5142f3bb4f61e29eededf0b28e2a68a7718796832023-03-20 19:52:37436 days 16 hrs ago Yieldification: slYDF Token Yieldification: ETH Rewards0 ETH
0xab2590f5ca6f59980e9980ddd2d5783d5142f3bb4f61e29eededf0b28e2a68a7718796832023-03-20 19:52:37436 days 16 hrs ago Yieldification: slYDF Token Yieldification: ETH Rewards0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakeRewards

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : StakeRewards.sol
/******************************************************************************************************
Yieldification Staking Rewards

Website: https://yieldification.com
Twitter: https://twitter.com/yieldification
Telegram: https://t.me/yieldification
******************************************************************************************************/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
import './interfaces/IStakeRewards.sol';

contract StakeRewards is IStakeRewards, Ownable {
  address public ydf;
  IERC721 private sYDF;
  IERC721 private slYDF;
  IUniswapV2Router02 private uniswapV2Router;

  uint256 public compoundBuySlippage = 2;

  uint256 public totalStakedUsers;
  uint256 public totalSharesDeposited;

  struct Share {
    uint256 amount;
    uint256 stakedTime;
  }
  struct Reward {
    uint256 totalExcluded;
    uint256 totalRealised;
  }
  mapping(address => Share) private shares;
  mapping(address => Reward) public rewards;

  uint256 public totalRewards;
  uint256 public totalDistributed;
  uint256 public rewardsPerShare;

  uint256 private constant ACC_FACTOR = 10**36;

  event AddShares(address indexed user, uint256 amount);
  event RemoveShares(address indexed user, uint256 amount);
  event ClaimReward(address user);
  event DistributeReward(address indexed user, uint256 amount);
  event DepositRewards(address indexed user, uint256 amountTokens);

  modifier onlyToken() {
    require(
      msg.sender == address(sYDF) || msg.sender == address(slYDF),
      'must be stake token'
    );
    _;
  }

  constructor(address _ydf, address _dexRouter) {
    ydf = _ydf;
    uniswapV2Router = IUniswapV2Router02(_dexRouter);
  }

  function setShare(
    address shareholder,
    uint256 balanceUpdate,
    bool isRemoving
  ) external override onlyToken {
    if (isRemoving) {
      _removeShares(shareholder, balanceUpdate);
      emit RemoveShares(shareholder, balanceUpdate);
    } else {
      _addShares(shareholder, balanceUpdate);
      emit AddShares(shareholder, balanceUpdate);
    }
  }

  function _addShares(address shareholder, uint256 amount) private {
    if (shares[shareholder].amount > 0) {
      _distributeReward(shareholder, false);
    }

    uint256 sharesBefore = shares[shareholder].amount;

    totalSharesDeposited += amount;
    shares[shareholder].amount += amount;
    shares[shareholder].stakedTime = block.timestamp;
    if (sharesBefore == 0 && shares[shareholder].amount > 0) {
      totalStakedUsers++;
    }
    rewards[shareholder].totalExcluded = getCumulativeRewards(
      shares[shareholder].amount
    );
  }

  function _removeShares(address shareholder, uint256 amount) private {
    require(
      shares[shareholder].amount > 0 &&
        (amount == 0 || amount <= shares[shareholder].amount),
      'you can only unstake if you have some staked'
    );
    _distributeReward(shareholder, false);

    uint256 removeAmount = amount == 0 ? shares[shareholder].amount : amount;

    totalSharesDeposited -= removeAmount;
    shares[shareholder].amount -= removeAmount;
    rewards[shareholder].totalExcluded = getCumulativeRewards(
      shares[shareholder].amount
    );
  }

  function depositRewards() external payable override {
    uint256 _amount = msg.value;
    require(_amount > 0, 'must provide ETH to deposit for rewards');
    require(totalSharesDeposited > 0, 'must be shares to distribute rewards');

    totalRewards += _amount;
    rewardsPerShare += (ACC_FACTOR * _amount) / totalSharesDeposited;
    emit DepositRewards(msg.sender, _amount);
  }

  function _distributeReward(address shareholder, bool compound) internal {
    if (shares[shareholder].amount == 0) {
      return;
    }

    uint256 amount = getUnpaid(shareholder);
    rewards[shareholder].totalRealised += amount;
    rewards[shareholder].totalExcluded = getCumulativeRewards(
      shares[shareholder].amount
    );

    if (amount > 0) {
      totalDistributed += amount;
      uint256 _balBefore = address(this).balance;
      if (compound) {
        uint256 _tokensToReceiveNoSlip = _getTokensToReceiveOnBuyNoSlippage(
          amount
        );
        address[] memory path = new address[](2);
        path[0] = uniswapV2Router.WETH();
        path[1] = ydf;
        uniswapV2Router.swapExactETHForTokens{ value: amount }(
          (_tokensToReceiveNoSlip * (100 - compoundBuySlippage)) / 100, // handle slippage
          path,
          shareholder,
          block.timestamp
        );
      } else {
        payable(shareholder).call{ value: amount }('');
      }
      require(address(this).balance >= _balBefore - amount, 'took too much');
      emit DistributeReward(shareholder, amount);
    }
  }

  function _getTokensToReceiveOnBuyNoSlippage(uint256 _amountETH)
    internal
    view
    returns (uint256)
  {
    address pairAddy = IUniswapV2Factory(uniswapV2Router.factory()).getPair(
      uniswapV2Router.WETH(),
      ydf
    );
    IUniswapV2Pair pair = IUniswapV2Pair(pairAddy);
    (uint112 _r0, uint112 _r1, ) = pair.getReserves();
    if (pair.token0() == uniswapV2Router.WETH()) {
      return (_amountETH * _r1) / _r0;
    } else {
      return (_amountETH * _r0) / _r1;
    }
  }

  function claimReward(bool _compound) external override {
    _distributeReward(msg.sender, _compound);
    emit ClaimReward(msg.sender);
  }

  // returns the unpaid rewards
  function getUnpaid(address shareholder) public view returns (uint256) {
    if (shares[shareholder].amount == 0) {
      return 0;
    }

    uint256 earnedRewards = getCumulativeRewards(shares[shareholder].amount);
    uint256 rewardsExcluded = rewards[shareholder].totalExcluded;
    if (earnedRewards <= rewardsExcluded) {
      return 0;
    }

    return earnedRewards - rewardsExcluded;
  }

  function getCumulativeRewards(uint256 share) internal view returns (uint256) {
    return (share * rewardsPerShare) / ACC_FACTOR;
  }

  function getShares(address user) external view override returns (uint256) {
    return shares[user].amount;
  }

  function getsYDF() external view returns (address) {
    return address(sYDF);
  }

  function getslYDF() external view returns (address) {
    return address(slYDF);
  }

  function setCompoundBuySlippage(uint8 _slippage) external onlyOwner {
    require(_slippage <= 100, 'cannot be more than 100% slippage');
    compoundBuySlippage = _slippage;
  }

  function setsYDF(address _sYDF) external onlyOwner {
    sYDF = IERC721(_sYDF);
  }

  function setslYDF(address _slYDF) external onlyOwner {
    slYDF = IERC721(_slYDF);
  }
}

File 2 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 10 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 4 of 10 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 5 of 10 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

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

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 6 of 10 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 7 of 10 : IStakeRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface IStakeRewards {
  function claimReward(bool compound) external;

  function depositRewards() external payable;

  function getShares(address wallet) external view returns (uint256);

  function setShare(
    address shareholder,
    uint256 balanceUpdate,
    bool isRemoving
  ) external;
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

File 10 of 10 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_ydf","type":"address"},{"internalType":"address","name":"_dexRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"ClaimReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountTokens","type":"uint256"}],"name":"DepositRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DistributeReward","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RemoveShares","type":"event"},{"inputs":[{"internalType":"bool","name":"_compound","type":"bool"}],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundBuySlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositRewards","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"shareholder","type":"address"}],"name":"getUnpaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getsYDF","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getslYDF","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"totalExcluded","type":"uint256"},{"internalType":"uint256","name":"totalRealised","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_slippage","type":"uint8"}],"name":"setCompoundBuySlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"shareholder","type":"address"},{"internalType":"uint256","name":"balanceUpdate","type":"uint256"},{"internalType":"bool","name":"isRemoving","type":"bool"}],"name":"setShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sYDF","type":"address"}],"name":"setsYDF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_slYDF","type":"address"}],"name":"setslYDF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSharesDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedUsers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ydf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405260026005553480156200001657600080fd5b506040516200163b3803806200163b8339810160408190526200003991620000e3565b620000443362000076565b600180546001600160a01b039384166001600160a01b031991821617909155600480549290931691161790556200011b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000de57600080fd5b919050565b60008060408385031215620000f757600080fd5b6200010283620000c6565b91506200011260208401620000c6565b90509250929050565b611510806200012b6000396000f3fe60806040526004361061012a5760003560e01c806380bb4055116100ab578063c7e1d0b11161006f578063c7e1d0b114610310578063e38bc6f614610326578063efca2eed14610346578063f04da65b1461035c578063f2fde38b14610392578063f36adc35146103b257600080fd5b806380bb40551461027c5780638433c04c1461029257806389d96917146102b25780638da5cb5b146102d2578063c5a0ffd7146102f057600080fd5b806329cc05cf116100f257806329cc05cf146101fd5780633c6e67891461021d5780634eb2e07d146102335780635533adf514610249578063715018a61461026757600080fd5b80630700037d1461012f5780630e15561a1461017d578063152111f7146101a1578063178edaec146101ab5780631b3acb07146101dd575b600080fd5b34801561013b57600080fd5b5061016361014a3660046111e0565b6009602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b34801561018957600080fd5b50610193600a5481565b604051908152602001610174565b6101a96103d2565b005b3480156101b757600080fd5b506002546001600160a01b03165b6040516001600160a01b039091168152602001610174565b3480156101e957600080fd5b506101a96101f83660046111e0565b61051e565b34801561020957600080fd5b506101a9610218366004611219565b610548565b34801561022957600080fd5b5061019360075481565b34801561023f57600080fd5b5061019360055481565b34801561025557600080fd5b506003546001600160a01b03166101c5565b34801561027357600080fd5b506101a961064f565b34801561028857600080fd5b5061019360065481565b34801561029e57600080fd5b506101a96102ad3660046111e0565b610663565b3480156102be57600080fd5b506101936102cd3660046111e0565b61068d565b3480156102de57600080fd5b506000546001600160a01b03166101c5565b3480156102fc57600080fd5b506101a961030b366004611257565b610715565b34801561031c57600080fd5b50610193600c5481565b34801561033257600080fd5b506001546101c5906001600160a01b031681565b34801561035257600080fd5b50610193600b5481565b34801561036857600080fd5b506101936103773660046111e0565b6001600160a01b031660009081526008602052604090205490565b34801561039e57600080fd5b506101a96103ad3660046111e0565b610755565b3480156103be57600080fd5b506101a96103cd366004611272565b6107ce565b34806104355760405162461bcd60e51b815260206004820152602760248201527f6d7573742070726f766964652045544820746f206465706f73697420666f72206044820152667265776172647360c81b60648201526084015b60405180910390fd5b6000600754116104935760405162461bcd60e51b8152602060048201526024808201527f6d7573742062652073686172657320746f2064697374726962757465207265776044820152636172647360e01b606482015260840161042c565b80600a60008282546104a591906112ab565b90915550506007546104c6826ec097ce7bc90715b34b9f10000000006112be565b6104d091906112dd565b600c60008282546104e191906112ab565b909155505060405181815233907fb9ad861b752f80117b35bea6dec99933d8a5ae360f2839ee8784b750d56134099060200160405180910390a250565b61052661083c565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633148061056b57506003546001600160a01b031633145b6105ad5760405162461bcd60e51b815260206004820152601360248201527236bab9ba1031329039ba30b5b2903a37b5b2b760691b604482015260640161042c565b8015610605576105bd8383610896565b826001600160a01b03167fae0577e1c96b26fbc0b9df702431f5470979d001d24f136eded791b8b6521d6f836040516105f891815260200190565b60405180910390a2505050565b61060f83836109fa565b826001600160a01b03167fba8f3777cf908803bf1f3dd58e7f4b7d3de4dbe3c234c4ccab0975d98f7cd388836040516105f891815260200190565b505050565b61065761083c565b6106616000610b02565b565b61066b61083c565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526008602052604081205481036106b457506000919050565b6001600160a01b0382166000908152600860205260408120546106d690610b52565b6001600160a01b038416600090815260096020526040902054909150808211610703575060009392505050565b61070d81836112ff565b949350505050565b61071f3382610b82565b6040513381527f63e32091e4445d16e29c33a6b264577c2d86694021aa4e6f4dd590048f5792e89060200160405180910390a150565b61075d61083c565b6001600160a01b0381166107c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161042c565b6107cb81610b02565b50565b6107d661083c565b60648160ff1611156108345760405162461bcd60e51b815260206004820152602160248201527f63616e6e6f74206265206d6f7265207468616e203130302520736c69707061676044820152606560f81b606482015260840161042c565b60ff16600555565b6000546001600160a01b031633146106615760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161042c565b6001600160a01b038216600090815260086020526040902054158015906108dd57508015806108dd57506001600160a01b0382166000908152600860205260409020548111155b61093e5760405162461bcd60e51b815260206004820152602c60248201527f796f752063616e206f6e6c7920756e7374616b6520696620796f75206861766560448201526b081cdbdb59481cdd185ad95960a21b606482015260840161042c565b610949826000610b82565b600081156109575781610971565b6001600160a01b0383166000908152600860205260409020545b9050806007600082825461098591906112ff565b90915550506001600160a01b038316600090815260086020526040812080548392906109b29084906112ff565b90915550506001600160a01b0383166000908152600860205260409020546109d990610b52565b6001600160a01b039093166000908152600960205260409020929092555050565b6001600160a01b03821660009081526008602052604090205415610a2357610a23826000610b82565b6001600160a01b0382166000908152600860205260408120546007805491928492610a4f9084906112ab565b90915550506001600160a01b03831660009081526008602052604081208054849290610a7c9084906112ab565b90915550506001600160a01b03831660009081526008602052604090204260019091015580158015610ac557506001600160a01b03831660009081526008602052604090205415155b15610ae05760068054906000610ada83611312565b91905055505b6001600160a01b0383166000908152600860205260409020546109d990610b52565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006ec097ce7bc90715b34b9f1000000000600c5483610b7291906112be565b610b7c91906112dd565b92915050565b6001600160a01b0382166000908152600860205260408120549003610ba5575050565b6000610bb08361068d565b6001600160a01b038416600090815260096020526040812060010180549293508392909190610be09084906112ab565b90915550506001600160a01b038316600090815260086020526040902054610c0790610b52565b6001600160a01b038416600090815260096020526040902055801561064a5780600b6000828254610c3891906112ab565b909155504790508215610ddc576000610c5083610ec0565b6040805160028082526060820183529293506000929091602083019080368337505060048054604080516315ab88c960e31b815290519495506001600160a01b039091169363ad5c46489350818301926020928290030181865afa158015610cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce09190611341565b81600081518110610cf357610cf361135e565b6001600160a01b0392831660209182029290920101526001805483519216918391908110610d2357610d2361135e565b6001600160a01b039283166020918202929092010152600454600554911690637ff36ab5908690606490610d5790826112ff565b610d6190876112be565b610d6b91906112dd565b848a426040518663ffffffff1660e01b8152600401610d8d9493929190611374565b60006040518083038185885af1158015610dab573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610dd491908101906113de565b505050610e2e565b6040516001600160a01b038516908390600081818185875af1925050503d8060008114610e25576040519150601f19603f3d011682016040523d82523d6000602084013e610e2a565b606091505b5050505b610e3882826112ff565b471015610e775760405162461bcd60e51b815260206004820152600d60248201526c0e8deded640e8dede40daeac6d609b1b604482015260640161042c565b836001600160a01b03167fe8b160e373db99a103e0a2abfa029b9c3fc8b328984a1ead8a65ae68ae646db783604051610eb291815260200190565b60405180910390a250505050565b600480546040805163c45a015560e01b8152905160009384936001600160a01b03169263c45a015592818301926020928290030181865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2d9190611341565b6001600160a01b031663e6a43905600460009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb29190611341565b60015460405160e084901b6001600160e01b03191681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa158015611000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110249190611341565b90506000819050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561106c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109091906114b3565b5060048054604080516315ab88c960e31b815290519496509294506001600160a01b03169263ad5c46489280830192602092918290030181865afa1580156110dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111009190611341565b6001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190611341565b6001600160a01b0316036111ac57816001600160701b0316816001600160701b03168761119891906112be565b6111a291906112dd565b9695505050505050565b806001600160701b0316826001600160701b03168761119891906112be565b6001600160a01b03811681146107cb57600080fd5b6000602082840312156111f257600080fd5b81356111fd816111cb565b9392505050565b8035801515811461121457600080fd5b919050565b60008060006060848603121561122e57600080fd5b8335611239816111cb565b92506020840135915061124e60408501611204565b90509250925092565b60006020828403121561126957600080fd5b6111fd82611204565b60006020828403121561128457600080fd5b813560ff811681146111fd57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610b7c57610b7c611295565b60008160001904831182151516156112d8576112d8611295565b500290565b6000826112fa57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610b7c57610b7c611295565b60006001820161132457611324611295565b5060010190565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561135357600080fd5b81516111fd816111cb565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156113be5784516001600160a01b031683529383019391830191600101611399565b50506001600160a01b039690961660408501525050506060015292915050565b600060208083850312156113f157600080fd5b825167ffffffffffffffff8082111561140957600080fd5b818501915085601f83011261141d57600080fd5b81518181111561142f5761142f61132b565b8060051b604051601f19603f830116810181811085821117156114545761145461132b565b60405291825284820192508381018501918883111561147257600080fd5b938501935b8285101561149057845184529385019392850192611477565b98975050505050505050565b80516001600160701b038116811461121457600080fd5b6000806000606084860312156114c857600080fd5b6114d18461149c565b92506114df6020850161149c565b9150604084015163ffffffff811681146114f857600080fd5b80915050925092509256fea164736f6c6343000810000a00000000000000000000000030dcba0405004cf124045793e1933c798af9e66a0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506

Deployed Bytecode

0x60806040526004361061012a5760003560e01c806380bb4055116100ab578063c7e1d0b11161006f578063c7e1d0b114610310578063e38bc6f614610326578063efca2eed14610346578063f04da65b1461035c578063f2fde38b14610392578063f36adc35146103b257600080fd5b806380bb40551461027c5780638433c04c1461029257806389d96917146102b25780638da5cb5b146102d2578063c5a0ffd7146102f057600080fd5b806329cc05cf116100f257806329cc05cf146101fd5780633c6e67891461021d5780634eb2e07d146102335780635533adf514610249578063715018a61461026757600080fd5b80630700037d1461012f5780630e15561a1461017d578063152111f7146101a1578063178edaec146101ab5780631b3acb07146101dd575b600080fd5b34801561013b57600080fd5b5061016361014a3660046111e0565b6009602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b34801561018957600080fd5b50610193600a5481565b604051908152602001610174565b6101a96103d2565b005b3480156101b757600080fd5b506002546001600160a01b03165b6040516001600160a01b039091168152602001610174565b3480156101e957600080fd5b506101a96101f83660046111e0565b61051e565b34801561020957600080fd5b506101a9610218366004611219565b610548565b34801561022957600080fd5b5061019360075481565b34801561023f57600080fd5b5061019360055481565b34801561025557600080fd5b506003546001600160a01b03166101c5565b34801561027357600080fd5b506101a961064f565b34801561028857600080fd5b5061019360065481565b34801561029e57600080fd5b506101a96102ad3660046111e0565b610663565b3480156102be57600080fd5b506101936102cd3660046111e0565b61068d565b3480156102de57600080fd5b506000546001600160a01b03166101c5565b3480156102fc57600080fd5b506101a961030b366004611257565b610715565b34801561031c57600080fd5b50610193600c5481565b34801561033257600080fd5b506001546101c5906001600160a01b031681565b34801561035257600080fd5b50610193600b5481565b34801561036857600080fd5b506101936103773660046111e0565b6001600160a01b031660009081526008602052604090205490565b34801561039e57600080fd5b506101a96103ad3660046111e0565b610755565b3480156103be57600080fd5b506101a96103cd366004611272565b6107ce565b34806104355760405162461bcd60e51b815260206004820152602760248201527f6d7573742070726f766964652045544820746f206465706f73697420666f72206044820152667265776172647360c81b60648201526084015b60405180910390fd5b6000600754116104935760405162461bcd60e51b8152602060048201526024808201527f6d7573742062652073686172657320746f2064697374726962757465207265776044820152636172647360e01b606482015260840161042c565b80600a60008282546104a591906112ab565b90915550506007546104c6826ec097ce7bc90715b34b9f10000000006112be565b6104d091906112dd565b600c60008282546104e191906112ab565b909155505060405181815233907fb9ad861b752f80117b35bea6dec99933d8a5ae360f2839ee8784b750d56134099060200160405180910390a250565b61052661083c565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633148061056b57506003546001600160a01b031633145b6105ad5760405162461bcd60e51b815260206004820152601360248201527236bab9ba1031329039ba30b5b2903a37b5b2b760691b604482015260640161042c565b8015610605576105bd8383610896565b826001600160a01b03167fae0577e1c96b26fbc0b9df702431f5470979d001d24f136eded791b8b6521d6f836040516105f891815260200190565b60405180910390a2505050565b61060f83836109fa565b826001600160a01b03167fba8f3777cf908803bf1f3dd58e7f4b7d3de4dbe3c234c4ccab0975d98f7cd388836040516105f891815260200190565b505050565b61065761083c565b6106616000610b02565b565b61066b61083c565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526008602052604081205481036106b457506000919050565b6001600160a01b0382166000908152600860205260408120546106d690610b52565b6001600160a01b038416600090815260096020526040902054909150808211610703575060009392505050565b61070d81836112ff565b949350505050565b61071f3382610b82565b6040513381527f63e32091e4445d16e29c33a6b264577c2d86694021aa4e6f4dd590048f5792e89060200160405180910390a150565b61075d61083c565b6001600160a01b0381166107c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161042c565b6107cb81610b02565b50565b6107d661083c565b60648160ff1611156108345760405162461bcd60e51b815260206004820152602160248201527f63616e6e6f74206265206d6f7265207468616e203130302520736c69707061676044820152606560f81b606482015260840161042c565b60ff16600555565b6000546001600160a01b031633146106615760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161042c565b6001600160a01b038216600090815260086020526040902054158015906108dd57508015806108dd57506001600160a01b0382166000908152600860205260409020548111155b61093e5760405162461bcd60e51b815260206004820152602c60248201527f796f752063616e206f6e6c7920756e7374616b6520696620796f75206861766560448201526b081cdbdb59481cdd185ad95960a21b606482015260840161042c565b610949826000610b82565b600081156109575781610971565b6001600160a01b0383166000908152600860205260409020545b9050806007600082825461098591906112ff565b90915550506001600160a01b038316600090815260086020526040812080548392906109b29084906112ff565b90915550506001600160a01b0383166000908152600860205260409020546109d990610b52565b6001600160a01b039093166000908152600960205260409020929092555050565b6001600160a01b03821660009081526008602052604090205415610a2357610a23826000610b82565b6001600160a01b0382166000908152600860205260408120546007805491928492610a4f9084906112ab565b90915550506001600160a01b03831660009081526008602052604081208054849290610a7c9084906112ab565b90915550506001600160a01b03831660009081526008602052604090204260019091015580158015610ac557506001600160a01b03831660009081526008602052604090205415155b15610ae05760068054906000610ada83611312565b91905055505b6001600160a01b0383166000908152600860205260409020546109d990610b52565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006ec097ce7bc90715b34b9f1000000000600c5483610b7291906112be565b610b7c91906112dd565b92915050565b6001600160a01b0382166000908152600860205260408120549003610ba5575050565b6000610bb08361068d565b6001600160a01b038416600090815260096020526040812060010180549293508392909190610be09084906112ab565b90915550506001600160a01b038316600090815260086020526040902054610c0790610b52565b6001600160a01b038416600090815260096020526040902055801561064a5780600b6000828254610c3891906112ab565b909155504790508215610ddc576000610c5083610ec0565b6040805160028082526060820183529293506000929091602083019080368337505060048054604080516315ab88c960e31b815290519495506001600160a01b039091169363ad5c46489350818301926020928290030181865afa158015610cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce09190611341565b81600081518110610cf357610cf361135e565b6001600160a01b0392831660209182029290920101526001805483519216918391908110610d2357610d2361135e565b6001600160a01b039283166020918202929092010152600454600554911690637ff36ab5908690606490610d5790826112ff565b610d6190876112be565b610d6b91906112dd565b848a426040518663ffffffff1660e01b8152600401610d8d9493929190611374565b60006040518083038185885af1158015610dab573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610dd491908101906113de565b505050610e2e565b6040516001600160a01b038516908390600081818185875af1925050503d8060008114610e25576040519150601f19603f3d011682016040523d82523d6000602084013e610e2a565b606091505b5050505b610e3882826112ff565b471015610e775760405162461bcd60e51b815260206004820152600d60248201526c0e8deded640e8dede40daeac6d609b1b604482015260640161042c565b836001600160a01b03167fe8b160e373db99a103e0a2abfa029b9c3fc8b328984a1ead8a65ae68ae646db783604051610eb291815260200190565b60405180910390a250505050565b600480546040805163c45a015560e01b8152905160009384936001600160a01b03169263c45a015592818301926020928290030181865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2d9190611341565b6001600160a01b031663e6a43905600460009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb29190611341565b60015460405160e084901b6001600160e01b03191681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa158015611000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110249190611341565b90506000819050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561106c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109091906114b3565b5060048054604080516315ab88c960e31b815290519496509294506001600160a01b03169263ad5c46489280830192602092918290030181865afa1580156110dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111009190611341565b6001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190611341565b6001600160a01b0316036111ac57816001600160701b0316816001600160701b03168761119891906112be565b6111a291906112dd565b9695505050505050565b806001600160701b0316826001600160701b03168761119891906112be565b6001600160a01b03811681146107cb57600080fd5b6000602082840312156111f257600080fd5b81356111fd816111cb565b9392505050565b8035801515811461121457600080fd5b919050565b60008060006060848603121561122e57600080fd5b8335611239816111cb565b92506020840135915061124e60408501611204565b90509250925092565b60006020828403121561126957600080fd5b6111fd82611204565b60006020828403121561128457600080fd5b813560ff811681146111fd57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610b7c57610b7c611295565b60008160001904831182151516156112d8576112d8611295565b500290565b6000826112fa57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610b7c57610b7c611295565b60006001820161132457611324611295565b5060010190565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561135357600080fd5b81516111fd816111cb565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156113be5784516001600160a01b031683529383019391830191600101611399565b50506001600160a01b039690961660408501525050506060015292915050565b600060208083850312156113f157600080fd5b825167ffffffffffffffff8082111561140957600080fd5b818501915085601f83011261141d57600080fd5b81518181111561142f5761142f61132b565b8060051b604051601f19603f830116810181811085821117156114545761145461132b565b60405291825284820192508381018501918883111561147257600080fd5b938501935b8285101561149057845184529385019392850192611477565b98975050505050505050565b80516001600160701b038116811461121457600080fd5b6000806000606084860312156114c857600080fd5b6114d18461149c565b92506114df6020850161149c565b9150604084015163ffffffff811681146114f857600080fd5b80915050925092509256fea164736f6c6343000810000a

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

00000000000000000000000030dcba0405004cf124045793e1933c798af9e66a0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506

-----Decoded View---------------
Arg [0] : _ydf (address): 0x30dcBa0405004cF124045793E1933C798Af9E66a
Arg [1] : _dexRouter (address): 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000030dcba0405004cf124045793e1933c798af9e66a
Arg [1] : 0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506


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.