ETH Price: $2,167.38 (+3.78%)

Contract

0x4ee0e17bF129E045DD3F8A3640d691D22fFdFA05
 

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw120747662021-03-20 8:57:101821 days ago1616230630IN
0x4ee0e17b...22fFdFA05
0 ETH0.01133384112
Exit120747322021-03-20 8:48:001821 days ago1616230080IN
0x4ee0e17b...22fFdFA05
0 ETH0.01329939106
Withdraw117254242021-01-25 14:24:201875 days ago1611584660IN
0x4ee0e17b...22fFdFA05
0 ETH0.01032178102
Withdraw117046702021-01-22 10:06:341878 days ago1611309994IN
0x4ee0e17b...22fFdFA05
0 ETH0.0080944880
Withdraw117046512021-01-22 10:03:111878 days ago1611309791IN
0x4ee0e17b...22fFdFA05
0 ETH0.0105703791
Start116869522021-01-19 16:55:441881 days ago1611075344IN
0x4ee0e17b...22fFdFA05
0 ETH0.00650349131
Withdraw115979952021-01-06 1:11:411894 days ago1609895501IN
0x4ee0e17b...22fFdFA05
0 ETH0.01094816127
Withdraw115965612021-01-05 19:54:221895 days ago1609876462IN
0x4ee0e17b...22fFdFA05
0 ETH0.00514469109.00000145
Withdraw115957802021-01-05 17:11:431895 days ago1609866703IN
0x4ee0e17b...22fFdFA05
0 ETH0.00850014180
Withdraw115957662021-01-05 17:09:081895 days ago1609866548IN
0x4ee0e17b...22fFdFA05
0 ETH0.00888243188
Withdraw115901072021-01-04 20:17:101896 days ago1609791430IN
0x4ee0e17b...22fFdFA05
0 ETH0.00481919102
Withdraw115900962021-01-04 20:14:541896 days ago1609791294IN
0x4ee0e17b...22fFdFA05
0 ETH0.0047247100
Withdraw115900912021-01-04 20:13:411896 days ago1609791221IN
0x4ee0e17b...22fFdFA05
0 ETH0.00481919102
Withdraw115900902021-01-04 20:13:331896 days ago1609791213IN
0x4ee0e17b...22fFdFA05
0 ETH0.00481919102
Withdraw115900862021-01-04 20:12:091896 days ago1609791129IN
0x4ee0e17b...22fFdFA05
0 ETH0.0046443898.3
Withdraw115900792021-01-04 20:11:211896 days ago1609791081IN
0x4ee0e17b...22fFdFA05
0 ETH0.0046443898.3
Withdraw115163962020-12-24 12:51:381907 days ago1608814298IN
0x4ee0e17b...22fFdFA05
0 ETH0.0040511147.00000134
Exit114332512020-12-11 18:36:401920 days ago1607711800IN
0x4ee0e17b...22fFdFA05
0 ETH0.001404350
Withdraw114228672020-12-10 3:45:581921 days ago1607571958IN
0x4ee0e17b...22fFdFA05
0 ETH0.0027495831.90000023
Withdraw113694242020-12-01 22:39:251930 days ago1606862365IN
0x4ee0e17b...22fFdFA05
0 ETH0.0020686524
Withdraw112972942020-11-20 21:06:361941 days ago1605906396IN
0x4ee0e17b...22fFdFA05
0 ETH0.0023265627
Stake112952282020-11-20 13:26:151941 days ago1605878775IN
0x4ee0e17b...22fFdFA05
0 ETH0.0053225155
Withdraw112938792020-11-20 8:28:551941 days ago1605860935IN
0x4ee0e17b...22fFdFA05
0 ETH0.0050854459
Withdraw112928522020-11-20 4:42:351941 days ago1605847355IN
0x4ee0e17b...22fFdFA05
0 ETH0.005257161
Withdraw112767022020-11-17 17:09:481944 days ago1605632988IN
0x4ee0e17b...22fFdFA05
0 ETH0.0142363140.7
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewards

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-09-19
*/

pragma solidity ^0.5.16;


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

/**
 * @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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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);
}

/**
 * @dev Optional functions from the ERC20 standard.
 */
contract ERC20Detailed is IERC20 {
    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
     * these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol, uint8 decimals) public {
        _name = name;
        _symbol = symbol;
        _decimals = decimals;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }
}

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing 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.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        // 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 != 0x0 && codehash != accountHash);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

/**
 * @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 ERC20;` 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));
    }

    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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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");
        }
    }
}

/**
 * @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.
 */
contract ReentrancyGuard {
    // counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    constructor () internal {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @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() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

interface IStakingRewards {
    // Views
    function lastRewardPaidTime(address account) external view returns (uint256);

    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

    function earned(address account) 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;

    function sync() external;
}

// https://docs.synthetix.io/contracts/RewardsDistributionRecipient
contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function start() external;

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

// Inheritance
contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

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

    IERC20 public rewardsToken;
    IERC20 public stakingToken;
    uint256 public periodFinish = 0;
    uint256 public periodStart = 0;
    uint256 public rewardRate = 0;
    uint256 public rewardsDuration = 8 weeks;

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

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

    constructor(
        address _rewardsDistribution,
        address _rewardsToken,
        address _stakingToken
    ) public {
        rewardsToken = IERC20(_rewardsToken);
        stakingToken = IERC20(_stakingToken);
        rewardsDistribution = _rewardsDistribution;
    }

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

    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) {
        return Math.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            return 0;
        }
        return rewardRate.mul(1e18).div(_totalSupply);
    }

    function lastRewardPaidTime(address account) public view returns (uint256) {
        if (periodStart == 0) {
            return 0;
        }
        return Math.max(_lastRewardPaidTime[account], periodStart);
    }

    function earned(address account) public view returns (uint256) {
        uint256 _lastPaidTime = lastRewardPaidTime(account);
        if (_lastPaidTime == 0) {
            return 0;
        }
        return _balances[account].mul(lastTimeRewardApplicable().sub(_lastPaidTime)).mul(rewardPerToken()).div(1e18);
    }

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

    function stake(uint256 amount) external nonReentrant {
        require(amount > 0, "Cannot stake 0");
        _getReward();
        _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 {
        require(amount > 0, "Cannot withdraw 0");
        _getReward();
        _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 nonReentrant {
        _getReward();
    }

    function _getReward() private {
        uint256 reward = earned(msg.sender);
        _lastRewardPaidTime[msg.sender] = block.timestamp;
        if (reward > 0) {
            rewardsToken.safeTransfer(msg.sender, reward);
            _remainingAmount = _remainingAmount.sub(reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

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

    function sync() external {
      uint balance = rewardsToken.balanceOf(address(this));
      require(balance > 0, "Invalid balance");

      rewardRate = rewardRate.mul(balance).div(_remainingAmount);
      _remainingAmount = balance;
      emit Synced();
    }

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

    function start() external onlyRewardsDistribution {
      uint balance = rewardsToken.balanceOf(address(this));
      require(balance > 0, "Invalid balance");
      rewardRate = balance.div(rewardsDuration);

      periodStart = block.timestamp;
      periodFinish = block.timestamp.add(rewardsDuration);
      _remainingAmount = balance;
      emit Started();
    }

    event Started();
    event Synced();
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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":[],"name":"Started","type":"event"},{"anonymous":false,"inputs":[],"name":"Synced","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"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lastRewardPaidTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"start","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040526000600455600060055560006006556249d40060075534801561002657600080fd5b5060405161107b38038061107b8339818101604052606081101561004957600080fd5b508051602082015160409092015160018055600280546001600160a01b039485166001600160a01b031991821617909155600380549285169282169290921790915560008054939092169216919091179055610fd1806100aa6000396000f3fe608060405234801561001057600080fd5b50600436106101205760003560e01c80637b0a47ee116100ad578063d1af0c7d11610071578063d1af0c7d14610249578063e9fad8ee14610251578063ebe2b12b14610259578063eda4e6d614610261578063fff6cae91461026957610120565b80637b0a47ee1461020c57806380faa57d14610214578063a694fc3a1461021c578063be9a655514610239578063cd3daf9d1461024157610120565b80633d18b912116100f45780633d18b9121461018c5780633fc6df6e1461019457806365d9b827146101b857806370a08231146101de57806372f702f31461020457610120565b80628cc2621461012557806318160ddd1461015d5780632e1a7d4d14610165578063386a952514610184575b600080fd5b61014b6004803603602081101561013b57600080fd5b50356001600160a01b0316610271565b60408051918252519081900360200190f35b61014b610306565b6101826004803603602081101561017b57600080fd5b503561030d565b005b61014b610457565b61018261045d565b61019c6104c8565b604080516001600160a01b039092168252519081900360200190f35b61014b600480360360208110156101ce57600080fd5b50356001600160a01b03166104d7565b61014b600480360360208110156101f457600080fd5b50356001600160a01b0316610518565b61019c610533565b61014b610542565b61014b610548565b6101826004803603602081101561023257600080fd5b503561055b565b61018261069f565b61014b610809565b61019c610841565b610182610850565b61014b610873565b61014b610879565b61018261087f565b60008061027d836104d7565b90508061028e576000915050610301565b6102fd670de0b6b3a76400006102f16102a5610809565b6102e56102c0866102b4610548565b9063ffffffff61098b16565b6001600160a01b0389166000908152600a60205260409020549063ffffffff6109d416565b9063ffffffff6109d416565b9063ffffffff610a2d16565b9150505b919050565b6009545b90565b600180548101908190558161035d576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b610365610a6f565b600954610378908363ffffffff61098b16565b600955336000908152600a602052604090205461039b908363ffffffff61098b16565b336000818152600a60205260409020919091556003546103c7916001600160a01b039091169084610b00565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a26001548114610453576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60075481565b6001805481019081905561046f610a6f565b60015481146104c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b6000546001600160a01b031681565b6000600554600014156104ec57506000610301565b6001600160a01b0382166000908152600b60205260409020546005546105129190610b57565b92915050565b6001600160a01b03166000908152600a602052604090205490565b6003546001600160a01b031681565b60065481565b600061055642600454610b6e565b905090565b60018054810190819055816105a8576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6105b0610a6f565b6009546105c3908363ffffffff610b7d16565b600955336000908152600a60205260409020546105e6908363ffffffff610b7d16565b336000818152600a6020526040902091909155600354610613916001600160a01b03909116903085610bd7565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a26001548114610453576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000546001600160a01b031633146106e85760405162461bcd60e51b815260040180806020018281038252602a815260200180610f49602a913960400191505060405180910390fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561073357600080fd5b505afa158015610747573d6000803e3d6000fd5b505050506040513d602081101561075d57600080fd5b50519050806107a5576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b6007546107b990829063ffffffff610a2d16565b6006554260058190556007546107d5919063ffffffff610b7d16565b60045560088190556040517fd8cea0ecd56872ff072e771658b5682ffe4de16d752947f79597d600ea56f7a990600090a150565b60006009546000141561081e5750600061030a565b6105566009546102f1670de0b6b3a76400006006546109d490919063ffffffff16565b6002546001600160a01b031681565b336000908152600a60205260409020546108699061030d565b61087161045d565b565b60045481565b60055481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d60208110156108f457600080fd5b505190508061093c576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b6109576008546102f1836006546109d490919063ffffffff16565b60065560088190556040517f3cf21d43d853d313c15c52435ccb3d7a401cf38f82f7330c800290276ef31d3090600090a150565b60006109cd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c37565b9392505050565b6000826109e357506000610512565b828202828482816109f057fe5b04146109cd5760405162461bcd60e51b8152600401808060200182810382526021815260200180610f286021913960400191505060405180910390fd5b60006109cd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610cce565b6000610a7a33610271565b336000908152600b60205260409020429055905080156104c557600254610ab1906001600160a01b0316338363ffffffff610b0016565b600854610ac4908263ffffffff61098b16565b60085560408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b52908490610d33565b505050565b600081831015610b6757816109cd565b5090919050565b6000818310610b6757816109cd565b6000828201838110156109cd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610c31908590610d33565b50505050565b60008184841115610cc65760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c8b578181015183820152602001610c73565b50505050905090810190601f168015610cb85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610d1d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c8b578181015183820152602001610c73565b506000838581610d2957fe5b0495945050505050565b610d45826001600160a01b0316610eeb565b610d96576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610dd45780518252601f199092019160209182019101610db5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610e36576040519150601f19603f3d011682016040523d82523d6000602084013e610e3b565b606091505b509150915081610e92576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610c3157808060200190516020811015610eae57600080fd5b5051610c315760405162461bcd60e51b815260040180806020018281038252602a815260200180610f73602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590610f1f5750808214155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820606167aa91bd783f47848ea8f993b74e74e87890b6ba655b1569bb9fc588842364736f6c6343000510003200000000000000000000000089323ba4b757b31555a85a08e87bca288f891f780000000000000000000000005322a3556f979ce2180b30e689a9436fddcb1021000000000000000000000000d5525d397898e5502075ea5e830d8914f6f0affe

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101205760003560e01c80637b0a47ee116100ad578063d1af0c7d11610071578063d1af0c7d14610249578063e9fad8ee14610251578063ebe2b12b14610259578063eda4e6d614610261578063fff6cae91461026957610120565b80637b0a47ee1461020c57806380faa57d14610214578063a694fc3a1461021c578063be9a655514610239578063cd3daf9d1461024157610120565b80633d18b912116100f45780633d18b9121461018c5780633fc6df6e1461019457806365d9b827146101b857806370a08231146101de57806372f702f31461020457610120565b80628cc2621461012557806318160ddd1461015d5780632e1a7d4d14610165578063386a952514610184575b600080fd5b61014b6004803603602081101561013b57600080fd5b50356001600160a01b0316610271565b60408051918252519081900360200190f35b61014b610306565b6101826004803603602081101561017b57600080fd5b503561030d565b005b61014b610457565b61018261045d565b61019c6104c8565b604080516001600160a01b039092168252519081900360200190f35b61014b600480360360208110156101ce57600080fd5b50356001600160a01b03166104d7565b61014b600480360360208110156101f457600080fd5b50356001600160a01b0316610518565b61019c610533565b61014b610542565b61014b610548565b6101826004803603602081101561023257600080fd5b503561055b565b61018261069f565b61014b610809565b61019c610841565b610182610850565b61014b610873565b61014b610879565b61018261087f565b60008061027d836104d7565b90508061028e576000915050610301565b6102fd670de0b6b3a76400006102f16102a5610809565b6102e56102c0866102b4610548565b9063ffffffff61098b16565b6001600160a01b0389166000908152600a60205260409020549063ffffffff6109d416565b9063ffffffff6109d416565b9063ffffffff610a2d16565b9150505b919050565b6009545b90565b600180548101908190558161035d576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b610365610a6f565b600954610378908363ffffffff61098b16565b600955336000908152600a602052604090205461039b908363ffffffff61098b16565b336000818152600a60205260409020919091556003546103c7916001600160a01b039091169084610b00565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a26001548114610453576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60075481565b6001805481019081905561046f610a6f565b60015481146104c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b6000546001600160a01b031681565b6000600554600014156104ec57506000610301565b6001600160a01b0382166000908152600b60205260409020546005546105129190610b57565b92915050565b6001600160a01b03166000908152600a602052604090205490565b6003546001600160a01b031681565b60065481565b600061055642600454610b6e565b905090565b60018054810190819055816105a8576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6105b0610a6f565b6009546105c3908363ffffffff610b7d16565b600955336000908152600a60205260409020546105e6908363ffffffff610b7d16565b336000818152600a6020526040902091909155600354610613916001600160a01b03909116903085610bd7565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a26001548114610453576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000546001600160a01b031633146106e85760405162461bcd60e51b815260040180806020018281038252602a815260200180610f49602a913960400191505060405180910390fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561073357600080fd5b505afa158015610747573d6000803e3d6000fd5b505050506040513d602081101561075d57600080fd5b50519050806107a5576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b6007546107b990829063ffffffff610a2d16565b6006554260058190556007546107d5919063ffffffff610b7d16565b60045560088190556040517fd8cea0ecd56872ff072e771658b5682ffe4de16d752947f79597d600ea56f7a990600090a150565b60006009546000141561081e5750600061030a565b6105566009546102f1670de0b6b3a76400006006546109d490919063ffffffff16565b6002546001600160a01b031681565b336000908152600a60205260409020546108699061030d565b61087161045d565b565b60045481565b60055481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d60208110156108f457600080fd5b505190508061093c576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b6109576008546102f1836006546109d490919063ffffffff16565b60065560088190556040517f3cf21d43d853d313c15c52435ccb3d7a401cf38f82f7330c800290276ef31d3090600090a150565b60006109cd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c37565b9392505050565b6000826109e357506000610512565b828202828482816109f057fe5b04146109cd5760405162461bcd60e51b8152600401808060200182810382526021815260200180610f286021913960400191505060405180910390fd5b60006109cd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610cce565b6000610a7a33610271565b336000908152600b60205260409020429055905080156104c557600254610ab1906001600160a01b0316338363ffffffff610b0016565b600854610ac4908263ffffffff61098b16565b60085560408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b52908490610d33565b505050565b600081831015610b6757816109cd565b5090919050565b6000818310610b6757816109cd565b6000828201838110156109cd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610c31908590610d33565b50505050565b60008184841115610cc65760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c8b578181015183820152602001610c73565b50505050905090810190601f168015610cb85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610d1d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c8b578181015183820152602001610c73565b506000838581610d2957fe5b0495945050505050565b610d45826001600160a01b0316610eeb565b610d96576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610dd45780518252601f199092019160209182019101610db5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610e36576040519150601f19603f3d011682016040523d82523d6000602084013e610e3b565b606091505b509150915081610e92576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610c3157808060200190516020811015610eae57600080fd5b5051610c315760405162461bcd60e51b815260040180806020018281038252602a815260200180610f73602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590610f1f5750808214155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820606167aa91bd783f47848ea8f993b74e74e87890b6ba655b1569bb9fc588842364736f6c63430005100032

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

00000000000000000000000089323ba4b757b31555a85a08e87bca288f891f780000000000000000000000005322a3556f979ce2180b30e689a9436fddcb1021000000000000000000000000d5525d397898e5502075ea5e830d8914f6f0affe

-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0x89323bA4b757B31555a85a08E87BCa288f891F78
Arg [1] : _rewardsToken (address): 0x5322A3556F979cE2180B30e689a9436fDDCB1021
Arg [2] : _stakingToken (address): 0xD5525D397898e5502075Ea5E830d8914f6F0affe

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000089323ba4b757b31555a85a08e87bca288f891f78
Arg [1] : 0000000000000000000000005322a3556f979ce2180b30e689a9436fddcb1021
Arg [2] : 000000000000000000000000d5525d397898e5502075ea5e830d8914f6f0affe


Deployed Bytecode Sourcemap

19910:4406:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19910:4406:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21705:321;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21705:321:0;-1:-1:-1;;;;;21705:321:0;;:::i;:::-;;;;;;;;;;;;;;;;20922:93;;;:::i;22473:355::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22473:355:0;;:::i;:::-;;20303:40;;;:::i;22836:72::-;;;:::i;19656:34::-;;;:::i;:::-;;;;-1:-1:-1;;;;;19656:34:0;;;;;;;;;;;;;;21478:219;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21478:219:0;-1:-1:-1;;;;;21478:219:0;;:::i;21023:112::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21023:112:0;-1:-1:-1;;;;;21023:112:0;;:::i;20159:26::-;;;:::i;20267:29::-;;;:::i;21143:131::-;;;:::i;22088:377::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22088:377:0;;:::i;23715:375::-;;;:::i;21282:188::-;;;:::i;20126:26::-;;;:::i;23278:97::-;;;:::i;20192:31::-;;;:::i;20230:30::-;;;:::i;23383:268::-;;;:::i;21705:321::-;21759:7;21779:21;21803:27;21822:7;21803:18;:27::i;:::-;21779:51;-1:-1:-1;21845:18:0;21841:59;;21887:1;21880:8;;;;;21841:59;21917:101;22013:4;21917:91;21991:16;:14;:16::i;:::-;21917:69;21940:45;21971:13;21940:26;:24;:26::i;:::-;:30;:45;:30;:45;:::i;:::-;-1:-1:-1;;;;;21917:18:0;;;;;;:9;:18;;;;;;;:69;:22;:69;:::i;:::-;:73;:91;:73;:91;:::i;:::-;:95;:101;:95;:101;:::i;:::-;21910:108;;;21705:321;;;;:::o;20922:93::-;20995:12;;20922:93;;:::o;22473:355::-;18676:1;18659:18;;;;;;;;22546:10;22538:40;;;;;-1:-1:-1;;;22538:40:0;;;;;;;;;;;;-1:-1:-1;;;22538:40:0;;;;;;;;;;;;;;;22589:12;:10;:12::i;:::-;22627;;:24;;22644:6;22627:24;:16;:24;:::i;:::-;22612:12;:39;22696:10;22686:21;;;;:9;:21;;;;;;:33;;22712:6;22686:33;:25;:33;:::i;:::-;22672:10;22662:21;;;;:9;:21;;;;;:57;;;;22730:12;;:45;;-1:-1:-1;;;;;22730:12:0;;;;22768:6;22730:25;:45::i;:::-;22791:29;;;;;;;;22801:10;;22791:29;;;;;;;;;;18771:13;;18755:12;:29;18747:73;;;;;-1:-1:-1;;;18747:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22473:355;;:::o;20303:40::-;;;;:::o;22836:72::-;18676:1;18659:18;;;;;;;;22888:12;:10;:12::i;:::-;18771:13;;18755:12;:29;18747:73;;;;;-1:-1:-1;;;18747:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22836:72;:::o;19656:34::-;;;-1:-1:-1;;;;;19656:34:0;;:::o;21478:219::-;21544:7;21568:11;;21583:1;21568:16;21564:57;;;-1:-1:-1;21608:1:0;21601:8;;21564:57;-1:-1:-1;;;;;21647:28:0;;;;;;:19;:28;;;;;;21677:11;;21638:51;;21647:28;21638:8;:51::i;:::-;21631:58;21478:219;-1:-1:-1;;21478:219:0:o;21023:112::-;-1:-1:-1;;;;;21109:18:0;21082:7;21109:18;;;:9;:18;;;;;;;21023:112::o;20159:26::-;;;-1:-1:-1;;;;;20159:26:0;;:::o;20267:29::-;;;;:::o;21143:131::-;21200:7;21227:39;21236:15;21253:12;;21227:8;:39::i;:::-;21220:46;;21143:131;:::o;22088:377::-;18676:1;18659:18;;;;;;;;22160:10;22152:37;;;;;-1:-1:-1;;;22152:37:0;;;;;;;;;;;;-1:-1:-1;;;22152:37:0;;;;;;;;;;;;;;;22200:12;:10;:12::i;:::-;22238;;:24;;22255:6;22238:24;:16;:24;:::i;:::-;22223:12;:39;22307:10;22297:21;;;;:9;:21;;;;;;:33;;22323:6;22297:33;:25;:33;:::i;:::-;22283:10;22273:21;;;;:9;:21;;;;;:57;;;;22341:12;;:64;;-1:-1:-1;;;;;22341:12:0;;;;22391:4;22398:6;22341:29;:64::i;:::-;22431:26;;;;;;;;22438:10;;22431:26;;;;;;;;;;18771:13;;18755:12;:29;18747:73;;;;;-1:-1:-1;;;18747:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;23715:375;19801:19;;-1:-1:-1;;;;;19801:19:0;19787:10;:33;19779:88;;;;-1:-1:-1;;;19779:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23789:12;;:37;;;-1:-1:-1;;;23789:37:0;;23820:4;23789:37;;;;;;23774:12;;-1:-1:-1;;;;;23789:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;23789:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23789:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23789:37:0;;-1:-1:-1;23843:11:0;23835:39;;;;;-1:-1:-1;;;23835:39:0;;;;;;;;;;;;-1:-1:-1;;;23835:39:0;;;;;;;;;;;;;;;23908:15;;23896:28;;:7;;:28;:11;:28;:::i;:::-;23883:10;:41;23949:15;23935:11;:29;;;24008:15;;23988:36;;23949:15;23988:36;:19;:36;:::i;:::-;23973:12;:51;24033:16;:26;;;24073:9;;;;-1:-1:-1;;24073:9:0;19878:1;23715:375::o;21282:188::-;21329:7;21353:12;;21369:1;21353:17;21349:58;;;-1:-1:-1;21394:1:0;21387:8;;21349:58;21424:38;21449:12;;21424:20;21439:4;21424:10;;:14;;:20;;;;:::i;20126:26::-;;;-1:-1:-1;;;;;20126:26:0;;:::o;23278:97::-;23333:10;23323:21;;;;:9;:21;;;;;;23314:31;;:8;:31::i;:::-;23356:11;:9;:11::i;:::-;23278:97::o;20192:31::-;;;;:::o;20230:30::-;;;;:::o;23383:268::-;23432:12;;:37;;;-1:-1:-1;;;23432:37:0;;23463:4;23432:37;;;;;;23417:12;;-1:-1:-1;;;;;23432:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;23432:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23432:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23432:37:0;;-1:-1:-1;23486:11:0;23478:39;;;;;-1:-1:-1;;;23478:39:0;;;;;;;;;;;;-1:-1:-1;;;23478:39:0;;;;;;;;;;;;;;;23541:45;23569:16;;23541:23;23556:7;23541:10;;:14;;:23;;;;:::i;:45::-;23528:10;:58;23595:16;:26;;;23635:8;;;;-1:-1:-1;;23635:8:0;23383:268;:::o;2090:136::-;2148:7;2175:43;2179:1;2182;2175:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;2168:50;2090:136;-1:-1:-1;;;2090:136:0:o;3006:471::-;3064:7;3309:6;3305:47;;-1:-1:-1;3339:1:0;3332:8;;3305:47;3376:5;;;3380:1;3376;:5;:1;3400:5;;;;;:10;3392:56;;;;-1:-1:-1;;;3392:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3945:132;4003:7;4030:39;4034:1;4037;4030:39;;;;;;;;;;;;;;;;;:3;:39::i;22916:354::-;22957:14;22974:18;22981:10;22974:6;:18::i;:::-;23023:10;23003:31;;;;:19;:31;;;;;23037:15;23003:49;;22957:35;-1:-1:-1;23067:10:0;;23063:200;;23094:12;;:45;;-1:-1:-1;;;;;23094:12:0;23120:10;23132:6;23094:45;:25;:45;:::i;:::-;23173:16;;:28;;23194:6;23173:28;:20;:28;:::i;:::-;23154:16;:47;23221:30;;;;;;;;23232:10;;23221:30;;;;;;;;;;22916:354;:::o;14198:176::-;14307:58;;;-1:-1:-1;;;;;14307:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;14307:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;14281:85:0;;14300:5;;14281:18;:85::i;:::-;14198:176;;;:::o;194:107::-;252:7;284:1;279;:6;;:14;;292:1;279:14;;;-1:-1:-1;288:1:0;;194:107;-1:-1:-1;194:107:0:o;377:106::-;435:7;466:1;462;:5;:13;;474:1;462:13;;1634:181;1692:7;1724:5;;;1748:6;;;;1740:46;;;;;-1:-1:-1;;;1740:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;14382:204;14509:68;;;-1:-1:-1;;;;;14509:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;14509:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;14483:95:0;;14502:5;;14483:18;:95::i;:::-;14382:204;;;;:::o;2563:192::-;2649:7;2685:12;2677:6;;;;2669:29;;;;-1:-1:-1;;;2669:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2669:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2721:5:0;;;2563:192::o;4607:345::-;4693:7;4795:12;4788:5;4780:28;;;;-1:-1:-1;;;4780:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;4780:28:0;;4819:9;4835:1;4831;:5;;;;;;;4607:345;-1:-1:-1;;;;;4607:345:0:o;16237:1114::-;16841:27;16849:5;-1:-1:-1;;;;;16841:25:0;;:27::i;:::-;16833:71;;;;;-1:-1:-1;;;16833:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16978:12;16992:23;17027:5;-1:-1:-1;;;;;17019:19:0;17039:4;17019:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;17019:25:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;16977:67:0;;;;17063:7;17055:52;;;;;-1:-1:-1;;;17055:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17124:17;;:21;17120:224;;17266:10;17255:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17255:30:0;17247:85;;;;-1:-1:-1;;;17247:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11131:810;11191:4;11850:20;;11693:66;11890:15;;;;;:42;;;11921:11;11909:8;:23;;11890:42;11882:51;11131:810;-1:-1:-1;;;;11131:810:0:o

Swarm Source

bzzr://606167aa91bd783f47848ea8f993b74e74e87890b6ba655b1569bb9fc5888423

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