Contract 0x8d481245801907b45823fb032e6848d0d3c29ae5 3

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9b35c684bb47ec0c69e7102dc8d3b06e25fa24ba23c28392202bb0b3d8ed64d4Get Reward131297132022-05-28 11:52:4911 hrs 9 mins ago0xe22e71dc574e52c9ecdc7c6d3b868eb58ffdee52 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000123090117 ETH
0xa307263ba64e66c929e9a78c8181caef3fc8b30a2bf80b4b6bacd4af6e03eb8eGet Reward131296742022-05-28 11:52:4911 hrs 9 mins ago0xe22e71dc574e52c9ecdc7c6d3b868eb58ffdee52 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000124349394 ETH
0x8f4d24d7df52db88bcc46d6e03ade61bf73500729926231093b1b7a91aa1f40cWithdraw130357482022-05-27 4:19:421 day 18 hrs ago0x957fe1ed8a14b6803a657b2e211d1bbe875af1c3 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000211720923 ETH
0xed799e9f242c7781acfadcce9b562d2498ddc96700a00a7085a8a5f424aba3e0Withdraw130255902022-05-27 1:15:151 day 21 hrs ago0x8552aa9db5bcaa56d41411a4800309d7d0d35e36 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000235037834 ETH
0xa97ad2e65da8315a48d6d598dab419a01aca443aff67bb4eca3e2e039ca11bd9Withdraw129841242022-05-26 10:03:042 days 12 hrs ago0xb354fe945842b0660111d1700bf2515e40a273d8 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000212716575 ETH
0x61a70c4cdf1de12cf51cd95c0d08745c589ff90271bf2241cc3aa61779dd041bWithdraw128172782022-05-23 23:37:174 days 23 hrs ago0x1c2ca85254ee1a6ae3d85b9be010c2bbe8600a45 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000112944779 ETH
0x947d216997593d1308ed4587f5939bcda95fb3a5e4ecfa9d1b4a9929cb9f4016Withdraw128138042022-05-23 22:21:235 days 40 mins ago0xe4d6983a254e695cf3fe40172ad741973126656d IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.00011532465 ETH
0x04dfac26b2f079eccabb51340bf79ddd6604a74c8021830b5f89e8ccf8242444Get Reward128111912022-05-23 21:13:425 days 1 hr ago0x59080f366bea0c0ee70e6600475565041f79a4cc IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000121901448 ETH
0xd2c39fa3514d07c6f1d27f14ff6536e053ca1e17c3b4f41ccce8f5107328b2acWithdraw128111712022-05-23 21:13:425 days 1 hr ago0x59080f366bea0c0ee70e6600475565041f79a4cc IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000148478747 ETH
0x1ffd53a09262aaff6c04fc282c636a81d92ccf651a65cc1ee83d15f3ddf49ed9Withdraw127327982022-05-22 20:55:136 days 2 hrs ago0x11d80cab11a96a5624c06bc87de79af91aa36767 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000108303139 ETH
0xfb27414a9e3e714befb9a1fab15c72d0a1c6091a8b0e4ff5d4d0a1c86545b4aaWithdraw126901352022-05-22 8:18:416 days 14 hrs ago0x7952edb6d9b89afdf3aa7c71d721a168271bcadb IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000123496302 ETH
0x00b9634cce5b7a6dbf636d2afc7f059726e8608badc6fc35a2d765e6875d3459Withdraw126671502022-05-21 23:47:336 days 23 hrs ago0x742303b4bac59d7da5d86ff864e240d59953c6b7 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.00009607001 ETH
0x346cf89c2584b3d478058958e4a66ed853d3fa7c115dea09fcfb4eb0f0fcd452Get Reward126671382022-05-21 23:46:486 days 23 hrs ago0x742303b4bac59d7da5d86ff864e240d59953c6b7 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000115458033 ETH
0x5d93695b203f7a63a082837de405387f808a79fe0f7ca1a4e8cac11bc72a5464Withdraw126030872022-05-21 3:24:587 days 19 hrs ago0x4ee0d59edd7a83164f473cd87a87381793c73b51 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000150931082 ETH
0x9849b91c689921fb3244e246c30dd776d479cce6e741c33da43f70be06d1231bGet Reward126030672022-05-21 3:24:587 days 19 hrs ago0x4ee0d59edd7a83164f473cd87a87381793c73b51 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000148429032 ETH
0xdc035ba04d03ee3d9d7dde73ce1d3d1fde038111edeb290f7152228e2b3b7c8dWithdraw125769822022-05-20 17:01:278 days 6 hrs ago0x282d06dccf9f95ff64162b27a9b125453e79911f IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000145520173 ETH
0x4ce6c90de8aa603ba93fef7eee2a76dd06b93816576db98137ba71e82ef59f16Withdraw125761322022-05-20 16:50:438 days 6 hrs ago0x9867d605da51f26aaf63ecf74cf3232b08b704f0 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000131379229 ETH
0x4ee71bb4c7d336e6fbeab81174d572b5906415a47424570f986959ae0ac98b0dGet Reward125760572022-05-20 16:49:528 days 6 hrs ago0x9867d605da51f26aaf63ecf74cf3232b08b704f0 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000157460277 ETH
0xfd83b8a8e837e60e2ee6e15f2e1c93bff54e6baad91dbafec3d6cbe0d938cc81Withdraw124696712022-05-19 9:50:319 days 13 hrs ago0x7d51910845011b41cc32806644da478feff2f11f IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000119525671 ETH
0xc7cf1e20b3ccd6f676af1681d851c790d0317d077dc1e90456ba0db61a40dfa5Withdraw124688302022-05-19 9:41:219 days 13 hrs ago0x323048524bee5eddd7c0ca20b8846ef63e200258 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000143358621 ETH
0xa32b212a2d878df1a51041b858b8f16f39c964f330d609c88ec87053d0aa8a25Withdraw124434682022-05-19 2:51:219 days 20 hrs ago0x9462881d61b9379ee4fff783c2bd8ac80d945aaf IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.00014315227 ETH
0x818bd49e0617d4da7d3119efd51b068aedb2a08d3660600069f0ff7e032e66e9Get Reward124433852022-05-19 2:50:029 days 20 hrs ago0x9462881d61b9379ee4fff783c2bd8ac80d945aaf IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000172010058 ETH
0x3fe983e73daabe1bc5cb971ed03e0f3a68e0254c81e0d1043ce3cc99b7dbb2acWithdraw124034632022-05-18 13:47:1910 days 9 hrs ago0x37caa7e069d49f634cb3aecc9b41d1c8442f2ee4 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000156993742 ETH
0x35a5eb60df89d730af1d10baec1f1a8ade12985fec67acf6b087c2feccbdce39Withdraw123238792022-05-17 14:52:3811 days 8 hrs ago0xeabed8538923d8b8e0616938f8dc657f3cdf74c6 IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000141364961 ETH
0xd1f7e9ba3a445b3cc13a8a23d0fcd567f32f54fe201783ff70630563cf02a0f7Withdraw122867132022-05-17 6:25:4611 days 16 hrs ago0x7243535ef022f404c7524587642bb5099c8494eb IN  0x8d481245801907b45823fb032e6848d0d3c29ae50 ETH0.000167359459 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa307263ba64e66c929e9a78c8181caef3fc8b30a2bf80b4b6bacd4af6e03eb8e131296742022-05-28 11:52:4911 hrs 9 mins ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0xa307263ba64e66c929e9a78c8181caef3fc8b30a2bf80b4b6bacd4af6e03eb8e131296742022-05-28 11:52:4911 hrs 9 mins ago 0x8d481245801907b45823fb032e6848d0d3c29ae5Dopex: DPX Token0 ETH
0x8f4d24d7df52db88bcc46d6e03ade61bf73500729926231093b1b7a91aa1f40c130357482022-05-27 4:19:421 day 18 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0xed799e9f242c7781acfadcce9b562d2498ddc96700a00a7085a8a5f424aba3e0130255902022-05-27 1:15:151 day 21 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0xa97ad2e65da8315a48d6d598dab419a01aca443aff67bb4eca3e2e039ca11bd9129841242022-05-26 10:03:042 days 12 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x61a70c4cdf1de12cf51cd95c0d08745c589ff90271bf2241cc3aa61779dd041b128172782022-05-23 23:37:174 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0x61a70c4cdf1de12cf51cd95c0d08745c589ff90271bf2241cc3aa61779dd041b128172782022-05-23 23:37:174 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x947d216997593d1308ed4587f5939bcda95fb3a5e4ecfa9d1b4a9929cb9f4016128138042022-05-23 22:21:235 days 40 mins ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0x947d216997593d1308ed4587f5939bcda95fb3a5e4ecfa9d1b4a9929cb9f4016128138042022-05-23 22:21:235 days 40 mins ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x04dfac26b2f079eccabb51340bf79ddd6604a74c8021830b5f89e8ccf8242444128111912022-05-23 21:13:425 days 1 hr ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0x04dfac26b2f079eccabb51340bf79ddd6604a74c8021830b5f89e8ccf8242444128111912022-05-23 21:13:425 days 1 hr ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x04dfac26b2f079eccabb51340bf79ddd6604a74c8021830b5f89e8ccf8242444128111912022-05-23 21:13:425 days 1 hr ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x04dfac26b2f079eccabb51340bf79ddd6604a74c8021830b5f89e8ccf8242444128111912022-05-23 21:13:425 days 1 hr ago 0x8d481245801907b45823fb032e6848d0d3c29ae5Dopex: DPX Token0 ETH
0xd2c39fa3514d07c6f1d27f14ff6536e053ca1e17c3b4f41ccce8f5107328b2ac128111712022-05-23 21:13:425 days 1 hr ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0xd2c39fa3514d07c6f1d27f14ff6536e053ca1e17c3b4f41ccce8f5107328b2ac128111712022-05-23 21:13:425 days 1 hr ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x1ffd53a09262aaff6c04fc282c636a81d92ccf651a65cc1ee83d15f3ddf49ed9127327982022-05-22 20:55:136 days 2 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0x1ffd53a09262aaff6c04fc282c636a81d92ccf651a65cc1ee83d15f3ddf49ed9127327982022-05-22 20:55:136 days 2 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0xfb27414a9e3e714befb9a1fab15c72d0a1c6091a8b0e4ff5d4d0a1c86545b4aa126901352022-05-22 8:18:416 days 14 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0xfb27414a9e3e714befb9a1fab15c72d0a1c6091a8b0e4ff5d4d0a1c86545b4aa126901352022-05-22 8:18:416 days 14 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x00b9634cce5b7a6dbf636d2afc7f059726e8608badc6fc35a2d765e6875d3459126671502022-05-21 23:47:336 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0x00b9634cce5b7a6dbf636d2afc7f059726e8608badc6fc35a2d765e6875d3459126671502022-05-21 23:47:336 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x346cf89c2584b3d478058958e4a66ed853d3fa7c115dea09fcfb4eb0f0fcd452126671382022-05-21 23:46:486 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0xeec2be5c91ae7f8a338e1e5f3b5de49d07afdc810 ETH
0x346cf89c2584b3d478058958e4a66ed853d3fa7c115dea09fcfb4eb0f0fcd452126671382022-05-21 23:46:486 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 0x3f770ac673856f105b586bb393d122721265ad460 ETH
0x346cf89c2584b3d478058958e4a66ed853d3fa7c115dea09fcfb4eb0f0fcd452126671382022-05-21 23:46:486 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5 Dopex: rDPX Token0 ETH
0x346cf89c2584b3d478058958e4a66ed853d3fa7c115dea09fcfb4eb0f0fcd452126671382022-05-21 23:46:486 days 23 hrs ago 0x8d481245801907b45823fb032e6848d0d3c29ae5Dopex: DPX Token0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewardsV2

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : StakingRewardsV2.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

// Libraries
import '@openzeppelin/contracts/math/Math.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';

// Interfaces
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import './interfaces/IStakingRewards.sol';

// Contracts
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract StakingRewardsV2 is ReentrancyGuard, Ownable {
  using SafeMath for uint256;
  using SafeERC20 for IERC20;

  /* ========== STATE VARIABLES ========== */

  IERC20 public rewardsTokenDPX;
  IERC20 public rewardsTokenRDPX;
  IERC20 public stakingToken;
  uint256 public boost = 0;
  uint256 public periodFinish = 0;
  uint256 public boostedFinish = 0;
  uint256 public rewardRateDPX = 0;
  uint256 public rewardRateRDPX = 0;
  uint256 public rewardsDuration;
  uint256 public lastUpdateTime;
  uint256 public rewardPerTokenStoredDPX;
  uint256 public rewardPerTokenStoredRDPX;
  uint256 public boostedTimePeriod;
  uint256 public id;

  mapping(address => bool) public whitelistedContracts;
  mapping(address => uint256) public userDPXRewardPerTokenPaid;
  mapping(address => uint256) public userRDPXRewardPerTokenPaid;
  mapping(address => uint256) public rewardsDPX;
  mapping(address => uint256) public rewardsRDPX;
  mapping(address => uint256) private _balances;

  uint256 private _totalSupply;

  /* ========== CONSTRUCTOR ========== */

  constructor(
    address _rewardsTokenDPX,
    address _rewardsTokenRDPX,
    address _stakingToken,
    uint256 _rewardsDuration,
    uint256 _boostedTimePeriod,
    uint256 _boost
  ) Ownable() {
    rewardsTokenDPX = IERC20(_rewardsTokenDPX);
    rewardsTokenRDPX = IERC20(_rewardsTokenRDPX);
    stakingToken = IERC20(_stakingToken);
    rewardsDuration = _rewardsDuration;
    boostedTimePeriod = _boostedTimePeriod;
    boost = _boost;
  }

  /* ========== VIEWS ========== */

  function isContract(address addr) public view returns (bool) {
    uint256 size;
    assembly {
      size := extcodesize(addr)
    }
    return size > 0;
  }

  function totalSupply() external view returns (uint256) {
    return _totalSupply;
  }

  function balanceOf(address account) external view returns (uint256) {
    return _balances[account];
  }

  function lastTimeRewardApplicable() public view returns (uint256) {
    uint256 timeApp = Math.min(block.timestamp, periodFinish);
    return timeApp;
  }

  function rewardPerToken() public view returns (uint256, uint256) {
    if (_totalSupply == 0) {
      uint256 perTokenRateDPX = rewardPerTokenStoredDPX;
      uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX;
      return (perTokenRateDPX, perTokenRateRDPX);
    }
    if (block.timestamp < boostedFinish) {
      uint256 perTokenRateDPX = rewardPerTokenStoredDPX.add(
        lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateDPX.mul(boost)).mul(1e18).div(
          _totalSupply
        )
      );
      uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX.add(
        lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateRDPX.mul(boost)).mul(1e18).div(
          _totalSupply
        )
      );
      return (perTokenRateDPX, perTokenRateRDPX);
    } else {
      if (lastUpdateTime < boostedFinish) {
        uint256 perTokenRateDPX = rewardPerTokenStoredDPX
          .add(
            boostedFinish.sub(lastUpdateTime).mul(rewardRateDPX.mul(boost)).mul(1e18).div(
              _totalSupply
            )
          )
          .add(
            lastTimeRewardApplicable().sub(boostedFinish).mul(rewardRateDPX).mul(1e18).div(
              _totalSupply
            )
          );
        uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX
          .add(
            boostedFinish.sub(lastUpdateTime).mul(rewardRateRDPX.mul(boost)).mul(1e18).div(
              _totalSupply
            )
          )
          .add(
            lastTimeRewardApplicable().sub(boostedFinish).mul(rewardRateRDPX).mul(1e18).div(
              _totalSupply
            )
          );
        return (perTokenRateDPX, perTokenRateRDPX);
      } else {
        uint256 perTokenRateDPX = rewardPerTokenStoredDPX.add(
          lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateDPX).mul(1e18).div(
            _totalSupply
          )
        );
        uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX.add(
          lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateRDPX).mul(1e18).div(
            _totalSupply
          )
        );
        return (perTokenRateDPX, perTokenRateRDPX);
      }
    }
  }

  function earned(address account)
    public
    view
    returns (uint256 DPXtokensEarned, uint256 RDPXtokensEarned)
  {
    uint256 perTokenRateDPX;
    uint256 perTokenRateRDPX;
    (perTokenRateDPX, perTokenRateRDPX) = rewardPerToken();
    DPXtokensEarned = _balances[account]
      .mul(perTokenRateDPX.sub(userDPXRewardPerTokenPaid[account]))
      .div(1e18)
      .add(rewardsDPX[account]);
    RDPXtokensEarned = _balances[account]
      .mul(perTokenRateRDPX.sub(userRDPXRewardPerTokenPaid[account]))
      .div(1e18)
      .add(rewardsRDPX[account]);
  }

  /* ========== MUTATIVE FUNCTIONS ========== */

  function stake(uint256 amount)
    external
    payable
    isEligibleSender
    nonReentrant
    updateReward(msg.sender)
  {
    require(amount > 0, 'Cannot stake 0');
    _totalSupply = _totalSupply.add(amount);
    _balances[msg.sender] = _balances[msg.sender].add(amount);
    stakingToken.safeTransferFrom(msg.sender, address(this), amount);
    emit Staked(msg.sender, amount);
  }

  function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
    require(amount > 0, 'Cannot withdraw 0');
    require(amount <= _balances[msg.sender], 'Insufficent balance');
    _totalSupply = _totalSupply.sub(amount);
    _balances[msg.sender] = _balances[msg.sender].sub(amount);
    stakingToken.safeTransfer(msg.sender, amount);
    emit Withdrawn(msg.sender, amount);
  }

  function withdrawRewardTokens() public onlyOwner returns (uint256, uint256) {
    address OwnerAddress = owner();
    if (OwnerAddress == msg.sender) {
      uint256 DPXRewards = rewardsTokenDPX.balanceOf(address(this));
      uint256 RDPXRewards = rewardsTokenRDPX.balanceOf(address(this));
      if (stakingToken == rewardsTokenDPX) {
        DPXRewards -= _totalSupply;
      } else if (stakingToken == rewardsTokenRDPX) {
        RDPXRewards -= _totalSupply;
      }
      periodFinish = block.timestamp;
      IERC20(rewardsTokenDPX).safeTransfer(OwnerAddress, DPXRewards);
      IERC20(rewardsTokenRDPX).safeTransfer(OwnerAddress, RDPXRewards);
      return (DPXRewards, RDPXRewards);
    } else {
      return (0, 0);
    }
  }

  function compound() public nonReentrant updateReward(msg.sender) {
    if (stakingToken == rewardsTokenDPX) {
      uint256 rewardDPX = rewardsDPX[msg.sender];
      require(rewardDPX > 0, 'stake address not found');
      rewardsDPX[msg.sender] = 0;
      _totalSupply = _totalSupply.add(rewardDPX);
      _balances[msg.sender] = _balances[msg.sender].add(rewardDPX);
      emit RewardCompounded(msg.sender, rewardDPX);
    } else if (stakingToken == rewardsTokenRDPX) {
      uint256 rewardRDPX = rewardsRDPX[msg.sender];
      require(rewardRDPX > 0, 'stake address not found');
      rewardsRDPX[msg.sender] = 0;
      _totalSupply = _totalSupply.add(rewardRDPX);
      _balances[msg.sender] = _balances[msg.sender].add(rewardRDPX);
      emit RewardCompounded(msg.sender, rewardRDPX);
    } else {
      require(false, 'stakingToken not found');
    }
  }

  function getReward(uint256 rewardsTokenID) public nonReentrant updateReward(msg.sender) {
    if (rewardsTokenID == 0) {
      uint256 rewardDPX = rewardsDPX[msg.sender];
      require(rewardDPX > 0, 'can not withdraw 0 DPX reward');
      rewardsDPX[msg.sender] = 0;
      rewardsTokenDPX.safeTransfer(msg.sender, rewardDPX);
      emit RewardPaid(msg.sender, rewardDPX);
    } else if (rewardsTokenID == 1) {
      uint256 rewardRDPX = rewardsRDPX[msg.sender];
      require(rewardRDPX > 0, 'can not withdraw 0 RDPX reward');
      rewardsRDPX[msg.sender] = 0;
      rewardsTokenRDPX.safeTransfer(msg.sender, rewardRDPX);
      emit RewardPaid(msg.sender, rewardRDPX);
    } else {
      uint256 rewardDPX = rewardsDPX[msg.sender];
      uint256 rewardRDPX = rewardsRDPX[msg.sender];
      if (rewardDPX > 0) {
        rewardsDPX[msg.sender] = 0;
        rewardsTokenDPX.safeTransfer(msg.sender, rewardDPX);
      }
      if (rewardRDPX > 0) {
        rewardsRDPX[msg.sender] = 0;
        rewardsTokenRDPX.safeTransfer(msg.sender, rewardRDPX);
      }
      emit RewardPaid(msg.sender, rewardDPX);
      emit RewardPaid(msg.sender, rewardRDPX);
    }
  }

  function exit() external {
    getReward(2);
    withdraw(_balances[msg.sender]);
  }

  /* ========== RESTRICTED FUNCTIONS ========== */

  function notifyRewardAmount(uint256 rewardDPX, uint256 rewardRDPX)
    external
    onlyOwner
    setReward(address(0))
  {
    if (periodFinish == 0) {
      rewardRateDPX = rewardDPX.div(rewardsDuration.add(boostedTimePeriod));
      rewardRateRDPX = rewardRDPX.div(rewardsDuration.add(boostedTimePeriod));
      lastUpdateTime = block.timestamp;
      periodFinish = block.timestamp.add(rewardsDuration);
      boostedFinish = block.timestamp.add(boostedTimePeriod);
    } else {
      uint256 remaining = periodFinish.sub(block.timestamp);
      uint256 leftoverDPX = remaining.mul(rewardRateDPX);
      uint256 leftoverRDPX = remaining.mul(rewardRateRDPX);
      rewardRateDPX = rewardDPX.add(leftoverDPX).div(rewardsDuration);
      rewardRateRDPX = rewardRDPX.add(leftoverRDPX).div(rewardsDuration);
      lastUpdateTime = block.timestamp;
      periodFinish = block.timestamp.add(rewardsDuration);
    }
    emit RewardAdded(rewardDPX, rewardRDPX);
  }

  function addToContractWhitelist(address _contract) external onlyOwner returns (bool) {
    require(isContract(_contract), 'StakingRewards: Address must be a contract address');
    require(!whitelistedContracts[_contract], 'StakingRewards: Contract already whitelisted');

    whitelistedContracts[_contract] = true;

    emit AddToContractWhitelist(_contract);

    return true;
  }

  function removeFromContractWhitelist(address _contract) external onlyOwner returns (bool) {
    require(whitelistedContracts[_contract], 'StakingRewards: Contract not whitelisted');

    whitelistedContracts[_contract] = false;

    emit RemoveFromContractWhitelist(_contract);

    return true;
  }

  /* ========== MODIFIERS ========== */

  // Modifier is eligible sender modifier
  modifier isEligibleSender() {
    if (isContract(msg.sender))
      require(whitelistedContracts[msg.sender], 'StakingRewards: Contract must be whitelisted');
    _;
  }

  // Modifier Set Reward modifier
  modifier setReward(address account) {
    (rewardPerTokenStoredDPX, rewardPerTokenStoredRDPX) = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (account != address(0)) {
      (rewardsDPX[account], rewardsRDPX[account]) = earned(account);
      userDPXRewardPerTokenPaid[account] = rewardPerTokenStoredDPX;
      userRDPXRewardPerTokenPaid[account] = rewardPerTokenStoredRDPX;
    }
    _;
  }

  // Modifier *Update Reward modifier*
  modifier updateReward(address account) {
    (rewardPerTokenStoredDPX, rewardPerTokenStoredRDPX) = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (account != address(0)) {
      (rewardsDPX[account], rewardsRDPX[account]) = earned(account);
      userDPXRewardPerTokenPaid[account] = rewardPerTokenStoredDPX;
      userRDPXRewardPerTokenPaid[account] = rewardPerTokenStoredRDPX;
    }
    _;
  }

  /* ========== EVENTS ========== */

  event RewardUpdated(uint256 rewardDPX, uint256 rewardRDPX);
  event RewardAdded(uint256 rewardDPX, uint256 rewardRDPX);
  event Staked(address indexed user, uint256 amount);
  event Withdrawn(address indexed user, uint256 amount);
  event RewardPaid(address indexed user, uint256 reward);
  event RewardCompounded(address indexed user, uint256 rewardDPX);
  event AddToContractWhitelist(address indexed _contract);
  event RemoveFromContractWhitelist(address indexed _contract);
}

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

File 2 of 10 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 3 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    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 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) {
        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 4 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using 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 5 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

File 6 of 10 : IStakingRewards.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

interface IStakingRewards {
  // Views
  function lastTimeRewardApplicable() external view returns (uint256);

  function rewardPerToken() external view returns (uint256, uint256);

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

  function getRewardForDuration() external view returns (uint256, uint256);

  function totalSupply() external view returns (uint256);

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

  // Mutative

  function stake(uint256 amount) external payable;

  function withdraw(uint256 amount) external;

  function getReward(uint256 rewardsTokenID) external;

  function exit() external;
}

File 7 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 8 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../GSN/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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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 9 of 10 : 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);
    }

    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 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 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": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsTokenDPX","type":"address"},{"internalType":"address","name":"_rewardsTokenRDPX","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"},{"internalType":"uint256","name":"_boostedTimePeriod","type":"uint256"},{"internalType":"uint256","name":"_boost","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"}],"name":"AddToContractWhitelist","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":"_contract","type":"address"}],"name":"RemoveFromContractWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"}],"name":"RewardCompounded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"RewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"addToContractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedTimePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"DPXtokensEarned","type":"uint256"},{"internalType":"uint256","name":"RDPXtokensEarned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardsTokenID","type":"uint256"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeFromContractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStoredDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStoredRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenRDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":[{"internalType":"address","name":"","type":"address"}],"name":"userDPXRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRDPXRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040526000600555600060065560006007556000600855600060095534801561002957600080fd5b5060405161252f38038061252f833981810160405260c081101561004c57600080fd5b508051602082015160408301516060840151608085015160a090950151600160009081559495939492939192610080610120565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600280546001600160a01b03199081166001600160a01b039889161790915560038054821696881696909617909555600480549095169390951692909217909255600a91909155600e55600555610124565b3390565b6123fc806101336000396000f3fe6080604052600436106102195760003560e01c80638da5cb5b11610123578063c11e1e4b116100ab578063e363208e1161006f578063e363208e14610694578063e9fad8ee146106a9578063ebe2b12b146106be578063f2fde38b146106d3578063f69e20461461070657610219565b8063c11e1e4b146105ef578063c3d9ed3914610622578063c8f33c9114610655578063c9b6b2b11461066a578063cd3daf9d1461067f57610219565b8063ac2c5413116100f2578063ac2c54131461054a578063acc3a0061461055f578063ad46a40c14610592578063af640d0f146105a7578063bc1e25dc146105bc57610219565b80638da5cb5b146104d0578063a1411e67146104e5578063a66f42c014610518578063a694fc3a1461052d57610219565b8063370243dc116101a657806370a082311161017557806370a0823114610449578063715018a61461047c57806372f702f31461049157806380faa57d146104a65780638a0dfa0d146104bb57610219565b8063370243dc146103d7578063386a9525146103ec57806338736f4914610401578063391feebb1461041657610219565b806318156416116101ed578063181564161461030957806318160ddd1461033c5780631c4b774b14610351578063246132f91461037d5780632e1a7d4d146103ad57610219565b80628cc2621461021e5780630131c8701461026a578063080b3ead1461029b57806316279055146102c2575b600080fd5b34801561022a57600080fd5b506102516004803603602081101561024157600080fd5b50356001600160a01b031661071b565b6040805192835260208301919091528051918290030190f35b34801561027657600080fd5b5061027f6107f2565b604080516001600160a01b039092168252519081900360200190f35b3480156102a757600080fd5b506102b0610801565b60408051918252519081900360200190f35b3480156102ce57600080fd5b506102f5600480360360208110156102e557600080fd5b50356001600160a01b0316610807565b604080519115158252519081900360200190f35b34801561031557600080fd5b506102b06004803603602081101561032c57600080fd5b50356001600160a01b031661080d565b34801561034857600080fd5b506102b061081f565b34801561035d57600080fd5b5061037b6004803603602081101561037457600080fd5b5035610825565b005b34801561038957600080fd5b5061037b600480360360408110156103a057600080fd5b5080359060200135610b37565b3480156103b957600080fd5b5061037b600480360360208110156103d057600080fd5b5035610d41565b3480156103e357600080fd5b50610251610f39565b3480156103f857600080fd5b506102b0611137565b34801561040d57600080fd5b506102b061113d565b34801561042257600080fd5b506102f56004803603602081101561043957600080fd5b50356001600160a01b0316611143565b34801561045557600080fd5b506102b06004803603602081101561046c57600080fd5b50356001600160a01b0316611158565b34801561048857600080fd5b5061037b611173565b34801561049d57600080fd5b5061027f611215565b3480156104b257600080fd5b506102b0611224565b3480156104c757600080fd5b506102b0611239565b3480156104dc57600080fd5b5061027f61123f565b3480156104f157600080fd5b506102b06004803603602081101561050857600080fd5b50356001600160a01b031661124e565b34801561052457600080fd5b506102b0611260565b61037b6004803603602081101561054357600080fd5b5035611266565b34801561055657600080fd5b506102b061145e565b34801561056b57600080fd5b506102f56004803603602081101561058257600080fd5b50356001600160a01b0316611464565b34801561059e57600080fd5b506102b06115ab565b3480156105b357600080fd5b506102b06115b1565b3480156105c857600080fd5b506102b0600480360360208110156105df57600080fd5b50356001600160a01b03166115b7565b3480156105fb57600080fd5b506102b06004803603602081101561061257600080fd5b50356001600160a01b03166115c9565b34801561062e57600080fd5b506102f56004803603602081101561064557600080fd5b50356001600160a01b03166115db565b34801561066157600080fd5b506102b06116da565b34801561067657600080fd5b506102b06116e0565b34801561068b57600080fd5b506102516116e6565b3480156106a057600080fd5b5061027f6118d1565b3480156106b557600080fd5b5061037b6118e0565b3480156106ca57600080fd5b506102b0611905565b3480156106df57600080fd5b5061037b600480360360208110156106f657600080fd5b50356001600160a01b031661190b565b34801561071257600080fd5b5061037b611a04565b6000806000806107296116e6565b6001600160a01b0387166000908152601360209081526040808320546011909252909120549294509092506107a09161079a90670de0b6b3a76400009061079490610775908890611ca2565b6001600160a01b038b1660009081526015602052604090205490611ced565b90611d46565b90611d88565b6001600160a01b0386166000908152601460209081526040808320546012909252909120549195506107e99161079a90670de0b6b3a76400009061079490610775908790611ca2565b92505050915091565b6002546001600160a01b031681565b60085481565b3b151590565b60126020526000908152604090205481565b60165490565b6002600054141561086b576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b6002600055336108796116e6565b600d55600c55610887611224565b600b556001600160a01b038116156108e5576108a28161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b816109b157336000908152601360205260409020548061094c576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b33600081815260136020526040812055600254610975916001600160a01b039091169083611de2565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610b2e565b8160011415610a45573360009081526014602052604090205480610a1c576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b33600081815260146020526040812055600354610975916001600160a01b039091169083611de2565b336000908152601360209081526040808320546014909252909120548115610a905733600081815260136020526040812055600254610a90916001600160a01b039091169084611de2565b8015610abf5733600081815260146020526040812055600354610abf916001600160a01b039091169083611de2565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b50506001600055565b610b3f611e39565b6001546001600160a01b03908116911614610b8f576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6000610b996116e6565b600d55600c55610ba7611224565b600b556001600160a01b03811615610c0557610bc28161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b600654610c7a57610c2d610c26600e54600a54611d8890919063ffffffff16565b8490611d46565b600855600e54600a54610c4b91610c449190611d88565b8390611d46565b60095542600b819055600a54610c619190611d88565b600655600e54610c72904290611d88565b600755610d01565b600654600090610c8a9042611ca2565b90506000610ca360085483611ced90919063ffffffff16565b90506000610cbc60095484611ced90919063ffffffff16565b600a54909150610cd0906107948885611d88565b600855600a54610ce4906107948784611d88565b60095542600b819055600a54610cfa9190611d88565b6006555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b60026000541415610d87576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b600260005533610d956116e6565b600d55600c55610da3611224565b600b556001600160a01b03811615610e0157610dbe8161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b60008211610e4a576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260156020526040902054821115610ea4576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601654610eb19083611ca2565b60165533600090815260156020526040902054610ece9083611ca2565b33600081815260156020526040902091909155600454610efa916001600160a01b039091169084611de2565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506001600055565b600080610f44611e39565b6001546001600160a01b03908116911614610f94576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6000610f9e61123f565b90506001600160a01b03811633141561112a57600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610ffc57600080fd5b505afa158015611010573d6000803e3d6000fd5b505050506040513d602081101561102657600080fd5b5051600354604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561107957600080fd5b505afa15801561108d573d6000803e3d6000fd5b505050506040513d60208110156110a357600080fd5b50516002546004549192506001600160a01b03918216911614156110cd57601654820391506110ec565b6003546004546001600160a01b03908116911614156110ec5760165490035b42600655600254611107906001600160a01b03168484611de2565b60035461111e906001600160a01b03168483611de2565b90935091506111339050565b60008092509250505b9091565b600a5481565b600c5481565b60106020526000908152604090205460ff1681565b6001600160a01b031660009081526015602052604090205490565b61117b611e39565b6001546001600160a01b039081169116146111cb576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6004546001600160a01b031681565b60008061123342600654611e3d565b91505090565b60095481565b6001546001600160a01b031690565b60146020526000908152604090205481565b60055481565b61126f33610807565b156112c2573360009081526010602052604090205460ff166112c25760405162461bcd60e51b815260040180806020018281038252602c815260200180612349602c913960400191505060405180910390fd5b60026000541415611308576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b6002600055336113166116e6565b600d55600c55611324611224565b600b556001600160a01b038116156113825761133f8161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b600082116113c8576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6016546113d59083611d88565b601655336000908152601560205260409020546113f29083611d88565b3360008181526015602052604090209190915560045461141f916001600160a01b03909116903085611e53565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001600055565b60075481565b600061146e611e39565b6001546001600160a01b039081169116146114be576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6114c782610807565b6115025760405162461bcd60e51b81526004018080602001828103825260328152602001806122d66032913960400191505060405180910390fd5b6001600160a01b03821660009081526010602052604090205460ff161561155a5760405162461bcd60e51b815260040180806020018281038252602c81526020018061225e602c913960400191505060405180910390fd5b6001600160a01b038216600081815260106020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a2506001919050565b600d5481565b600f5481565b60116020526000908152604090205481565b60136020526000908152604090205481565b60006115e5611e39565b6001546001600160a01b03908116911614611635576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526010602052604090205460ff1661168c5760405162461bcd60e51b815260040180806020018281038252602881526020018061239f6028913960400191505060405180910390fd5b6001600160a01b038216600081815260106020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b600b5481565b600e5481565b60008060165460001415611701575050600c54600d54611133565b6007544210156117a857600061175f611756601654610794670de0b6b3a764000061175061173c600554600854611ced90919063ffffffff16565b611750600b5461174a611224565b90611ca2565b90611ced565b600c5490611d88565b9050600061179b611792601654610794670de0b6b3a764000061175061173c600554600954611ced90919063ffffffff16565b600d5490611d88565b9193509091506111339050565b600754600b54101561187957600061181d6117df601654610794670de0b6b3a764000061175060085461175060075461174a611224565b61079a611756601654610794670de0b6b3a764000061175061180e600554600854611ced90919063ffffffff16565b600b5460075461175091611ca2565b9050600061179b61184a601654610794670de0b6b3a764000061175060095461175060075461174a611224565b61079a611792601654610794670de0b6b3a764000061175061180e600554600954611ced90919063ffffffff16565b60006118a4611756601654610794670de0b6b3a7640000611750600854611750600b5461174a611224565b9050600061179b611792601654610794670de0b6b3a7640000611750600954611750600b5461174a611224565b6003546001600160a01b031681565b6118ea6002610825565b3360009081526015602052604090205461190390610d41565b565b60065481565b611913611e39565b6001546001600160a01b03908116911614611963576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6001600160a01b0381166119a85760405162461bcd60e51b815260040180806020018281038252602681526020018061228a6026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b60026000541415611a4a576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b600260005533611a586116e6565b600d55600c55611a66611224565b600b556001600160a01b03811615611ac457611a818161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b6002546004546001600160a01b0390811691161415611bc2573360009081526013602052604090205480611b39576040805162461bcd60e51b81526020600482015260176024820152761cdd185ad9481859191c995cdcc81b9bdd08199bdd5b99604a1b604482015290519081900360640190fd5b33600090815260136020526040812055601654611b569082611d88565b60165533600090815260156020526040902054611b739082611d88565b33600081815260156020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a250611c9a565b6003546004546001600160a01b0390811691161415611c54573360009081526014602052604090205480611c37576040805162461bcd60e51b81526020600482015260176024820152761cdd185ad9481859191c995cdcc81b9bdd08199bdd5b99604a1b604482015290519081900360640190fd5b33600090815260146020526040812055601654611b569082611d88565b6040805162461bcd60e51b81526020600482015260166024820152751cdd185ada5b99d51bdad95b881b9bdd08199bdd5b9960521b604482015290519081900360640190fd5b506001600055565b6000611ce483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611eb3565b90505b92915050565b600082611cfc57506000611ce7565b82820282848281611d0957fe5b0414611ce45760405162461bcd60e51b81526004018080602001828103825260218152602001806123086021913960400191505060405180910390fd5b6000611ce483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f4f565b600082820183811015611ce4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611e34908490611fb4565b505050565b3390565b6000818310611e4c5781611ce4565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611ead908590611fb4565b50505050565b60008184841115611f425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f07578181015183820152602001611eef565b50505050905090810190601f168015611f345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611f9e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611f07578181015183820152602001611eef565b506000838581611faa57fe5b0495945050505050565b6000612009826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120659092919063ffffffff16565b805190915015611e345780806020019051602081101561202857600080fd5b5051611e345760405162461bcd60e51b815260040180806020018281038252602a815260200180612375602a913960400191505060405180910390fd5b6060612074848460008561207c565b949350505050565b6060824710156120bd5760405162461bcd60e51b81526004018080602001828103825260268152602001806122b06026913960400191505060405180910390fd5b6120c685610807565b612117576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106121555780518252601f199092019160209182019101612136565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146121b7576040519150601f19603f3d011682016040523d82523d6000602084013e6121bc565b606091505b50915091506121cc8282866121d7565b979650505050505050565b606083156121e6575081611f48565b8251156121f65782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611f07578181015183820152602001611eef56fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005374616b696e67526577617264733a20436f6e747261637420616c72656164792077686974656c69737465644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e67526577617264733a2041646472657373206d757374206265206120636f6e74726163742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e67526577617264733a20436f6e7472616374206d7573742062652077686974656c69737465645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645374616b696e67526577617264733a20436f6e7472616374206e6f742077686974656c6973746564a2646970667358221220231ff7c7bfe9b9cf0683b82ceb78610038dae76ab82c2ba48b9195d3a5d472b464736f6c634300070600330000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a21200000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212000000000000000000000000000000000000000000000000000000000076a7000000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000000002

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

0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a21200000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212000000000000000000000000000000000000000000000000000000000076a7000000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000000002

-----Decoded View---------------
Arg [0] : _rewardsTokenDPX (address): 0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [1] : _rewardsTokenRDPX (address): 0x32eb7902d4134bf98a28b963d26de779af92a212
Arg [2] : _stakingToken (address): 0x32eb7902d4134bf98a28b963d26de779af92a212
Arg [3] : _rewardsDuration (uint256): 7776000
Arg [4] : _boostedTimePeriod (uint256): 604800
Arg [5] : _boost (uint256): 2

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [1] : 00000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212
Arg [2] : 00000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212
Arg [3] : 000000000000000000000000000000000000000000000000000000000076a700
Arg [4] : 0000000000000000000000000000000000000000000000000000000000093a80
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002


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