Contract 0xc6D714170fE766691670f12c2b45C1f34405AAb6 5

 

Contract Overview

Dopex: Retired DPX Farm
Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x493ea8779641b6bf053c660231dcfff42804aef4022f902d2dffa5107a0e19aaWithdraw196421722022-08-07 16:27:1612 hrs 18 mins ago0xba4980ac5a114fbf0000adb1f8b0ed153bae96ba IN Dopex: Retired DPX Farm0 ETH0.000044953101 ETH
0x83f7de32960381106a31e14a144a72de25865c6ab7d9ef7c204733e96edb32b5Compound195654752022-08-06 19:46:541 day 8 hrs ago0xba4980ac5a114fbf0000adb1f8b0ed153bae96ba IN Dopex: Retired DPX Farm0 ETH0.000040098609 ETH
0x8935bfb3ef7d969c97e542fe27087cedce27e388970af55c4804ffc4ebfae448Compound195649542022-08-06 19:37:051 day 9 hrs ago0xba4980ac5a114fbf0000adb1f8b0ed153bae96ba IN Dopex: Retired DPX Farm0 ETH0.000040094546 ETH
0xab42cf28d08845887bde250e64b3a9d8526ca940c8cab9ed38b2a022c806732bWithdraw192292592022-08-02 21:34:175 days 7 hrs ago0x300772d881e58a4eb2bb0844d5fc9b2e5476b31b IN Dopex: Retired DPX Farm0 ETH0.00007769412 ETH
0xa33f0d8877f74e697b149dc9b9fd4aeb3f1b96e6e46d53af96216986893d9f0cWithdraw190408462022-07-31 14:11:377 days 14 hrs ago0x70b9da24c1af003c61338e87d1b460c5a8dcdd0a IN Dopex: Retired DPX Farm0 ETH0.000032904752 ETH
0x6a75f5778825e96d869efde390b1d47aecccb592e9ebf8b4d5a28d5e2a91edf2Compound187457252022-07-28 3:52:3211 days 53 mins ago0x3a781cb383b65a1fff97ce061c3d35a1c09e6960 IN Dopex: Retired DPX Farm0 ETH0.000093459069 ETH
0x1dd3fe2dad3d7d91ae890556ef4d6fdacbd4f21e5ce65d479c11b2828de32e3aStake185600012022-07-25 20:52:4813 days 7 hrs ago0x300772d881e58a4eb2bb0844d5fc9b2e5476b31b IN Dopex: Retired DPX Farm0 ETH0.000141055411 ETH
0x8f5cd1c6c5e2f9d648c804bab0025f35cb4735ce16575d3aacafd89b486b0e9fWithdraw184631322022-07-24 18:00:0914 days 10 hrs ago0x7b5e7553ed40d1062ee948f577247b9214fac9bb IN Dopex: Retired DPX Farm0 ETH0.000072573591 ETH
0x41a229a2b97634264764a60246cbe51c9b783ee777e5b0447636f92594c427bcStake182826182022-07-22 9:21:2416 days 19 hrs ago0x3a529617384a3e044cd08ac0a45a687105d49316 IN Dopex: Retired DPX Farm0 ETH0.000091548271 ETH
0x3020f7be64ecedb212f3ca78624b7830d9903c8562ab666475e0eb998d321077Stake179955732022-07-19 7:32:4519 days 21 hrs ago0xcce806114b6cc9df239821ba1373c44bafe9b200 IN Dopex: Retired DPX Farm0 ETH0.000140346467 ETH
0x87b52cedece10fa554a76f22ec951aa6e675009d3ff4b90698e3dbea2d43e4e2Get Reward178995012022-07-18 9:13:0620 days 19 hrs ago0x697f21718a14a93bd76b1b97b32dc02f1f3ff382 IN Dopex: Retired DPX Farm0 ETH0.000090854793 ETH
0x8769d626ce813f27e08f308d28dc9a25bc6bb00c34cb9428ca1d77294313e3e5Get Reward178991892022-07-18 9:08:1220 days 19 hrs ago0x697f21718a14a93bd76b1b97b32dc02f1f3ff382 IN Dopex: Retired DPX Farm0 ETH0.000091060029 ETH
0x174976f93b74826763affc3fe8d18590fbf97cb84563d315a6b9f524868926f9Withdraw178989692022-07-18 9:05:2220 days 19 hrs ago0x697f21718a14a93bd76b1b97b32dc02f1f3ff382 IN Dopex: Retired DPX Farm0 ETH0.000092675702 ETH
0x3f9de291a72c6013dbac2f4d7db75616d1c34b86f4bce96c337893c15f1db074Withdraw Reward ...178980762022-07-18 8:50:5920 days 19 hrs ago0x697f21718a14a93bd76b1b97b32dc02f1f3ff382 IN Dopex: Retired DPX Farm0 ETH0.000096140347 ETH
0xa9556acbd2a5868ef870a365b39e8171872ac36db04810b8190dd6bfb2367567Withdraw178188232022-07-17 9:03:5521 days 19 hrs ago0xcd79272e57a870c0b1f69a8c840244364c4a0260 IN Dopex: Retired DPX Farm0 ETH0.000091518464 ETH
0xb2ab409c0c75c899d71a49da9922657849c7c7cd53eaa94e870c3d2603c4a611Stake177891432022-07-17 0:32:1722 days 4 hrs ago0xd15ace00c0f9581ceeab362b81a70d09f1f112fc IN Dopex: Retired DPX Farm0 ETH0.000108483948 ETH
0xd8c0bb3706bf6ead3eb4283fb695bc9abfca8a6886c88daa3d8a16129c19dd2dExit177688202022-07-16 17:07:0422 days 11 hrs ago0xd106e57b04975cbebf26d52cdaa722e29f29b93f IN Dopex: Retired DPX Farm0 ETH0.000089202954 ETH
0x30f17e5af1b8baadf3f24fb01124e59bddb2721f09a23b53867144a951381154Withdraw177592952022-07-16 14:33:2222 days 14 hrs ago0x0a8f8b7345782b8323b37f344e823200498131f2 IN Dopex: Retired DPX Farm0 ETH0.000073397976 ETH
0x43445386b7b411fd03a310963313c385d59c78224fd3fd42cc5b2d941fb53dfeCompound177591832022-07-16 14:31:5222 days 14 hrs ago0x0a8f8b7345782b8323b37f344e823200498131f2 IN Dopex: Retired DPX Farm0 ETH0.00006882959 ETH
0x0381f7eab9354e16154ae3cfd00e02a1465ec70f0bcbf0c612f609609635d647Withdraw177591502022-07-16 14:30:2322 days 14 hrs ago0x0a8f8b7345782b8323b37f344e823200498131f2 IN Dopex: Retired DPX Farm0 ETH0.000072053431 ETH
0x51e8f1080c57718f201c80eec9547d2a528faf2f5bb9fce4c147b41ac6490f85Withdraw Reward ...177590572022-07-16 14:29:2722 days 14 hrs ago0x0a8f8b7345782b8323b37f344e823200498131f2 IN Dopex: Retired DPX Farm0 ETH0.000076552531 ETH
0x5e61ae238a68f78355e55d0a0bc09477d226b1f9c7c988b1a8d89f605980a275Withdraw177590022022-07-16 14:28:1122 days 14 hrs ago0x0a8f8b7345782b8323b37f344e823200498131f2 IN Dopex: Retired DPX Farm0 ETH0.000073613588 ETH
0xe176c5ff2d0144366212a01294db7fbf53cc6420dde29698da19d6f9a644e3e9Get Reward176434812022-07-14 18:40:1724 days 10 hrs ago0x81818e94f63c6f31569dc69d26cc79558bfbfda8 IN Dopex: Retired DPX Farm0 ETH0.000153699156 ETH
0x3417a53938da0c6c410e09452e3ad95078f4b316ce45bce07fa18205b14d30bdGet Reward176431762022-07-14 18:33:5324 days 10 hrs ago0x81818e94f63c6f31569dc69d26cc79558bfbfda8 IN Dopex: Retired DPX Farm0 ETH0.000162364934 ETH
0x116437b089e1f6332c6eb87a1001239a896a5c40426f64d1e6d64ea228230680Withdraw Reward ...176431272022-07-14 18:32:5224 days 10 hrs ago0x81818e94f63c6f31569dc69d26cc79558bfbfda8 IN Dopex: Retired DPX Farm0 ETH0.000163533955 ETH
[ Download CSV Export 

OVERVIEW

The retired DPX single staking farm. This was retired on 27th June 2022. Please avoid staking any tokens into the farm as it will result in a loss of tokens.

Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x8ec94defa2d4425c4de2669fbea382b6e3acaed58d6dc04aba8502941d6ebf34196555252022-08-07 21:05:187 hrs 40 mins ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x8ec94defa2d4425c4de2669fbea382b6e3acaed58d6dc04aba8502941d6ebf34196555252022-08-07 21:05:187 hrs 40 mins ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x7b73090344d7bf8192aa9d203e8612369b1fbb567c9040acc3bba15be091656e196554912022-08-07 21:05:057 hrs 40 mins ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x7b73090344d7bf8192aa9d203e8612369b1fbb567c9040acc3bba15be091656e196554912022-08-07 21:05:057 hrs 40 mins ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x9d38cd760d31ec9a25dfa25cf3dddeb532221f3644db61cc2fc5819b1bdc716f196450742022-08-07 17:17:5211 hrs 28 mins ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x9d38cd760d31ec9a25dfa25cf3dddeb532221f3644db61cc2fc5819b1bdc716f196450742022-08-07 17:17:5211 hrs 28 mins ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x87a7aa5e4b95a431701b4bad7786799f072f75263181a70036869f20989fcf21196450452022-08-07 17:16:1511 hrs 29 mins ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x87a7aa5e4b95a431701b4bad7786799f072f75263181a70036869f20989fcf21196450452022-08-07 17:16:1511 hrs 29 mins ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x493ea8779641b6bf053c660231dcfff42804aef4022f902d2dffa5107a0e19aa196421722022-08-07 16:27:1612 hrs 18 mins ago Dopex: Retired DPX FarmDopex: DPX Token0 ETH
0xb56bfa12617df143c2bc12dde894b7e0f89095621b9a761f79f846186bdb8e63196370712022-08-07 15:09:0113 hrs 36 mins ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0xb56bfa12617df143c2bc12dde894b7e0f89095621b9a761f79f846186bdb8e63196370712022-08-07 15:09:0113 hrs 36 mins ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x3f437ee3083fc1d436a2d5cd09bbf957d8c32d96aadcbfb6581b8f3ee537cb22195473812022-08-06 15:07:501 day 13 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x3f437ee3083fc1d436a2d5cd09bbf957d8c32d96aadcbfb6581b8f3ee537cb22195473812022-08-06 15:07:501 day 13 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x374644974e7afa745806c1bc6e43e9654fe529417cf2fcec987f7fa97bcebd18195146562022-08-06 6:22:091 day 22 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x374644974e7afa745806c1bc6e43e9654fe529417cf2fcec987f7fa97bcebd18195146562022-08-06 6:22:091 day 22 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0xa6ceaaec2e846710777430d55c29d9b1aac57146d06dbc745832e5674365df2d195144172022-08-06 6:18:001 day 22 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0xa6ceaaec2e846710777430d55c29d9b1aac57146d06dbc745832e5674365df2d195144172022-08-06 6:18:001 day 22 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x73b46ccdb475bcb95faef4489f8b2a1427eb9eb3e82ae8bac7af56223049a052195020402022-08-06 2:01:542 days 2 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x73b46ccdb475bcb95faef4489f8b2a1427eb9eb3e82ae8bac7af56223049a052195020402022-08-06 2:01:542 days 2 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x079ffb315de8f72dba0f8ff5a6fcfebba3f35d7d8ad97faf6ec94ef559dfe15b194840742022-08-05 19:48:322 days 8 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x079ffb315de8f72dba0f8ff5a6fcfebba3f35d7d8ad97faf6ec94ef559dfe15b194840742022-08-05 19:48:322 days 8 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0xb1eb62b43ec1d09dc54dbc42ff5ef49ca59d33d621733507acb41832b542c087194431062022-08-05 10:41:582 days 18 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0xb1eb62b43ec1d09dc54dbc42ff5ef49ca59d33d621733507acb41832b542c087194431062022-08-05 10:41:582 days 18 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
0x3c568240a02c5c47fec03464d30aef9682237f9a979c569f334671d0834ef9d4193929962022-08-04 18:39:433 days 10 hrs ago 0xc046f44ed68014f048eca0010a642749ebe34b03Dopex: Retired DPX Farm0 ETH
0x3c568240a02c5c47fec03464d30aef9682237f9a979c569f334671d0834ef9d4193929962022-08-04 18:39:433 days 10 hrs ago 0x6052213c67a539a91a1a88842dd81785601ddd13Dopex: Retired DPX Farm0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewards

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 11 : StakingRewards.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';
import './RewardsDistributionRecipient.sol';

contract StakingRewards is RewardsDistributionRecipient, 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 _rewardsDistribution,
    address _rewardsTokenDPX,
    address _rewardsTokenRDPX,
    address _stakingToken,
    uint256 _rewardsDuration,
    uint256 _boostedTimePeriod,
    uint256 _boost,
    uint256 _id
  ) Ownable() {
    rewardsTokenDPX = IERC20(_rewardsTokenDPX);
    rewardsTokenRDPX = IERC20(_rewardsTokenRDPX);
    stakingToken = IERC20(_stakingToken);
    rewardsDistribution = _rewardsDistribution;
    rewardsDuration = _rewardsDuration;
    boostedTimePeriod = _boostedTimePeriod;
    boost = _boost;
    id = _id;
  }

  /* ========== 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(uint256 amountDPX, uint256 amountRDPX)
    public
    onlyOwner
    returns (uint256, uint256)
  {
    address OwnerAddress = owner();
    if (OwnerAddress == msg.sender) {
      IERC20(rewardsTokenDPX).safeTransfer(OwnerAddress, amountDPX);
      IERC20(rewardsTokenRDPX).safeTransfer(OwnerAddress, amountRDPX);
    }
    return (amountDPX, amountRDPX);
  }

  function compound() public nonReentrant updateReward(msg.sender) {
    uint256 rewardDPX = rewardsDPX[msg.sender];
    require(rewardDPX > 0, 'stake address not found');
    require(rewardsTokenDPX == stakingToken, "Can't stake the reward token.");
    rewardsDPX[msg.sender] = 0;
    _totalSupply = _totalSupply.add(rewardDPX);
    _balances[msg.sender] = _balances[msg.sender].add(rewardDPX);
    emit RewardCompounded(msg.sender, rewardDPX);
  }

  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
    override
    onlyRewardsDistribution
    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 11 : 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 11 : 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 11 : 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 11 : 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 11 : 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 11 : 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 11 : 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 11 : RewardsDistributionRecipient.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

abstract contract RewardsDistributionRecipient {
  address public rewardsDistribution;

  function notifyRewardAmount(uint256 rewardDPX, uint256 rewardRDPX) external virtual;

  modifier onlyRewardsDistribution() {
    require(msg.sender == rewardsDistribution, 'Caller is not RewardsDistribution contract');
    _;
  }
}

File 10 of 11 : 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 11 of 11 : 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":"_rewardsDistribution","type":"address"},{"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"},{"internalType":"uint256","name":"_id","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":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"uint256","name":"amountDPX","type":"uint256"},{"internalType":"uint256","name":"amountRDPX","type":"uint256"}],"name":"withdrawRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

608060405260006006556000600755600060085560006009556000600a5534801561002957600080fd5b506040516123de3803806123de833981810160405261010081101561004d57600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015160018055959694959394929391929091600061008e610144565b600280546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b03199081166001600160a01b03998a16179091556004805482169789169790971790965560058054871695881695909517909455600080549095169690951695909517909255600b91909155600f92909255600655601055610148565b3390565b612287806101576000396000f3fe6080604052600436106102245760003560e01c80638da5cb5b11610123578063c11e1e4b116100ab578063e363208e1161006f578063e363208e146106cf578063e9fad8ee146106e4578063ebe2b12b146106f9578063f2fde38b1461070e578063f69e20461461074157610224565b8063c11e1e4b1461062a578063c3d9ed391461065d578063c8f33c9114610690578063c9b6b2b1146106a5578063cd3daf9d146106ba57610224565b8063ac2c5413116100f2578063ac2c541314610585578063acc3a0061461059a578063ad46a40c146105cd578063af640d0f146105e2578063bc1e25dc146105f757610224565b80638da5cb5b1461050b578063a1411e6714610520578063a66f42c014610553578063a694fc3a1461056857610224565b80632e1a7d4d116101b157806370a082311161017557806370a0823114610484578063715018a6146104b757806372f702f3146104cc57806380faa57d146104e15780638a0dfa0d146104f657610224565b80632e1a7d4d146103e8578063386a95251461041257806338736f4914610427578063391feebb1461043c5780633fc6df6e1461046f57610224565b806318156416116101f8578063181564161461031457806318160ddd146103475780631c4b774b1461035c578063246132f9146103885780632729f584146103b857610224565b80628cc262146102295780630131c87014610275578063080b3ead146102a657806316279055146102cd575b600080fd5b34801561023557600080fd5b5061025c6004803603602081101561024c57600080fd5b50356001600160a01b0316610756565b6040805192835260208301919091528051918290030190f35b34801561028157600080fd5b5061028a61082d565b604080516001600160a01b039092168252519081900360200190f35b3480156102b257600080fd5b506102bb61083c565b60408051918252519081900360200190f35b3480156102d957600080fd5b50610300600480360360208110156102f057600080fd5b50356001600160a01b0316610842565b604080519115158252519081900360200190f35b34801561032057600080fd5b506102bb6004803603602081101561033757600080fd5b50356001600160a01b0316610848565b34801561035357600080fd5b506102bb61085a565b34801561036857600080fd5b506103866004803603602081101561037f57600080fd5b5035610860565b005b34801561039457600080fd5b50610386600480360360408110156103ab57600080fd5b5080359060200135610b71565b3480156103c457600080fd5b5061025c600480360360408110156103db57600080fd5b5080359060200135610d6c565b3480156103f457600080fd5b506103866004803603602081101561040b57600080fd5b5035610e1b565b34801561041e57600080fd5b506102bb611012565b34801561043357600080fd5b506102bb611018565b34801561044857600080fd5b506103006004803603602081101561045f57600080fd5b50356001600160a01b031661101e565b34801561047b57600080fd5b5061028a611033565b34801561049057600080fd5b506102bb600480360360208110156104a757600080fd5b50356001600160a01b0316611042565b3480156104c357600080fd5b5061038661105d565b3480156104d857600080fd5b5061028a6110ff565b3480156104ed57600080fd5b506102bb61110e565b34801561050257600080fd5b506102bb611123565b34801561051757600080fd5b5061028a611129565b34801561052c57600080fd5b506102bb6004803603602081101561054357600080fd5b50356001600160a01b0316611138565b34801561055f57600080fd5b506102bb61114a565b6103866004803603602081101561057e57600080fd5b5035611150565b34801561059157600080fd5b506102bb611347565b3480156105a657600080fd5b50610300600480360360208110156105bd57600080fd5b50356001600160a01b031661134d565b3480156105d957600080fd5b506102bb611494565b3480156105ee57600080fd5b506102bb61149a565b34801561060357600080fd5b506102bb6004803603602081101561061a57600080fd5b50356001600160a01b03166114a0565b34801561063657600080fd5b506102bb6004803603602081101561064d57600080fd5b50356001600160a01b03166114b2565b34801561066957600080fd5b506103006004803603602081101561068057600080fd5b50356001600160a01b03166114c4565b34801561069c57600080fd5b506102bb6115c3565b3480156106b157600080fd5b506102bb6115c9565b3480156106c657600080fd5b5061025c6115cf565b3480156106db57600080fd5b5061028a6117be565b3480156106f057600080fd5b506103866117cd565b34801561070557600080fd5b506102bb6117f2565b34801561071a57600080fd5b506103866004803603602081101561073157600080fd5b50356001600160a01b03166117f8565b34801561074d57600080fd5b506103866118f1565b6000806000806107646115cf565b6001600160a01b0387166000908152601460209081526040808320546012909252909120549294509092506107db916107d590670de0b6b3a7640000906107cf906107b0908890611b03565b6001600160a01b038b1660009081526016602052604090205490611b4e565b90611ba7565b90611be9565b6001600160a01b038616600090815260156020908152604080832054601390925290912054919550610824916107d590670de0b6b3a7640000906107cf906107b0908790611b03565b92505050915091565b6003546001600160a01b031681565b60095481565b3b151590565b60136020526000908152604090205481565b60175490565b600260015414156108a6576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336108b46115cf565b600e55600d556108c261110e565b600c556001600160a01b03811615610920576108dd81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b816109ec573360009081526014602052604090205480610987576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b336000818152601460205260408120556003546109b0916001600160a01b039091169083611c43565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610b69565b8160011415610a80573360009081526015602052604090205480610a57576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b336000818152601560205260408120556004546109b0916001600160a01b039091169083611c43565b336000908152601460209081526040808320546015909252909120548115610acb5733600081815260146020526040812055600354610acb916001600160a01b039091169084611c43565b8015610afa5733600081815260156020526040812055600454610afa916001600160a01b039091169083611c43565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b505060018055565b6000546001600160a01b03163314610bba5760405162461bcd60e51b815260040180806020018281038252602a8152602001806121d6602a913960400191505060405180910390fd5b6000610bc46115cf565b600e55600d55610bd261110e565b600c556001600160a01b03811615610c3057610bed81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600754610ca557610c58610c51600f54600b54611be990919063ffffffff16565b8490611ba7565b600955600f54600b54610c7691610c6f9190611be9565b8390611ba7565b600a5542600c819055600b54610c8c9190611be9565b600755600f54610c9d904290611be9565b600855610d2c565b600754600090610cb59042611b03565b90506000610cce60095483611b4e90919063ffffffff16565b90506000610ce7600a5484611b4e90919063ffffffff16565b600b54909150610cfb906107cf8885611be9565b600955600b54610d0f906107cf8784611be9565b600a5542600c819055600b54610d259190611be9565b6007555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b600080610d77611c9a565b6002546001600160a01b03908116911614610dc7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6000610dd1611129565b90506001600160a01b038116331415610e1257600354610dfb906001600160a01b03168287611c43565b600454610e12906001600160a01b03168286611c43565b50929391925050565b60026001541415610e61576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b600260015533610e6f6115cf565b600e55600d55610e7d61110e565b600c556001600160a01b03811615610edb57610e9881610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b60008211610f24576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260166020526040902054821115610f7e576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601754610f8b9083611b03565b60175533600090815260166020526040902054610fa89083611b03565b33600081815260166020526040902091909155600554610fd4916001600160a01b039091169084611c43565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b600b5481565b600d5481565b60116020526000908152604090205460ff1681565b6000546001600160a01b031681565b6001600160a01b031660009081526016602052604090205490565b611065611c9a565b6002546001600160a01b039081169116146110b5576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6005546001600160a01b031681565b60008061111d42600754611c9e565b91505090565b600a5481565b6002546001600160a01b031690565b60156020526000908152604090205481565b60065481565b61115933610842565b156111ac573360009081526011602052604090205460ff166111ac5760405162461bcd60e51b815260040180806020018281038252602c8152602001806121aa602c913960400191505060405180910390fd5b600260015414156111f2576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336112006115cf565b600e55600d5561120e61110e565b600c556001600160a01b0381161561126c5761122981610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600082116112b2576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6017546112bf9083611be9565b601755336000908152601660205260409020546112dc9083611be9565b33600081815260166020526040902091909155600554611309916001600160a01b03909116903085611cb4565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60085481565b6000611357611c9a565b6002546001600160a01b039081169116146113a7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6113b082610842565b6113eb5760405162461bcd60e51b81526004018080602001828103825260328152602001806121376032913960400191505060405180910390fd5b6001600160a01b03821660009081526011602052604090205460ff16156114435760405162461bcd60e51b815260040180806020018281038252602c8152602001806120bf602c913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a2506001919050565b600e5481565b60105481565b60126020526000908152604090205481565b60146020526000908152604090205481565b60006114ce611c9a565b6002546001600160a01b0390811691161461151e576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff166115755760405162461bcd60e51b815260040180806020018281038252602881526020018061222a6028913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b600c5481565b600f5481565b600080601754600014156115ea575050600d54600e546117ba565b60085442101561169157600061164861163f6017546107cf670de0b6b3a7640000611639611625600654600954611b4e90919063ffffffff16565b611639600c5461163361110e565b90611b03565b90611b4e565b600d5490611be9565b9050600061168461167b6017546107cf670de0b6b3a7640000611639611625600654600a54611b4e90919063ffffffff16565b600e5490611be9565b9193509091506117ba9050565b600854600c5410156117625760006117066116c86017546107cf670de0b6b3a764000061163960095461163960085461163361110e565b6107d561163f6017546107cf670de0b6b3a76400006116396116f7600654600954611b4e90919063ffffffff16565b600c5460085461163991611b03565b905060006116846117336017546107cf670de0b6b3a7640000611639600a5461163960085461163361110e565b6107d561167b6017546107cf670de0b6b3a76400006116396116f7600654600a54611b4e90919063ffffffff16565b600061178d61163f6017546107cf670de0b6b3a7640000611639600954611639600c5461163361110e565b9050600061168461167b6017546107cf670de0b6b3a7640000611639600a54611639600c5461163361110e565b9091565b6004546001600160a01b031681565b6117d76002610860565b336000908152601660205260409020546117f090610e1b565b565b60075481565b611800611c9a565b6002546001600160a01b03908116911614611850576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b0381166118955760405162461bcd60e51b81526004018080602001828103825260268152602001806120eb6026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611937576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336119456115cf565b600e55600d5561195361110e565b600c556001600160a01b038116156119b15761196e81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b3360009081526014602052604090205480611a13576040805162461bcd60e51b815260206004820152601760248201527f7374616b652061646472657373206e6f7420666f756e64000000000000000000604482015290519081900360640190fd5b6005546003546001600160a01b03908116911614611a78576040805162461bcd60e51b815260206004820152601d60248201527f43616e2774207374616b65207468652072657761726420746f6b656e2e000000604482015290519081900360640190fd5b33600090815260146020526040812055601754611a959082611be9565b60175533600090815260166020526040902054611ab29082611be9565b33600081815260166020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a2505060018055565b6000611b4583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d14565b90505b92915050565b600082611b5d57506000611b48565b82820282848281611b6a57fe5b0414611b455760405162461bcd60e51b81526004018080602001828103825260218152602001806121696021913960400191505060405180910390fd5b6000611b4583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611db0565b600082820183811015611b45576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611c95908490611e15565b505050565b3390565b6000818310611cad5781611b45565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d0e908590611e15565b50505050565b60008184841115611da35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d68578181015183820152602001611d50565b50505050905090810190601f168015611d955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611dff5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d68578181015183820152602001611d50565b506000838581611e0b57fe5b0495945050505050565b6000611e6a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ec69092919063ffffffff16565b805190915015611c9557808060200190516020811015611e8957600080fd5b5051611c955760405162461bcd60e51b815260040180806020018281038252602a815260200180612200602a913960400191505060405180910390fd5b6060611ed58484600085611edd565b949350505050565b606082471015611f1e5760405162461bcd60e51b81526004018080602001828103825260268152602001806121116026913960400191505060405180910390fd5b611f2785610842565b611f78576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611fb65780518252601f199092019160209182019101611f97565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612018576040519150601f19603f3d011682016040523d82523d6000602084013e61201d565b606091505b509150915061202d828286612038565b979650505050505050565b60608315612047575081611da9565b8251156120575782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611d68578181015183820152602001611d5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005374616b696e67526577617264733a20436f6e747261637420616c72656164792077686974656c69737465644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e67526577617264733a2041646472657373206d757374206265206120636f6e74726163742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e67526577617264733a20436f6e7472616374206d7573742062652077686974656c697374656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645374616b696e67526577617264733a20436f6e7472616374206e6f742077686974656c6973746564a26469706673582212206400d657659722aa37069f750df6956dc2079e7cd1833e67a53800e4877395d264736f6c63430007060033000000000000000000000000923c88f0aa5998953c01a23cdd1d82852f94aeea0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a2120000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee550000000000000000000000000000000000000000000000000000000003355680000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001

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

000000000000000000000000923c88f0aa5998953c01a23cdd1d82852f94aeea0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a2120000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee550000000000000000000000000000000000000000000000000000000003355680000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0x923c88f0aa5998953c01a23cdd1d82852f94aeea
Arg [1] : _rewardsTokenDPX (address): 0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [2] : _rewardsTokenRDPX (address): 0x32eb7902d4134bf98a28b963d26de779af92a212
Arg [3] : _stakingToken (address): 0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [4] : _rewardsDuration (uint256): 53827200
Arg [5] : _boostedTimePeriod (uint256): 1209600
Arg [6] : _boost (uint256): 2
Arg [7] : _id (uint256): 1

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000923c88f0aa5998953c01a23cdd1d82852f94aeea
Arg [1] : 0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [2] : 00000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212
Arg [3] : 0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [4] : 0000000000000000000000000000000000000000000000000000000003355680
Arg [5] : 0000000000000000000000000000000000000000000000000000000000127500
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001


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.