ETH Price: $2,429.53 (+3.04%)
Gas: 1.61 Gwei

Contract

0x27dd88eEe957AE18665983C818c35dCCef8818A8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Get Reward136031082021-11-12 19:14:031036 days ago1636744443IN
0x27dd88eE...Cef8818A8
0 ETH0.00924926124.66152541
Get Reward135951342021-11-11 13:20:121037 days ago1636636812IN
0x27dd88eE...Cef8818A8
0 ETH0.0061423386.03315337
Get Reward131132042021-08-28 9:59:451112 days ago1630144785IN
0x27dd88eE...Cef8818A8
0 ETH0.0039745347.91133332
Get Reward130598202021-08-20 3:46:261120 days ago1629431186IN
0x27dd88eE...Cef8818A8
0 ETH0.002415925
Get Reward129630062021-08-05 4:56:231135 days ago1628139383IN
0x27dd88eE...Cef8818A8
0 ETH0.0023098235
Get Reward129309602021-07-31 3:31:281140 days ago1627702288IN
0x27dd88eE...Cef8818A8
0 ETH0.001253919.00000134
Get Reward129275192021-07-30 14:33:221141 days ago1627655602IN
0x27dd88eE...Cef8818A8
0 ETH0.0026351839.93
Withdraw128867162021-07-24 3:53:071147 days ago1627098787IN
0x27dd88eE...Cef8818A8
0 ETH0.0025679420
Withdraw128813742021-07-23 7:45:291148 days ago1627026329IN
0x27dd88eE...Cef8818A8
0 ETH0.0010287712.00000067
Withdraw127533862021-07-03 7:51:201168 days ago1625298680IN
0x27dd88eE...Cef8818A8
0 ETH0.000642045
Withdraw127461022021-07-02 4:35:071169 days ago1625200507IN
0x27dd88eE...Cef8818A8
0 ETH0.0014124911
Get Reward127391672021-07-01 2:36:011170 days ago1625106961IN
0x27dd88eE...Cef8818A8
0 ETH0.0014282721
Withdraw127391082021-07-01 2:21:151170 days ago1625106075IN
0x27dd88eE...Cef8818A8
0 ETH0.0023372321
Get Reward127348032021-06-30 10:33:291171 days ago1625049209IN
0x27dd88eE...Cef8818A8
0 ETH0.0008161512
Withdraw127348002021-06-30 10:33:061171 days ago1625049186IN
0x27dd88eE...Cef8818A8
0 ETH0.000866729.2
Withdraw127344282021-06-30 9:10:321171 days ago1625044232IN
0x27dd88eE...Cef8818A8
0 ETH0.0024734417
Get Reward127300852021-06-29 16:46:291172 days ago1624985189IN
0x27dd88eE...Cef8818A8
0 ETH0.0025009723
Get Reward127198442021-06-28 2:30:061173 days ago1624847406IN
0x27dd88eE...Cef8818A8
0 ETH0.0007646410
Withdraw127110742021-06-26 17:49:351175 days ago1624729775IN
0x27dd88eE...Cef8818A8
0 ETH0.001340610
Withdraw127066092021-06-26 1:10:411175 days ago1624669841IN
0x27dd88eE...Cef8818A8
0 ETH0.001169610
Get Reward127065992021-06-26 1:08:351175 days ago1624669715IN
0x27dd88eE...Cef8818A8
0 ETH0.0012282911.3
Withdraw127056892021-06-25 21:43:201176 days ago1624657400IN
0x27dd88eE...Cef8818A8
0 ETH0.0021447616
Get Reward126968492021-06-24 12:32:591177 days ago1624537979IN
0x27dd88eE...Cef8818A8
0 ETH0.0012234216
Withdraw126968422021-06-24 12:31:051177 days ago1624537865IN
0x27dd88eE...Cef8818A8
0 ETH0.0015975616
Get Reward126908052021-06-23 14:10:111178 days ago1624457411IN
0x27dd88eE...Cef8818A8
0 ETH0.002752736
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewardsLock

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 9 : StakingRewardsLock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

import "../interface/IStakingRewards.sol";
import "./RewardsDistributionRecipient.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract StakingRewardsLock is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuard {

    using SafeMath for uint;
    using Math for uint;
    using SafeERC20 for IERC20;

    IERC20 public rewardsToken;
    IERC20 public stakingToken;
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public rewardsDuration;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    uint256 public lockDuration;

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public unlockRewards;
    mapping(address => uint256) public lockRewards;
    mapping(address => uint256) public userLockTime;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    uint public unlockPercent;
    uint public lockPercent;

    constructor(
        address _rewardsDistribution,
        address _rewardsToken,
        address _stakingToken,
        uint256 _lockDuration,
        uint256 _unlockPercent,
        uint256 _lockPercent
    ) public {
        rewardsToken = IERC20(_rewardsToken);
        stakingToken = IERC20(_stakingToken);
        rewardsDistribution = _rewardsDistribution;
        lockDuration = _lockDuration;
        unlockPercent = _unlockPercent;
        lockPercent = _lockPercent;
    }

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

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

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

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

    function rewardPerToken() public override view returns (uint256) {
        if (_totalSupply == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored.add(
                lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(_totalSupply)
            );
    }

    function earned(address account) public override view returns (uint256, uint256) {
        uint earnedToken = earnedDuration(account);
        if(block.timestamp >= userLockTime[account]) {
            uint unlockAmount = unlockRewards[account].add(lockRewards[account]).add(earnedToken);
            return (unlockAmount, 0);
        } else {
            uint unlockAmount = unlockRewards[account].add(earnedToken.mul(unlockPercent).div(100));
            uint lockAmount = lockRewards[account].add(earnedToken.mul(lockPercent).div(100));
            return (unlockAmount, lockAmount);
        }
    }


    function earnedDuration(address account) internal view returns (uint256) {
        return _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18);
    }

    function getRewardForDuration() external override view returns (uint256) {
        return rewardRate.mul(rewardsDuration);
    }

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

    function stakeWithPermit(uint256 amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        if (userLockTime[msg.sender] == 0) {
            userLockTime[msg.sender] = block.timestamp.add(lockDuration);
        }
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);

        // permit
        IBORERC20(address(stakingToken)).permit(msg.sender, address(this), amount, deadline, v, r, s);

        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
    }

    function stake(uint256 amount) external override nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        if (userLockTime[msg.sender] == 0) {
            userLockTime[msg.sender] = block.timestamp.add(lockDuration);
        }
        _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 override virtual nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);
        emit Withdrawn(msg.sender, amount);
    }

    function getReward() public override nonReentrant updateReward(msg.sender) {
        uint256 reward = unlockRewards[msg.sender];
        if (reward > 0) {
            unlockRewards[msg.sender] = 0;
            rewardsToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

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

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

    function notifyRewardAmount(uint256 reward, uint duration) external override onlyRewardsDistribution updateReward(address(0)) {
        rewardsDuration = duration;
        if (block.timestamp >= periodFinish) { 
            rewardRate = reward.div(rewardsDuration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(rewardsDuration);
        }

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint balance = rewardsToken.balanceOf(address(this));
        require(rewardRate <= balance.div(rewardsDuration), "Provided reward too high");

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(rewardsDuration);
        emit RewardAdded(reward);
    }

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

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            (uint unlock, uint lock) = earned(account);
            unlockRewards[account] = unlock;
            lockRewards[account] = lock;
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

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

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);



}

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

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

pragma solidity ^0.6.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 9 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 5 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 6 of 9 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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 7 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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].
 */
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 9 : IStakingRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

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

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

    function getRewardForDuration() external view returns (uint256);

    function totalSupply() external view returns (uint256);

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

    // Mutative

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;

    function getReward() external;

    function exit() external;
}

File 9 of 9 : RewardsDistributionRecipient.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

abstract contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function notifyRewardAmount(uint256 reward, uint duration) external virtual;

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

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"},{"internalType":"uint256","name":"_unlockPercent","type":"uint256"},{"internalType":"uint256","name":"_lockPercent","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","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":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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lockRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","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":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"stateMutability":"nonpayable","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":[],"name":"unlockPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unlockRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600455600060055534801561001a57600080fd5b506040516116f33803806116f3833981810160405260c081101561003d57600080fd5b508051602082015160408301516060840151608085015160a09095015160018055600280546001600160a01b039586166001600160a01b031991821617909155600380549486169482169490941790935560008054949095169390921692909217909255600955601091909155601155611637806100bc6000396000f3fe608060405234801561001057600080fd5b50600436106101a85760003560e01c80637b0a47ee116100f9578063c8f33c9111610097578063df136d6511610071578063df136d65146103a7578063e9fad8ee146103af578063ebe2b12b146103b7578063ecd9ba82146103bf576101a8565b8063c8f33c911461038f578063cd3daf9d14610397578063d1af0c7d1461039f576101a8565b80638b876347116100d35780638b8763471461031e57806391030cb614610344578063940711611461034c578063a694fc3a14610372576101a8565b80637b0a47ee146102e857806380faa57d146102f0578063876e65ff146102f8576101a8565b8063386a9525116101665780635a9a93fc116101405780635a9a93fc1461028c57806370a08231146102b257806372f702f3146102d8578063756688c0146102e0576101a8565b8063386a9525146102585780633d18b912146102605780633fc6df6e14610268576101a8565b80628cc262146101ad57806304554443146101ec57806318160ddd146102065780631c1f78eb1461020e578063246132f9146102165780632e1a7d4d1461023b575b600080fd5b6101d3600480360360208110156101c357600080fd5b50356001600160a01b03166103f7565b6040805192835260208301919091528051918290030190f35b6101f4610505565b60408051918252519081900360200190f35b6101f461050b565b6101f4610512565b6102396004803603604081101561022c57600080fd5b5080359060200135610530565b005b6102396004803603602081101561025157600080fd5b503561077a565b6101f461090e565b610239610914565b610270610a49565b604080516001600160a01b039092168252519081900360200190f35b6101f4600480360360208110156102a257600080fd5b50356001600160a01b0316610a58565b6101f4600480360360208110156102c857600080fd5b50356001600160a01b0316610a6a565b610270610a85565b6101f4610a94565b6101f4610a9a565b6101f4610aa0565b6101f46004803603602081101561030e57600080fd5b50356001600160a01b0316610aae565b6101f46004803603602081101561033457600080fd5b50356001600160a01b0316610ac0565b6101f4610ad2565b6101f46004803603602081101561036257600080fd5b50356001600160a01b0316610ad8565b6102396004803603602081101561038857600080fd5b5035610aea565b6101f4610caf565b6101f4610cb5565b610270610d09565b6101f4610d18565b610239610d1e565b6101f4610d41565b610239600480360360a08110156103d557600080fd5b5080359060208101359060ff6040820135169060608101359060800135610d47565b600080600061040584610f9b565b6001600160a01b0385166000908152600d6020526040902054909150421061046e576001600160a01b0384166000908152600c6020908152604080832054600b90925282205461046091849161045a91610ff7565b90610ff7565b935060009250610500915050565b60006104b2610493606461048d6010548661105890919063ffffffff16565b906110b1565b6001600160a01b0387166000908152600b602052604090205490610ff7565b905060006104f26104d3606461048d6011548761105890919063ffffffff16565b6001600160a01b0388166000908152600c602052604090205490610ff7565b919450909250610500915050565b915091565b60095481565b600e545b90565b600061052b60065460055461105890919063ffffffff16565b905090565b6000546001600160a01b031633146105795760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ae602a913960400191505060405180910390fd5b6000610583610cb5565b60085561058e610aa0565b6007556001600160a01b038116156105e6576000806105ac836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b6006829055600454421061060a576006546106029084906110b1565b60055561064d565b60045460009061061a90426110f3565b905060006106336005548361105890919063ffffffff16565b6006549091506106479061048d8784610ff7565b60055550505b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561069857600080fd5b505afa1580156106ac573d6000803e3d6000fd5b505050506040513d60208110156106c257600080fd5b50516006549091506106d59082906110b1565b600554111561072b576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b42600781905560065461073e9190610ff7565b6004556040805185815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505050565b600260015414156107c0576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b6002600155336107ce610cb5565b6008556107d9610aa0565b6007556001600160a01b03811615610831576000806107f7836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b6000821161087a576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600e5461088790836110f3565b600e55336000908152600f60205260409020546108a490836110f3565b336000818152600f60205260409020919091556003546108d0916001600160a01b039091169084611135565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b60065481565b6002600154141561095a576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b600260015533610968610cb5565b600855610973610aa0565b6007556001600160a01b038116156109cb57600080610991836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b336000908152600b60205260409020548015610a4157336000818152600b6020526040812055600254610a0a916001600160a01b039091169083611135565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505060018055565b6000546001600160a01b031681565b600d6020526000908152604090205481565b6001600160a01b03166000908152600f602052604090205490565b6003546001600160a01b031681565b60105481565b60055481565b600061052b4260045461118c565b600b6020526000908152604090205481565b600a6020526000908152604090205481565b60115481565b600c6020526000908152604090205481565b60026001541415610b30576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b600260015533610b3e610cb5565b600855610b49610aa0565b6007556001600160a01b03811615610ba157600080610b67836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b60008211610be7576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b336000908152600d6020526040902054610c1a57600954610c09904290610ff7565b336000908152600d60205260409020555b600e54610c279083610ff7565b600e55336000908152600f6020526040902054610c449083610ff7565b336000818152600f6020526040902091909155600354610c71916001600160a01b039091169030856111a2565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60075481565b6000600e5460001415610ccb575060085461050f565b61052b610d00600e5461048d670de0b6b3a7640000610cfa600554610cfa600754610cf4610aa0565b906110f3565b90611058565b60085490610ff7565b6002546001600160a01b031681565b60085481565b336000908152600f6020526040902054610d379061077a565b610d3f610914565b565b60045481565b60026001541415610d8d576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b600260015533610d9b610cb5565b600855610da6610aa0565b6007556001600160a01b03811615610dfe57600080610dc4836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b60008611610e44576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b336000908152600d6020526040902054610e7757600954610e66904290610ff7565b336000908152600d60205260409020555b600e54610e849087610ff7565b600e55336000908152600f6020526040902054610ea19087610ff7565b336000818152600f602052604080822093909355600354835163d505accf60e01b81526004810193909352306024840152604483018a90526064830189905260ff8816608484015260a4830187905260c4830186905292516001600160a01b039093169263d505accf9260e480820193929182900301818387803b158015610f2857600080fd5b505af1158015610f3c573d6000803e3d6000fd5b5050600354610f5992506001600160a01b031690503330896111a2565b60408051878152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001805550505050565b6001600160a01b0381166000908152600a6020526040812054610ff190670de0b6b3a76400009061048d90610fd290610cf4610cb5565b6001600160a01b0386166000908152600f602052604090205490611058565b92915050565b600082820183811015611051576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008261106757506000610ff1565b8282028284828161107457fe5b04146110515760405162461bcd60e51b815260040180806020018281038252602181526020018061158d6021913960400191505060405180910390fd5b600061105183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611202565b600061105183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112a4565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111879084906112fe565b505050565b600081831061119b5781611051565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526111fc9085906112fe565b50505050565b6000818361128e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561125357818101518382015260200161123b565b50505050905090810190601f1680156112805780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161129a57fe5b0495945050505050565b600081848411156112f65760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561125357818101518382015260200161123b565b505050900390565b6060611353826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113af9092919063ffffffff16565b8051909150156111875780806020019051602081101561137257600080fd5b50516111875760405162461bcd60e51b815260040180806020018281038252602a8152602001806115d8602a913960400191505060405180910390fd5b60606113be84846000856113c6565b949350505050565b60606113d185611533565b611422576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106114615780518252601f199092019160209182019101611442565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146114c3576040519150601f19603f3d011682016040523d82523d6000602084013e6114c8565b606091505b509150915081156114dc5791506113be9050565b8051156114ec5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561125357818101518382015260200161123b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113be57505015159291505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212205320d3cdd19c9d49c6109230979f02658364d39a29cdadfee21b4b1a1b9b9ce964736f6c634300060c003300000000000000000000000067ee188ee1319cdac271553e7b8faaed2fbc52cc0000000000000000000000003c9d6c1c73b31c837832c72e04d3152f051fc1a90000000000000000000000008b2eaf139fb7af0c6de2481f0cadbceb5cf224c2000000000000000000000000000000000000000000000000000000000076a70000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000032

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a85760003560e01c80637b0a47ee116100f9578063c8f33c9111610097578063df136d6511610071578063df136d65146103a7578063e9fad8ee146103af578063ebe2b12b146103b7578063ecd9ba82146103bf576101a8565b8063c8f33c911461038f578063cd3daf9d14610397578063d1af0c7d1461039f576101a8565b80638b876347116100d35780638b8763471461031e57806391030cb614610344578063940711611461034c578063a694fc3a14610372576101a8565b80637b0a47ee146102e857806380faa57d146102f0578063876e65ff146102f8576101a8565b8063386a9525116101665780635a9a93fc116101405780635a9a93fc1461028c57806370a08231146102b257806372f702f3146102d8578063756688c0146102e0576101a8565b8063386a9525146102585780633d18b912146102605780633fc6df6e14610268576101a8565b80628cc262146101ad57806304554443146101ec57806318160ddd146102065780631c1f78eb1461020e578063246132f9146102165780632e1a7d4d1461023b575b600080fd5b6101d3600480360360208110156101c357600080fd5b50356001600160a01b03166103f7565b6040805192835260208301919091528051918290030190f35b6101f4610505565b60408051918252519081900360200190f35b6101f461050b565b6101f4610512565b6102396004803603604081101561022c57600080fd5b5080359060200135610530565b005b6102396004803603602081101561025157600080fd5b503561077a565b6101f461090e565b610239610914565b610270610a49565b604080516001600160a01b039092168252519081900360200190f35b6101f4600480360360208110156102a257600080fd5b50356001600160a01b0316610a58565b6101f4600480360360208110156102c857600080fd5b50356001600160a01b0316610a6a565b610270610a85565b6101f4610a94565b6101f4610a9a565b6101f4610aa0565b6101f46004803603602081101561030e57600080fd5b50356001600160a01b0316610aae565b6101f46004803603602081101561033457600080fd5b50356001600160a01b0316610ac0565b6101f4610ad2565b6101f46004803603602081101561036257600080fd5b50356001600160a01b0316610ad8565b6102396004803603602081101561038857600080fd5b5035610aea565b6101f4610caf565b6101f4610cb5565b610270610d09565b6101f4610d18565b610239610d1e565b6101f4610d41565b610239600480360360a08110156103d557600080fd5b5080359060208101359060ff6040820135169060608101359060800135610d47565b600080600061040584610f9b565b6001600160a01b0385166000908152600d6020526040902054909150421061046e576001600160a01b0384166000908152600c6020908152604080832054600b90925282205461046091849161045a91610ff7565b90610ff7565b935060009250610500915050565b60006104b2610493606461048d6010548661105890919063ffffffff16565b906110b1565b6001600160a01b0387166000908152600b602052604090205490610ff7565b905060006104f26104d3606461048d6011548761105890919063ffffffff16565b6001600160a01b0388166000908152600c602052604090205490610ff7565b919450909250610500915050565b915091565b60095481565b600e545b90565b600061052b60065460055461105890919063ffffffff16565b905090565b6000546001600160a01b031633146105795760405162461bcd60e51b815260040180806020018281038252602a8152602001806115ae602a913960400191505060405180910390fd5b6000610583610cb5565b60085561058e610aa0565b6007556001600160a01b038116156105e6576000806105ac836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b6006829055600454421061060a576006546106029084906110b1565b60055561064d565b60045460009061061a90426110f3565b905060006106336005548361105890919063ffffffff16565b6006549091506106479061048d8784610ff7565b60055550505b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561069857600080fd5b505afa1580156106ac573d6000803e3d6000fd5b505050506040513d60208110156106c257600080fd5b50516006549091506106d59082906110b1565b600554111561072b576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b42600781905560065461073e9190610ff7565b6004556040805185815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505050565b600260015414156107c0576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b6002600155336107ce610cb5565b6008556107d9610aa0565b6007556001600160a01b03811615610831576000806107f7836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b6000821161087a576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600e5461088790836110f3565b600e55336000908152600f60205260409020546108a490836110f3565b336000818152600f60205260409020919091556003546108d0916001600160a01b039091169084611135565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b60065481565b6002600154141561095a576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b600260015533610968610cb5565b600855610973610aa0565b6007556001600160a01b038116156109cb57600080610991836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b336000908152600b60205260409020548015610a4157336000818152600b6020526040812055600254610a0a916001600160a01b039091169083611135565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505060018055565b6000546001600160a01b031681565b600d6020526000908152604090205481565b6001600160a01b03166000908152600f602052604090205490565b6003546001600160a01b031681565b60105481565b60055481565b600061052b4260045461118c565b600b6020526000908152604090205481565b600a6020526000908152604090205481565b60115481565b600c6020526000908152604090205481565b60026001541415610b30576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b600260015533610b3e610cb5565b600855610b49610aa0565b6007556001600160a01b03811615610ba157600080610b67836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b60008211610be7576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b336000908152600d6020526040902054610c1a57600954610c09904290610ff7565b336000908152600d60205260409020555b600e54610c279083610ff7565b600e55336000908152600f6020526040902054610c449083610ff7565b336000818152600f6020526040902091909155600354610c71916001600160a01b039091169030856111a2565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60075481565b6000600e5460001415610ccb575060085461050f565b61052b610d00600e5461048d670de0b6b3a7640000610cfa600554610cfa600754610cf4610aa0565b906110f3565b90611058565b60085490610ff7565b6002546001600160a01b031681565b60085481565b336000908152600f6020526040902054610d379061077a565b610d3f610914565b565b60045481565b60026001541415610d8d576040805162461bcd60e51b815260206004820152601f602482015260008051602061156d833981519152604482015290519081900360640190fd5b600260015533610d9b610cb5565b600855610da6610aa0565b6007556001600160a01b03811615610dfe57600080610dc4836103f7565b6001600160a01b0385166000908152600b6020908152604080832094909455600c815283822092909255600854600a909252919091205550505b60008611610e44576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b336000908152600d6020526040902054610e7757600954610e66904290610ff7565b336000908152600d60205260409020555b600e54610e849087610ff7565b600e55336000908152600f6020526040902054610ea19087610ff7565b336000818152600f602052604080822093909355600354835163d505accf60e01b81526004810193909352306024840152604483018a90526064830189905260ff8816608484015260a4830187905260c4830186905292516001600160a01b039093169263d505accf9260e480820193929182900301818387803b158015610f2857600080fd5b505af1158015610f3c573d6000803e3d6000fd5b5050600354610f5992506001600160a01b031690503330896111a2565b60408051878152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001805550505050565b6001600160a01b0381166000908152600a6020526040812054610ff190670de0b6b3a76400009061048d90610fd290610cf4610cb5565b6001600160a01b0386166000908152600f602052604090205490611058565b92915050565b600082820183811015611051576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008261106757506000610ff1565b8282028284828161107457fe5b04146110515760405162461bcd60e51b815260040180806020018281038252602181526020018061158d6021913960400191505060405180910390fd5b600061105183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611202565b600061105183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112a4565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111879084906112fe565b505050565b600081831061119b5781611051565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526111fc9085906112fe565b50505050565b6000818361128e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561125357818101518382015260200161123b565b50505050905090810190601f1680156112805780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161129a57fe5b0495945050505050565b600081848411156112f65760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561125357818101518382015260200161123b565b505050900390565b6060611353826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113af9092919063ffffffff16565b8051909150156111875780806020019051602081101561137257600080fd5b50516111875760405162461bcd60e51b815260040180806020018281038252602a8152602001806115d8602a913960400191505060405180910390fd5b60606113be84846000856113c6565b949350505050565b60606113d185611533565b611422576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106114615780518252601f199092019160209182019101611442565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146114c3576040519150601f19603f3d011682016040523d82523d6000602084013e6114c8565b606091505b509150915081156114dc5791506113be9050565b8051156114ec5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561125357818101518382015260200161123b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113be57505015159291505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212205320d3cdd19c9d49c6109230979f02658364d39a29cdadfee21b4b1a1b9b9ce964736f6c634300060c0033

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

00000000000000000000000067ee188ee1319cdac271553e7b8faaed2fbc52cc0000000000000000000000003c9d6c1c73b31c837832c72e04d3152f051fc1a90000000000000000000000008b2eaf139fb7af0c6de2481f0cadbceb5cf224c2000000000000000000000000000000000000000000000000000000000076a70000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000032

-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0x67Ee188Ee1319CDAc271553e7b8FAAed2fBC52CC
Arg [1] : _rewardsToken (address): 0x3c9d6c1C73b31c837832c72E04D3152f051fc1A9
Arg [2] : _stakingToken (address): 0x8b2eAF139fb7Af0C6De2481F0cADbceb5CF224C2
Arg [3] : _lockDuration (uint256): 7776000
Arg [4] : _unlockPercent (uint256): 50
Arg [5] : _lockPercent (uint256): 50

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000067ee188ee1319cdac271553e7b8faaed2fbc52cc
Arg [1] : 0000000000000000000000003c9d6c1c73b31c837832c72e04d3152f051fc1a9
Arg [2] : 0000000000000000000000008b2eaf139fb7af0c6de2481f0cadbceb5cf224c2
Arg [3] : 000000000000000000000000000000000000000000000000000000000076a700
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000032


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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  ]

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.