ETH Price: $2,472.14 (+0.50%)

Contract

0xCA3239A9aCa196dE1AF4D0ECA6D669e6EbF4BA8b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Exit168142552023-03-12 20:14:47579 days ago1678652087IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0031434725.88752356
Exit163463242023-01-06 7:42:47645 days ago1672990967IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0019428416
Exit135611472021-11-06 5:23:381071 days ago1636176218IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0101923593.80823265
Exit135308922021-11-01 11:26:101076 days ago1635765970IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01330616109.58067196
Exit128028452021-07-11 0:29:381189 days ago1625963378IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0012832810
Get Reward125883722021-06-07 16:04:411223 days ago1623081881IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0013887417
Get Reward125883482021-06-07 16:01:201223 days ago1623081680IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0015108416
Get Reward123411242021-04-30 9:52:381261 days ago1619776358IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0042492645
Exit122949932021-04-23 6:57:181268 days ago1619161038IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01014045103
Exit122816052021-04-21 5:08:501270 days ago1618981730IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0166842150
Exit121987242021-04-08 10:53:491283 days ago1617879229IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0138746896
Get Reward120480452021-03-16 6:28:431306 days ago1615876123IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01276861143
Exit120147172021-03-11 2:57:091311 days ago1615431429IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0140192197
Exit119953202021-03-08 3:08:131314 days ago1615172893IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01449586115.00000145
Exit119797962021-03-05 17:53:061317 days ago1614966786IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01788663141.9
Get Reward119546352021-03-01 21:00:541320 days ago1614632454IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01062562119.00000145
Get Reward119508832021-03-01 7:07:001321 days ago1614582420IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0077564172
Exit118980702021-02-21 4:16:171329 days ago1613880977IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01864411129
Get Reward118533012021-02-14 6:49:461336 days ago1613285386IN
0xCA3239A9...6EbF4BA8b
0 ETH0.01000059112
Exit118475962021-02-13 9:54:061337 days ago1613210046IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0252102200
Exit118339162021-02-11 7:31:531339 days ago1613028713IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0143082799
Get Reward117620092021-01-31 6:02:321350 days ago1612072952IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0064289572
Get Reward117466252021-01-28 20:58:161352 days ago1611867496IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0053980760.4549
Exit117463792021-01-28 20:07:091352 days ago1611864429IN
0xCA3239A9...6EbF4BA8b
0 ETH0.0109664387
Exit117461032021-01-28 19:06:541352 days ago1611860814IN
0xCA3239A9...6EbF4BA8b
0 ETH0.006932855
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:
KittenPool

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-09-24
*/

//   _    _ _   _                __ _                            
//  | |  (_) | | |              / _(_)                           
//  | | ___| |_| |_ ___ _ __   | |_ _ _ __   __ _ _ __   ___ ___ 
//  | |/ / | __| __/ _ \ '_ \  |  _| | '_ \ / _` | '_ \ / __/ _ \
//  |   <| | |_| ||  __/ | | |_| | | | | | | (_| | | | | (_|  __/
//  |_|\_\_|\__|\__\___|_| |_(_)_| |_|_| |_|\__,_|_| |_|\___\___|
/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: YFIRewards.sol
*
* Docs: https://docs.synthetix.io/
*
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

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

pragma solidity ^0.5.0;

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

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

pragma solidity ^0.5.0;

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    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;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/GSN/Context.sol

pragma solidity ^0.5.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 GSN 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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

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

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

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

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

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

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

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

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

pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @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/utils/Address.sol

pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing a contract.
     *
     * 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.
     */
    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.

        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != 0x0 && codehash != accountHash);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

pragma solidity ^0.5.0;

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

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

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

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

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

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/CurveRewards.sol

pragma solidity ^0.5.0;

contract LPTokenWrapper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using Address for address;

    IERC20 public LP_TOKEN = IERC20(0xC39180720b4B4df561a35366DA122FBa006FBC17); // EDIT_ME: Stake LP token

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    function stake(uint256 amount) public {
        address sender = msg.sender;
        require(!address(sender).isContract(), "plz farm by hand");
        require(tx.origin == sender, "plz farm by hand");
        _totalSupply = _totalSupply.add(amount);
        _balances[sender] = _balances[sender].add(amount);
        LP_TOKEN.safeTransferFrom(sender, address(this), amount);
    }

    function withdraw(uint256 amount) public {
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        LP_TOKEN.safeTransfer(msg.sender, amount);
    }
}

contract KittenPool is LPTokenWrapper, Ownable {
    IERC20 public REWARD_TOKEN = IERC20(0x124c6092c469716A661b5B0609F205050b26b50f); // EDIT_ME: Reward token
    uint256 public constant DURATION = 7 days;

    uint256 public origTotalSupply = 0;

    uint256 public initreward = 0;
    uint256 public starttime = 1600956000; // EDIT_ME: 2020-09-24T14:00:00+00:00
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

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

    constructor () public {
        origTotalSupply = REWARD_TOKEN.totalSupply();

        // 3 pools, 0.080 / 0.080 / 0.085 => 0.32 / 0.32 / 0.34 => total 98%
        initreward = origTotalSupply.mul(85).div(1000);

        notifyRewardAmount(initreward);
        renounceOwnership();
    }

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

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

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

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

    // stake visibility is public as overriding LPTokenWrapper's stake() function
    function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart { 
        require(amount > 0, "Cannot stake 0");
        super.stake(amount);
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        super.withdraw(amount);
        emit Withdrawn(msg.sender, amount);
    }

    function exit() external {
        withdraw(balanceOf(msg.sender));
        getReward();
    }

    function getReward() public updateReward(msg.sender) checkhalve {
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            rewards[msg.sender] = 0;

            // scaled by nowTotalSupply / origTotalSupply when claiming reward
            uint256 nowTotalSupply = REWARD_TOKEN.totalSupply();
            reward = reward.mul(nowTotalSupply).div(origTotalSupply);

            REWARD_TOKEN.safeTransfer(msg.sender, reward);
            
            emit RewardPaid(msg.sender, reward);
        }
    }

    modifier checkhalve(){
        if (block.timestamp >= periodFinish) {
            initreward = initreward.mul(75).div(100); // yield reduces to 75% every week

            rewardRate = initreward.div(DURATION);
            periodFinish = block.timestamp.add(DURATION);
            emit RewardAdded(initreward);
        }
        _;
    }
    modifier checkStart(){
        require(block.timestamp > starttime,"not start");
        _;
    }

    function notifyRewardAmount(uint256 reward) private
        updateReward(address(0))
    {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(DURATION);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(DURATION);
        }

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

Contract Security Audit

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"constant":true,"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LP_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REWARD_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initreward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"origTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"starttime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

6080604052600080546001600160a01b031990811673c39180720b4b4df561a35366da122fba006fbc171782556004805490911673124c6092c469716a661b5b0609f205050b26b50f17905560058190556006819055635f6ca66060075560088190556009553480156200007257600080fd5b50620000866001600160e01b036200019f16565b600380546001600160a01b0319166001600160a01b03928316179081905560405191169060009060008051602062001a4a833981519152908290a360048054604080516318160ddd60e01b815290516001600160a01b03909216926318160ddd928282019260209290829003018186803b1580156200010457600080fd5b505afa15801562000119573d6000803e3d6000fd5b505050506040513d60208110156200013057600080fd5b505160058190556200016d906103e89062000159906055620001a4602090811b62000aee17901c565b6200020b60201b62000b471790919060201c565b600681905562000186906001600160e01b036200025516565b620001996001600160e01b03620003c916565b620007c1565b335b90565b600082620001b55750600062000205565b82820282848281620001c357fe5b0414620002025760405162461bcd60e51b815260040180806020018281038252602181526020018062001a296021913960400191505060405180910390fd5b90505b92915050565b60006200020283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506200046760201b60201c565b60006200026a6001600160e01b036200050e16565b600b55620002806001600160e01b03620005bc16565b600a556001600160a01b03811615620002d357620002a7816001600160e01b03620005d716565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60085442106200030357620002fa62093a80836200020b60201b62000b471790919060201c565b6009556200036b565b600062000321426008546200065560201b62000aa51790919060201c565b905060006200034160095483620001a460201b62000aee1790919060201c565b90506200036562093a806200015983876200069f60201b62000b891790919060201c565b60095550505b42600a819055506200038f62093a80426200069f60201b62000b891790919060201c565b6008556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b620003dc6001600160e01b03620006fa16565b6200042e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b03169060008051602062001a4a833981519152908390a3600380546001600160a01b0319169055565b60008183620004f75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620004bb578181015183820152602001620004a1565b50505050905090810190601f168015620004e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200050457fe5b0495945050505050565b6000620005236001600160e01b036200072b16565b620005325750600b54620001a1565b620005b7620005a06200054d6001600160e01b036200072b16565b62000159670de0b6b3a76400006200058c6009546200058c600a5462000578620005bc60201b60201c565b6200065560201b62000aa51790919060201c565b620001a460201b62000aee1790919060201c565b600b546200069f60201b62000b891790919060201c565b905090565b6000620005b7426008546200073160201b62000c971760201c565b6001600160a01b0381166000908152600d6020908152604080832054600c9092528220546200020591906200064190670de0b6b3a76400009062000159906200062d90620005786001600160e01b036200050e16565b6200058c886001600160e01b036200074916565b6200069f60201b62000b891790919060201c565b60006200020283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506200076460201b60201c565b60008282018381101562000202576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6003546000906001600160a01b03166200071c6001600160e01b036200019f16565b6001600160a01b031614905090565b60015490565b600081831062000742578162000202565b5090919050565b6001600160a01b031660009081526002602052604090205490565b60008184841115620007b95760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315620004bb578181015183820152602001620004a1565b505050900390565b61125880620007d16000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c80638da5cb5b116100de578063c8f33c9111610097578063e9fad8ee11610071578063e9fad8ee14610305578063ebe2b12b1461030d578063f2fde38b14610315578063f49b45741461033b57610172565b8063c8f33c91146102ed578063cd3daf9d146102f5578063df136d65146102fd57610172565b80638da5cb5b146102785780638f32d59b1461029c57806399248ea7146102b85780639c907b58146102c0578063a694fc3a146102c8578063bfd9041b146102e557610172565b806370a082311161013057806370a082311461020c578063715018a6146102325780637b0a47ee1461023a57806380faa57d146102425780638b8763471461024a5780638da588971461027057610172565b80628cc262146101775780630700037d146101af57806318160ddd146101d55780631be05289146101dd5780632e1a7d4d146101e55780633d18b91214610204575b600080fd5b61019d6004803603602081101561018d57600080fd5b50356001600160a01b0316610343565b60408051918252519081900360200190f35b61019d600480360360208110156101c557600080fd5b50356001600160a01b03166103c9565b61019d6103db565b61019d6103e2565b610202600480360360208110156101fb57600080fd5b50356103e9565b005b6102026104d0565b61019d6004803603602081101561022257600080fd5b50356001600160a01b03166106c0565b6102026106db565b61019d61077e565b61019d610784565b61019d6004803603602081101561026057600080fd5b50356001600160a01b0316610797565b61019d6107a9565b6102806107af565b604080516001600160a01b039092168252519081900360200190f35b6102a46107be565b604080519115158252519081900360200190f35b6102806107e4565b61019d6107f3565b610202600480360360208110156102de57600080fd5b50356107f9565b6102806109aa565b61019d6109b9565b61019d6109bf565b61019d610a13565b610202610a19565b61019d610a34565b6102026004803603602081101561032b57600080fd5b50356001600160a01b0316610a3a565b61019d610a9f565b6001600160a01b0381166000908152600d6020908152604080832054600c9092528220546103c391906103b790670de0b6b3a7640000906103ab906103969061038a6109bf565b9063ffffffff610aa516565b61039f886106c0565b9063ffffffff610aee16565b9063ffffffff610b4716565b9063ffffffff610b8916565b92915050565b600d6020526000908152604090205481565b6001545b90565b62093a8081565b336103f26109bf565b600b556103fd610784565b600a556001600160a01b038116156104445761041881610343565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b6000821161048d576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b61049682610be3565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b336104d96109bf565b600b556104e4610784565b600a556001600160a01b0381161561052b576104ff81610343565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60085442106105b65761054f60646103ab604b600654610aee90919063ffffffff16565b60068190556105679062093a8063ffffffff610b4716565b60095561057d4262093a8063ffffffff610b8916565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b60006105c133610343565b905080156106bc57336000908152600d602090815260408083208390556004805482516318160ddd60e01b815292516001600160a01b03909116936318160ddd938084019391929190829003018186803b15801561061e57600080fd5b505afa158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b5051600554909150610664906103ab848463ffffffff610aee16565b600454909250610684906001600160a01b0316338463ffffffff610c4016565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a2505b5050565b6001600160a01b031660009081526002602052604090205490565b6106e36107be565b610734576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b60095481565b600061079242600854610c97565b905090565b600c6020526000908152604090205481565b60075481565b6003546001600160a01b031690565b6003546000906001600160a01b03166107d5610cad565b6001600160a01b031614905090565b6004546001600160a01b031681565b60065481565b336108026109bf565b600b5561080d610784565b600a556001600160a01b038116156108545761082881610343565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60085442106108df5761087860646103ab604b600654610aee90919063ffffffff16565b60068190556108909062093a8063ffffffff610b4716565b6009556108a64262093a8063ffffffff610b8916565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b6007544211610921576040805162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015290519081900360640190fd5b60008211610967576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b61097082610cb1565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b6000546001600160a01b031681565b600a5481565b60006109c96103db565b6109d65750600b546103df565b610792610a046109e46103db565b6103ab670de0b6b3a764000061039f60095461039f600a5461038a610784565b600b549063ffffffff610b8916565b600b5481565b610a2a610a25336106c0565b6103e9565b610a326104d0565b565b60085481565b610a426107be565b610a93576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a9c81610dc1565b50565b60055481565b6000610ae783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e62565b9392505050565b600082610afd575060006103c3565b82820282848281610b0a57fe5b0414610ae75760405162461bcd60e51b81526004018080602001828103825260218152602001806111d96021913960400191505060405180910390fd5b6000610ae783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ef9565b600082820183811015610ae7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154610bf6908263ffffffff610aa516565b60015533600090815260026020526040902054610c19908263ffffffff610aa516565b336000818152600260205260408120929092559054610a9c916001600160a01b0390911690835b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c92908490610f5e565b505050565b6000818310610ca65781610ae7565b5090919050565b3390565b33610cbb8161111c565b15610d00576040805162461bcd60e51b815260206004820152601060248201526f1c1b1e8819985c9b48189e481a185b9960821b604482015290519081900360640190fd5b326001600160a01b03821614610d50576040805162461bcd60e51b815260206004820152601060248201526f1c1b1e8819985c9b48189e481a185b9960821b604482015290519081900360640190fd5b600154610d63908363ffffffff610b8916565b6001556001600160a01b038116600090815260026020526040902054610d8f908363ffffffff610b8916565b6001600160a01b0380831660009081526002602052604081209290925590546106bc911682308563ffffffff61115816565b6001600160a01b038116610e065760405162461bcd60e51b81526004018080602001828103825260268152602001806111b36026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b60008184841115610ef15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610eb6578181015183820152602001610e9e565b50505050905090810190601f168015610ee35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f485760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610eb6578181015183820152602001610e9e565b506000838581610f5457fe5b0495945050505050565b610f70826001600160a01b031661111c565b610fc1576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610fff5780518252601f199092019160209182019101610fe0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611061576040519150601f19603f3d011682016040523d82523d6000602084013e611066565b606091505b5091509150816110bd576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611116578080602001905160208110156110d957600080fd5b50516111165760405162461bcd60e51b815260040180806020018281038252602a8152602001806111fa602a913960400191505060405180910390fd5b50505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906111505750808214155b949350505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611116908590610f5e56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820776a907bb8c56b13c673485747c915c6ef892c459ab39807cc8b5fb9c054ce4b64736f6c63430005100032536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f778be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101725760003560e01c80638da5cb5b116100de578063c8f33c9111610097578063e9fad8ee11610071578063e9fad8ee14610305578063ebe2b12b1461030d578063f2fde38b14610315578063f49b45741461033b57610172565b8063c8f33c91146102ed578063cd3daf9d146102f5578063df136d65146102fd57610172565b80638da5cb5b146102785780638f32d59b1461029c57806399248ea7146102b85780639c907b58146102c0578063a694fc3a146102c8578063bfd9041b146102e557610172565b806370a082311161013057806370a082311461020c578063715018a6146102325780637b0a47ee1461023a57806380faa57d146102425780638b8763471461024a5780638da588971461027057610172565b80628cc262146101775780630700037d146101af57806318160ddd146101d55780631be05289146101dd5780632e1a7d4d146101e55780633d18b91214610204575b600080fd5b61019d6004803603602081101561018d57600080fd5b50356001600160a01b0316610343565b60408051918252519081900360200190f35b61019d600480360360208110156101c557600080fd5b50356001600160a01b03166103c9565b61019d6103db565b61019d6103e2565b610202600480360360208110156101fb57600080fd5b50356103e9565b005b6102026104d0565b61019d6004803603602081101561022257600080fd5b50356001600160a01b03166106c0565b6102026106db565b61019d61077e565b61019d610784565b61019d6004803603602081101561026057600080fd5b50356001600160a01b0316610797565b61019d6107a9565b6102806107af565b604080516001600160a01b039092168252519081900360200190f35b6102a46107be565b604080519115158252519081900360200190f35b6102806107e4565b61019d6107f3565b610202600480360360208110156102de57600080fd5b50356107f9565b6102806109aa565b61019d6109b9565b61019d6109bf565b61019d610a13565b610202610a19565b61019d610a34565b6102026004803603602081101561032b57600080fd5b50356001600160a01b0316610a3a565b61019d610a9f565b6001600160a01b0381166000908152600d6020908152604080832054600c9092528220546103c391906103b790670de0b6b3a7640000906103ab906103969061038a6109bf565b9063ffffffff610aa516565b61039f886106c0565b9063ffffffff610aee16565b9063ffffffff610b4716565b9063ffffffff610b8916565b92915050565b600d6020526000908152604090205481565b6001545b90565b62093a8081565b336103f26109bf565b600b556103fd610784565b600a556001600160a01b038116156104445761041881610343565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b6000821161048d576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b61049682610be3565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b336104d96109bf565b600b556104e4610784565b600a556001600160a01b0381161561052b576104ff81610343565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60085442106105b65761054f60646103ab604b600654610aee90919063ffffffff16565b60068190556105679062093a8063ffffffff610b4716565b60095561057d4262093a8063ffffffff610b8916565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b60006105c133610343565b905080156106bc57336000908152600d602090815260408083208390556004805482516318160ddd60e01b815292516001600160a01b03909116936318160ddd938084019391929190829003018186803b15801561061e57600080fd5b505afa158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b5051600554909150610664906103ab848463ffffffff610aee16565b600454909250610684906001600160a01b0316338463ffffffff610c4016565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a2505b5050565b6001600160a01b031660009081526002602052604090205490565b6106e36107be565b610734576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b60095481565b600061079242600854610c97565b905090565b600c6020526000908152604090205481565b60075481565b6003546001600160a01b031690565b6003546000906001600160a01b03166107d5610cad565b6001600160a01b031614905090565b6004546001600160a01b031681565b60065481565b336108026109bf565b600b5561080d610784565b600a556001600160a01b038116156108545761082881610343565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60085442106108df5761087860646103ab604b600654610aee90919063ffffffff16565b60068190556108909062093a8063ffffffff610b4716565b6009556108a64262093a8063ffffffff610b8916565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b6007544211610921576040805162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b604482015290519081900360640190fd5b60008211610967576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b61097082610cb1565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b6000546001600160a01b031681565b600a5481565b60006109c96103db565b6109d65750600b546103df565b610792610a046109e46103db565b6103ab670de0b6b3a764000061039f60095461039f600a5461038a610784565b600b549063ffffffff610b8916565b600b5481565b610a2a610a25336106c0565b6103e9565b610a326104d0565b565b60085481565b610a426107be565b610a93576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a9c81610dc1565b50565b60055481565b6000610ae783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e62565b9392505050565b600082610afd575060006103c3565b82820282848281610b0a57fe5b0414610ae75760405162461bcd60e51b81526004018080602001828103825260218152602001806111d96021913960400191505060405180910390fd5b6000610ae783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ef9565b600082820183811015610ae7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154610bf6908263ffffffff610aa516565b60015533600090815260026020526040902054610c19908263ffffffff610aa516565b336000818152600260205260408120929092559054610a9c916001600160a01b0390911690835b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c92908490610f5e565b505050565b6000818310610ca65781610ae7565b5090919050565b3390565b33610cbb8161111c565b15610d00576040805162461bcd60e51b815260206004820152601060248201526f1c1b1e8819985c9b48189e481a185b9960821b604482015290519081900360640190fd5b326001600160a01b03821614610d50576040805162461bcd60e51b815260206004820152601060248201526f1c1b1e8819985c9b48189e481a185b9960821b604482015290519081900360640190fd5b600154610d63908363ffffffff610b8916565b6001556001600160a01b038116600090815260026020526040902054610d8f908363ffffffff610b8916565b6001600160a01b0380831660009081526002602052604081209290925590546106bc911682308563ffffffff61115816565b6001600160a01b038116610e065760405162461bcd60e51b81526004018080602001828103825260268152602001806111b36026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b60008184841115610ef15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610eb6578181015183820152602001610e9e565b50505050905090810190601f168015610ee35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f485760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610eb6578181015183820152602001610e9e565b506000838581610f5457fe5b0495945050505050565b610f70826001600160a01b031661111c565b610fc1576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610fff5780518252601f199092019160209182019101610fe0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611061576040519150601f19603f3d011682016040523d82523d6000602084013e611066565b606091505b5091509150816110bd576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611116578080602001905160208110156110d957600080fd5b50516111165760405162461bcd60e51b815260040180806020018281038252602a8152602001806111fa602a913960400191505060405180910390fd5b50505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906111505750808214155b949350505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611116908590610f5e56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820776a907bb8c56b13c673485747c915c6ef892c459ab39807cc8b5fb9c054ce4b64736f6c63430005100032

Deployed Bytecode Sourcemap

18919:4523:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18919:4523:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20990:265;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20990:265:0;-1:-1:-1;;;;;20990:265:0;;:::i;:::-;;;;;;;;;;;;;;;;19511:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;19511:42:0;-1:-1:-1;;;;;19511:42:0;;:::i;18079:91::-;;;:::i;19084:41::-;;;:::i;21568:203::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21568:203:0;;:::i;:::-;;21884:539;;;:::i;18178:110::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;18178:110:0;-1:-1:-1;;;;;18178:110:0;;:::i;7053:140::-;;;:::i;19333:29::-;;;:::i;20423:131::-;;;:::i;19447:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;19447:57:0;-1:-1:-1;;;;;19447:57:0;;:::i;19213:37::-;;;:::i;6242:79::-;;;:::i;:::-;;;;-1:-1:-1;;;;;6242:79:0;;;;;;;;;;;;;;6608:94;;;:::i;:::-;;;;;;;;;;;;;;;;;;18973:79;;;:::i;19177:29::-;;;:::i;21346:214::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21346:214:0;;:::i;17879:75::-;;;:::i;19369:29::-;;;:::i;20562:420::-;;;:::i;19405:35::-;;;:::i;21779:97::-;;;:::i;19295:31::-;;;:::i;7348:109::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7348:109:0;-1:-1:-1;;;;;7348:109:0;;:::i;19134:34::-;;;:::i;20990:265::-;-1:-1:-1;;;;;21230:16:0;;21044:7;21230:16;;;:7;:16;;;;;;;;;21146:22;:31;;;;;;21084:163;;21230:16;21084:123;;21202:4;;21084:95;;21125:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;21084:18;21094:7;21084:9;:18::i;:::-;:40;:95;:40;:95;:::i;:::-;:117;:123;:117;:123;:::i;:::-;:145;:163;:145;:163;:::i;:::-;21064:183;20990:265;-1:-1:-1;;20990:265:0:o;19511:42::-;;;;;;;;;;;;;:::o;18079:91::-;18150:12;;18079:91;;:::o;19084:41::-;19119:6;19084:41;:::o;21568:203::-;21622:10;20158:16;:14;:16::i;:::-;20135:20;:39;20202:26;:24;:26::i;:::-;20185:14;:43;-1:-1:-1;;;;;20243:21:0;;;20239:157;;20300:15;20307:7;20300:6;:15::i;:::-;-1:-1:-1;;;;;20281:16:0;;;;;;:7;:16;;;;;;;;:34;;;;20364:20;;20330:22;:31;;;;;;:54;20239:157;21662:1;21653:6;:10;21645:40;;;;;-1:-1:-1;;;21645:40:0;;;;;;;;;;;;-1:-1:-1;;;21645:40:0;;;;;;;;;;;;;;;21696:22;21711:6;21696:14;:22::i;:::-;21734:29;;;;;;;;21744:10;;21734:29;;;;;;;;;;21568:203;;:::o;21884:539::-;21925:10;20158:16;:14;:16::i;:::-;20135:20;:39;20202:26;:24;:26::i;:::-;20185:14;:43;-1:-1:-1;;;;;20243:21:0;;;20239:157;;20300:15;20307:7;20300:6;:15::i;:::-;-1:-1:-1;;;;;20281:16:0;;;;;;:7;:16;;;;;;;;:34;;;;20364:20;;20330:22;:31;;;;;;:54;20239:157;22486:12;;22467:15;:31;22463:295;;22528:27;22551:3;22528:18;22543:2;22528:10;;:14;;:18;;;;:::i;:27::-;22515:10;:40;;;22620:24;;19119:6;22620:24;:14;:24;:::i;:::-;22607:10;:37;22674:29;:15;19119:6;22674:29;:19;:29;:::i;:::-;22659:12;:44;22735:10;;22723:23;;;;;;;;;;;;;;;;22463:295;21959:14;21976:18;21983:10;21976:6;:18::i;:::-;21959:35;-1:-1:-1;22009:10:0;;22005:411;;22044:10;22058:1;22036:19;;;:7;:19;;;;;;;;:23;;;22181:12;;;:26;;-1:-1:-1;;;22181:26:0;;;;-1:-1:-1;;;;;22181:12:0;;;;:24;;:26;;;;22036:19;;22181:26;;;;;;;:12;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;22181:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;22181:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22181:26:0;22262:15;;22181:26;;-1:-1:-1;22231:47:0;;:26;:6;22181:26;22231;:10;:26;:::i;:47::-;22295:12;;22222:56;;-1:-1:-1;22295:45:0;;-1:-1:-1;;;;;22295:12:0;22321:10;22222:56;22295:45;:25;:45;:::i;:::-;22374:30;;;;;;;;22385:10;;22374:30;;;;;;;;;;22005:411;;22768:1;21884:539;:::o;18178:110::-;-1:-1:-1;;;;;18262:18:0;18235:7;18262:18;;;:9;:18;;;;;;;18178:110::o;7053:140::-;6454:9;:7;:9::i;:::-;6446:54;;;;;-1:-1:-1;;;6446:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7136:6;;7115:40;;7152:1;;-1:-1:-1;;;;;7136:6:0;;7115:40;;7152:1;;7115:40;7166:6;:19;;-1:-1:-1;;;;;;7166:19:0;;;7053:140::o;19333:29::-;;;;:::o;20423:131::-;20480:7;20507:39;20516:15;20533:12;;20507:8;:39::i;:::-;20500:46;;20423:131;:::o;19447:57::-;;;;;;;;;;;;;:::o;19213:37::-;;;;:::o;6242:79::-;6307:6;;-1:-1:-1;;;;;6307:6:0;6242:79;:::o;6608:94::-;6688:6;;6648:4;;-1:-1:-1;;;;;6688:6:0;6672:12;:10;:12::i;:::-;-1:-1:-1;;;;;6672:22:0;;6665:29;;6608:94;:::o;18973:79::-;;;-1:-1:-1;;;;;18973:79:0;;:::o;19177:29::-;;;;:::o;21346:214::-;21397:10;20158:16;:14;:16::i;:::-;20135:20;:39;20202:26;:24;:26::i;:::-;20185:14;:43;-1:-1:-1;;;;;20243:21:0;;;20239:157;;20300:15;20307:7;20300:6;:15::i;:::-;-1:-1:-1;;;;;20281:16:0;;;;;;:7;:16;;;;;;;;:34;;;;20364:20;;20330:22;:31;;;;;;:54;20239:157;22486:12;;22467:15;:31;22463:295;;22528:27;22551:3;22528:18;22543:2;22528:10;;:14;;:18;;;;:::i;:27::-;22515:10;:40;;;22620:24;;19119:6;22620:24;:14;:24;:::i;:::-;22607:10;:37;22674:29;:15;19119:6;22674:29;:19;:29;:::i;:::-;22659:12;:44;22735:10;;22723:23;;;;;;;;;;;;;;;;22463:295;22841:9;;22823:15;:27;22815:48;;;;;-1:-1:-1;;;22815:48:0;;;;;;;;;;;;-1:-1:-1;;;22815:48:0;;;;;;;;;;;;;;;21460:1;21451:6;:10;21443:37;;;;;-1:-1:-1;;;21443:37:0;;;;;;;;;;;;-1:-1:-1;;;21443:37:0;;;;;;;;;;;;;;;21491:19;21503:6;21491:11;:19::i;:::-;21526:26;;;;;;;;21533:10;;21526:26;;;;;;;;;;21346:214;;:::o;17879:75::-;;;-1:-1:-1;;;;;17879:75:0;;:::o;19369:29::-;;;;:::o;20562:420::-;20609:7;20633:13;:11;:13::i;:::-;20629:78;;-1:-1:-1;20675:20:0;;20668:27;;20629:78;20737:237;20780:179;20945:13;:11;:13::i;:::-;20780:138;20913:4;20780:106;20875:10;;20780:68;20833:14;;20780:26;:24;:26::i;:179::-;20737:20;;;:237;:24;:237;:::i;19405:35::-;;;;:::o;21779:97::-;21815:31;21824:21;21834:10;21824:9;:21::i;:::-;21815:8;:31::i;:::-;21857:11;:9;:11::i;:::-;21779:97::o;19295:31::-;;;;:::o;7348:109::-;6454:9;:7;:9::i;:::-;6446:54;;;;;-1:-1:-1;;;6446:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7421:28;7440:8;7421:18;:28::i;:::-;7348:109;:::o;19134:34::-;;;;:::o;2506:136::-;2564:7;2591:43;2595:1;2598;2591:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;2584:50;2506:136;-1:-1:-1;;;2506:136:0:o;2850:471::-;2908:7;3153:6;3149:47;;-1:-1:-1;3183:1:0;3176:8;;3149:47;3220:5;;;3224:1;3220;:5;:1;3244:5;;;;;:10;3236:56;;;;-1:-1:-1;;;3236:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3329:132;3387:7;3414:39;3418:1;3421;3414:39;;;;;;;;;;;;;;;;;:3;:39::i;2317:181::-;2375:7;2407:5;;;2431:6;;;;2423:46;;;;;-1:-1:-1;;;2423:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;18693:219;18760:12;;:24;;18777:6;18760:24;:16;:24;:::i;:::-;18745:12;:39;18829:10;18819:21;;;;:9;:21;;;;;;:33;;18845:6;18819:33;:25;:33;:::i;:::-;18805:10;18795:21;;;;:9;:21;;;;;:57;;;;18863:8;;:41;;-1:-1:-1;;;;;18863:8:0;;;;18897:6;14522:176;14631:58;;;-1:-1:-1;;;;;14631:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;14631:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;14605:85:0;;14624:5;;14605:18;:85::i;:::-;14522:176;;;:::o;2099:106::-;2157:7;2188:1;2184;:5;:13;;2196:1;2184:13;;;-1:-1:-1;2192:1:0;;2099:106;-1:-1:-1;2099:106:0:o;4991:98::-;5071:10;4991:98;:::o;18296:389::-;18362:10;18392:28;18362:10;18392:26;:28::i;:::-;18391:29;18383:58;;;;;-1:-1:-1;;;18383:58:0;;;;;;;;;;;;-1:-1:-1;;;18383:58:0;;;;;;;;;;;;;;;18460:9;-1:-1:-1;;;;;18460:19:0;;;18452:48;;;;;-1:-1:-1;;;18452:48:0;;;;;;;;;;;;-1:-1:-1;;;18452:48:0;;;;;;;;;;;;;;;18526:12;;:24;;18543:6;18526:24;:16;:24;:::i;:::-;18511:12;:39;-1:-1:-1;;;;;18581:17:0;;;;;;:9;:17;;;;;;:29;;18603:6;18581:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;18561:17:0;;;;;;;:9;:17;;;;;:49;;;;18621:8;;:56;;:8;18571:6;18663:4;18670:6;18621:56;:25;:56;:::i;7563:229::-;-1:-1:-1;;;;;7637:22:0;;7629:73;;;;-1:-1:-1;;;7629:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7739:6;;7718:38;;-1:-1:-1;;;;;7718:38:0;;;;7739:6;;7718:38;;7739:6;;7718:38;7767:6;:17;;-1:-1:-1;;;;;;7767:17:0;-1:-1:-1;;;;;7767:17:0;;;;;;;;;;7563:229::o;2650:192::-;2736:7;2772:12;2764:6;;;;2756:29;;;;-1:-1:-1;;;2756:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2756:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2808:5:0;;;2650:192::o;3469:345::-;3555:7;3657:12;3650:5;3642:28;;;;-1:-1:-1;;;3642:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3642:28:0;;3681:9;3697:1;3693;:5;;;;;;;3469:345;-1:-1:-1;;;;;3469:345:0:o;16561:1114::-;17165:27;17173:5;-1:-1:-1;;;;;17165:25:0;;:27::i;:::-;17157:71;;;;;-1:-1:-1;;;17157:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;17302:12;17316:23;17351:5;-1:-1:-1;;;;;17343:19:0;17363:4;17343:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;17343:25:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;17301:67:0;;;;17387:7;17379:52;;;;;-1:-1:-1;;;17379:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17448:17;;:21;17444:224;;17590:10;17579:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17579:30:0;17571:85;;;;-1:-1:-1;;;17571:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16561:1114;;;;:::o;11366:810::-;11426:4;12085:20;;11928:66;12125:15;;;;;:42;;;12156:11;12144:8;:23;;12125:42;12117:51;11366:810;-1:-1:-1;;;;11366:810:0:o;14706:204::-;14833:68;;;-1:-1:-1;;;;;14833:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;14833:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;14807:95:0;;14826:5;;14807:18;:95::i

Swarm Source

bzzr://776a907bb8c56b13c673485747c915c6ef892c459ab39807cc8b5fb9c054ce4b

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.