ETH Price: $3,297.29 (-9.35%)

Contract

0x93567318aaBd27E21c52F766d2844Fc6De9Dc738
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Reward214227812024-12-17 14:13:472 days ago1734444827IN
0x93567318...6De9Dc738
0 ETH0.0033477935.45076563
Claim Reward211684842024-11-12 2:00:3538 days ago1731376835IN
0x93567318...6De9Dc738
0 ETH0.0024405325.84358268
Claim Reward206588992024-09-01 23:08:23109 days ago1725232103IN
0x93567318...6De9Dc738
0 ETH0.000127341.34854642
Claim Reward200213382024-06-04 22:06:59198 days ago1717538819IN
0x93567318...6De9Dc738
0 ETH0.0010375910.98741153
Claim Reward190129572024-01-15 14:44:35339 days ago1705329875IN
0x93567318...6De9Dc738
0 ETH0.0028641325.67927657
Claim Reward187172102023-12-05 2:36:23381 days ago1701743783IN
0x93567318...6De9Dc738
0 ETH0.0064985368.83242298
Claim Reward185784042023-11-15 16:13:35400 days ago1700064815IN
0x93567318...6De9Dc738
0 ETH0.0036014949.68258717
Claim Reward180005722023-08-26 18:16:11481 days ago1693073771IN
0x93567318...6De9Dc738
0 ETH0.0011177313.96679726
Claim Reward175637392023-06-26 12:56:47543 days ago1687784207IN
0x93567318...6De9Dc738
0 ETH0.0012017612.72584402
Claim Reward175293642023-06-21 16:56:23547 days ago1687366583IN
0x93567318...6De9Dc738
0 ETH0.0036013538.13576046
Claim Reward174429752023-06-09 13:29:35560 days ago1686317375IN
0x93567318...6De9Dc738
0 ETH0.0019743420.90694077
Claim Reward171800472023-05-03 11:58:47597 days ago1683115127IN
0x93567318...6De9Dc738
0 ETH0.006209869.31354174
Claim Reward167076762023-02-25 20:30:59663 days ago1677357059IN
0x93567318...6De9Dc738
0 ETH0.0016216520.26593355
Claim Reward165464472023-02-03 6:24:35686 days ago1675405475IN
0x93567318...6De9Dc738
0 ETH0.0020891923.32266547
Claim Reward164793952023-01-24 21:36:23695 days ago1674596183IN
0x93567318...6De9Dc738
0 ETH0.0018648920.81590855
Claim Reward162758302022-12-27 11:37:11724 days ago1672141031IN
0x93567318...6De9Dc738
0 ETH0.0009647212.05478264
Claim Reward161997112022-12-16 20:42:23734 days ago1671223343IN
0x93567318...6De9Dc738
0 ETH0.0012081316.66619363
Claim Reward161903462022-12-15 13:18:59736 days ago1671110339IN
0x93567318...6De9Dc738
0 ETH0.0024954326.42490297
Claim Reward159496902022-11-11 22:15:23769 days ago1668204923IN
0x93567318...6De9Dc738
0 ETH0.0015107516.34400054
Claim Reward159491232022-11-11 20:21:35769 days ago1668198095IN
0x93567318...6De9Dc738
0 ETH0.001539517.18392722
Claim Reward158322822022-10-26 12:35:23786 days ago1666787723IN
0x93567318...6De9Dc738
0 ETH0.0015770717.0614892
Claim Reward155307972022-09-14 3:44:38828 days ago1663127078IN
0x93567318...6De9Dc738
0 ETH0.000425254.74671656
Claim Reward153891202022-08-22 8:03:06851 days ago1661155386IN
0x93567318...6De9Dc738
0 ETH0.000686299.46737677
Claim Reward153552652022-08-16 23:24:23856 days ago1660692263IN
0x93567318...6De9Dc738
0 ETH0.000545437.52421843
Claim Reward152936022022-08-07 6:40:56866 days ago1659854456IN
0x93567318...6De9Dc738
0 ETH0.000313613.50052351
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PoolRewards

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-02-11
*/

// SPDX-License-Identifier: MIT

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/math/SafeMath.sol



pragma solidity ^0.6.0;

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

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol



pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // 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;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol



pragma solidity ^0.6.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 IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol



pragma solidity ^0.6.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// File: contracts/interfaces/vesper/IController.sol



pragma solidity 0.6.12;

interface IController {
    function aaveReferralCode() external view returns (uint16);

    function feeCollector(address) external view returns (address);

    function founderFee() external view returns (uint256);

    function founderVault() external view returns (address);

    function interestFee(address) external view returns (uint256);

    function isPool(address) external view returns (bool);

    function pools() external view returns (address);

    function strategy(address) external view returns (address);

    function rebalanceFriction(address) external view returns (uint256);

    function poolRewards(address) external view returns (address);

    function treasuryPool() external view returns (address);

    function uniswapRouter() external view returns (address);

    function withdrawFee(address) external view returns (uint256);
}

// File: contracts/interfaces/vesper/IPoolRewards.sol



pragma solidity 0.6.12;

interface IPoolRewards {
    function notifyRewardAmount(uint256) external;

    function claimReward(address) external;

    function updateReward(address) external;

    function rewardForDuration() external view returns (uint256);

    function claimable(address) external view returns (uint256);

    function pool() external view returns (address);

    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);
}

// File: contracts/pools/PoolRewards.sol



pragma solidity 0.6.12;






contract PoolRewards is IPoolRewards, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    address public immutable override pool;
    IERC20 public immutable rewardToken;
    IController public immutable controller;
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public constant REWARD_DURATION = 30 days;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;
    event RewardAdded(uint256 reward);

    constructor(
        address _pool,
        address _rewardToken,
        address _controller
    ) public {
        require(_controller != address(0), "Controller address is zero");
        controller = IController(_controller);
        rewardToken = IERC20(_rewardToken);
        pool = _pool;
    }

    event RewardPaid(address indexed user, uint256 reward);

    /**
     * @dev Notify that reward is added.
     * Also updates reward rate and reward earning period.
     */
    function notifyRewardAmount(uint256 rewardAmount) external override {
        _updateReward(address(0));
        require(msg.sender == address(controller), "Not authorized");
        require(address(rewardToken) != address(0), "Rewards token not set");
        if (block.timestamp >= periodFinish) {
            rewardRate = rewardAmount.div(REWARD_DURATION);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = rewardAmount.add(leftover).div(REWARD_DURATION);
        }

        uint256 balance = rewardToken.balanceOf(address(this));
        require(rewardRate <= balance.div(REWARD_DURATION), "Reward too high");

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(REWARD_DURATION);
        emit RewardAdded(rewardAmount);
    }

    /// @dev Claim reward earned so far.
    function claimReward(address account) external override nonReentrant {
        _updateReward(account);
        uint256 reward = rewards[account];
        if (reward != 0) {
            rewards[account] = 0;
            rewardToken.safeTransfer(account, reward);
            emit RewardPaid(account, reward);
        }
    }

    /**
     * @dev Updated reward for given account. Only Pool can call
     */
    function updateReward(address _account) external override {
        require(msg.sender == pool, "Only pool can update reward");
        _updateReward(_account);
    }

    function rewardForDuration() external view override returns (uint256) {
        return rewardRate.mul(REWARD_DURATION);
    }

    /// @dev Returns claimable reward amount.
    function claimable(address account) public view override returns (uint256) {
        return
            IERC20(pool)
                .balanceOf(account)
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    /// @dev Returns timestamp of last reward update
    function lastTimeRewardApplicable() public view override returns (uint256) {
        return block.timestamp < periodFinish ? block.timestamp : periodFinish;
    }

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

    function _updateReward(address _account) private {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (_account != address(0)) {
            rewards[_account] = claimable(_account);
            userRewardPerTokenPaid[_account] = rewardPerTokenStored;
        }
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"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"},{"inputs":[],"name":"REWARD_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract IController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"updateReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60e06040526000600155600060025534801561001a57600080fd5b5060405161109f38038061109f8339818101604052606081101561003d57600080fd5b508051602082015160409092015160016000559091906001600160a01b0381166100ae576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c65722061646472657373206973207a65726f000000000000604482015290519081900360640190fd5b6001600160601b0319606082811b821660c05283811b821660a05284901b166080526001600160a01b03928316929182169116610f7361012c600039806102be528061098452508061032352806103fe528061090652806109a852508061028752806105885280610643528061071452806107ac5250610f736000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806380faa57d116100a2578063d279c19111610071578063d279c1911461022d578063df136d6514610253578063ebe2b12b1461025b578063f77c479114610263578063f7c618c11461026b5761010b565b806380faa57d146101ef5780638b876347146101f7578063c8f33c911461021d578063cd3daf9d146102255761010b565b80635ade228a116100de5780635ade228a146101b1578063632447c9146101b95780636946a235146101df5780637b0a47ee146101e75761010b565b80630700037d1461011057806316f0115b146101485780633c6b16ab1461016c578063402914f51461018b575b600080fd5b6101366004803603602081101561012657600080fd5b50356001600160a01b0316610273565b60408051918252519081900360200190f35b610150610285565b604080516001600160a01b039092168252519081900360200190f35b6101896004803603602081101561018257600080fd5b50356102a9565b005b610136600480360360208110156101a157600080fd5b50356001600160a01b0316610539565b610136610631565b610189600480360360208110156101cf57600080fd5b50356001600160a01b0316610638565b6101366106c1565b6101366106da565b6101366106e0565b6101366004803603602081101561020d57600080fd5b50356001600160a01b03166106f8565b61013661070a565b610136610710565b6101896004803603602081101561024357600080fd5b50356001600160a01b0316610861565b610136610976565b61013661097c565b610150610982565b6101506109a6565b60066020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6102b360006109ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610321576040805162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610394576040805162461bcd60e51b815260206004820152601560248201527414995dd85c991cc81d1bdad95b881b9bdd081cd95d605a1b604482015290519081900360640190fd5b60015442106103b2576103aa8162278d00610a26565b6002556103fa565b6001546000906103c29042610a6f565b905060006103db60025483610ab190919063ffffffff16565b90506103f462278d006103ee8584610b0a565b90610a26565b60025550505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561046957600080fd5b505afa15801561047d573d6000803e3d6000fd5b505050506040513d602081101561049357600080fd5b505190506104a48162278d00610a26565b60025411156104ec576040805162461bcd60e51b815260206004820152600f60248201526e0a4caeec2e4c840e8dede40d0d2ced608b1b604482015290519081900360640190fd5b4260038190556104ff9062278d00610b0a565b6001556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b6001600160a01b038116600090815260066020908152604080832054600590925282205461062b919061062590670de0b6b3a7640000906103ee9061058690610580610710565b90610a6f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105f357600080fd5b505afa158015610607573d6000803e3d6000fd5b505050506040513d602081101561061d57600080fd5b505190610ab1565b90610b0a565b92915050565b62278d0081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106b5576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920706f6f6c2063616e20757064617465207265776172640000000000604482015290519081900360640190fd5b6106be816109ca565b50565b6002546000906106d49062278d00610ab1565b90505b90565b60025481565b600060015442106106f3576001546106d4565b504290565b60056020526000908152604090205481565b60035481565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076b57600080fd5b505afa15801561077f573d6000803e3d6000fd5b505050506040513d602081101561079557600080fd5b50516107a457506004546106d7565b6106d46108587f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561080357600080fd5b505afa158015610817573d6000803e3d6000fd5b505050506040513d602081101561082d57600080fd5b50516002546003546103ee91670de0b6b3a764000091610852919082906105806106e0565b90610ab1565b60045490610b0a565b600260005414156108b9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556108c7816109ca565b6001600160a01b038116600090815260066020526040902054801561096d576001600160a01b0380831660009081526006602052604081205561092d907f0000000000000000000000000000000000000000000000000000000000000000168383610b64565b6040805182815290516001600160a01b038416917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001600055565b60045481565b60015481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6109d2610710565b6004556109dd6106e0565b6003556001600160a01b038116156106be576109f881610539565b6001600160a01b03821660009081526006602090815260408083209390935560045460059091529190205550565b6000610a6883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610bbb565b9392505050565b6000610a6883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c5d565b600082610ac05750600061062b565b82820282848281610acd57fe5b0414610a685760405162461bcd60e51b8152600401808060200182810382526021815260200180610ef36021913960400191505060405180910390fd5b600082820183811015610a68576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610bb6908490610cb7565b505050565b60008183610c475760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c0c578181015183820152602001610bf4565b50505050905090810190601f168015610c395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610c5357fe5b0495945050505050565b60008184841115610caf5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c0c578181015183820152602001610bf4565b505050900390565b6060610d0c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d689092919063ffffffff16565b805190915015610bb657808060200190516020811015610d2b57600080fd5b5051610bb65760405162461bcd60e51b815260040180806020018281038252602a815260200180610f14602a913960400191505060405180910390fd5b6060610d778484600085610d7f565b949350505050565b6060610d8a85610eec565b610ddb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610e1a5780518252601f199092019160209182019101610dfb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50915091508115610e95579150610d779050565b805115610ea55780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610c0c578181015183820152602001610bf4565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220933dfbc2356e301889b6e5087383b61f2c2c00996574932a822f6849ddcd9b0464736f6c634300060c0033000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e998421000000000000000000000000a4f1671d3aee73c05b552d57f2d16d3cfcbd0217

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806380faa57d116100a2578063d279c19111610071578063d279c1911461022d578063df136d6514610253578063ebe2b12b1461025b578063f77c479114610263578063f7c618c11461026b5761010b565b806380faa57d146101ef5780638b876347146101f7578063c8f33c911461021d578063cd3daf9d146102255761010b565b80635ade228a116100de5780635ade228a146101b1578063632447c9146101b95780636946a235146101df5780637b0a47ee146101e75761010b565b80630700037d1461011057806316f0115b146101485780633c6b16ab1461016c578063402914f51461018b575b600080fd5b6101366004803603602081101561012657600080fd5b50356001600160a01b0316610273565b60408051918252519081900360200190f35b610150610285565b604080516001600160a01b039092168252519081900360200190f35b6101896004803603602081101561018257600080fd5b50356102a9565b005b610136600480360360208110156101a157600080fd5b50356001600160a01b0316610539565b610136610631565b610189600480360360208110156101cf57600080fd5b50356001600160a01b0316610638565b6101366106c1565b6101366106da565b6101366106e0565b6101366004803603602081101561020d57600080fd5b50356001600160a01b03166106f8565b61013661070a565b610136610710565b6101896004803603602081101561024357600080fd5b50356001600160a01b0316610861565b610136610976565b61013661097c565b610150610982565b6101506109a6565b60066020526000908152604090205481565b7f000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e81565b6102b360006109ca565b336001600160a01b037f000000000000000000000000a4f1671d3aee73c05b552d57f2d16d3cfcbd02171614610321576040805162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015290519081900360640190fd5b7f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e9984216001600160a01b0316610394576040805162461bcd60e51b815260206004820152601560248201527414995dd85c991cc81d1bdad95b881b9bdd081cd95d605a1b604482015290519081900360640190fd5b60015442106103b2576103aa8162278d00610a26565b6002556103fa565b6001546000906103c29042610a6f565b905060006103db60025483610ab190919063ffffffff16565b90506103f462278d006103ee8584610b0a565b90610a26565b60025550505b60007f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e9984216001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561046957600080fd5b505afa15801561047d573d6000803e3d6000fd5b505050506040513d602081101561049357600080fd5b505190506104a48162278d00610a26565b60025411156104ec576040805162461bcd60e51b815260206004820152600f60248201526e0a4caeec2e4c840e8dede40d0d2ced608b1b604482015290519081900360640190fd5b4260038190556104ff9062278d00610b0a565b6001556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b6001600160a01b038116600090815260066020908152604080832054600590925282205461062b919061062590670de0b6b3a7640000906103ee9061058690610580610710565b90610a6f565b7f000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e6001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105f357600080fd5b505afa158015610607573d6000803e3d6000fd5b505050506040513d602081101561061d57600080fd5b505190610ab1565b90610b0a565b92915050565b62278d0081565b336001600160a01b037f000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e16146106b5576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920706f6f6c2063616e20757064617465207265776172640000000000604482015290519081900360640190fd5b6106be816109ca565b50565b6002546000906106d49062278d00610ab1565b90505b90565b60025481565b600060015442106106f3576001546106d4565b504290565b60056020526000908152604090205481565b60035481565b60007f000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076b57600080fd5b505afa15801561077f573d6000803e3d6000fd5b505050506040513d602081101561079557600080fd5b50516107a457506004546106d7565b6106d46108587f000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561080357600080fd5b505afa158015610817573d6000803e3d6000fd5b505050506040513d602081101561082d57600080fd5b50516002546003546103ee91670de0b6b3a764000091610852919082906105806106e0565b90610ab1565b60045490610b0a565b600260005414156108b9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556108c7816109ca565b6001600160a01b038116600090815260066020526040902054801561096d576001600160a01b0380831660009081526006602052604081205561092d907f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e998421168383610b64565b6040805182815290516001600160a01b038416917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001600055565b60045481565b60015481565b7f000000000000000000000000a4f1671d3aee73c05b552d57f2d16d3cfcbd021781565b7f0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e99842181565b6109d2610710565b6004556109dd6106e0565b6003556001600160a01b038116156106be576109f881610539565b6001600160a01b03821660009081526006602090815260408083209390935560045460059091529190205550565b6000610a6883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610bbb565b9392505050565b6000610a6883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c5d565b600082610ac05750600061062b565b82820282848281610acd57fe5b0414610a685760405162461bcd60e51b8152600401808060200182810382526021815260200180610ef36021913960400191505060405180910390fd5b600082820183811015610a68576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610bb6908490610cb7565b505050565b60008183610c475760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c0c578181015183820152602001610bf4565b50505050905090810190601f168015610c395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610c5357fe5b0495945050505050565b60008184841115610caf5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c0c578181015183820152602001610bf4565b505050900390565b6060610d0c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d689092919063ffffffff16565b805190915015610bb657808060200190516020811015610d2b57600080fd5b5051610bb65760405162461bcd60e51b815260040180806020018281038252602a815260200180610f14602a913960400191505060405180910390fd5b6060610d778484600085610d7f565b949350505050565b6060610d8a85610eec565b610ddb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610e1a5780518252601f199092019160209182019101610dfb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50915091508115610e95579150610d779050565b805115610ea55780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610c0c578181015183820152602001610bf4565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220933dfbc2356e301889b6e5087383b61f2c2c00996574932a822f6849ddcd9b0464736f6c634300060c0033

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

000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e998421000000000000000000000000a4f1671d3aee73c05b552d57f2d16d3cfcbd0217

-----Decoded View---------------
Arg [0] : _pool (address): 0x103cc17C2B1586e5Cd9BaD308690bCd0BBe54D5e
Arg [1] : _rewardToken (address): 0x1b40183EFB4Dd766f11bDa7A7c3AD8982e998421
Arg [2] : _controller (address): 0xa4F1671d3Aee73C05b552d57f2d16d3cfcBd0217

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000103cc17c2b1586e5cd9bad308690bcd0bbe54d5e
Arg [1] : 0000000000000000000000001b40183efb4dd766f11bda7a7c3ad8982e998421
Arg [2] : 000000000000000000000000a4f1671d3aee73c05b552d57f2d16d3cfcbd0217


Deployed Bytecode Sourcemap

22353:4149:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22885:42;;;;;;;;;;;;;;;;-1:-1:-1;22885:42:0;-1:-1:-1;;;;;22885:42:0;;:::i;:::-;;;;;;;;;;;;;;;;22480:38;;;:::i;:::-;;;;-1:-1:-1;;;;;22480:38:0;;;;;;;;;;;;;;23477:898;;;;;;;;;;;;;;;;-1:-1:-1;23477:898:0;;:::i;:::-;;25207:308;;;;;;;;;;;;;;;;-1:-1:-1;25207:308:0;-1:-1:-1;;;;;25207:308:0;;:::i;22687:49::-;;;:::i;24848:169::-;;;;;;;;;;;;;;;;-1:-1:-1;24848:169:0;-1:-1:-1;;;;;24848:169:0;;:::i;25025:127::-;;;:::i;22651:29::-;;;:::i;25577:164::-;;;:::i;22821:57::-;;;;;;;;;;;;;;;;-1:-1:-1;22821:57:0;-1:-1:-1;;;;;22821:57:0;;:::i;22743:29::-;;;:::i;25749:407::-;;;:::i;24425:331::-;;;;;;;;;;;;;;;;-1:-1:-1;24425:331:0;-1:-1:-1;;;;;24425:331:0;;:::i;22779:35::-;;;:::i;22613:31::-;;;:::i;22567:39::-;;;:::i;22525:35::-;;;:::i;22885:42::-;;;;;;;;;;;;;:::o;22480:38::-;;;:::o;23477:898::-;23556:25;23578:1;23556:13;:25::i;:::-;23600:10;-1:-1:-1;;;;;23622:10:0;23600:33;;23592:60;;;;;-1:-1:-1;;;23592:60:0;;;;;;;;;;;;-1:-1:-1;;;23592:60:0;;;;;;;;;;;;;;;23679:11;-1:-1:-1;;;;;23671:34:0;23663:68;;;;;-1:-1:-1;;;23663:68:0;;;;;;;;;;;;-1:-1:-1;;;23663:68:0;;;;;;;;;;;;;;;23765:12;;23746:15;:31;23742:330;;23807:33;:12;22729:7;23807:16;:33::i;:::-;23794:10;:46;23742:330;;;23893:12;;23873:17;;23893:33;;23910:15;23893:16;:33::i;:::-;23873:53;;23941:16;23960:25;23974:10;;23960:9;:13;;:25;;;;:::i;:::-;23941:44;-1:-1:-1;24013:47:0;22729:7;24013:26;:12;23941:44;24013:16;:26::i;:::-;:30;;:47::i;:::-;24000:10;:60;-1:-1:-1;;23742:330:0;24084:15;24102:11;-1:-1:-1;;;;;24102:21:0;;24132:4;24102:36;;;;;;;;;;;;;-1:-1:-1;;;;;24102:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;24102:36:0;;-1:-1:-1;24171:28:0;24102:36;22729:7;24171:11;:28::i;:::-;24157:10;;:42;;24149:70;;;;;-1:-1:-1;;;24149:70:0;;;;;;;;;;;;-1:-1:-1;;;24149:70:0;;;;;;;;;;;;;;;24249:15;24232:14;:32;;;24290:36;;22729:7;24290:19;:36::i;:::-;24275:12;:51;24342:25;;;;;;;;;;;;;;;;;23477:898;;:::o;25207:308::-;-1:-1:-1;;;;;25490:16:0;;25273:7;25490:16;;;:7;:16;;;;;;;;;25406:22;:31;;;;;;25313:194;;25490:16;25313:154;;25462:4;;25313:126;;25385:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;25320:4;-1:-1:-1;;;;;25313:40:0;;25354:7;25313:49;;;;;;;;;;;;;-1:-1:-1;;;;;25313:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25313:49:0;;:71;:126::i;:154::-;:176;;:194::i;:::-;25293:214;25207:308;-1:-1:-1;;25207:308:0:o;22687:49::-;22729:7;22687:49;:::o;24848:169::-;24925:10;-1:-1:-1;;;;;24939:4:0;24925:18;;24917:58;;;;;-1:-1:-1;;;24917:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;24986:23;25000:8;24986:13;:23::i;:::-;24848:169;:::o;25025:127::-;25113:10;;25086:7;;25113:31;;22729:7;25113:14;:31::i;:::-;25106:38;;25025:127;;:::o;22651:29::-;;;;:::o;25577:164::-;25643:7;25688:12;;25670:15;:30;:63;;25721:12;;25670:63;;;-1:-1:-1;25703:15:0;;25577:164::o;22821:57::-;;;;;;;;;;;;;:::o;22743:29::-;;;;:::o;25749:407::-;25805:7;25836:4;-1:-1:-1;;;;;25829:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25829:26:0;25825:91;;-1:-1:-1;25884:20:0;;25877:27;;25825:91;25946:202;25989:144;26095:4;-1:-1:-1;;;;;26088:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26088:26:0;26040:10;;26020:14;;25989:72;;26056:4;;25989:62;;26040:10;25989:62;;:26;:24;:26::i;:46::-;:50;;:62::i;:144::-;25946:20;;;:24;:202::i;24425:331::-;19732:1;20338:7;;:19;;20330:63;;;;;-1:-1:-1;;;20330:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;19732:1;20471:7;:18;24505:22:::1;24519:7:::0;24505:13:::1;:22::i;:::-;-1:-1:-1::0;;;;;24555:16:0;::::1;24538:14;24555:16:::0;;;:7:::1;:16;::::0;;;;;24586:11;;24582:167:::1;;-1:-1:-1::0;;;;;24614:16:0;;::::1;24633:1;24614:16:::0;;;:7:::1;:16;::::0;;;;:20;24649:41:::1;::::0;:11:::1;:24;24622:7:::0;24683:6;24649:24:::1;:41::i;:::-;24710:27;::::0;;;;;;;-1:-1:-1;;;;;24710:27:0;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;24582:167;-1:-1:-1::0;;19688:1:0;20650:7;:22;24425:331::o;22779:35::-;;;;:::o;22613:31::-;;;;:::o;22567:39::-;;;:::o;22525:35::-;;;:::o;26164:335::-;26247:16;:14;:16::i;:::-;26224:20;:39;26291:26;:24;:26::i;:::-;26274:14;:43;-1:-1:-1;;;;;26332:22:0;;;26328:164;;26391:19;26401:8;26391:9;:19::i;:::-;-1:-1:-1;;;;;26371:17:0;;;;;;:7;:17;;;;;;;;:39;;;;26460:20;;26425:22;:32;;;;;;:55;26164:335;:::o;6060:132::-;6118:7;6145:39;6149:1;6152;6145:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;6138:46;6060:132;-1:-1:-1;;;6060:132:0:o;4223:136::-;4281:7;4308:43;4312:1;4315;4308:43;;;;;;;;;;;;;;;;;:3;:43::i;5113:471::-;5171:7;5416:6;5412:47;;-1:-1:-1;5446:1:0;5439:8;;5412:47;5483:5;;;5487:1;5483;:5;:1;5507:5;;;;;:10;5499:56;;;;-1:-1:-1;;;5499:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3759:181;3817:7;3849:5;;;3873:6;;;;3865:46;;;;;-1:-1:-1;;;3865:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;14924:177;15034:58;;;-1:-1:-1;;;;;15034:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15034:58:0;-1:-1:-1;;;15034:58:0;;;15007:86;;15027:5;;15007:19;:86::i;:::-;14924:177;;;:::o;6688:278::-;6774:7;6809:12;6802:5;6794:28;;;;-1:-1:-1;;;6794:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6833:9;6849:1;6845;:5;;;;;;;6688:278;-1:-1:-1;;;;;6688:278:0:o;4662:192::-;4748:7;4784:12;4776:6;;;;4768:29;;;;-1:-1:-1;;;4768:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4820:5:0;;;4662:192::o;17229:761::-;17653:23;17679:69;17707:4;17679:69;;;;;;;;;;;;;;;;;17687:5;-1:-1:-1;;;;;17679:27:0;;;:69;;;;;:::i;:::-;17763:17;;17653:95;;-1:-1:-1;17763:21:0;17759:224;;17905:10;17894:30;;;;;;;;;;;;;;;-1:-1:-1;17894:30:0;17886:85;;;;-1:-1:-1;;;17886:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11903:196;12006:12;12038:53;12061:6;12069:4;12075:1;12078:12;12038:22;:53::i;:::-;12031:60;11903:196;-1:-1:-1;;;;11903:196:0:o;13280:979::-;13410:12;13443:18;13454:6;13443:10;:18::i;:::-;13435:60;;;;;-1:-1:-1;;;13435:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13569:12;13583:23;13610:6;-1:-1:-1;;;;;13610:11:0;13630:8;13641:4;13610:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13610:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13568:78;;;;13661:7;13657:595;;;13692:10;-1:-1:-1;13685:17:0;;-1:-1:-1;13685:17:0;13657:595;13806:17;;:21;13802:439;;14069:10;14063:17;14130:15;14117:10;14113:2;14109:19;14102:44;14017:148;14205:20;;-1:-1:-1;;;14205:20:0;;;;;;;;;;;;;;;;;14212:12;;14205:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8985:422;9352:20;9391:8;;;8985:422::o

Swarm Source

ipfs://933dfbc2356e301889b6e5087383b61f2c2c00996574932a822f6849ddcd9b04

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.