ETH Price: $2,938.91 (-0.64%)

Contract

0x03ac1Aa1ff470cf376e6b7cD3A3389Ad6D922A74

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Withdraw3286057902025-04-21 6:53:52279 days ago1745218432IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000001470.01
Withdraw1988386062024-04-08 10:00:43657 days ago1712570443IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000001760.01
Withdraw1901317932024-03-14 1:37:35682 days ago1710380255IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000090410.1
Get Reward1901312362024-03-14 1:35:07682 days ago1710380107IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000088730.1
Withdraw1866043642024-03-03 7:13:48693 days ago1709450028IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000087920.1
Withdraw1612845252023-12-18 14:55:03768 days ago1702911303IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000264180.1
Withdraw1595565072023-12-13 1:23:31774 days ago1702430611IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000089230.1
Withdraw1512007192023-11-17 4:19:14800 days ago1700194754IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.00004590.1
Withdraw1485199142023-11-09 0:24:07808 days ago1699489447IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000070210.1
Withdraw1483416202023-11-08 11:31:12808 days ago1699443072IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.00004710.1
Withdraw1467992002023-11-03 18:55:57813 days ago1699037757IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000046510.1
Withdraw1428147052023-10-22 6:19:52826 days ago1697955592IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000027610.1
Withdraw1416666762023-10-18 10:20:04830 days ago1697624404IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.00002770.1
Withdraw1365421432023-10-01 19:39:17846 days ago1696189157IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000026910.1
Withdraw1360078472023-09-30 5:36:48848 days ago1696052208IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000027530.1
Withdraw1232262382023-08-20 11:45:33888 days ago1692531933IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000032570.1
Withdraw1172159482023-08-01 22:00:59907 days ago1690927259IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.00004820.1
Withdraw1102234652023-07-11 20:23:43928 days ago1689107023IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000041440.1
Withdraw1082552172023-07-05 22:51:48934 days ago1688597508IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000082680.1
Withdraw991655192023-06-08 20:50:46961 days ago1686257446IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.00005150.1
Withdraw963996032023-05-31 16:28:24969 days ago1685550504IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000097730.1
Withdraw903700472023-05-13 19:13:51987 days ago1684005231IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000068220.1
Withdraw900430522023-05-12 19:56:52988 days ago1683921412IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000101460.15911
Withdraw889741162023-05-09 16:45:07991 days ago1683650707IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000199420.1
Withdraw772194572023-04-05 7:27:401026 days ago1680679660IN
Dopex: rDPX-WETH Staking Rewards
0 ETH0.000060240.1
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
718049022023-03-20 14:43:051041 days ago1679323385
Dopex: rDPX-WETH Staking Rewards
0 ETH
718045672023-03-20 14:41:411041 days ago1679323301
Dopex: rDPX-WETH Staking Rewards
0 ETH
709490952023-03-18 2:50:031044 days ago1679107803
Dopex: rDPX-WETH Staking Rewards
0 ETH
700142002023-03-15 8:24:141047 days ago1678868654
Dopex: rDPX-WETH Staking Rewards
0 ETH
675611352023-03-07 9:55:261055 days ago1678182926
Dopex: rDPX-WETH Staking Rewards
0 ETH
619242932023-02-17 23:32:031072 days ago1676676723
Dopex: rDPX-WETH Staking Rewards
0 ETH
618665422023-02-17 18:58:331072 days ago1676660313
Dopex: rDPX-WETH Staking Rewards
0 ETH
593704592023-02-09 10:10:141081 days ago1675937414
Dopex: rDPX-WETH Staking Rewards
0 ETH
589072662023-02-07 21:15:521082 days ago1675804552
Dopex: rDPX-WETH Staking Rewards
0 ETH
562467132023-01-29 1:14:311092 days ago1674954871
Dopex: rDPX-WETH Staking Rewards
0 ETH
559660162023-01-27 21:31:011093 days ago1674855061
Dopex: rDPX-WETH Staking Rewards
0 ETH
559524092023-01-27 20:17:381093 days ago1674850658
Dopex: rDPX-WETH Staking Rewards
0 ETH
555569332023-01-26 8:03:381095 days ago1674720218
Dopex: rDPX-WETH Staking Rewards
0 ETH
552949982023-01-25 5:42:041096 days ago1674625324
Dopex: rDPX-WETH Staking Rewards
0 ETH
549570212023-01-23 16:37:041097 days ago1674491824
Dopex: rDPX-WETH Staking Rewards
0 ETH
548487722023-01-23 4:53:121098 days ago1674449592
Dopex: rDPX-WETH Staking Rewards
0 ETH
548439352023-01-23 4:02:271098 days ago1674446547
Dopex: rDPX-WETH Staking Rewards
0 ETH
547851172023-01-22 20:13:321098 days ago1674418412
Dopex: rDPX-WETH Staking Rewards
0 ETH
537054302023-01-17 14:33:171103 days ago1673965997
Dopex: rDPX-WETH Staking Rewards
0 ETH
532951282023-01-15 17:16:241105 days ago1673802984
Dopex: rDPX-WETH Staking Rewards
0 ETH
531619362023-01-15 5:05:361106 days ago1673759136
Dopex: rDPX-WETH Staking Rewards
0 ETH
513852092023-01-07 7:58:431114 days ago1673078323
Dopex: rDPX-WETH Staking Rewards
0 ETH
485299122022-12-24 14:35:351127 days ago1671892535
Dopex: rDPX-WETH Staking Rewards
0 ETH
483989212022-12-24 2:25:361128 days ago1671848736
Dopex: rDPX-WETH Staking Rewards
0 ETH
458910532022-12-13 18:01:501138 days ago1670954510
Dopex: rDPX-WETH Staking Rewards
0 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xc6D71417...34405AAb6
The constructor portion of the code might be different and could alter the actual behaviour of the contract

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)

// 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;
}

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

// 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;
    }
}

// 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");
        }
    }
}

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

// 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;
    }
}

// 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');
    _;
  }
}

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

// 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 Security Audit

Contract ABI

API
[{"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"}]

0x608060405260006006556000600755600060085560006009556000600a5534801561002957600080fd5b506040516123de3803806123de833981810160405261010081101561004d57600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015160018055959694959394929391929091600061008e610144565b600280546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b03199081166001600160a01b03998a16179091556004805482169789169790971790965560058054871695881695909517909455600080549095169690951695909517909255600b91909155600f92909255600655601055610148565b3390565b612287806101576000396000f3fe6080604052600436106102245760003560e01c80638da5cb5b11610123578063c11e1e4b116100ab578063e363208e1161006f578063e363208e146106cf578063e9fad8ee146106e4578063ebe2b12b146106f9578063f2fde38b1461070e578063f69e20461461074157610224565b8063c11e1e4b1461062a578063c3d9ed391461065d578063c8f33c9114610690578063c9b6b2b1146106a5578063cd3daf9d146106ba57610224565b8063ac2c5413116100f2578063ac2c541314610585578063acc3a0061461059a578063ad46a40c146105cd578063af640d0f146105e2578063bc1e25dc146105f757610224565b80638da5cb5b1461050b578063a1411e6714610520578063a66f42c014610553578063a694fc3a1461056857610224565b80632e1a7d4d116101b157806370a082311161017557806370a0823114610484578063715018a6146104b757806372f702f3146104cc57806380faa57d146104e15780638a0dfa0d146104f657610224565b80632e1a7d4d146103e8578063386a95251461041257806338736f4914610427578063391feebb1461043c5780633fc6df6e1461046f57610224565b806318156416116101f8578063181564161461031457806318160ddd146103475780631c4b774b1461035c578063246132f9146103885780632729f584146103b857610224565b80628cc262146102295780630131c87014610275578063080b3ead146102a657806316279055146102cd575b600080fd5b34801561023557600080fd5b5061025c6004803603602081101561024c57600080fd5b50356001600160a01b0316610756565b6040805192835260208301919091528051918290030190f35b34801561028157600080fd5b5061028a61082d565b604080516001600160a01b039092168252519081900360200190f35b3480156102b257600080fd5b506102bb61083c565b60408051918252519081900360200190f35b3480156102d957600080fd5b50610300600480360360208110156102f057600080fd5b50356001600160a01b0316610842565b604080519115158252519081900360200190f35b34801561032057600080fd5b506102bb6004803603602081101561033757600080fd5b50356001600160a01b0316610848565b34801561035357600080fd5b506102bb61085a565b34801561036857600080fd5b506103866004803603602081101561037f57600080fd5b5035610860565b005b34801561039457600080fd5b50610386600480360360408110156103ab57600080fd5b5080359060200135610b71565b3480156103c457600080fd5b5061025c600480360360408110156103db57600080fd5b5080359060200135610d6c565b3480156103f457600080fd5b506103866004803603602081101561040b57600080fd5b5035610e1b565b34801561041e57600080fd5b506102bb611012565b34801561043357600080fd5b506102bb611018565b34801561044857600080fd5b506103006004803603602081101561045f57600080fd5b50356001600160a01b031661101e565b34801561047b57600080fd5b5061028a611033565b34801561049057600080fd5b506102bb600480360360208110156104a757600080fd5b50356001600160a01b0316611042565b3480156104c357600080fd5b5061038661105d565b3480156104d857600080fd5b5061028a6110ff565b3480156104ed57600080fd5b506102bb61110e565b34801561050257600080fd5b506102bb611123565b34801561051757600080fd5b5061028a611129565b34801561052c57600080fd5b506102bb6004803603602081101561054357600080fd5b50356001600160a01b0316611138565b34801561055f57600080fd5b506102bb61114a565b6103866004803603602081101561057e57600080fd5b5035611150565b34801561059157600080fd5b506102bb611347565b3480156105a657600080fd5b50610300600480360360208110156105bd57600080fd5b50356001600160a01b031661134d565b3480156105d957600080fd5b506102bb611494565b3480156105ee57600080fd5b506102bb61149a565b34801561060357600080fd5b506102bb6004803603602081101561061a57600080fd5b50356001600160a01b03166114a0565b34801561063657600080fd5b506102bb6004803603602081101561064d57600080fd5b50356001600160a01b03166114b2565b34801561066957600080fd5b506103006004803603602081101561068057600080fd5b50356001600160a01b03166114c4565b34801561069c57600080fd5b506102bb6115c3565b3480156106b157600080fd5b506102bb6115c9565b3480156106c657600080fd5b5061025c6115cf565b3480156106db57600080fd5b5061028a6117be565b3480156106f057600080fd5b506103866117cd565b34801561070557600080fd5b506102bb6117f2565b34801561071a57600080fd5b506103866004803603602081101561073157600080fd5b50356001600160a01b03166117f8565b34801561074d57600080fd5b506103866118f1565b6000806000806107646115cf565b6001600160a01b0387166000908152601460209081526040808320546012909252909120549294509092506107db916107d590670de0b6b3a7640000906107cf906107b0908890611b03565b6001600160a01b038b1660009081526016602052604090205490611b4e565b90611ba7565b90611be9565b6001600160a01b038616600090815260156020908152604080832054601390925290912054919550610824916107d590670de0b6b3a7640000906107cf906107b0908790611b03565b92505050915091565b6003546001600160a01b031681565b60095481565b3b151590565b60136020526000908152604090205481565b60175490565b600260015414156108a6576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336108b46115cf565b600e55600d556108c261110e565b600c556001600160a01b03811615610920576108dd81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b816109ec573360009081526014602052604090205480610987576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b336000818152601460205260408120556003546109b0916001600160a01b039091169083611c43565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610b69565b8160011415610a80573360009081526015602052604090205480610a57576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b336000818152601560205260408120556004546109b0916001600160a01b039091169083611c43565b336000908152601460209081526040808320546015909252909120548115610acb5733600081815260146020526040812055600354610acb916001600160a01b039091169084611c43565b8015610afa5733600081815260156020526040812055600454610afa916001600160a01b039091169083611c43565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b505060018055565b6000546001600160a01b03163314610bba5760405162461bcd60e51b815260040180806020018281038252602a8152602001806121d6602a913960400191505060405180910390fd5b6000610bc46115cf565b600e55600d55610bd261110e565b600c556001600160a01b03811615610c3057610bed81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600754610ca557610c58610c51600f54600b54611be990919063ffffffff16565b8490611ba7565b600955600f54600b54610c7691610c6f9190611be9565b8390611ba7565b600a5542600c819055600b54610c8c9190611be9565b600755600f54610c9d904290611be9565b600855610d2c565b600754600090610cb59042611b03565b90506000610cce60095483611b4e90919063ffffffff16565b90506000610ce7600a5484611b4e90919063ffffffff16565b600b54909150610cfb906107cf8885611be9565b600955600b54610d0f906107cf8784611be9565b600a5542600c819055600b54610d259190611be9565b6007555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b600080610d77611c9a565b6002546001600160a01b03908116911614610dc7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6000610dd1611129565b90506001600160a01b038116331415610e1257600354610dfb906001600160a01b03168287611c43565b600454610e12906001600160a01b03168286611c43565b50929391925050565b60026001541415610e61576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b600260015533610e6f6115cf565b600e55600d55610e7d61110e565b600c556001600160a01b03811615610edb57610e9881610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b60008211610f24576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260166020526040902054821115610f7e576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601754610f8b9083611b03565b60175533600090815260166020526040902054610fa89083611b03565b33600081815260166020526040902091909155600554610fd4916001600160a01b039091169084611c43565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b600b5481565b600d5481565b60116020526000908152604090205460ff1681565b6000546001600160a01b031681565b6001600160a01b031660009081526016602052604090205490565b611065611c9a565b6002546001600160a01b039081169116146110b5576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6005546001600160a01b031681565b60008061111d42600754611c9e565b91505090565b600a5481565b6002546001600160a01b031690565b60156020526000908152604090205481565b60065481565b61115933610842565b156111ac573360009081526011602052604090205460ff166111ac5760405162461bcd60e51b815260040180806020018281038252602c8152602001806121aa602c913960400191505060405180910390fd5b600260015414156111f2576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336112006115cf565b600e55600d5561120e61110e565b600c556001600160a01b0381161561126c5761122981610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600082116112b2576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6017546112bf9083611be9565b601755336000908152601660205260409020546112dc9083611be9565b33600081815260166020526040902091909155600554611309916001600160a01b03909116903085611cb4565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60085481565b6000611357611c9a565b6002546001600160a01b039081169116146113a7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6113b082610842565b6113eb5760405162461bcd60e51b81526004018080602001828103825260328152602001806121376032913960400191505060405180910390fd5b6001600160a01b03821660009081526011602052604090205460ff16156114435760405162461bcd60e51b815260040180806020018281038252602c8152602001806120bf602c913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a2506001919050565b600e5481565b60105481565b60126020526000908152604090205481565b60146020526000908152604090205481565b60006114ce611c9a565b6002546001600160a01b0390811691161461151e576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff166115755760405162461bcd60e51b815260040180806020018281038252602881526020018061222a6028913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b600c5481565b600f5481565b600080601754600014156115ea575050600d54600e546117ba565b60085442101561169157600061164861163f6017546107cf670de0b6b3a7640000611639611625600654600954611b4e90919063ffffffff16565b611639600c5461163361110e565b90611b03565b90611b4e565b600d5490611be9565b9050600061168461167b6017546107cf670de0b6b3a7640000611639611625600654600a54611b4e90919063ffffffff16565b600e5490611be9565b9193509091506117ba9050565b600854600c5410156117625760006117066116c86017546107cf670de0b6b3a764000061163960095461163960085461163361110e565b6107d561163f6017546107cf670de0b6b3a76400006116396116f7600654600954611b4e90919063ffffffff16565b600c5460085461163991611b03565b905060006116846117336017546107cf670de0b6b3a7640000611639600a5461163960085461163361110e565b6107d561167b6017546107cf670de0b6b3a76400006116396116f7600654600a54611b4e90919063ffffffff16565b600061178d61163f6017546107cf670de0b6b3a7640000611639600954611639600c5461163361110e565b9050600061168461167b6017546107cf670de0b6b3a7640000611639600a54611639600c5461163361110e565b9091565b6004546001600160a01b031681565b6117d76002610860565b336000908152601660205260409020546117f090610e1b565b565b60075481565b611800611c9a565b6002546001600160a01b03908116911614611850576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b0381166118955760405162461bcd60e51b81526004018080602001828103825260268152602001806120eb6026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611937576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336119456115cf565b600e55600d5561195361110e565b600c556001600160a01b038116156119b15761196e81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b3360009081526014602052604090205480611a13576040805162461bcd60e51b815260206004820152601760248201527f7374616b652061646472657373206e6f7420666f756e64000000000000000000604482015290519081900360640190fd5b6005546003546001600160a01b03908116911614611a78576040805162461bcd60e51b815260206004820152601d60248201527f43616e2774207374616b65207468652072657761726420746f6b656e2e000000604482015290519081900360640190fd5b33600090815260146020526040812055601754611a959082611be9565b60175533600090815260166020526040902054611ab29082611be9565b33600081815260166020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a2505060018055565b6000611b4583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d14565b90505b92915050565b600082611b5d57506000611b48565b82820282848281611b6a57fe5b0414611b455760405162461bcd60e51b81526004018080602001828103825260218152602001806121696021913960400191505060405180910390fd5b6000611b4583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611db0565b600082820183811015611b45576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611c95908490611e15565b505050565b3390565b6000818310611cad5781611b45565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d0e908590611e15565b50505050565b60008184841115611da35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d68578181015183820152602001611d50565b50505050905090810190601f168015611d955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611dff5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d68578181015183820152602001611d50565b506000838581611e0b57fe5b0495945050505050565b6000611e6a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ec69092919063ffffffff16565b805190915015611c9557808060200190516020811015611e8957600080fd5b5051611c955760405162461bcd60e51b815260040180806020018281038252602a815260200180612200602a913960400191505060405180910390fd5b6060611ed58484600085611edd565b949350505050565b606082471015611f1e5760405162461bcd60e51b81526004018080602001828103825260268152602001806121116026913960400191505060405180910390fd5b611f2785610842565b611f78576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611fb65780518252601f199092019160209182019101611f97565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612018576040519150601f19603f3d011682016040523d82523d6000602084013e61201d565b606091505b509150915061202d828286612038565b979650505050505050565b60608315612047575081611da9565b8251156120575782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611d68578181015183820152602001611d5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005374616b696e67526577617264733a20436f6e747261637420616c72656164792077686974656c69737465644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e67526577617264733a2041646472657373206d757374206265206120636f6e74726163742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e67526577617264733a20436f6e7472616374206d7573742062652077686974656c697374656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645374616b696e67526577617264733a20436f6e7472616374206e6f742077686974656c6973746564a26469706673582212206400d657659722aa37069f750df6956dc2079e7cd1833e67a53800e4877395d264736f6c63430007060033000000000000000000000000923c88f0aa5998953c01a23cdd1d82852f94aeea0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a2120000000000000000000000007418f5a2621e13c05d1efbd71ec922070794b90a0000000000000000000000000000000000000000000000000000000003355680000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003

Deployed Bytecode

0x6080604052600436106102245760003560e01c80638da5cb5b11610123578063c11e1e4b116100ab578063e363208e1161006f578063e363208e146106cf578063e9fad8ee146106e4578063ebe2b12b146106f9578063f2fde38b1461070e578063f69e20461461074157610224565b8063c11e1e4b1461062a578063c3d9ed391461065d578063c8f33c9114610690578063c9b6b2b1146106a5578063cd3daf9d146106ba57610224565b8063ac2c5413116100f2578063ac2c541314610585578063acc3a0061461059a578063ad46a40c146105cd578063af640d0f146105e2578063bc1e25dc146105f757610224565b80638da5cb5b1461050b578063a1411e6714610520578063a66f42c014610553578063a694fc3a1461056857610224565b80632e1a7d4d116101b157806370a082311161017557806370a0823114610484578063715018a6146104b757806372f702f3146104cc57806380faa57d146104e15780638a0dfa0d146104f657610224565b80632e1a7d4d146103e8578063386a95251461041257806338736f4914610427578063391feebb1461043c5780633fc6df6e1461046f57610224565b806318156416116101f8578063181564161461031457806318160ddd146103475780631c4b774b1461035c578063246132f9146103885780632729f584146103b857610224565b80628cc262146102295780630131c87014610275578063080b3ead146102a657806316279055146102cd575b600080fd5b34801561023557600080fd5b5061025c6004803603602081101561024c57600080fd5b50356001600160a01b0316610756565b6040805192835260208301919091528051918290030190f35b34801561028157600080fd5b5061028a61082d565b604080516001600160a01b039092168252519081900360200190f35b3480156102b257600080fd5b506102bb61083c565b60408051918252519081900360200190f35b3480156102d957600080fd5b50610300600480360360208110156102f057600080fd5b50356001600160a01b0316610842565b604080519115158252519081900360200190f35b34801561032057600080fd5b506102bb6004803603602081101561033757600080fd5b50356001600160a01b0316610848565b34801561035357600080fd5b506102bb61085a565b34801561036857600080fd5b506103866004803603602081101561037f57600080fd5b5035610860565b005b34801561039457600080fd5b50610386600480360360408110156103ab57600080fd5b5080359060200135610b71565b3480156103c457600080fd5b5061025c600480360360408110156103db57600080fd5b5080359060200135610d6c565b3480156103f457600080fd5b506103866004803603602081101561040b57600080fd5b5035610e1b565b34801561041e57600080fd5b506102bb611012565b34801561043357600080fd5b506102bb611018565b34801561044857600080fd5b506103006004803603602081101561045f57600080fd5b50356001600160a01b031661101e565b34801561047b57600080fd5b5061028a611033565b34801561049057600080fd5b506102bb600480360360208110156104a757600080fd5b50356001600160a01b0316611042565b3480156104c357600080fd5b5061038661105d565b3480156104d857600080fd5b5061028a6110ff565b3480156104ed57600080fd5b506102bb61110e565b34801561050257600080fd5b506102bb611123565b34801561051757600080fd5b5061028a611129565b34801561052c57600080fd5b506102bb6004803603602081101561054357600080fd5b50356001600160a01b0316611138565b34801561055f57600080fd5b506102bb61114a565b6103866004803603602081101561057e57600080fd5b5035611150565b34801561059157600080fd5b506102bb611347565b3480156105a657600080fd5b50610300600480360360208110156105bd57600080fd5b50356001600160a01b031661134d565b3480156105d957600080fd5b506102bb611494565b3480156105ee57600080fd5b506102bb61149a565b34801561060357600080fd5b506102bb6004803603602081101561061a57600080fd5b50356001600160a01b03166114a0565b34801561063657600080fd5b506102bb6004803603602081101561064d57600080fd5b50356001600160a01b03166114b2565b34801561066957600080fd5b506103006004803603602081101561068057600080fd5b50356001600160a01b03166114c4565b34801561069c57600080fd5b506102bb6115c3565b3480156106b157600080fd5b506102bb6115c9565b3480156106c657600080fd5b5061025c6115cf565b3480156106db57600080fd5b5061028a6117be565b3480156106f057600080fd5b506103866117cd565b34801561070557600080fd5b506102bb6117f2565b34801561071a57600080fd5b506103866004803603602081101561073157600080fd5b50356001600160a01b03166117f8565b34801561074d57600080fd5b506103866118f1565b6000806000806107646115cf565b6001600160a01b0387166000908152601460209081526040808320546012909252909120549294509092506107db916107d590670de0b6b3a7640000906107cf906107b0908890611b03565b6001600160a01b038b1660009081526016602052604090205490611b4e565b90611ba7565b90611be9565b6001600160a01b038616600090815260156020908152604080832054601390925290912054919550610824916107d590670de0b6b3a7640000906107cf906107b0908790611b03565b92505050915091565b6003546001600160a01b031681565b60095481565b3b151590565b60136020526000908152604090205481565b60175490565b600260015414156108a6576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336108b46115cf565b600e55600d556108c261110e565b600c556001600160a01b03811615610920576108dd81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b816109ec573360009081526014602052604090205480610987576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b336000818152601460205260408120556003546109b0916001600160a01b039091169083611c43565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610b69565b8160011415610a80573360009081526015602052604090205480610a57576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b336000818152601560205260408120556004546109b0916001600160a01b039091169083611c43565b336000908152601460209081526040808320546015909252909120548115610acb5733600081815260146020526040812055600354610acb916001600160a01b039091169084611c43565b8015610afa5733600081815260156020526040812055600454610afa916001600160a01b039091169083611c43565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b505060018055565b6000546001600160a01b03163314610bba5760405162461bcd60e51b815260040180806020018281038252602a8152602001806121d6602a913960400191505060405180910390fd5b6000610bc46115cf565b600e55600d55610bd261110e565b600c556001600160a01b03811615610c3057610bed81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600754610ca557610c58610c51600f54600b54611be990919063ffffffff16565b8490611ba7565b600955600f54600b54610c7691610c6f9190611be9565b8390611ba7565b600a5542600c819055600b54610c8c9190611be9565b600755600f54610c9d904290611be9565b600855610d2c565b600754600090610cb59042611b03565b90506000610cce60095483611b4e90919063ffffffff16565b90506000610ce7600a5484611b4e90919063ffffffff16565b600b54909150610cfb906107cf8885611be9565b600955600b54610d0f906107cf8784611be9565b600a5542600c819055600b54610d259190611be9565b6007555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b600080610d77611c9a565b6002546001600160a01b03908116911614610dc7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6000610dd1611129565b90506001600160a01b038116331415610e1257600354610dfb906001600160a01b03168287611c43565b600454610e12906001600160a01b03168286611c43565b50929391925050565b60026001541415610e61576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b600260015533610e6f6115cf565b600e55600d55610e7d61110e565b600c556001600160a01b03811615610edb57610e9881610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b60008211610f24576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260166020526040902054821115610f7e576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601754610f8b9083611b03565b60175533600090815260166020526040902054610fa89083611b03565b33600081815260166020526040902091909155600554610fd4916001600160a01b039091169084611c43565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b600b5481565b600d5481565b60116020526000908152604090205460ff1681565b6000546001600160a01b031681565b6001600160a01b031660009081526016602052604090205490565b611065611c9a565b6002546001600160a01b039081169116146110b5576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6005546001600160a01b031681565b60008061111d42600754611c9e565b91505090565b600a5481565b6002546001600160a01b031690565b60156020526000908152604090205481565b60065481565b61115933610842565b156111ac573360009081526011602052604090205460ff166111ac5760405162461bcd60e51b815260040180806020018281038252602c8152602001806121aa602c913960400191505060405180910390fd5b600260015414156111f2576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336112006115cf565b600e55600d5561120e61110e565b600c556001600160a01b0381161561126c5761122981610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600082116112b2576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6017546112bf9083611be9565b601755336000908152601660205260409020546112dc9083611be9565b33600081815260166020526040902091909155600554611309916001600160a01b03909116903085611cb4565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60085481565b6000611357611c9a565b6002546001600160a01b039081169116146113a7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6113b082610842565b6113eb5760405162461bcd60e51b81526004018080602001828103825260328152602001806121376032913960400191505060405180910390fd5b6001600160a01b03821660009081526011602052604090205460ff16156114435760405162461bcd60e51b815260040180806020018281038252602c8152602001806120bf602c913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a2506001919050565b600e5481565b60105481565b60126020526000908152604090205481565b60146020526000908152604090205481565b60006114ce611c9a565b6002546001600160a01b0390811691161461151e576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff166115755760405162461bcd60e51b815260040180806020018281038252602881526020018061222a6028913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b600c5481565b600f5481565b600080601754600014156115ea575050600d54600e546117ba565b60085442101561169157600061164861163f6017546107cf670de0b6b3a7640000611639611625600654600954611b4e90919063ffffffff16565b611639600c5461163361110e565b90611b03565b90611b4e565b600d5490611be9565b9050600061168461167b6017546107cf670de0b6b3a7640000611639611625600654600a54611b4e90919063ffffffff16565b600e5490611be9565b9193509091506117ba9050565b600854600c5410156117625760006117066116c86017546107cf670de0b6b3a764000061163960095461163960085461163361110e565b6107d561163f6017546107cf670de0b6b3a76400006116396116f7600654600954611b4e90919063ffffffff16565b600c5460085461163991611b03565b905060006116846117336017546107cf670de0b6b3a7640000611639600a5461163960085461163361110e565b6107d561167b6017546107cf670de0b6b3a76400006116396116f7600654600a54611b4e90919063ffffffff16565b600061178d61163f6017546107cf670de0b6b3a7640000611639600954611639600c5461163361110e565b9050600061168461167b6017546107cf670de0b6b3a7640000611639600a54611639600c5461163361110e565b9091565b6004546001600160a01b031681565b6117d76002610860565b336000908152601660205260409020546117f090610e1b565b565b60075481565b611800611c9a565b6002546001600160a01b03908116911614611850576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b0381166118955760405162461bcd60e51b81526004018080602001828103825260268152602001806120eb6026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611937576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336119456115cf565b600e55600d5561195361110e565b600c556001600160a01b038116156119b15761196e81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b3360009081526014602052604090205480611a13576040805162461bcd60e51b815260206004820152601760248201527f7374616b652061646472657373206e6f7420666f756e64000000000000000000604482015290519081900360640190fd5b6005546003546001600160a01b03908116911614611a78576040805162461bcd60e51b815260206004820152601d60248201527f43616e2774207374616b65207468652072657761726420746f6b656e2e000000604482015290519081900360640190fd5b33600090815260146020526040812055601754611a959082611be9565b60175533600090815260166020526040902054611ab29082611be9565b33600081815260166020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a2505060018055565b6000611b4583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d14565b90505b92915050565b600082611b5d57506000611b48565b82820282848281611b6a57fe5b0414611b455760405162461bcd60e51b81526004018080602001828103825260218152602001806121696021913960400191505060405180910390fd5b6000611b4583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611db0565b600082820183811015611b45576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611c95908490611e15565b505050565b3390565b6000818310611cad5781611b45565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d0e908590611e15565b50505050565b60008184841115611da35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d68578181015183820152602001611d50565b50505050905090810190601f168015611d955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611dff5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d68578181015183820152602001611d50565b506000838581611e0b57fe5b0495945050505050565b6000611e6a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ec69092919063ffffffff16565b805190915015611c9557808060200190516020811015611e8957600080fd5b5051611c955760405162461bcd60e51b815260040180806020018281038252602a815260200180612200602a913960400191505060405180910390fd5b6060611ed58484600085611edd565b949350505050565b606082471015611f1e5760405162461bcd60e51b81526004018080602001828103825260268152602001806121116026913960400191505060405180910390fd5b611f2785610842565b611f78576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611fb65780518252601f199092019160209182019101611f97565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612018576040519150601f19603f3d011682016040523d82523d6000602084013e61201d565b606091505b509150915061202d828286612038565b979650505050505050565b60608315612047575081611da9565b8251156120575782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611d68578181015183820152602001611d5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005374616b696e67526577617264733a20436f6e747261637420616c72656164792077686974656c69737465644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e67526577617264733a2041646472657373206d757374206265206120636f6e74726163742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e67526577617264733a20436f6e7472616374206d7573742062652077686974656c697374656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645374616b696e67526577617264733a20436f6e7472616374206e6f742077686974656c6973746564a26469706673582212206400d657659722aa37069f750df6956dc2079e7cd1833e67a53800e4877395d264736f6c63430007060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.