Contract 0xB3a2bA62802dF29e32Bb78Ff58f0dED8a36c321d

 
Ad
Ad
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb4e6092defb9c2da529f5367eb8e4e46e53bd49126e68d5857ffd15c220f6e54Exit170000312021-07-18 14:36:47132 days 8 hrs ago0x54688a441c8e9f17253038ff8a4336b679c02a4b IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00032065783
0xc9a71d9378faa7880ffeb814e445383a43ab96f9a17a21cd2da3face47c75c51Get Reward170000272021-07-18 14:36:39132 days 8 hrs ago0x54688a441c8e9f17253038ff8a4336b679c02a4b IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00073678995
0xf2e0c9dc4a4cce17d54641d5c4f3cd7f2c5c4fe9a020166696ca49faa00966beExit146881752021-05-19 16:09:14192 days 6 hrs ago0xbfef947b244f9f013265d6246d62802990149964 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00131311
0x6ad9cc697e8e4c273ae97a7a35d60d1c35e982c9460fdde6657df6247429e5f2Exit146877282021-05-19 15:53:17192 days 6 hrs ago0x12d234465961dd8813726064bf71d64c19e486c5 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00131311
0x161354e9151aae3b71c13bb322ba145d26727bfbc269ee22c20c384afadc8ccaExit144173832021-05-12 21:34:36199 days 1 hr ago0xe809968423551135675f38ca77d9595c5d225918 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000826025
0x8a68a1c6cab5fb5105ac3d8983ed7fc1ff7fc04cfcc4db1a426ff4c29e4f7b05Exit144138822021-05-12 19:17:11199 days 3 hrs ago0x0cebccb5445f5f4bf97cc832af4849467951fca8 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00119431
0x16ead9b3c4f7c868ba50216b5b69ffe7a74b066a6c4471119f1d4d9cde4b4cccExit144047892021-05-12 13:47:19199 days 9 hrs ago0x3c229864378b3b0adf98ae247ca33986aed8ec1e IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00102931
0x46a03ab5d2a768b7be1233b99bbf12817d4f61cacd3e77495264f91176d0349aExit143939122021-05-12 7:00:56199 days 15 hrs ago0x4eadb34712d8abf5bee9bf1f13c5b9a94c93ba09 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00102931
0xb5cfaa5561daceb2c1480d92ae0bdc1aa539298d192c9bc09b3808882965286bExit143706332021-05-11 15:57:32200 days 6 hrs ago0x30f89f5f4cf25f457b4d9cbfb64a64a97f00bed0 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000811025
0x126fe7e3e50e766fd4d929655c8ff6203ba77dd997ce55e042f4b78841a93510Exit143556132021-05-11 7:02:27200 days 15 hrs ago0xa2e7002e0ffc42e4228292d67c13a81fdd191870 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00114811
0xd226a00c8193f4129db67232c8d2612af623ac43b984f71d8ad17fa710ddde86Exit143504012021-05-11 3:59:58200 days 18 hrs ago0x0a715ec6549926c0863e3ea21fc5d682de28d386 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000826025
0xf4cfb3c75cd164026bf7a684ec5a5228cf1b697fa6f1b20ca08add148070a911Exit143341632021-05-10 18:15:48201 days 4 hrs ago0x8de3c3891268502f77db7e876d727257dec0f852 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00102931
0x31ddf7f8ca254570aa8dbef43fc0769c8acc47263a3c4e5e8635191ca3e4b02cExit143335842021-05-10 17:49:37201 days 5 hrs ago0x4aa60959b1571e62f9b353937c3e45978fd07713 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00114811
0x4b98ecf035b60069334b991249e40de87556b6d9012bfde222c08e04f5cdc631Exit143316272021-05-10 16:40:39201 days 6 hrs ago0x0f288fa8dbc0283ee5be62c0cb2cd97ae8f1abb4 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00114811
0xf93612b1bbc2b6b31b6fc35826588851762f9ae5f85d43eb166f35b2c0d7e409Exit143121822021-05-10 5:21:09201 days 17 hrs ago0x7d568306e1157a92ea4e0d7774575b7e7e6f53b5 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000826025
0x93f50878a137aee4cbe5c405abe5e50ce5f70adecd9b928019d0008069a74623Get Reward143117022021-05-10 5:04:03201 days 17 hrs ago0x7d568306e1157a92ea4e0d7774575b7e7e6f53b5 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000751995
0x112b6100add9bf5755331141fdf822a57022c0590115a35b4c02e7fa93186672Exit143036032021-05-10 0:21:32201 days 22 hrs ago0x9776a4a25e08230aa132865d5fce43bc48f0eb18 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000826025
0x8882b159c2509dd7cfafb82490a95cd69da614a5dad3f0d5dbd03a7150a97c1fGet Reward143035892021-05-10 0:21:04201 days 22 hrs ago0x9776a4a25e08230aa132865d5fce43bc48f0eb18 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000783195
0xa06fea336dbea973a98ecf52b2b4c37041beff027b3e1413bdefde19586ffa5aExit143032152021-05-10 0:08:12201 days 22 hrs ago0x01e9bb97414d5744d640790ed6371973fde5e5fa IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00114811
0x5ddec37cce85769ea36caa0cb3dbb20d7affee456aa29c66c78a0dccbb762a64Exit143027862021-05-09 23:53:30201 days 22 hrs ago0x440db9410ef21b781dedf6365832bd11b5037595 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00114811
0xee024c32e61e9d4395fdc10200b98f610bae98571f0a0eb1c39d24744e64a566Get Reward142477072021-05-08 15:42:56203 days 7 hrs ago0x30f89f5f4cf25f457b4d9cbfb64a64a97f00bed0 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000751995
0x284a84b0a4b680184fccaf1e823c46ed3278ec374111b19e91de946041d90c91Get Reward142468772021-05-08 15:14:18203 days 7 hrs ago0xe809968423551135675f38ca77d9595c5d225918 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000783195
0x6993cf1bceb70f22cab449654c8baae1a47ae9c65dbfb80ae7a7f1dbac9fbb11Exit142329912021-05-08 7:02:12203 days 15 hrs ago0x5100739f72caf71a30c02af20987ef3abcfe8cd8 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000826025
0xce67b8c97039cd2b8196bce5c5f05659a6f9faa4791043dee7b4d4c95818f774Get Reward142327272021-05-08 6:53:08203 days 16 hrs ago0x5100739f72caf71a30c02af20987ef3abcfe8cd8 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.000751995
0xbf994349189b9b55e061f815414407794010dccbda6a41004bef629c6821064eExit142327172021-05-08 6:52:48203 days 16 hrs ago0x91c8c091d0e421e236f9bc14df47588532921100 IN  0xb3a2ba62802df29e32bb78ff58f0ded8a36c321d0 MATIC0.00114811
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x7b44626572f91046b1693ba262a760e9b1b2fbaabc251ef71c0f599e75e6e081129768762021-04-07 11:47:13234 days 11 hrs ago 0x3156a51d75c2d328ea35446969197ffc2b89771e  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewards

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-06-30
*/

// File: openzeppelin-solidity-2.3.0/contracts/math/Math.sol

pragma solidity ^0.5.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

// File: openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        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;
    }
}

// File: openzeppelin-solidity-2.3.0/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.0;

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

// File: openzeppelin-solidity-2.3.0/contracts/token/ERC20/ERC20Detailed.sol

pragma solidity ^0.5.0;


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

// File: openzeppelin-solidity-2.3.0/contracts/utils/Address.sol

pragma solidity ^0.5.0;

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

// File: openzeppelin-solidity-2.3.0/contracts/token/ERC20/SafeERC20.sol

pragma solidity ^0.5.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");
        }
    }
}

// File: openzeppelin-solidity-2.3.0/contracts/utils/ReentrancyGuard.sol

pragma solidity ^0.5.0;

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

// File: contracts/interfaces/IStakingRewards.sol

pragma solidity >=0.4.24;


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

    function rewardPerToken(address rewardToken) external view returns (uint256);

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

    function getRewardForDuration(address rewardToken) external view returns (uint256);

    function totalSupply() external view returns (uint256);

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

    // Mutative

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;

    function getReward() external;

    function exit() external;
}

// File: contracts/RewardsDistributionRecipient.sol

pragma solidity >=0.5.16;

contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function notifyRewardAmount(address rewardToken, uint256 reward) external;

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

// File: contracts/StakingRewards.sol

pragma solidity >=0.5.16;






// Inheritance



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

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

    IERC20 public stakingToken;
    uint256 public periodFinish = 0;
    uint256 public rewardsDuration = 30 days;
    uint256 public rewardPerTokenStored;
    uint256 private _totalSupply;
    address[] private stakers;
    address[] public rewardTokens;

    mapping(address => uint256) public rewardsPerTokenMap;
    mapping(address => uint256) public tokenRewardRate;
    mapping(address => uint256) private _balances;
    mapping(address => uint256) public rewardLastUpdatedTime;
    mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
    mapping(address => mapping(address => uint256)) public rewards;

    struct RewardView {
        uint256 rewardAmount;
        address rewardToken;
    }

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

    constructor(
        address _rewardsDistribution,
        address[] memory _rewardTokens,
        address _stakingToken
    ) public {
        rewardTokens = _rewardTokens;
        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 stakerBalances() external view returns (address[] memory, uint256[] memory){
        uint stakerCount = stakers.length;
        uint256[] memory balances = new uint256[](stakerCount);
        for (uint i=0;i<stakers.length;i++){
            balances[i] = _balances[stakers[i]];
        }
        return (stakers, balances);
    }

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

    function rewardPerToken(address rewardToken) public view returns (uint256) {
        if (_totalSupply == 0) {
            return rewardsPerTokenMap[rewardToken];
        }
        return
            rewardsPerTokenMap[rewardToken].add(
                lastTimeRewardApplicable().sub(rewardLastUpdatedTime[rewardToken]).mul(tokenRewardRate[rewardToken]).mul(1e18).div(_totalSupply)
            );
    }

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

    function getRewardForDuration(address rewardToken) external view returns (uint256) {
        return tokenRewardRate[rewardToken].mul(rewardsDuration);
    }

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

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

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

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

    function stake(uint256 amount) external nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        _totalSupply = _totalSupply.add(amount);
        if(_balances[msg.sender] == 0){
            stakers.push(msg.sender);
        }
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        _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 updateReward(msg.sender) {
        for (uint i=0; i<rewardTokens.length; i++){        
            uint256 reward = rewards[msg.sender][rewardTokens[i]];
            if (reward > 0) {
                rewards[msg.sender][rewardTokens[i]] = 0;
                IERC20(rewardTokens[i]).safeTransfer(msg.sender, reward);
                emit RewardPaid(msg.sender, reward);
            }
        }
    }

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

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

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

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

        rewardLastUpdatedTime[rewardToken] = block.timestamp;
        tokenRewardRate[rewardToken] = rewardRate;
        emit RewardAdded(reward);
    }

    function rescueFunds(address tokenAddress, address receiver) external onlyRewardsDistribution {
        require(tokenAddress != address(stakingToken), "StakingRewards: rescue of staking token not allowed");
        IERC20(tokenAddress).transfer(receiver, IERC20(tokenAddress).balanceOf(address(this)));
    }

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

    modifier updateReward(address account) {
        for (uint i=0; i<rewardTokens.length; i++){
            rewardsPerTokenMap[rewardTokens[i]] = rewardPerToken(rewardTokens[i]);
            rewardLastUpdatedTime[rewardTokens[i]] = lastTimeRewardApplicable();
            if (account != address(0)) {
                rewards[account][rewardTokens[i]] = earned(account, rewardTokens[i]);
                userRewardPerTokenPaid[account][rewardTokens[i]] = rewardsPerTokenMap[rewardTokens[i]];
            }
        }
        _;
    }

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address[]","name":"_rewardTokens","type":"address[]"},{"internalType":"address","name":"_stakingToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"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"},{"internalType":"address","name":"rewardToken","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":"rewardToken","type":"address"}],"name":"getRewardForDuration","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":false,"inputs":[{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"name":"rescueFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardLastUpdatedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"rewardToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","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":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsPerTokenMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stakerBalances","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenRewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","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"}]

6080604052600060035562278d006004553480156200001d57600080fd5b506040516200282638038062002826833981810160405260608110156200004357600080fd5b8151602083018051604051929492938301929190846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82518660208202830111640100000000821117156200009f57600080fd5b82525081516020918201928201910280838360005b83811015620000ce578181015183820152602001620000b4565b505050509190910160405250602090810151600180558451909350620000fb925060089185019062000133565b50600280546001600160a01b039283166001600160a01b031991821617909155600080549490921693169290921790915550620001c7565b8280548282559060005260206000209081019282156200018b579160200282015b828111156200018b57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000154565b50620001999291506200019d565b5090565b620001c491905b80821115620001995780546001600160a01b0319168155600101620001a4565b90565b61264f80620001d76000396000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806380faa57d116100ee578063df136d6511610097578063e9ffcb1b11610071578063e9ffcb1b1461050e578063ebe2b12b14610541578063ecd9ba8214610549578063f122977714610581576101a3565b8063df136d65146104c3578063e70b9e27146104cb578063e9fad8ee14610506576101a3565b8063b66503cf116100c8578063b66503cf146103b6578063bcd11014146103ef578063c61c631014610422576101a3565b806380faa57d1461035e578063a4f880f214610366578063a694fc3a14610399576101a3565b80633d18b9121161015057806370a082311161012a57806370a082311461030657806372f702f3146103395780637bb7bed114610341576101a3565b80633d18b912146102925780633fc6df6e1461029a5780637035ab98146102cb576101a3565b8063292eee8411610181578063292eee841461023a5780632e1a7d4d1461026d578063386a95251461028a576101a3565b806318160ddd146101a85780631ff9b6f2146101c2578063211dc32d146101ff575b600080fd5b6101b06105b4565b60408051918252519081900360200190f35b6101fd600480360360408110156101d857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166105ba565b005b6101b06004803603604081101561021557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166107e5565b6101b06004803603602081101561025057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166108b2565b6101fd6004803603602081101561028357600080fd5b50356108c4565b6101b0610c7f565b6101fd610c85565b6102a261101d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101b0600480360360408110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611039565b6101b06004803603602081101561031c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611056565b6102a2611082565b6102a26004803603602081101561035757600080fd5b503561109e565b6101b06110d2565b6101b06004803603602081101561037c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166110e5565b6101fd600480360360208110156103af57600080fd5b50356110f7565b6101fd600480360360408110156103cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356114d0565b6101b06004803603602081101561040557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611960565b61042a61199b565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561046e578181015183820152602001610456565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156104ad578181015183820152602001610495565b5050505090500194505050505060405180910390f35b6101b0611ab9565b6101b0600480360360408110156104e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611abf565b6101fd611adc565b6101b06004803603602081101561052457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611aff565b6101b0611b11565b6101fd600480360360a081101561055f57600080fd5b5080359060208101359060ff6040820135169060608101359060800135611b17565b6101b06004803603602081101561059757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611f40565b60065490565b60005473ffffffffffffffffffffffffffffffffffffffff16331461062a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125c7602a913960400191505060405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff8381169116141561069e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806125946033913960400191505060405180910390fd5b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff84169163a9059cbb91849184916370a0823191602480820192602092909190829003018186803b15801561071557600080fd5b505afa158015610729573d6000803e3d6000fd5b505050506040513d602081101561073f57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b1580156107b557600080fd5b505af11580156107c9573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b50505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600e6020908152604080832094861680845294825280832054938352600d8252808320948352939052918220546108a9919061089d90670de0b6b3a7640000906108919061085f9061085389611f40565b9063ffffffff61201316565b73ffffffffffffffffffffffffffffffffffffffff89166000908152600b60205260409020549063ffffffff61208a16565b9063ffffffff6120fd16565b9063ffffffff61218116565b90505b92915050565b600a6020526000908152604090205481565b600180548101908190553360005b600854811015610af557610913600882815481106108ec57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16611f40565b600960006008848154811061092457fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561095e6110d2565b600c60006008848154811061096f57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452908301939093526040909101902091909155821615610aed576109e882600883815481106109c157fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff166107e5565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081206008805491929185908110610a1e57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181209190915560088054600992919084908110610a6657fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d90529081206008805491929185908110610aba57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b6001016108d2565b5060008311610b6557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b600654610b78908463ffffffff61201316565b600655336000908152600b6020526040902054610b9b908463ffffffff61201316565b336000818152600b6020526040902091909155600254610bd49173ffffffffffffffffffffffffffffffffffffffff90911690856121f5565b60408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2506001548114610c7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60045481565b600180548101908190553360005b600854811015610e6857610cad600882815481106108ec57fe5b6009600060088481548110610cbe57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055610cf86110d2565b600c600060088481548110610d0957fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452908301939093526040909101902091909155821615610e6057610d5b82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081206008805491929185908110610d9157fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181209190915560088054600992919084908110610dd957fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d90529081206008805491929185908110610e2d57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101610c93565b5060005b600854811015610fa857336000908152600e602052604081206008805483919085908110610e9657fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205490508015610f9f57336000908152600e602052604081206008805483919086908110610ef057fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205560088054610f6891339184919086908110610f3957fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16919063ffffffff6121f516565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50600101610e6c565b5050600154811461101a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600d60209081526000928352604080842090915290825290205481565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260409020545b919050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b600881815481106110ab57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60006110e042600354612287565b905090565b60096020526000908152604090205481565b600180548101908190553360005b6008548110156112da5761111f600882815481106108ec57fe5b600960006008848154811061113057fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561116a6110d2565b600c60006008848154811061117b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684529083019390935260409091019020919091558216156112d2576111cd82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e60205260408120600880549192918590811061120357fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120919091556008805460099291908490811061124b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d9052908120600880549192918590811061129f57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101611105565b506000831161134a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b60065461135d908463ffffffff61218116565b600655336000908152600b60205260409020546113cf57600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790555b336000908152600b60205260409020546113ef908463ffffffff61218116565b336000818152600b60205260409020919091556002546114299173ffffffffffffffffffffffffffffffffffffffff90911690308661229d565b60408051848152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001548114610c7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314611540576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125c7602a913960400191505060405180910390fd5b6000805b6008548110156117195761155e600882815481106108ec57fe5b600960006008848154811061156f57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020556115a96110d2565b600c6000600884815481106115ba57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684529083019390935260409091019020919091558216156117115761160c82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e60205260408120600880549192918590811061164257fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120919091556008805460099291908490811061168a57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d905290812060088054919291859081106116de57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101611544565b5073ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040902054600354421061177c5760045461175d90849063ffffffff6120fd16565b90506117746004544261218190919063ffffffff16565b6003556117c1565b600354600090611792904263ffffffff61201316565b905060006117a6828463ffffffff61208a16565b90506117bc82610891878463ffffffff61218116565b925050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8716916370a0823191602480820192602092909190829003018186803b15801561183157600080fd5b505afa158015611845573d6000803e3d6000fd5b505050506040513d602081101561185b57600080fd5b505160035490915061188490611877904263ffffffff61201316565b829063ffffffff6120fd16565b8211156118f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600c60209081526040808320429055600a825291829020849055815186815291517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9281900390910190a15050505050565b60045473ffffffffffffffffffffffffffffffffffffffff82166000908152600a602052604081205490916108ac919063ffffffff61208a16565b600754604080518281526020808402820101909152606091829182908280156119ce578160200160208202803883390190505b50905060005b600754811015611a4257600b6000600783815481106119ef57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020548251839083908110611a2f57fe5b60209081029190910101526001016119d4565b5060078181805480602002602001604051908101604052809291908181526020018280548015611aa857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611a7d575b505050505091509350935050509091565b60055481565b600e60209081526000928352604080842090915290825290205481565b336000908152600b6020526040902054611af5906108c4565b611afd610c85565b565b600c6020526000908152604090205481565b60035481565b600180548101908190553360005b600854811015611cfa57611b3f600882815481106108ec57fe5b6009600060088481548110611b5057fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055611b8a6110d2565b600c600060088481548110611b9b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452908301939093526040909101902091909155821615611cf257611bed82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081206008805491929185908110611c2357fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181209190915560088054600992919084908110611c6b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d90529081206008805491929185908110611cbf57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101611b25565b5060008711611d6a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b600654611d7d908863ffffffff61218116565b600655336000908152600b6020526040902054611da0908863ffffffff61218116565b336000818152600b60205260408082209390935560025483517fd505accf0000000000000000000000000000000000000000000000000000000081526004810193909352306024840152604483018b9052606483018a905260ff8916608484015260a4830188905260c48301879052925173ffffffffffffffffffffffffffffffffffffffff9093169263d505accf9260e480820193929182900301818387803b158015611e4d57600080fd5b505af1158015611e61573d6000803e3d6000fd5b5050600254611e91925073ffffffffffffffffffffffffffffffffffffffff16905033308a63ffffffff61229d16565b60408051888152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001548114611f3857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050505050565b600060065460001415611f79575073ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604090205461107d565b60065473ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020908152604080832054600c909252909120546108ac92611fe192909161089191670de0b6b3a764000091611fd5919082906108536110d2565b9063ffffffff61208a16565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600960205260409020549063ffffffff61218116565b60008282111561208457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082612099575060006108ac565b828202828482816120a657fe5b04146108a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806125736021913960400191505060405180910390fd5b600080821161216d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161217857fe5b04949350505050565b6000828201838110156108a957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261228290849061232e565b505050565b600081831061229657816108a9565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526107df9085905b61234d8273ffffffffffffffffffffffffffffffffffffffff1661256c565b6123b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061242157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016123e4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612483576040519150601f19603f3d011682016040523d82523d6000602084013e612488565b606091505b5091509150816124f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156107df5780806020019051602081101561251557600080fd5b50516107df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f1602a913960400191505060405180910390fd5b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775374616b696e67526577617264733a20726573637565206f66207374616b696e6720746f6b656e206e6f7420616c6c6f77656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158207fe4516fc9e0744bd06e3a14eca664c354362d738da083d4e3170eefb43b4a8d64736f6c634300051100320000000000000000000000003156a51d75c2d328ea35446969197ffc2b89771e00000000000000000000000000000000000000000000000000000000000000600000000000000000000000003ad67c86e647bdea7548f0bcdcfd7773d291f9ea000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000016eccfdbb4ee1a85a33f3a9b21175cd7ae753db40000000000000000000000004fdce518fe527439fe76883e6b51a1c522b61b7c000000000000000000000000a3ed22eee92a3872709823a6970069e12a4540eb000000000000000000000000be5cf150e1ff59ca7f2499eaa13bfc40aae70e78000000000000000000000000e6fc6c7cb6d2c31b359a49a33ef08ab87f4de7ce000000000000000000000000c3ec80343d2bae2f8e680fdadde7c17e71e114ea000000000000000000000000f6f85b3f9fd581c2ee717c404f7684486f057f9500000000000000000000000040ccd55b789fdee8d434915dc2aa6bd938506a92000000000000000000000000c91c06db0f7bffba61e2a5645cc15686f0a8c828000000000000000000000000a79e0bfc579c709819f4a0e95d4597f03093b01100000000000000000000000067480287cb3715d1d9429b38772c71d6e94c16da

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

0000000000000000000000003156a51d75c2d328ea35446969197ffc2b89771e00000000000000000000000000000000000000000000000000000000000000600000000000000000000000003ad67c86e647bdea7548f0bcdcfd7773d291f9ea000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000016eccfdbb4ee1a85a33f3a9b21175cd7ae753db40000000000000000000000004fdce518fe527439fe76883e6b51a1c522b61b7c000000000000000000000000a3ed22eee92a3872709823a6970069e12a4540eb000000000000000000000000be5cf150e1ff59ca7f2499eaa13bfc40aae70e78000000000000000000000000e6fc6c7cb6d2c31b359a49a33ef08ab87f4de7ce000000000000000000000000c3ec80343d2bae2f8e680fdadde7c17e71e114ea000000000000000000000000f6f85b3f9fd581c2ee717c404f7684486f057f9500000000000000000000000040ccd55b789fdee8d434915dc2aa6bd938506a92000000000000000000000000c91c06db0f7bffba61e2a5645cc15686f0a8c828000000000000000000000000a79e0bfc579c709819f4a0e95d4597f03093b01100000000000000000000000067480287cb3715d1d9429b38772c71d6e94c16da

-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0x3156a51d75c2d328ea35446969197ffc2b89771e
Arg [1] : _rewardTokens (address[]): 0x16eccfdbb4ee1a85a33f3a9b21175cd7ae753db4,0x4fdce518fe527439fe76883e6b51a1c522b61b7c,0xa3ed22eee92a3872709823a6970069e12a4540eb,0xbe5cf150e1ff59ca7f2499eaa13bfc40aae70e78,0xe6fc6c7cb6d2c31b359a49a33ef08ab87f4de7ce,0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea,0xf6f85b3f9fd581c2ee717c404f7684486f057f95,0x40ccd55b789fdee8d434915dc2aa6bd938506a92,0xc91c06db0f7bffba61e2a5645cc15686f0a8c828,0xa79e0bfc579c709819f4a0e95d4597f03093b011,0x67480287cb3715d1d9429b38772c71d6e94c16da
Arg [2] : _stakingToken (address): 0x3ad67c86e647bdea7548f0bcdcfd7773d291f9ea

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000003156a51d75c2d328ea35446969197ffc2b89771e
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 0000000000000000000000003ad67c86e647bdea7548f0bcdcfd7773d291f9ea
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [4] : 00000000000000000000000016eccfdbb4ee1a85a33f3a9b21175cd7ae753db4
Arg [5] : 0000000000000000000000004fdce518fe527439fe76883e6b51a1c522b61b7c
Arg [6] : 000000000000000000000000a3ed22eee92a3872709823a6970069e12a4540eb
Arg [7] : 000000000000000000000000be5cf150e1ff59ca7f2499eaa13bfc40aae70e78
Arg [8] : 000000000000000000000000e6fc6c7cb6d2c31b359a49a33ef08ab87f4de7ce
Arg [9] : 000000000000000000000000c3ec80343d2bae2f8e680fdadde7c17e71e114ea
Arg [10] : 000000000000000000000000f6f85b3f9fd581c2ee717c404f7684486f057f95
Arg [11] : 00000000000000000000000040ccd55b789fdee8d434915dc2aa6bd938506a92
Arg [12] : 000000000000000000000000c91c06db0f7bffba61e2a5645cc15686f0a8c828
Arg [13] : 000000000000000000000000a79e0bfc579c709819f4a0e95d4597f03093b011
Arg [14] : 00000000000000000000000067480287cb3715d1d9429b38772c71d6e94c16da


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.