ETH Price: $4,072.58 (+6.28%)

Contract

0x4eB4C5911e931667fE1647428F38401aB1661763
 
Transaction Hash
Method
Block
From
To
Withdraw210157972024-10-21 18:37:4746 days ago1729535867IN
0x4eB4C591...aB1661763
0 ETH0.000854598.86669997
Emergency Withdr...209213392024-10-08 14:04:3559 days ago1728396275IN
0x4eB4C591...aB1661763
0 ETH0.0008325734.78045922
Withdraw199170902024-05-21 8:28:11199 days ago1716280091IN
0x4eB4C591...aB1661763
0 ETH0.00070767.49820578
Withdraw199103612024-05-20 9:52:11200 days ago1716198731IN
0x4eB4C591...aB1661763
0 ETH0.000284973.86540732
Withdraw198236562024-05-08 6:48:11212 days ago1715150891IN
0x4eB4C591...aB1661763
0 ETH0.000434794.60729635
Withdraw196361762024-04-12 1:13:47238 days ago1712884427IN
0x4eB4C591...aB1661763
0 ETH0.0009194612.47153683
Withdraw194976872024-03-23 13:46:59258 days ago1711201619IN
0x4eB4C591...aB1661763
0 ETH0.0017959918.63644327
Deposit194512792024-03-17 1:22:59264 days ago1710638579IN
0x4eB4C591...aB1661763
0 ETH0.0029716627.54498205
Deposit194155512024-03-12 0:54:23269 days ago1710204863IN
0x4eB4C591...aB1661763
0 ETH0.0069217264.15180213
Withdraw193595452024-03-04 4:55:11277 days ago1709528111IN
0x4eB4C591...aB1661763
0 ETH0.0045481348.19470701
Withdraw193518082024-03-03 2:58:35278 days ago1709434715IN
0x4eB4C591...aB1661763
0 ETH0.0027970537.93280722
Withdraw193505882024-03-02 22:53:35278 days ago1709420015IN
0x4eB4C591...aB1661763
0 ETH0.0037807640.06323983
Withdraw192258472024-02-14 11:15:35296 days ago1707909335IN
0x4eB4C591...aB1661763
0 ETH0.0021216624.42677919
Withdraw188011672023-12-16 21:02:59355 days ago1702760579IN
0x4eB4C591...aB1661763
0 ETH0.0024203842.75325126
Withdraw188011642023-12-16 21:02:23355 days ago1702760543IN
0x4eB4C591...aB1661763
0 ETH0.0037228245.86225902
Withdraw187874222023-12-14 22:42:23357 days ago1702593743IN
0x4eB4C591...aB1661763
0 ETH0.0029754438.50110242
Deposit187191342023-12-05 9:04:23367 days ago1701767063IN
0x4eB4C591...aB1661763
0 ETH0.0045560144.18687024
Withdraw186797112023-11-29 20:40:11372 days ago1701290411IN
0x4eB4C591...aB1661763
0 ETH0.0018413732.51183414
Deposit186656622023-11-27 21:29:23374 days ago1701120563IN
0x4eB4C591...aB1661763
0 ETH0.0034110334.70171468
Withdraw186081752023-11-19 20:16:11382 days ago1700424971IN
0x4eB4C591...aB1661763
0 ETH0.0028761639.0057267
Deposit186048792023-11-19 9:11:23383 days ago1700385083IN
0x4eB4C591...aB1661763
0 ETH0.0015591815.12185799
Withdraw185587082023-11-12 22:07:35389 days ago1699826855IN
0x4eB4C591...aB1661763
0 ETH0.0019793126.84727271
Withdraw185507062023-11-11 19:15:11391 days ago1699730111IN
0x4eB4C591...aB1661763
0 ETH0.0036843439.04151644
Withdraw185282002023-11-08 15:42:23394 days ago1699458143IN
0x4eB4C591...aB1661763
0 ETH0.0028831843.54410729
Withdraw185281722023-11-08 15:36:47394 days ago1699457807IN
0x4eB4C591...aB1661763
0 ETH0.0035419153.55104053
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:
SaffronStakingV2

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : SaffronStakingV2.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interface/ISFIRewarder.sol";

/**
 * @dev Contract for rewarding users with SFI for the Saffron liquidity mining program.
 *
 * Code based off Sushiswap's Masterchef contract with the addition of SFIRewarder.
 * 
 * NOTE: Do not add pools with LP tokens that are deflationary or have reflection.
 */
contract SaffronStakingV2 is Ownable {
    using SafeERC20 for IERC20;

    // Structure of user deposited amounts and their pending reward debt.
    struct UserInfo {
        // Amount of tokens added by the user.
        uint256 amount;

        // Accounting mechanism. Prevents double-redeeming rewards in the same block.
        uint256 rewardDebt;
    }

    // Structure holding information about each pool's LP token and allocation information.
    struct PoolInfo {
        // LP token contract. In the case of single-asset staking this is an ERC20.
        IERC20 lpToken;

        // Allocation points to determine how many SFI will be distributed per block to this pool.
        uint256 allocPoint;

        // The last block that accumulated rewards were calculated for this pool.
        uint256 lastRewardBlock; 

        // Accumulator storing the accumulated SFI earned per share of this pool.
        // Shares are user lpToken deposit amounts. This value is scaled up by 1e18.
        uint256 accSFIPerShare; 
    }

    // The amount of SFI to be rewarded per block to all pools.
    uint256 public sfiPerBlock;

    // SFI rewards are cut off after a specified block. Can be updated by governance to extend/reduce reward time.
    uint256 public rewardCutoff; 

    // SFIRewarder contract holding the SFI tokens to be rewarded to users.
    ISFIRewarder public rewarder;

    // List of pool info structs by pool id.
    PoolInfo[] public poolInfo;

    // Mapping to store list of added LP tokens to prevent accidentally adding duplicate pools.
    mapping(address => bool) public lpTokenAdded; 

    // Mapping of mapping to store user informaton indexed by pool id and the user's address.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;

    constructor(address _rewarder, uint256 _sfiPerBlock, uint256 _rewardCutoff) {
        require(_rewarder != address(0), "invalid rewarder");
        require(_rewardCutoff >= block.number, "invalid rewardCutoff");
        rewarder = ISFIRewarder(_rewarder);
        sfiPerBlock = _sfiPerBlock;
        rewardCutoff = _rewardCutoff;
    }

    /** 
     * @dev Update the SFIRewarder. Only callable by the contract owner.
     * @param _rewarder The new SFIRewarder account.
     */
    function setRewarder(address _rewarder) external onlyOwner {
        require(_rewarder != address(0), "invalid rewarder address");
        rewarder = ISFIRewarder(_rewarder);
    }

    /** 
     * @dev Update the amount of SFI rewarded per block. Only callable by the contract owner.
     * @param _sfiPerBlock The new SFI per block amount to be distributed.
     */
    function setRewardPerBlock(uint256 _sfiPerBlock) external onlyOwner {
        massUpdatePools();
        sfiPerBlock = _sfiPerBlock;
        emit RewardPerBlockSet(sfiPerBlock);
    }

    /** 
     * @dev Update the reward end block. Only callable by the contract owner.
     * @param _rewardCutoff The new cut-off block to end SFI reward distribution.
     */
    function setRewardCutoff(uint256 _rewardCutoff) external onlyOwner {
        require(_rewardCutoff >= block.number, "invalid rewardCutoff");
        rewardCutoff = _rewardCutoff;
    }

    /** 
     * @dev Update the reward end block and sfiPerBlock atomically. Only callable by the contract owner.
     * @param _rewardCutoff The new cut-off block to end SFI reward distribution.
     * @param _sfiPerBlock The new SFI per block amount to be distributed.
     */
    function setRewardPerBlockAndRewardCutoff(uint256 _sfiPerBlock, uint256 _rewardCutoff) external onlyOwner {
        require(_rewardCutoff >= block.number, "invalid rewardCutoff");
        massUpdatePools();
        sfiPerBlock = _sfiPerBlock;
        rewardCutoff = _rewardCutoff;
    }

    /** 
     * @dev Return the number of pools in the poolInfo list.
     */
    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    /**
     * @dev Add a new pool specifying its lp token and allocation points.
     * @param _allocPoint The allocationPoints for the pool. Determines SFI per block.
     * @param _lpToken Token address for the LP token in this pool.
     */
    function add(uint256 _allocPoint, address _lpToken) public onlyOwner {
        require(_lpToken != address(0), "invalid _lpToken address");
        require(!lpTokenAdded[_lpToken], "lpToken already added");
        require(block.number < rewardCutoff, "can't add pool after cutoff");
        require(_allocPoint > 0, "can't add pool with 0 ap");
        massUpdatePools();
        totalAllocPoint = totalAllocPoint + _allocPoint;
        lpTokenAdded[_lpToken] = true;
        poolInfo.push(PoolInfo({lpToken: IERC20(_lpToken), allocPoint: _allocPoint, lastRewardBlock: block.number, accSFIPerShare: 0}));
    }

    /**
     * @dev Set the allocPoint of the specific pool with id _pid.
     * @param _pid The pool id that is to be set.
     * @param _allocPoint The new allocPoint for the pool.
     */
    function set(uint256 _pid, uint256 _allocPoint) public onlyOwner {
        require(_pid < poolInfo.length, "can't set non-existant pool");
        require(_allocPoint > 0, "can't set pool to 0 ap");
        massUpdatePools();
        totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    /**
     * @dev Return the pending SFI rewards of a user for a specific pool id.
     *
     * Helper function for front-end web3 implementations.
     *
     * @param _pid Pool id to get SFI rewards report from.
     * @param _user User account to report SFI rewards from.
     * @return Pending SFI amount for the user indexed by pool id.
     */
    function pendingSFI(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo memory user = userInfo[_pid][_user];
        uint256 accSFIPerShare = pool.accSFIPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));

        uint256 latestRewardBlock = block.number >= rewardCutoff ? rewardCutoff : block.number;

        if (latestRewardBlock > pool.lastRewardBlock && lpSupply != 0) {
            // Get number of blocks to multiply by
            uint256 multiplier = latestRewardBlock - pool.lastRewardBlock;
            // New SFI reward is the number of blocks multiplied by the SFI per block times multiplied by the pools share of the total
            uint256 sfiReward = multiplier * sfiPerBlock * pool.allocPoint;
            // Add delta/change in share of the new reward to the accumulated SFI per share for this pool's token
            accSFIPerShare = accSFIPerShare + (sfiReward * 1e18 / lpSupply / totalAllocPoint);
        }
        // Return the pending SFI amount for this user
        return (user.amount * accSFIPerShare / 1e18) - user.rewardDebt;
    }

    /**
     * @dev Update reward variables for all pools. Be careful of gas spending! More than 100 pools is not recommended.
     */
    function massUpdatePools() public {
        for (uint256 pid = 0; pid < poolInfo.length; ++pid) {
            updatePool(pid);
        }
    }

    /**
     * @dev Update accumulated SFI shares of the specified pool.
     * @param _pid The id of the pool to be updated.
     */
    function updatePool(uint256 _pid) public returns (PoolInfo memory) {
        // Retrieve pool info by the pool id
        PoolInfo storage pool = poolInfo[_pid];

        // Only reward SFI for blocks earlier than rewardCutoff block
        uint256 latestRewardBlock = block.number >= rewardCutoff ? rewardCutoff : block.number;

        // Don't update twice in the same block
        if (latestRewardBlock > pool.lastRewardBlock) {
            // Get the amount of this pools token owned by the SaffronStaking contract
            uint256 lpSupply = pool.lpToken.balanceOf(address(this));
            // Calculate new rewards if amount is greater than 0
            if (lpSupply > 0) {
                // Get number of blocks to multiply by
                uint256 multiplier = latestRewardBlock - pool.lastRewardBlock;
                // New SFI reward is the number of blocks multiplied by the SFI per block times multiplied by the pools share of the total
                uint256 sfiReward = multiplier * sfiPerBlock * pool.allocPoint;
                // Add delta/change in share of the new reward to the accumulated SFI per share for this pool's token
                pool.accSFIPerShare = pool.accSFIPerShare + (sfiReward * 1e18 / lpSupply / totalAllocPoint);
            } 
            // Set the last reward block to the most recent reward block
            pool.lastRewardBlock = latestRewardBlock;
        }
        // Return this pools updated info
        return poolInfo[_pid];
    }

    /**
     * @dev Deposit the user's lp token into the the specified pool.
     * @param _pid Pool id where the user's asset is being deposited.
     * @param _amount Amount to deposit into the pool.
     */
    function deposit(uint256 _pid, uint256 _amount) public {
        // Get pool identified by pid
        PoolInfo memory pool = updatePool(_pid);
        // Get user in this pool identified by msg.sender address
        UserInfo storage user = userInfo[_pid][msg.sender];
        // Calculate pending SFI earnings for this user in this pool
        uint256 pending = (user.amount * pool.accSFIPerShare / 1e18) - user.rewardDebt;

        // Effects
        // Add the new deposit amount to the pool user's amount total
        user.amount = user.amount + _amount;
        // Update the pool user's reward debt to this new amount
        user.rewardDebt = user.amount * pool.accSFIPerShare / 1e18;

        // Interactions
        // Transfer pending SFI rewards to the user
        safeSFITransfer(msg.sender, pending);
        // Transfer the users tokens to this contract (deposit them in this contract)
        pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);

        emit TokensDeposited(msg.sender, _pid, _amount, pool.lpToken.balanceOf(address(this)));
    }

    /**
     * @dev Withdraw the user's lp token from the specified pool.
     * @param _pid Pool id from which the user's asset is being withdrawn.
     * @param _amount Amount to withdraw from the pool.
     */
    function withdraw(uint256 _pid, uint256 _amount) public {
        // Get pool identified by pid
        PoolInfo memory pool = updatePool(_pid);
        // Get user in this pool identified by msg.sender address
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "can't withdraw more than user balance");
        // Calculate pending SFI earnings for this user in this pool
        uint256 pending = (user.amount * pool.accSFIPerShare / 1e18) - user.rewardDebt;

        // Effects
        // Subtract the new withdraw amount from the pool user's amount total
        user.amount = user.amount - _amount;
        // Update the pool user's reward debt to this new amount
        user.rewardDebt = user.amount * pool.accSFIPerShare / 1e18;

        // Interactions
        // Transfer pending SFI rewards to the user
        safeSFITransfer(msg.sender, pending);
        // Transfer contract's tokens amount to this user (withdraw them from this contract)
        pool.lpToken.safeTransfer(address(msg.sender), _amount);

        emit TokensWithdrawn(msg.sender, _pid, _amount, pool.lpToken.balanceOf(address(this)));
    }

    /**
     * @dev Emergency function to withdraw a user's asset in a specified pool.
     * @param _pid Pool id from which the user's asset is being withdrawn.
     */
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;

        // Effects
        user.amount = 0;
        user.rewardDebt = 0;

        // Interactions
        pool.lpToken.safeTransfer(address(msg.sender), amount);

        emit TokensEmergencyWithdrawn(msg.sender, _pid, amount, pool.lpToken.balanceOf(address(this)));
    }

    /**
     * @dev Transfer SFI from the SFIRewarder contract to the user's account.
     * @param to Account to transfer SFI to from the SFIRewarder contract.
     * @param amount Amount of SFI to transfer from the SFIRewarder to the user's account.
     */
    function safeSFITransfer(address to, uint256 amount) internal {
        if (amount > 0) rewarder.rewardUser(to, amount);
    }

    /**
     * @dev Emitted when `amount` tokens are deposited by `user` into pool id `pid`.
     */
    event TokensDeposited(address indexed user, uint256 indexed pid, uint256 amount, uint256 balance);

    /**
     * @dev Emitted when `amount` tokens are withdrawn by `user` from pool id `pid`.
     */
    event TokensWithdrawn(address indexed user, uint256 indexed pid, uint256 amount, uint256 balance);

    /**
     * @dev Emitted when `amount` tokens are emergency withdrawn by `user` from pool id `pid`.
     */
    event TokensEmergencyWithdrawn(address indexed user, uint256 indexed pid, uint256 amount, uint256 balance);

    /**
     * @dev Emitted when `sfiPerBlock` is set by governance.
     */
    event RewardPerBlockSet(uint256 newSfiPerBlock);

}

File 2 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 3 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - 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. 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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 7 : ISFIRewarder.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

/**
 * @dev Interface of the SFIRewarder contract for SaffronStakingV2 to implement and call.
 */
interface ISFIRewarder {
    /**
     * @dev Rewards an `amount` of SFI to account `to`.
     */
    function rewardUser(address to, uint256 amount) external;
    
    /**
     * @dev Emitted when `amount` SFI are rewarded to account `to`.
     *
     * Note that `amount` may be zero.
     */
    event UserRewarded(address indexed to, uint256 amount);

}

File 6 of 7 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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 on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        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");

        (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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 7 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewarder","type":"address"},{"internalType":"uint256","name":"_sfiPerBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardCutoff","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSfiPerBlock","type":"uint256"}],"name":"RewardPerBlockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"TokensDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"TokensEmergencyWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"TokensWithdrawn","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"address","name":"_lpToken","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lpTokenAdded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingSFI","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accSFIPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardCutoff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewarder","outputs":[{"internalType":"contract ISFIRewarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardCutoff","type":"uint256"}],"name":"setRewardCutoff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sfiPerBlock","type":"uint256"}],"name":"setRewardPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sfiPerBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardCutoff","type":"uint256"}],"name":"setRewardPerBlockAndRewardCutoff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewarder","type":"address"}],"name":"setRewarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sfiPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[{"components":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accSFIPerShare","type":"uint256"}],"internalType":"struct SaffronStakingV2.PoolInfo","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001ae938038062001ae983398101604081905262000034916200015d565b6200003f336200010d565b6001600160a01b0383166200008e5760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b2103932bbb0b93232b960811b60448201526064015b60405180910390fd5b43811015620000e05760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207265776172644375746f6666000000000000000000000000604482015260640162000085565b600380546001600160a01b0319166001600160a01b039490941693909317909255600155600255620001a0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006060848603121562000172578283fd5b83516001600160a01b038116811462000189578384fd5b602085015160409095015190969495509392505050565b61193980620001b06000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063630b5ba1116100c3578063bb872b4a1161007c578063bb872b4a1461033d578063d139066414610350578063d669ce1314610363578063dcc3e06e1461036c578063e2bbb1581461037f578063f2fde38b1461039257600080fd5b8063630b5ba114610285578063672ac8dc1461028d578063715018a6146102965780638da5cb5b1461029e57806393f1a40b146102c3578063a38b6f5b1461030a57600080fd5b80633a6462e4116101155780633a6462e4146101d75780633e155e42146101ea578063441a3e70146101fd5780634714c4c91461021057806351eb05a6146102235780635312ea8e1461027257600080fd5b8063081e3eda146101525780631526fe271461016957806317caf6f1146101a65780631ab06ee5146101af5780632b8bbbe8146101c4575b600080fd5b6004545b6040519081526020015b60405180910390f35b61017c610177366004611738565b6103a5565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610160565b61015660075481565b6101c26101bd366004611793565b6103e9565b005b6101c26101d2366004611768565b61054a565b6101c26101e53660046116fe565b6107f2565b6101c26101f8366004611793565b610894565b6101c261020b366004611793565b610918565b61015661021e366004611768565b610af4565b610236610231366004611738565b610ce3565b604051610160919081516001600160a01b0316815260208083015190820152604080830151908201526060918201519181019190915260800190565b6101c2610280366004611738565b610ee4565b6101c2611042565b61015660025481565b6101c261106c565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610160565b6102f56102d1366004611768565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610160565b61032d6103183660046116fe565b60056020526000908152604090205460ff1681565b6040519015158152602001610160565b6101c261034b366004611738565b6110a2565b6101c261035e366004611738565b61110f565b61015660015481565b6003546102ab906001600160a01b031681565b6101c261038d366004611793565b611185565b6101c26103a03660046116fe565b611297565b600481815481106103b557600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b0316331461041c5760405162461bcd60e51b815260040161041390611803565b60405180910390fd5b600454821061046d5760405162461bcd60e51b815260206004820152601b60248201527f63616e277420736574206e6f6e2d6578697374616e7420706f6f6c00000000006044820152606401610413565b600081116104b65760405162461bcd60e51b8152602060048201526016602482015275063616e27742073657420706f6f6c20746f20302061760541b6044820152606401610413565b6104be611042565b80600483815481106104e057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101546007546104ff919061188f565b6105099190611838565b600781905550806004838154811061053157634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101819055505050565b6000546001600160a01b031633146105745760405162461bcd60e51b815260040161041390611803565b6001600160a01b0381166105ca5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964205f6c70546f6b656e206164647265737300000000000000006044820152606401610413565b6001600160a01b03811660009081526005602052604090205460ff161561062b5760405162461bcd60e51b81526020600482015260156024820152741b1c151bdad95b88185b1c9958591e481859191959605a1b6044820152606401610413565b600254431061067c5760405162461bcd60e51b815260206004820152601b60248201527f63616e27742061646420706f6f6c206166746572206375746f666600000000006044820152606401610413565b600082116106cc5760405162461bcd60e51b815260206004820152601860248201527f63616e27742061646420706f6f6c2077697468203020617000000000000000006044820152606401610413565b6106d4611042565b816007546106e29190611838565b6007556001600160a01b039081166000818152600560209081526040808320805460ff1916600190811790915581516080810183529485529184019586524390840190815260608401838152600480549384018155938490529351919092027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b81018054929095166001600160a01b03199092169190911790935592517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c83015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e90910155565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260040161041390611803565b6001600160a01b0381166108725760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207265776172646572206164647265737300000000000000006044820152606401610413565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108be5760405162461bcd60e51b815260040161041390611803565b438110156109055760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103932bbb0b93221baba37b33360611b6044820152606401610413565b61090d611042565b600191909155600255565b600061092383610ce3565b6000848152600660209081526040808320338452909152902080549192509083111561099f5760405162461bcd60e51b815260206004820152602560248201527f63616e2774207769746864726177206d6f7265207468616e20757365722062616044820152646c616e636560d81b6064820152608401610413565b60008160010154670de0b6b3a7640000846060015184600001546109c39190611870565b6109cd9190611850565b6109d7919061188f565b82549091506109e790859061188f565b8083556060840151670de0b6b3a764000091610a039190611870565b610a0d9190611850565b6001830155610a1c338261132f565b8251610a32906001600160a01b031633866113a0565b82516040516370a0823160e01b8152306004820152869133917fb3ad69dc1d2c6b1f5f5b0927ffd8ee8f1437a156253c8f6dccc75e6f8e4fd38b9188916001600160a01b03909116906370a08231906024015b60206040518083038186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad59190611750565b6040805192835260208301919091520160405180910390a35050505050565b60008060048481548110610b1857634e487b7160e01b600052603260045260246000fd5b6000918252602080832060408051608081018252600494850290920180546001600160a01b03908116845260018083015485870152600283015485850152600390920154606085019081528b8852600686528388208b8316895286528388208451808601865281548152930154958301959095529351835192516370a0823160e01b81523096810196909652929650949193919216906370a082319060240160206040518083038186803b158015610bcf57600080fd5b505afa158015610be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c079190611750565b90506000600254431015610c1b5743610c1f565b6002545b9050846040015181118015610c3357508115155b15610ca7576000856040015182610c4a919061188f565b90506000866020015160015483610c619190611870565b610c6b9190611870565b60075490915084610c8483670de0b6b3a7640000611870565b610c8e9190611850565b610c989190611850565b610ca29086611838565b945050505b60208401518451670de0b6b3a764000090610cc3908690611870565b610ccd9190611850565b610cd7919061188f565b98975050505050505050565b610d17604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b600060048381548110610d3a57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020190506000600254431015610d5c5743610d60565b6002545b90508160020154811115610e715781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611750565b90508015610e68576000836002015483610e03919061188f565b90506000846001015460015483610e1a9190611870565b610e249190611870565b60075490915083610e3d83670de0b6b3a7640000611870565b610e479190611850565b610e519190611850565b8560030154610e609190611838565b600386015550505b50600282018190555b60048481548110610e9257634e487b7160e01b600052603260045260246000fd5b600091825260209182902060408051608081018252600490930290910180546001600160a01b031683526001810154938301939093526002830154908201526003909101546060820152949350505050565b600060048281548110610f0757634e487b7160e01b600052603260045260246000fd5b6000918252602080832060408051608081018252600490940290910180546001600160a01b03908116855260018083015486860152600283015486850152600390920154606086015287865260068452828620338088529452918520805486825591810195909555835193955092610f8292911690836113a0565b82516040516370a0823160e01b8152306004820152859133917f4d0b6fd10a4a84991f0c0077f391c03ce27f8c34dc116aa9960d848ecc6bc0649185916001600160a01b03909116906370a082319060240160206040518083038186803b158015610fec57600080fd5b505afa158015611000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110249190611750565b6040805192835260208301919091520160405180910390a350505050565b60005b6004548110156110695761105881610ce3565b50611062816118d2565b9050611045565b50565b6000546001600160a01b031633146110965760405162461bcd60e51b815260040161041390611803565b6110a06000611408565b565b6000546001600160a01b031633146110cc5760405162461bcd60e51b815260040161041390611803565b6110d4611042565b60018190556040518181527f5d7c78d0ee3ce6196f90e74ed58c0ada9ac7ccc47d3aca0547ac893776f038269060200160405180910390a150565b6000546001600160a01b031633146111395760405162461bcd60e51b815260040161041390611803565b438110156111805760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103932bbb0b93221baba37b33360611b6044820152606401610413565b600255565b600061119083610ce3565b6000848152600660209081526040808320338452909152812060018101546060840151825494955091939091670de0b6b3a7640000916111d09190611870565b6111da9190611850565b6111e4919061188f565b82549091506111f4908590611838565b8083556060840151670de0b6b3a7640000916112109190611870565b61121a9190611850565b6001830155611229338261132f565b8251611240906001600160a01b0316333087611458565b82516040516370a0823160e01b8152306004820152869133917f651b66d4c82e3fedc9c57c6ff8a4cf8c81b8d1cd432d7297773c6edbf6cfb36a9188916001600160a01b03909116906370a0823190602401610a85565b6000546001600160a01b031633146112c15760405162461bcd60e51b815260040161041390611803565b6001600160a01b0381166113265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610413565b61106981611408565b801561139c5760035460405163393840f760e21b81526001600160a01b038481166004830152602482018490529091169063e4e103dc90604401600060405180830381600087803b15801561138357600080fd5b505af1158015611397573d6000803e3d6000fd5b505050505b5050565b6040516001600160a01b03831660248201526044810182905261140390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611496565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114909085906323b872dd60e01b906084016113cc565b50505050565b60006114eb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115689092919063ffffffff16565b80519091501561140357808060200190518101906115099190611718565b6114035760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610413565b60606115778484600085611581565b90505b9392505050565b6060824710156115e25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610413565b843b6116305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610413565b600080866001600160a01b0316858760405161164c91906117b4565b60006040518083038185875af1925050503d8060008114611689576040519150601f19603f3d011682016040523d82523d6000602084013e61168e565b606091505b509150915061169e8282866116a9565b979650505050505050565b606083156116b857508161157a565b8251156116c85782518084602001fd5b8160405162461bcd60e51b815260040161041391906117d0565b80356001600160a01b03811681146116f957600080fd5b919050565b60006020828403121561170f578081fd5b61157a826116e2565b600060208284031215611729578081fd5b8151801515811461157a578182fd5b600060208284031215611749578081fd5b5035919050565b600060208284031215611761578081fd5b5051919050565b6000806040838503121561177a578081fd5b8235915061178a602084016116e2565b90509250929050565b600080604083850312156117a5578182fd5b50508035926020909101359150565b600082516117c68184602087016118a6565b9190910192915050565b60208152600082518060208401526117ef8160408501602087016118a6565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561184b5761184b6118ed565b500190565b60008261186b57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561188a5761188a6118ed565b500290565b6000828210156118a1576118a16118ed565b500390565b60005b838110156118c15781810151838201526020016118a9565b838111156114905750506000910152565b60006000198214156118e6576118e66118ed565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122027d291743206e7beae3d75b10e294ce1c99268787d366cd0eea70bd054def8be64736f6c634300080400330000000000000000000000006eff7b3fa5060cd46adcc0ad84a239ec1ea82b7a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eafc40

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063630b5ba1116100c3578063bb872b4a1161007c578063bb872b4a1461033d578063d139066414610350578063d669ce1314610363578063dcc3e06e1461036c578063e2bbb1581461037f578063f2fde38b1461039257600080fd5b8063630b5ba114610285578063672ac8dc1461028d578063715018a6146102965780638da5cb5b1461029e57806393f1a40b146102c3578063a38b6f5b1461030a57600080fd5b80633a6462e4116101155780633a6462e4146101d75780633e155e42146101ea578063441a3e70146101fd5780634714c4c91461021057806351eb05a6146102235780635312ea8e1461027257600080fd5b8063081e3eda146101525780631526fe271461016957806317caf6f1146101a65780631ab06ee5146101af5780632b8bbbe8146101c4575b600080fd5b6004545b6040519081526020015b60405180910390f35b61017c610177366004611738565b6103a5565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610160565b61015660075481565b6101c26101bd366004611793565b6103e9565b005b6101c26101d2366004611768565b61054a565b6101c26101e53660046116fe565b6107f2565b6101c26101f8366004611793565b610894565b6101c261020b366004611793565b610918565b61015661021e366004611768565b610af4565b610236610231366004611738565b610ce3565b604051610160919081516001600160a01b0316815260208083015190820152604080830151908201526060918201519181019190915260800190565b6101c2610280366004611738565b610ee4565b6101c2611042565b61015660025481565b6101c261106c565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610160565b6102f56102d1366004611768565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610160565b61032d6103183660046116fe565b60056020526000908152604090205460ff1681565b6040519015158152602001610160565b6101c261034b366004611738565b6110a2565b6101c261035e366004611738565b61110f565b61015660015481565b6003546102ab906001600160a01b031681565b6101c261038d366004611793565b611185565b6101c26103a03660046116fe565b611297565b600481815481106103b557600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6000546001600160a01b0316331461041c5760405162461bcd60e51b815260040161041390611803565b60405180910390fd5b600454821061046d5760405162461bcd60e51b815260206004820152601b60248201527f63616e277420736574206e6f6e2d6578697374616e7420706f6f6c00000000006044820152606401610413565b600081116104b65760405162461bcd60e51b8152602060048201526016602482015275063616e27742073657420706f6f6c20746f20302061760541b6044820152606401610413565b6104be611042565b80600483815481106104e057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101546007546104ff919061188f565b6105099190611838565b600781905550806004838154811061053157634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101819055505050565b6000546001600160a01b031633146105745760405162461bcd60e51b815260040161041390611803565b6001600160a01b0381166105ca5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964205f6c70546f6b656e206164647265737300000000000000006044820152606401610413565b6001600160a01b03811660009081526005602052604090205460ff161561062b5760405162461bcd60e51b81526020600482015260156024820152741b1c151bdad95b88185b1c9958591e481859191959605a1b6044820152606401610413565b600254431061067c5760405162461bcd60e51b815260206004820152601b60248201527f63616e27742061646420706f6f6c206166746572206375746f666600000000006044820152606401610413565b600082116106cc5760405162461bcd60e51b815260206004820152601860248201527f63616e27742061646420706f6f6c2077697468203020617000000000000000006044820152606401610413565b6106d4611042565b816007546106e29190611838565b6007556001600160a01b039081166000818152600560209081526040808320805460ff1916600190811790915581516080810183529485529184019586524390840190815260608401838152600480549384018155938490529351919092027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b81018054929095166001600160a01b03199092169190911790935592517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c83015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e90910155565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260040161041390611803565b6001600160a01b0381166108725760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207265776172646572206164647265737300000000000000006044820152606401610413565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108be5760405162461bcd60e51b815260040161041390611803565b438110156109055760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103932bbb0b93221baba37b33360611b6044820152606401610413565b61090d611042565b600191909155600255565b600061092383610ce3565b6000848152600660209081526040808320338452909152902080549192509083111561099f5760405162461bcd60e51b815260206004820152602560248201527f63616e2774207769746864726177206d6f7265207468616e20757365722062616044820152646c616e636560d81b6064820152608401610413565b60008160010154670de0b6b3a7640000846060015184600001546109c39190611870565b6109cd9190611850565b6109d7919061188f565b82549091506109e790859061188f565b8083556060840151670de0b6b3a764000091610a039190611870565b610a0d9190611850565b6001830155610a1c338261132f565b8251610a32906001600160a01b031633866113a0565b82516040516370a0823160e01b8152306004820152869133917fb3ad69dc1d2c6b1f5f5b0927ffd8ee8f1437a156253c8f6dccc75e6f8e4fd38b9188916001600160a01b03909116906370a08231906024015b60206040518083038186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad59190611750565b6040805192835260208301919091520160405180910390a35050505050565b60008060048481548110610b1857634e487b7160e01b600052603260045260246000fd5b6000918252602080832060408051608081018252600494850290920180546001600160a01b03908116845260018083015485870152600283015485850152600390920154606085019081528b8852600686528388208b8316895286528388208451808601865281548152930154958301959095529351835192516370a0823160e01b81523096810196909652929650949193919216906370a082319060240160206040518083038186803b158015610bcf57600080fd5b505afa158015610be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c079190611750565b90506000600254431015610c1b5743610c1f565b6002545b9050846040015181118015610c3357508115155b15610ca7576000856040015182610c4a919061188f565b90506000866020015160015483610c619190611870565b610c6b9190611870565b60075490915084610c8483670de0b6b3a7640000611870565b610c8e9190611850565b610c989190611850565b610ca29086611838565b945050505b60208401518451670de0b6b3a764000090610cc3908690611870565b610ccd9190611850565b610cd7919061188f565b98975050505050505050565b610d17604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b600060048381548110610d3a57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020190506000600254431015610d5c5743610d60565b6002545b90508160020154811115610e715781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610db157600080fd5b505afa158015610dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de99190611750565b90508015610e68576000836002015483610e03919061188f565b90506000846001015460015483610e1a9190611870565b610e249190611870565b60075490915083610e3d83670de0b6b3a7640000611870565b610e479190611850565b610e519190611850565b8560030154610e609190611838565b600386015550505b50600282018190555b60048481548110610e9257634e487b7160e01b600052603260045260246000fd5b600091825260209182902060408051608081018252600490930290910180546001600160a01b031683526001810154938301939093526002830154908201526003909101546060820152949350505050565b600060048281548110610f0757634e487b7160e01b600052603260045260246000fd5b6000918252602080832060408051608081018252600490940290910180546001600160a01b03908116855260018083015486860152600283015486850152600390920154606086015287865260068452828620338088529452918520805486825591810195909555835193955092610f8292911690836113a0565b82516040516370a0823160e01b8152306004820152859133917f4d0b6fd10a4a84991f0c0077f391c03ce27f8c34dc116aa9960d848ecc6bc0649185916001600160a01b03909116906370a082319060240160206040518083038186803b158015610fec57600080fd5b505afa158015611000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110249190611750565b6040805192835260208301919091520160405180910390a350505050565b60005b6004548110156110695761105881610ce3565b50611062816118d2565b9050611045565b50565b6000546001600160a01b031633146110965760405162461bcd60e51b815260040161041390611803565b6110a06000611408565b565b6000546001600160a01b031633146110cc5760405162461bcd60e51b815260040161041390611803565b6110d4611042565b60018190556040518181527f5d7c78d0ee3ce6196f90e74ed58c0ada9ac7ccc47d3aca0547ac893776f038269060200160405180910390a150565b6000546001600160a01b031633146111395760405162461bcd60e51b815260040161041390611803565b438110156111805760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103932bbb0b93221baba37b33360611b6044820152606401610413565b600255565b600061119083610ce3565b6000848152600660209081526040808320338452909152812060018101546060840151825494955091939091670de0b6b3a7640000916111d09190611870565b6111da9190611850565b6111e4919061188f565b82549091506111f4908590611838565b8083556060840151670de0b6b3a7640000916112109190611870565b61121a9190611850565b6001830155611229338261132f565b8251611240906001600160a01b0316333087611458565b82516040516370a0823160e01b8152306004820152869133917f651b66d4c82e3fedc9c57c6ff8a4cf8c81b8d1cd432d7297773c6edbf6cfb36a9188916001600160a01b03909116906370a0823190602401610a85565b6000546001600160a01b031633146112c15760405162461bcd60e51b815260040161041390611803565b6001600160a01b0381166113265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610413565b61106981611408565b801561139c5760035460405163393840f760e21b81526001600160a01b038481166004830152602482018490529091169063e4e103dc90604401600060405180830381600087803b15801561138357600080fd5b505af1158015611397573d6000803e3d6000fd5b505050505b5050565b6040516001600160a01b03831660248201526044810182905261140390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611496565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114909085906323b872dd60e01b906084016113cc565b50505050565b60006114eb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115689092919063ffffffff16565b80519091501561140357808060200190518101906115099190611718565b6114035760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610413565b60606115778484600085611581565b90505b9392505050565b6060824710156115e25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610413565b843b6116305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610413565b600080866001600160a01b0316858760405161164c91906117b4565b60006040518083038185875af1925050503d8060008114611689576040519150601f19603f3d011682016040523d82523d6000602084013e61168e565b606091505b509150915061169e8282866116a9565b979650505050505050565b606083156116b857508161157a565b8251156116c85782518084602001fd5b8160405162461bcd60e51b815260040161041391906117d0565b80356001600160a01b03811681146116f957600080fd5b919050565b60006020828403121561170f578081fd5b61157a826116e2565b600060208284031215611729578081fd5b8151801515811461157a578182fd5b600060208284031215611749578081fd5b5035919050565b600060208284031215611761578081fd5b5051919050565b6000806040838503121561177a578081fd5b8235915061178a602084016116e2565b90509250929050565b600080604083850312156117a5578182fd5b50508035926020909101359150565b600082516117c68184602087016118a6565b9190910192915050565b60208152600082518060208401526117ef8160408501602087016118a6565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561184b5761184b6118ed565b500190565b60008261186b57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561188a5761188a6118ed565b500290565b6000828210156118a1576118a16118ed565b500390565b60005b838110156118c15781810151838201526020016118a9565b838111156114905750506000910152565b60006000198214156118e6576118e66118ed565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122027d291743206e7beae3d75b10e294ce1c99268787d366cd0eea70bd054def8be64736f6c63430008040033

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

0000000000000000000000006eff7b3fa5060cd46adcc0ad84a239ec1ea82b7a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eafc40

-----Decoded View---------------
Arg [0] : _rewarder (address): 0x6eFF7b3fA5060CD46AdCC0ad84a239ec1EA82b7A
Arg [1] : _sfiPerBlock (uint256): 0
Arg [2] : _rewardCutoff (uint256): 15400000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006eff7b3fa5060cd46adcc0ad84a239ec1ea82b7a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000eafc40


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.