Contract 0xa9ecf35F8Fb77083d33D8723B94E87957F4091cF

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfc115d24dde350d2f24ca2d9de7bd7957aaa74c128ad19168edcf2265221bc73Update Rewards239928342022-01-21 16:31:422 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0360626700
0xaedaaf32878ba5108a10f85dfdba74454576b3f9c968bfe8648eb85e210a40c2Update Rewards239928302022-01-21 16:31:242 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0360626700
0x0c6c0227048d163f8f19d1864da43bfc7096df11a18e46adbf934464777e8e6bUpdate Rewards239928262022-01-21 16:31:162 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0360626700
0x3d4d8d18a9104f86e621c6237dc267ad985e388988216afbbe888acb2ddedc29Update Rewards239928222022-01-21 16:31:082 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0360626700
0xa96e7567a747f480d6d876df406873c5c28227fd89b29b217d24551dcfbf767eUpdate Rewards239928182022-01-21 16:31:002 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.036071700
0x9e893140e1cd44fb8b86f6b3ab53d325473b53304ef72f8ade73de8f92a57ba9Update Rewards239928132022-01-21 16:30:502 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.036071700
0x19365e7db344ea35ef93e0f3ddfa006549a4ae2106d06e1943c927fbb4c0abd8Update Rewards239928082022-01-21 16:30:402 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0360626700
0x7f0ef087c9c4e896e7ffa7c312942dec10f8b6be0c4dd9f7223eaf4c6ada25afUpdate Rewards239928022022-01-21 16:30:282 days 5 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0360626700
0x6e7775a63edea16e788de7f0970b7ed86d389b5b4e875699e8857327627ff48bNotify Reward Am...239299452022-01-20 2:54:183 days 19 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0812095500
0x09ba33d6361028d869056877871663715f8e79d7a995e5e4de935ee2edbfb7fdUpdate Rewards239298872022-01-20 2:52:183 days 19 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.024353500
0xb9d789149737ab7592c359951f9f419de3f3177bf849221b226c6490a5e564c8Deploy239293442022-01-20 2:33:403 days 19 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.6080755500
0x9f5cd6f188e9bfac112826d7c8254c09941854e44e75ae4cef3857547d4dc329Deploy239200282022-01-19 20:43:304 days 1 hr ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.4864604400
0x2aede6d4efb81ddede05c75464ff3abff892b101e9c9b19027cc2a99637f3e94Update Rewards237138472022-01-14 15:53:359 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0030903660
0x58516a1b37c63e239f5480fa5a7550cb6e6528bd728c023e0841e1be07c3324dUpdate Rewards237138432022-01-14 15:53:279 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0030910860
0x8e273975f491c0c22ae31d0ac16cf1798b59a4c75807be7f7060602e6289af28Update Rewards237138382022-01-14 15:53:179 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0030910860
0x125279c08ac4b499c44225534593a047c736a4e953c96d5eb0f46fa121f5540cUpdate Rewards237138332022-01-14 15:53:079 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.003091860
0x4d882f9b33a95c28f9422c6481513fbbba0cc7ddc0481746d142acbbed289b63Update Rewards237138292022-01-14 15:52:599 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.003091860
0xca66fd1ce3731ab11da61515a3b16952c87fc1b87fadab7da9559b6f8c050be5Update Rewards237138252022-01-14 15:52:519 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0030910860
0xf4348d2952372112f0265818bbc576240dbdaf87621f036b6af171179c46bdc7Update Rewards237138202022-01-14 15:52:419 days 6 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0030910860
0xfe95af56c00963545cf36d8ad0b27981184a1e80c3991081c08ae7a0ac0ce156Update Rewards234488112022-01-07 17:41:3816 days 4 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0283283550
0x00d27287e64e89851efbef111ab3fea408c3c135ce4b074557fd78668cda0430Update Rewards234488062022-01-07 17:41:2816 days 4 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0283349550
0xacaae0aa5232d31a07019d522a7bd5f04c6b804fc8d593d3fccad79793613227Update Rewards234488002022-01-07 17:41:1616 days 4 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0283349550
0xdc0c3f9ece8d752521d94010679f27e2ec3dd2b9fdef11fc161a6b37c49dea36Update Rewards234487962022-01-07 17:41:0816 days 4 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0283415550
0xd76abd105cd53cc9122403966e7b1eb599e7e76f7f03bc395ff7223bb311429bUpdate Rewards234487902022-01-07 17:40:5616 days 4 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0283415550
0x254e7bd88fefc5abcaf2c5b6821db73cce6f0dd8d9e33638e1263432638e1f9dUpdate Rewards234487832022-01-07 17:40:4216 days 4 hrs ago0xb0dd96118594903bacb2746eb228550c10b2b1da IN  0xa9ecf35f8fb77083d33d8723b94e87957f4091cf0 MATIC0.0283349550
[ Download CSV Export 
Latest 9 internal transactions
Parent Txn Hash Block From To Value
0xb9d789149737ab7592c359951f9f419de3f3177bf849221b226c6490a5e564c8239293442022-01-20 2:33:403 days 19 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0x9f5cd6f188e9bfac112826d7c8254c09941854e44e75ae4cef3857547d4dc329239200282022-01-19 20:43:304 days 1 hr ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0xc93d8aa76516fc6d8a6ce5092cd2aa6b9a1d88d6ad4681280f417ac6f760b285224801822021-12-13 15:45:4641 days 6 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0xe58d2de5b1d97847ad458108224f110bee4d891466768af42a07da4935dbe443215606232021-11-19 16:21:2865 days 5 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0xa00ca20a9b3ba67971e79bbc3bb77f87f2c5521af49d993be8fa3563fad5f1cd211844012021-11-09 22:07:3974 days 23 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0xb32ae9cd111ea962af92b66f545e607d4b29cdee3e1e755349047dbecb5e892a183465632021-08-24 14:02:06152 days 7 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0xde13dac89e73d1b533285a93ffb14d08bc2002c765dc3bf7a92146264bb201a9180498782021-08-16 15:33:11160 days 6 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0xe85407e76b04653837dbdb876332c32fc5f77fbe187ad0e0448a99cbb4022de9168877962021-07-15 13:01:44192 days 8 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
0x73bb38f89c48158ccb34acbd2e6a8422aace25d89c70d6fdb3c5ed9c385f8100168877892021-07-15 13:01:30192 days 8 hrs ago 0xa9ecf35f8fb77083d33d8723b94e87957f4091cf  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultDistributionFactory

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 2 : VaultDistributionFactory.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.5.17;

import "./VaultDistributionRewards.sol";

contract VaultDistributionFactory is Ownable {
	// immutables
	address public rewardsToken;
	uint256 public stakingRewardsGenesis;

	// the staking tokens for which the rewards contract has been deployed
	address[] public stakingTokens;

	// info about rewards for a particular staking token
	struct StakingRewardsInfo {
		address stakingRewards;
		uint256 rewardAmount;
		uint256 endTime;
	}

	// rewards info by staking token
	mapping(address => StakingRewardsInfo)
		public stakingRewardsInfoByStakingToken;

	constructor(address _rewardsToken, uint256 _stakingRewardsGenesis)
		public
		Ownable()
	{
		require(
			_stakingRewardsGenesis >= block.timestamp,
			"StakingRewardsFactory::constructor: genesis too soon"
		);
		require(
			_rewardsToken != address(0),
			"rewards tokend cannot be zero address"
		);
		rewardsToken = _rewardsToken;
		stakingRewardsGenesis = _stakingRewardsGenesis;
	}

	///// permissioned functions

	// deploy a staking reward contract for the staking token, and store the reward amount
	// the reward will be distributed to the staking reward contract no sooner than the genesis
	function deploy(
		address stakingToken,
		uint256 rewardAmount,
		address vault,
		uint256 endTime
	) public onlyOwner {
		StakingRewardsInfo storage info = stakingRewardsInfoByStakingToken[
			stakingToken
		];
		require(
			info.stakingRewards == address(0),
			"StakingRewardsFactory::deploy: already deployed"
		);

		info.stakingRewards = address(
			new VaultDistributionRewards(
				/*_rewardsDistribution=*/
				address(this),
				rewardsToken,
				vault,
				owner()
			)
		);
		info.rewardAmount = rewardAmount;
		info.endTime = endTime;
		stakingTokens.push(stakingToken);
	}

	// updates the rerward amount and endTime for the distribution contract
	function updateRewards(
		address stakingToken,
		uint256 rewardAmount,
		uint256 endTime
	) public onlyOwner {
		require(
			stakingToken != address(0),
			"staking tokend cannot be zero address"
		);
		StakingRewardsInfo storage info = stakingRewardsInfoByStakingToken[
			stakingToken
		];
		info.rewardAmount = rewardAmount;
		info.endTime = endTime;
	}

	///// permissionless functions

	// call notifyRewardAmount for all staking tokens.
	function notifyRewardAmounts() public {
		require(
			stakingTokens.length > 0,
			"StakingRewardsFactory::notifyRewardAmounts: called before any deploys"
		);
		for (uint256 i = 0; i < stakingTokens.length; i++) {
			notifyRewardAmount(stakingTokens[i]);
		}
	}

	// notify reward amount for an individual staking token.
	// this is a fallback in case the notifyRewardAmounts costs too much gas to call for all contracts
	function notifyRewardAmount(address stakingToken) public {
		require(
			block.timestamp >= stakingRewardsGenesis,
			"StakingRewardsFactory::notifyRewardAmount: not ready"
		);

		StakingRewardsInfo storage info = stakingRewardsInfoByStakingToken[
			stakingToken
		];
		require(
			info.stakingRewards != address(0),
			"StakingRewardsFactory::notifyRewardAmount: not deployed"
		);

		if (info.rewardAmount > 0) {
			uint256 rewardAmount = info.rewardAmount;
			info.rewardAmount = 0;

			require(
				IERC20(rewardsToken).transfer(
					info.stakingRewards,
					rewardAmount
				),
				"StakingRewardsFactory::notifyRewardAmount: transfer failed"
			);
			VaultDistributionRewards(info.stakingRewards).notifyRewardAmount(
				rewardAmount,
				info.endTime
			);
		}
	}

	function sweep(
		address recipient,
		address erc20,
		uint256 transferAmount
	) public onlyOwner {
		require(recipient != address(0), "CANNOT TRANSFER TO ZERO ADDRESS");
		require(transferAmount > 0, "TRANSFER AMOUNT 0");
		require(
			IERC20(erc20).transfer(recipient, transferAmount),
			"StakingRewardsFactory::sweep: transfer failed"
		);
	}
}

File 2 of 2 : VaultDistributionRewards.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.5.17;

/**
 * @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.
	 *
	 * > 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 Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable {
	address private _owner;

	event OwnershipTransferred(
		address indexed previousOwner,
		address indexed newOwner
	);

	/**
	 * @dev Initializes the contract setting the deployer as the initial owner.
	 */
	constructor() internal {
		_owner = msg.sender;
		emit OwnershipTransferred(address(0), _owner);
	}

	/**
	 * @dev Returns the address of the current owner.
	 */
	function owner() public view returns (address) {
		return _owner;
	}

	/**
	 * @dev Throws if called by any account other than the owner.
	 */
	modifier onlyOwner() {
		require(isOwner(), "Ownable: caller is not the owner");
		_;
	}

	/**
	 * @dev Returns true if the caller is the current owner.
	 */
	function isOwner() public view returns (bool) {
		return msg.sender == _owner;
	}

	/**
	 * @dev Leaves the contract without owner. It will not be possible to call
	 * `onlyOwner` functions anymore. Can only be called by the current owner.
	 *
	 * > Note: Renouncing ownership will leave the contract without an owner,
	 * thereby removing any functionality that is only available to the owner.
	 */
	function renounceOwnership() public onlyOwner {
		emit OwnershipTransferred(_owner, address(0));
		_owner = address(0);
	}

	/**
	 * @dev Transfers ownership of the contract to a new account (`newOwner`).
	 * Can only be called by the current owner.
	 */
	function transferOwnership(address newOwner) public onlyOwner {
		_transferOwnership(newOwner);
	}

	/**
	 * @dev Transfers ownership of the contract to a new account (`newOwner`).
	 */
	function _transferOwnership(address newOwner) internal {
		require(
			newOwner != address(0),
			"Ownable: new owner is the zero address"
		);
		emit OwnershipTransferred(_owner, newOwner);
		_owner = newOwner;
	}
}

/**
 * @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) {
		require(b <= a, "SafeMath: subtraction overflow");
		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-solidity/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) {
		// Solidity only automatically asserts when dividing by 0
		require(b > 0, "SafeMath: division by zero");
		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) {
		require(b != 0, "SafeMath: modulo by zero");
		return a % b;
	}
}

/**
 * @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 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 that 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.
	 *
	 * > 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.

		uint256 size;
		// solhint-disable-next-line no-inline-assembly
		assembly {
			size := extcodesize(account)
		}
		return size > 0;
	}
}

/**
 * @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
		);
		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 aplied 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 {
	/// @dev 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"
		);
	}
}

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

	function rewardPerToken() external view returns (uint256);

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

	function getRewardForDuration() external view returns (uint256);

	function totalSupply() external view returns (uint256);

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

	// Mutative

	function stake(address user, uint256 amount) external;

	function withdraw(address user, uint256 amount) external;

	function getReward(address user) external;

	// function exit(address user) external;
}

contract RewardsDistributionRecipient {
	address public rewardsDistribution;

	function notifyRewardAmount(uint256 reward, uint256 endTime) external;

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

contract VaultDistributionRewards is
	IStakingRewards,
	RewardsDistributionRecipient,
	ReentrancyGuard
{
	using SafeMath for uint256;
	using SafeERC20 for IERC20;

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

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

	mapping(address => uint256) public userRewardPerTokenPaid;
	mapping(address => uint256) public rewards;

	uint256 private _totalSupply;
	mapping(address => uint256) private _balances;
	address public vault;
	address public owner;

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

	constructor(
		address _rewardsDistribution,
		address _rewardsToken,
		address _vault,
		address _owner
	) public {
		rewardsToken = IERC20(_rewardsToken);
		rewardsDistribution = _rewardsDistribution;
		vault = _vault;
		owner = _owner;
	}

	/* ========== 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 rewardPerTokenStored;
		}
		return
			rewardPerTokenStored.add(
				lastTimeRewardApplicable()
					.sub(lastUpdateTime)
					.mul(rewardRate)
					.mul(1e18)
					.div(_totalSupply)
			);
	}

	function earned(address account) public view returns (uint256) {
		return
			_balances[account]
				.mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
				.div(1e18)
				.add(rewards[account]);
	}

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

	function stake(address user, uint256 amount)
		external
		onlyVault
		nonReentrant
		updateReward(user)
	{
		require(amount > 0, "Cannot stake 0");
		_totalSupply = _totalSupply.add(amount);
		_balances[user] = _balances[user].add(amount);
		emit Staked(user, amount);
	}

	function withdraw(address user, uint256 amount)
		public
		onlyVault
		nonReentrant
		updateReward(user)
	{
		require(amount > 0, "Cannot withdraw 0");
		_totalSupply = _totalSupply.sub(amount);
		_balances[user] = _balances[user].sub(amount);
		emit Withdrawn(user, amount);
	}

	function getReward(address user) public nonReentrant updateReward(user) {
		uint256 reward = rewards[user];
		if (reward > 0) {
			rewards[user] = 0;
			rewardsToken.safeTransfer(user, reward);
			emit RewardPaid(user, reward);
		}
	}

	function sweep(
		address recipient,
		address erc20,
		uint256 transferAmount
	) public {
		require(msg.sender == owner, "INVALID ACCESS");
		require(recipient != address(0), "CANNOT TRANSFER TO ZERO ADDRESS");
		require(transferAmount > 0, "TRANSFER AMOUNT 0");
		require(
			IERC20(erc20).transfer(recipient, transferAmount),
			"VaultDistrubution::sweep: transfer failed"
		);
	}

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

	function notifyRewardAmount(uint256 reward, uint256 endTime)
		external
		onlyRewardsDistribution
		updateReward(address(0))
	{
		rewardsDuration = endTime.sub(block.timestamp);
		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.
		uint256 balance = rewardsToken.balanceOf(address(this));
		require(
			rewardRate <= balance.div(rewardsDuration),
			"Provided reward too high"
		);

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

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

	modifier updateReward(address account) {
		rewardPerTokenStored = rewardPerToken();
		lastUpdateTime = lastTimeRewardApplicable();
		if (account != address(0)) {
			rewards[account] = earned(account);
			userRewardPerTokenPaid[account] = rewardPerTokenStored;
		}
		_;
	}

	modifier onlyVault() {
		require(
			msg.sender == vault,
			"Invalid Access: Can only be accessed by ETHA Vaults"
		);
		_;
	}

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"_stakingRewardsGenesis","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":false,"inputs":[{"internalType":"address","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"deploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"stakingToken","type":"address"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"notifyRewardAmounts","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingRewardsGenesis","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingRewardsInfoByStakingToken","outputs":[{"internalType":"address","name":"stakingRewards","type":"address"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakingTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"erc20","type":"address"},{"internalType":"uint256","name":"transferAmount","type":"uint256"}],"name":"sweep","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"updateRewards","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516121fe3803806121fe8339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3428110156100c45760405162461bcd60e51b81526004018080602001828103825260348152602001806121ca6034913960400191505060405180910390fd5b6001600160a01b0382166101095760405162461bcd60e51b81526004018080602001828103825260258152602001806121a56025913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0393909316929092179091556002556120698061013c6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806381e162981161008c578063a0928c1111610066578063a0928c1114610251578063ae741d8d1461026b578063d1af0c7d14610273578063f2fde38b1461027b576100cf565b806381e16298146102075780638da5cb5b1461022d5780638f32d59b14610235576100cf565b8063278cdf1e146100d4578063344e5e34146101105780634a9bd8021461014957806362c067671461017b5780636cf8caf8146101b1578063715018a6146101ff575b600080fd5b61010e600480360360808110156100ea57600080fd5b506001600160a01b03813581169160208101359160408201351690606001356102a1565b005b61012d6004803603602081101561012657600080fd5b503561041b565b604080516001600160a01b039092168252519081900360200190f35b61010e6004803603606081101561015f57600080fd5b506001600160a01b038135169060208101359060400135610442565b61010e6004803603606081101561019157600080fd5b506001600160a01b038135811691602081013590911690604001356104f5565b6101d7600480360360208110156101c757600080fd5b50356001600160a01b03166106ac565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b61010e6106d7565b61010e6004803603602081101561021d57600080fd5b50356001600160a01b0316610768565b61012d61094f565b61023d61095e565b604080519115158252519081900360200190f35b61025961096f565b60408051918252519081900360200190f35b61010e610975565b61012d6109f5565b61010e6004803603602081101561029157600080fd5b50356001600160a01b0316610a04565b6102a961095e565b6102e8576040805162461bcd60e51b81526020600482018190526024820152600080516020611ed9833981519152604482015290519081900360640190fd5b6001600160a01b0380851660009081526004602052604090208054909116156103425760405162461bcd60e51b815260040180806020018281038252602f815260200180611eaa602f913960400191505060405180910390fd5b60015430906001600160a01b03168461035961094f565b60405161036590610aef565b6001600160a01b039485168152928416602084015290831660408084019190915292166060820152905190819003608001906000f0801580156103ac573d6000803e3d6000fd5b5081546001600160a01b03199081166001600160a01b039283161783556001808401969096556002909201929092556003805494850181556000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9093018054909316931692909217905550565b6003818154811061042857fe5b6000918252602090912001546001600160a01b0316905081565b61044a61095e565b610489576040805162461bcd60e51b81526020600482018190526024820152600080516020611ed9833981519152604482015290519081900360640190fd5b6001600160a01b0383166104ce5760405162461bcd60e51b8152600401808060200182810382526025815260200180611f786025913960400191505060405180910390fd5b6001600160a01b039092166000908152600460205260409020600181019190915560020155565b6104fd61095e565b61053c576040805162461bcd60e51b81526020600482018190526024820152600080516020611ed9833981519152604482015290519081900360640190fd5b6001600160a01b038316610597576040805162461bcd60e51b815260206004820152601f60248201527f43414e4e4f54205452414e5346455220544f205a45524f204144445245535300604482015290519081900360640190fd5b600081116105e0576040805162461bcd60e51b815260206004820152601160248201527005452414e5346455220414d4f554e54203607c1b604482015290519081900360640190fd5b816001600160a01b031663a9059cbb84836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561064057600080fd5b505af1158015610654573d6000803e3d6000fd5b505050506040513d602081101561066a57600080fd5b50516106a75760405162461bcd60e51b815260040180806020018281038252602d815260200180612008602d913960400191505060405180910390fd5b505050565b6004602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b6106df61095e565b61071e576040805162461bcd60e51b81526020600482018190526024820152600080516020611ed9833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002544210156107a95760405162461bcd60e51b8152600401808060200182810382526034815260200180611f9d6034913960400191505060405180910390fd5b6001600160a01b03808216600090815260046020526040902080549091166108025760405162461bcd60e51b8152600401808060200182810382526037815260200180611fd16037913960400191505060405180910390fd5b60018101541561094b5760018082018054600091829055915483546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561087257600080fd5b505af1158015610886573d6000803e3d6000fd5b505050506040513d602081101561089c57600080fd5b50516108d95760405162461bcd60e51b815260040180806020018281038252603a815260200180611f3e603a913960400191505060405180910390fd5b815460028301546040805163246132f960e01b8152600481018590526024810192909252516001600160a01b039092169163246132f99160448082019260009290919082900301818387803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b50505050505b5050565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b60025481565b6003546109b35760405162461bcd60e51b8152600401808060200182810382526045815260200180611ef96045913960600191505060405180910390fd5b60005b6003548110156109f2576109ea600382815481106109d057fe5b6000918252602090912001546001600160a01b0316610768565b6001016109b6565b50565b6001546001600160a01b031681565b610a0c61095e565b610a4b576040805162461bcd60e51b81526020600482018190526024820152600080516020611ed9833981519152604482015290519081900360640190fd5b6109f2816001600160a01b038116610a945760405162461bcd60e51b8152600401808060200182810382526026815260200180611e846026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61138780610afd8339019056fe608060405260006003556000600455600060055534801561001f57600080fd5b506040516113873803806113878339818101604052608081101561004257600080fd5b5080516020820151604083015160609093015160018055600280546001600160a01b03199081166001600160a01b0394851617909155600080548216948416949094178455600c8054821695841695909517909455600d80549094169116179091556112d39081906100b490396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80638b876347116100b8578063cd3daf9d1161007c578063cd3daf9d146102f9578063d1af0c7d14610301578063df136d6514610309578063ebe2b12b14610311578063f3fef3a314610319578063fbfa77cf1461034557610141565b80638b876347146102715780638da5cb5b14610297578063adc9772e1461029f578063c00007b0146102cb578063c8f33c91146102f157610141565b8063386a95251161010a578063386a9525146101d95780633fc6df6e146101e157806362c067671461020557806370a082311461023b5780637b0a47ee1461026157806380faa57d1461026957610141565b80628cc262146101465780630700037d1461017e57806318160ddd146101a45780631c1f78eb146101ac578063246132f9146101b4575b600080fd5b61016c6004803603602081101561015c57600080fd5b50356001600160a01b031661034d565b60408051918252519081900360200190f35b61016c6004803603602081101561019457600080fd5b50356001600160a01b03166103e3565b61016c6103f5565b61016c6103fc565b6101d7600480360360408110156101ca57600080fd5b508035906020013561041a565b005b61016c61066c565b6101e9610672565b604080516001600160a01b039092168252519081900360200190f35b6101d76004803603606081101561021b57600080fd5b506001600160a01b03813581169160208101359091169060400135610681565b61016c6004803603602081101561025157600080fd5b50356001600160a01b0316610841565b61016c61085c565b61016c610862565b61016c6004803603602081101561028757600080fd5b50356001600160a01b0316610870565b6101e9610882565b6101d7600480360360408110156102b557600080fd5b506001600160a01b038135169060200135610891565b6101d7600480360360208110156102e157600080fd5b50356001600160a01b0316610a6d565b61016c610bbc565b61016c610bc2565b6101e9610c1c565b61016c610c2b565b61016c610c31565b6101d76004803603604081101561032f57600080fd5b506001600160a01b038135169060200135610c37565b6101e9610e16565b6001600160a01b03811660009081526009602090815260408083205460089092528220546103dd91906103d190670de0b6b3a7640000906103c5906103a090610394610bc2565b9063ffffffff610e2516565b6001600160a01b0388166000908152600b60205260409020549063ffffffff610e8216565b9063ffffffff610ee216565b9063ffffffff610f4c16565b92915050565b60096020526000908152604090205481565b600a545b90565b6000610415600554600454610e8290919063ffffffff16565b905090565b6000546001600160a01b031633146104635760405162461bcd60e51b815260040180806020018281038252602a81526020018061124b602a913960400191505060405180910390fd5b600061046d610bc2565b600755610478610862565b6006556001600160a01b038116156104bf576104938161034d565b6001600160a01b0382166000908152600960209081526040808320939093556007546008909152919020555b6104cf824263ffffffff610e2516565b60055560035442106104f7576005546104ef90849063ffffffff610ee216565b600455610546565b60035460009061050d904263ffffffff610e2516565b9050600061052660045483610e8290919063ffffffff16565b600554909150610540906103c5878463ffffffff610f4c16565b60045550505b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561059157600080fd5b505afa1580156105a5573d6000803e3d6000fd5b505050506040513d60208110156105bb57600080fd5b50516005549091506105d490829063ffffffff610ee216565b600454111561062a576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b4260065560038390556040805185815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505050565b60055481565b6000546001600160a01b031681565b600d546001600160a01b031633146106d1576040805162461bcd60e51b815260206004820152600e60248201526d494e56414c49442041434345535360901b604482015290519081900360640190fd5b6001600160a01b03831661072c576040805162461bcd60e51b815260206004820152601f60248201527f43414e4e4f54205452414e5346455220544f205a45524f204144445245535300604482015290519081900360640190fd5b60008111610775576040805162461bcd60e51b815260206004820152601160248201527005452414e5346455220414d4f554e54203607c1b604482015290519081900360640190fd5b816001600160a01b031663a9059cbb84836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156107d557600080fd5b505af11580156107e9573d6000803e3d6000fd5b505050506040513d60208110156107ff57600080fd5b505161083c5760405162461bcd60e51b81526004018080602001828103825260298152602001806111ce6029913960400191505060405180910390fd5b505050565b6001600160a01b03166000908152600b602052604090205490565b60045481565b600061041542600354610fa6565b60086020526000908152604090205481565b600d546001600160a01b031681565b600c546001600160a01b031633146108da5760405162461bcd60e51b81526004018080602001828103825260338152602001806112186033913960400191505060405180910390fd5b60018054810190819055826108ed610bc2565b6007556108f8610862565b6006556001600160a01b0381161561093f576109138161034d565b6001600160a01b0382166000908152600960209081526040808320939093556007546008909152919020555b60008311610985576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600a54610998908463ffffffff610f4c16565b600a556001600160a01b0384166000908152600b60205260409020546109c4908463ffffffff610f4c16565b6001600160a01b0385166000818152600b6020908152604091829020939093558051868152905191927f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d92918290030190a250600154811461083c576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6001805481019081905581610a80610bc2565b600755610a8b610862565b6006556001600160a01b03811615610ad257610aa68161034d565b6001600160a01b0382166000908152600960209081526040808320939093556007546008909152919020555b6001600160a01b0383166000908152600960205260409020548015610b60576001600160a01b03808516600090815260096020526040812055600254610b209116858363ffffffff610fbc16565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001548114610bb8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60065481565b6000600a5460001415610bd857506007546103f9565b610415610c0d600a546103c5670de0b6b3a7640000610c01600454610c01600654610394610862565b9063ffffffff610e8216565b6007549063ffffffff610f4c16565b6002546001600160a01b031681565b60075481565b60035481565b600c546001600160a01b03163314610c805760405162461bcd60e51b81526004018080602001828103825260338152602001806112186033913960400191505060405180910390fd5b6001805481019081905582610c93610bc2565b600755610c9e610862565b6006556001600160a01b03811615610ce557610cb98161034d565b6001600160a01b0382166000908152600960209081526040808320939093556007546008909152919020555b60008311610d2e576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600a54610d41908463ffffffff610e2516565b600a556001600160a01b0384166000908152600b6020526040902054610d6d908463ffffffff610e2516565b6001600160a01b0385166000818152600b6020908152604091829020939093558051868152905191927f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d592918290030190a250600154811461083c576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600c546001600160a01b031681565b600082821115610e7c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610e91575060006103dd565b82820282848281610e9e57fe5b0414610edb5760405162461bcd60e51b81526004018080602001828103825260218152602001806111f76021913960400191505060405180910390fd5b9392505050565b6000808211610f38576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481610f4357fe5b04949350505050565b600082820183811015610edb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000818310610fb55781610edb565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261083c90849061101b826001600160a01b03166111c7565b61106c576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106110aa5780518252601f19909201916020918201910161108b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461110c576040519150601f19603f3d011682016040523d82523d6000602084013e611111565b606091505b509150915081611168576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156111c15780806020019051602081101561118457600080fd5b50516111c15760405162461bcd60e51b815260040180806020018281038252602a815260200180611275602a913960400191505060405180910390fd5b50505050565b3b15159056fe5661756c74446973747275627574696f6e3a3a73776565703a207472616e73666572206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e76616c6964204163636573733a2043616e206f6e6c792062652061636365737365642062792045544841205661756c747343616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158203b67be8db834fa00333d097b487f2d5f93ac8e0bee9175dea59bcd4bf1065a6b64736f6c634300051100324f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735374616b696e6752657761726473466163746f72793a3a6465706c6f793a20616c7265616479206465706c6f7965644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e74733a2063616c6c6564206265666f726520616e79206465706c6f79735374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a207472616e73666572206661696c65647374616b696e6720746f6b656e642063616e6e6f74206265207a65726f20616464726573735374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a206e6f742072656164795374616b696e6752657761726473466163746f72793a3a6e6f74696679526577617264416d6f756e743a206e6f74206465706c6f7965645374616b696e6752657761726473466163746f72793a3a73776565703a207472616e73666572206661696c6564a265627a7a7231582037364a308478c6e453b26ac7f6206270289c69c65722a593001e1a3f3e46c1e464736f6c634300051100327265776172647320746f6b656e642063616e6e6f74206265207a65726f20616464726573735374616b696e6752657761726473466163746f72793a3a636f6e7374727563746f723a2067656e6573697320746f6f20736f6f6e00000000000000000000000059e9261255644c411afdd00bd89162d09d862e380000000000000000000000000000000000000000000000000000000060f03f94

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

00000000000000000000000059e9261255644c411afdd00bd89162d09d862e380000000000000000000000000000000000000000000000000000000060f03f94

-----Decoded View---------------
Arg [0] : _rewardsToken (address): 0x59e9261255644c411afdd00bd89162d09d862e38
Arg [1] : _stakingRewardsGenesis (uint256): 1626357652

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000059e9261255644c411afdd00bd89162d09d862e38
Arg [1] : 0000000000000000000000000000000000000000000000000000000060f03f94


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