Contract 0x29028198437136DDfcF00D0a0365202a51BB00A4

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x38eb0a6f2e8867c992cc394d827584b73bf25b90e0e268957c165d937327e710Exit157512382021-06-15 16:45:18165 days 6 hrs ago0x4c1278727b01440dcba7ef9d30cc959eb9fb49b1 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00085951
0x1238602558a03b7cee228dbf558fc15ec3145c0374196af3b4ee8160cdd9ceedExit152783162021-06-03 9:46:45177 days 13 hrs ago0x436bb9e1f02c9ca7164afb5753c03c071430216d IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000371925
0xe3d0d4fc185398917728d17e2b0ceed425f6a3776b371f258966657b9e0e22a4Exit144829882021-05-14 12:25:55197 days 11 hrs ago0x72435e2e3d9947bf04bf7c7feb33a3e81b063414 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000826025
0xa316c6c83b77179d3afe10a618177b6617a09f02c8d4d13cc1253f5055af1c0fGet Reward144824722021-05-14 12:07:53197 days 11 hrs ago0x72435e2e3d9947bf04bf7c7feb33a3e81b063414 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000901995
0xa33d0b22e6df84789ed2076424c9a6163917e149555cb2a0489cf562866c6238Exit144751132021-05-14 7:44:09197 days 15 hrs ago0xc53e7040ce1d891d59f67cd2dff36b32d4db1f80 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000826025
0xf77f1143387fe33f9e3495979c6322daed012dedf057f200a4e6d2ec41da422aGet Reward144751012021-05-14 7:43:45197 days 15 hrs ago0xc53e7040ce1d891d59f67cd2dff36b32d4db1f80 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000751995
0x235a95f933b0e4d3b443f3c97aa8d64840dae48cd29e90236c0783b16c760ae5Exit144457682021-05-13 14:35:37198 days 8 hrs ago0x830ad77c26c5e0fdbcd353ac338ec08053c1c02c IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00114811
0x226ca022af6ecdd2fcf25d8436ddf0b865ed3fbb14561e0314cdac20f94a33b6Exit144448152021-05-13 14:02:51198 days 9 hrs ago0x54688a441c8e9f17253038ff8a4336b679c02a4b IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00114811
0xcf3417102a5cad40b3d4a2a55a63cb97d59d1d7c16ebdd6a1369b0417865662aExit144321612021-05-13 6:41:32198 days 16 hrs ago0xcc6669233939105f19ead096deab69064c83d7af IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00114811
0x38718d750fc7f371e60b90e9b3e8386bb9b54af8ec790370908e2c3c88b9b04aExit144048072021-05-12 13:47:59199 days 9 hrs ago0x3c229864378b3b0adf98ae247ca33986aed8ec1e IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00102931
0x282e19d4ba05105cc784e2cd5901d7f9a7975c8cb65207f8202acd2d8f97ecbfExit143939082021-05-12 7:00:48199 days 16 hrs ago0x4eadb34712d8abf5bee9bf1f13c5b9a94c93ba09 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00102931
0xb7d322ebec4f1bb4d9d69649e1b93e2be928a4e0284308e770f5a136f975eb7aExit143706252021-05-11 15:57:16200 days 7 hrs ago0x30f89f5f4cf25f457b4d9cbfb64a64a97f00bed0 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000811025
0x363695c65ca662757a4ca8bac4ba877999c4fa8c00c683409eac404164c60eb9Exit143478882021-05-11 2:33:32200 days 20 hrs ago0x22da1eedebc60c1b8c3a0c48f5c81bbe2b943dd9 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00114811
0xf5cbd7fdfb415138ff3d153ea94f35063d572a3a698729ac0596d00089d5db54Exit143341752021-05-10 18:16:12201 days 5 hrs ago0x8de3c3891268502f77db7e876d727257dec0f852 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00102931
0x1690bd8d23843f649b1fc83f155b2db25c59116e5bd627aa4ea34cce4cb4a45fExit143336402021-05-10 17:51:33201 days 5 hrs ago0x4aa60959b1571e62f9b353937c3e45978fd07713 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00102931
0xbd9dbe9a1e250eaea41c8dd716b3dc754b3e50607ea6d1b0b5a166f21dcc8b10Exit143303312021-05-10 15:56:06201 days 7 hrs ago0x2626a394669431d99bd8ad92dad1d3fa4f466c76 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00116311
0x5563ed4956da5220f8102af0bf022eb355c4ede390be8fa7a4e279720163d3f2Exit143121732021-05-10 5:20:51201 days 18 hrs ago0x7d568306e1157a92ea4e0d7774575b7e7e6f53b5 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000826025
0xec83133c13b00733ba357fa3e1a7a0b4def08a8d950555fff6422007e875cfc3Get Reward143116862021-05-10 5:03:31201 days 18 hrs ago0x7d568306e1157a92ea4e0d7774575b7e7e6f53b5 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000751995
0x53583c71962752a8e8168fd9a35bc133314a1572f194afcc8edc2759ff881478Get Reward143096612021-05-10 3:52:44201 days 19 hrs ago0x436bb9e1f02c9ca7164afb5753c03c071430216d IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.000751995
0xf5369789b092f38ecd17b18a2daa323d50922cf3b1c60329a12a4a66f0f15e87Exit142924052021-05-09 17:53:23202 days 5 hrs ago0x29fa84db074abd26a9c7c8af9fe07635c03878ec IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00126811
0xf639780b094b3480aa95fc8c5ae532751125a5268520cc73e545b378781184fcExit142854752021-05-09 13:48:15202 days 9 hrs ago0xbef07beac7024080177022e9fa4b4f1898ed7665 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00114811
0x472e09b452a09a471811bed7f473ddb5fb31487728614e3ecfcd318b9a3cefbcExit142725552021-05-09 6:08:55202 days 17 hrs ago0x7fe915d768bef8652d807322e514eac32fa09e24 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00129811
0xcefe0360b3c17b43a49d5357c96271331f8763547da5e0f7db8dd05f12e4138fExit142549172021-05-08 19:52:35203 days 3 hrs ago0x7fe915d768bef8652d807322e514eac32fa09e24 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00007
0xed2b2a1e9d635809e79bf4f2824526b98e9cd4c90a4db528415364b71f961954Exit142548672021-05-08 19:50:51203 days 3 hrs ago0x7fe915d768bef8652d807322e514eac32fa09e24 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00008
0x0a28d251a647cc07a269a4f1bfac33d4791fc95e12df50e4b6ee397aa0b08ce6Exit142548232021-05-08 19:49:19203 days 3 hrs ago0x7fe915d768bef8652d807322e514eac32fa09e24 IN  0x29028198437136ddfcf00d0a0365202a51bb00a40 MATIC0.00021
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x9c3e5fb2267267c3c03c4366dc77b8b48ddd801d73069711b4c00e73039cedfa129768572021-04-07 11:46:35234 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"}]

6080604052600060035562278d006004553480156200001d57600080fd5b506040516200282638038062002826833981810160405260608110156200004357600080fd5b8151602083018051604051929492938301929190846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82518660208202830111640100000000821117156200009f57600080fd5b82525081516020918201928201910280838360005b83811015620000ce578181015183820152602001620000b4565b505050509190910160405250602090810151600180558451909350620000fb925060089185019062000133565b50600280546001600160a01b039283166001600160a01b031991821617909155600080549490921693169290921790915550620001c7565b8280548282559060005260206000209081019282156200018b579160200282015b828111156200018b57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000154565b50620001999291506200019d565b5090565b620001c491905b80821115620001995780546001600160a01b0319168155600101620001a4565b90565b61264f80620001d76000396000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806380faa57d116100ee578063df136d6511610097578063e9ffcb1b11610071578063e9ffcb1b1461050e578063ebe2b12b14610541578063ecd9ba8214610549578063f122977714610581576101a3565b8063df136d65146104c3578063e70b9e27146104cb578063e9fad8ee14610506576101a3565b8063b66503cf116100c8578063b66503cf146103b6578063bcd11014146103ef578063c61c631014610422576101a3565b806380faa57d1461035e578063a4f880f214610366578063a694fc3a14610399576101a3565b80633d18b9121161015057806370a082311161012a57806370a082311461030657806372f702f3146103395780637bb7bed114610341576101a3565b80633d18b912146102925780633fc6df6e1461029a5780637035ab98146102cb576101a3565b8063292eee8411610181578063292eee841461023a5780632e1a7d4d1461026d578063386a95251461028a576101a3565b806318160ddd146101a85780631ff9b6f2146101c2578063211dc32d146101ff575b600080fd5b6101b06105b4565b60408051918252519081900360200190f35b6101fd600480360360408110156101d857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166105ba565b005b6101b06004803603604081101561021557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166107e5565b6101b06004803603602081101561025057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166108b2565b6101fd6004803603602081101561028357600080fd5b50356108c4565b6101b0610c7f565b6101fd610c85565b6102a261101d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101b0600480360360408110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611039565b6101b06004803603602081101561031c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611056565b6102a2611082565b6102a26004803603602081101561035757600080fd5b503561109e565b6101b06110d2565b6101b06004803603602081101561037c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166110e5565b6101fd600480360360208110156103af57600080fd5b50356110f7565b6101fd600480360360408110156103cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356114d0565b6101b06004803603602081101561040557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611960565b61042a61199b565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561046e578181015183820152602001610456565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156104ad578181015183820152602001610495565b5050505090500194505050505060405180910390f35b6101b0611ab9565b6101b0600480360360408110156104e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611abf565b6101fd611adc565b6101b06004803603602081101561052457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611aff565b6101b0611b11565b6101fd600480360360a081101561055f57600080fd5b5080359060208101359060ff6040820135169060608101359060800135611b17565b6101b06004803603602081101561059757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611f40565b60065490565b60005473ffffffffffffffffffffffffffffffffffffffff16331461062a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125c7602a913960400191505060405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff8381169116141561069e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806125946033913960400191505060405180910390fd5b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff84169163a9059cbb91849184916370a0823191602480820192602092909190829003018186803b15801561071557600080fd5b505afa158015610729573d6000803e3d6000fd5b505050506040513d602081101561073f57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b1580156107b557600080fd5b505af11580156107c9573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b50505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600e6020908152604080832094861680845294825280832054938352600d8252808320948352939052918220546108a9919061089d90670de0b6b3a7640000906108919061085f9061085389611f40565b9063ffffffff61201316565b73ffffffffffffffffffffffffffffffffffffffff89166000908152600b60205260409020549063ffffffff61208a16565b9063ffffffff6120fd16565b9063ffffffff61218116565b90505b92915050565b600a6020526000908152604090205481565b600180548101908190553360005b600854811015610af557610913600882815481106108ec57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16611f40565b600960006008848154811061092457fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561095e6110d2565b600c60006008848154811061096f57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452908301939093526040909101902091909155821615610aed576109e882600883815481106109c157fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff166107e5565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081206008805491929185908110610a1e57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181209190915560088054600992919084908110610a6657fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d90529081206008805491929185908110610aba57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b6001016108d2565b5060008311610b6557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b600654610b78908463ffffffff61201316565b600655336000908152600b6020526040902054610b9b908463ffffffff61201316565b336000818152600b6020526040902091909155600254610bd49173ffffffffffffffffffffffffffffffffffffffff90911690856121f5565b60408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2506001548114610c7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050565b60045481565b600180548101908190553360005b600854811015610e6857610cad600882815481106108ec57fe5b6009600060088481548110610cbe57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055610cf86110d2565b600c600060088481548110610d0957fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452908301939093526040909101902091909155821615610e6057610d5b82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081206008805491929185908110610d9157fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181209190915560088054600992919084908110610dd957fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d90529081206008805491929185908110610e2d57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101610c93565b5060005b600854811015610fa857336000908152600e602052604081206008805483919085908110610e9657fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205490508015610f9f57336000908152600e602052604081206008805483919086908110610ef057fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205560088054610f6891339184919086908110610f3957fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16919063ffffffff6121f516565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50600101610e6c565b5050600154811461101a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600d60209081526000928352604080842090915290825290205481565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260409020545b919050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b600881815481106110ab57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60006110e042600354612287565b905090565b60096020526000908152604090205481565b600180548101908190553360005b6008548110156112da5761111f600882815481106108ec57fe5b600960006008848154811061113057fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561116a6110d2565b600c60006008848154811061117b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684529083019390935260409091019020919091558216156112d2576111cd82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e60205260408120600880549192918590811061120357fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120919091556008805460099291908490811061124b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d9052908120600880549192918590811061129f57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101611105565b506000831161134a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b60065461135d908463ffffffff61218116565b600655336000908152600b60205260409020546113cf57600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790555b336000908152600b60205260409020546113ef908463ffffffff61218116565b336000818152600b60205260409020919091556002546114299173ffffffffffffffffffffffffffffffffffffffff90911690308661229d565b60408051848152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001548114610c7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314611540576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125c7602a913960400191505060405180910390fd5b6000805b6008548110156117195761155e600882815481106108ec57fe5b600960006008848154811061156f57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020556115a96110d2565b600c6000600884815481106115ba57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684529083019390935260409091019020919091558216156117115761160c82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e60205260408120600880549192918590811061164257fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120919091556008805460099291908490811061168a57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d905290812060088054919291859081106116de57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101611544565b5073ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040902054600354421061177c5760045461175d90849063ffffffff6120fd16565b90506117746004544261218190919063ffffffff16565b6003556117c1565b600354600090611792904263ffffffff61201316565b905060006117a6828463ffffffff61208a16565b90506117bc82610891878463ffffffff61218116565b925050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8716916370a0823191602480820192602092909190829003018186803b15801561183157600080fd5b505afa158015611845573d6000803e3d6000fd5b505050506040513d602081101561185b57600080fd5b505160035490915061188490611877904263ffffffff61201316565b829063ffffffff6120fd16565b8211156118f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600c60209081526040808320429055600a825291829020849055815186815291517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9281900390910190a15050505050565b60045473ffffffffffffffffffffffffffffffffffffffff82166000908152600a602052604081205490916108ac919063ffffffff61208a16565b600754604080518281526020808402820101909152606091829182908280156119ce578160200160208202803883390190505b50905060005b600754811015611a4257600b6000600783815481106119ef57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020548251839083908110611a2f57fe5b60209081029190910101526001016119d4565b5060078181805480602002602001604051908101604052809291908181526020018280548015611aa857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611a7d575b505050505091509350935050509091565b60055481565b600e60209081526000928352604080842090915290825290205481565b336000908152600b6020526040902054611af5906108c4565b611afd610c85565b565b600c6020526000908152604090205481565b60035481565b600180548101908190553360005b600854811015611cfa57611b3f600882815481106108ec57fe5b6009600060088481548110611b5057fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055611b8a6110d2565b600c600060088481548110611b9b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452908301939093526040909101902091909155821615611cf257611bed82600883815481106109c157fe5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081206008805491929185908110611c2357fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181209190915560088054600992919084908110611c6b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409283018220549386168252600d90529081206008805491929185908110611cbf57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600101611b25565b5060008711611d6a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b600654611d7d908863ffffffff61218116565b600655336000908152600b6020526040902054611da0908863ffffffff61218116565b336000818152600b60205260408082209390935560025483517fd505accf0000000000000000000000000000000000000000000000000000000081526004810193909352306024840152604483018b9052606483018a905260ff8916608484015260a4830188905260c48301879052925173ffffffffffffffffffffffffffffffffffffffff9093169263d505accf9260e480820193929182900301818387803b158015611e4d57600080fd5b505af1158015611e61573d6000803e3d6000fd5b5050600254611e91925073ffffffffffffffffffffffffffffffffffffffff16905033308a63ffffffff61229d16565b60408051888152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001548114611f3857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050505050565b600060065460001415611f79575073ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604090205461107d565b60065473ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020908152604080832054600c909252909120546108ac92611fe192909161089191670de0b6b3a764000091611fd5919082906108536110d2565b9063ffffffff61208a16565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600960205260409020549063ffffffff61218116565b60008282111561208457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082612099575060006108ac565b828202828482816120a657fe5b04146108a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806125736021913960400191505060405180910390fd5b600080821161216d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161217857fe5b04949350505050565b6000828201838110156108a957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261228290849061232e565b505050565b600081831061229657816108a9565b5090919050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526107df9085905b61234d8273ffffffffffffffffffffffffffffffffffffffff1661256c565b6123b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061242157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016123e4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612483576040519150601f19603f3d011682016040523d82523d6000602084013e612488565b606091505b5091509150816124f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156107df5780806020019051602081101561251557600080fd5b50516107df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806125f1602a913960400191505060405180910390fd5b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775374616b696e67526577617264733a20726573637565206f66207374616b696e6720746f6b656e206e6f7420616c6c6f77656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158207fe4516fc9e0744bd06e3a14eca664c354362d738da083d4e3170eefb43b4a8d64736f6c634300051100320000000000000000000000003156a51d75c2d328ea35446969197ffc2b89771e00000000000000000000000000000000000000000000000000000000000000600000000000000000000000009fe59c8072db692c81514394d0247ba05b7f2445000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000016eccfdbb4ee1a85a33f3a9b21175cd7ae753db40000000000000000000000004fdce518fe527439fe76883e6b51a1c522b61b7c000000000000000000000000a3ed22eee92a3872709823a6970069e12a4540eb000000000000000000000000be5cf150e1ff59ca7f2499eaa13bfc40aae70e78000000000000000000000000e6fc6c7cb6d2c31b359a49a33ef08ab87f4de7ce000000000000000000000000c3ec80343d2bae2f8e680fdadde7c17e71e114ea000000000000000000000000f6f85b3f9fd581c2ee717c404f7684486f057f9500000000000000000000000040ccd55b789fdee8d434915dc2aa6bd938506a92000000000000000000000000c91c06db0f7bffba61e2a5645cc15686f0a8c828000000000000000000000000a79e0bfc579c709819f4a0e95d4597f03093b01100000000000000000000000067480287cb3715d1d9429b38772c71d6e94c16da

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

0000000000000000000000003156a51d75c2d328ea35446969197ffc2b89771e00000000000000000000000000000000000000000000000000000000000000600000000000000000000000009fe59c8072db692c81514394d0247ba05b7f2445000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000016eccfdbb4ee1a85a33f3a9b21175cd7ae753db40000000000000000000000004fdce518fe527439fe76883e6b51a1c522b61b7c000000000000000000000000a3ed22eee92a3872709823a6970069e12a4540eb000000000000000000000000be5cf150e1ff59ca7f2499eaa13bfc40aae70e78000000000000000000000000e6fc6c7cb6d2c31b359a49a33ef08ab87f4de7ce000000000000000000000000c3ec80343d2bae2f8e680fdadde7c17e71e114ea000000000000000000000000f6f85b3f9fd581c2ee717c404f7684486f057f9500000000000000000000000040ccd55b789fdee8d434915dc2aa6bd938506a92000000000000000000000000c91c06db0f7bffba61e2a5645cc15686f0a8c828000000000000000000000000a79e0bfc579c709819f4a0e95d4597f03093b01100000000000000000000000067480287cb3715d1d9429b38772c71d6e94c16da

-----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): 0x9fe59c8072db692c81514394d0247ba05b7f2445

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000003156a51d75c2d328ea35446969197ffc2b89771e
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 0000000000000000000000009fe59c8072db692c81514394d0247ba05b7f2445
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.