ETH Price: $3,645.30 (+1.83%)

Contract

0x30394955e0AD22Dc96eC7Eb01d70C8594c899Aa7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit212955362024-11-29 19:48:598 hrs ago1732909739IN
0x30394955...94c899Aa7
0 ETH0.0012939412.31224051
Withdraw212954042024-11-29 19:22:359 hrs ago1732908155IN
0x30394955...94c899Aa7
0 ETH0.0011120413.81119453
Harvest212954012024-11-29 19:21:599 hrs ago1732908119IN
0x30394955...94c899Aa7
0 ETH0.0009571712.70105069
Harvest212544082024-11-24 1:46:116 days ago1732412771IN
0x30394955...94c899Aa7
0 ETH0.000841099.09664359
Deposit212322792024-11-20 23:38:359 days ago1732145915IN
0x30394955...94c899Aa7
0 ETH0.0012874111.71502873
Withdraw212322252024-11-20 23:27:479 days ago1732145267IN
0x30394955...94c899Aa7
0 ETH0.000772539.59450357
Harvest212322222024-11-20 23:27:119 days ago1732145231IN
0x30394955...94c899Aa7
0 ETH0.000736419.77163609
Deposit212155322024-11-18 15:35:1111 days ago1731944111IN
0x30394955...94c899Aa7
0 ETH0.0017406616.56107148
Withdraw211708212024-11-12 9:51:2317 days ago1731405083IN
0x30394955...94c899Aa7
0 ETH0.0058128559.53966747
Withdraw211679802024-11-12 0:19:2318 days ago1731370763IN
0x30394955...94c899Aa7
0 ETH0.0028575535.4843242
Harvest210524132024-10-26 21:14:1134 days ago1729977251IN
0x30394955...94c899Aa7
0 ETH0.000380635.05074323
Harvest208787682024-10-02 15:39:3558 days ago1727883575IN
0x30394955...94c899Aa7
0 ETH0.0009984413.2486611
Withdraw208655212024-09-30 19:19:4760 days ago1727723987IN
0x30394955...94c899Aa7
0 ETH0.0014276817.72600214
Withdraw208654432024-09-30 19:03:5960 days ago1727723039IN
0x30394955...94c899Aa7
0 ETH0.0020388124.97512511
Withdraw208653862024-09-30 18:52:3560 days ago1727722355IN
0x30394955...94c899Aa7
0 ETH0.0012071814.78782356
Harvest208653832024-09-30 18:51:5960 days ago1727722319IN
0x30394955...94c899Aa7
0 ETH0.0012359416.40004498
Harvest206850012024-09-05 14:31:4785 days ago1725546707IN
0x30394955...94c899Aa7
0 ETH0.000355494.71712895
Harvest205937792024-08-23 20:46:3598 days ago1724445995IN
0x30394955...94c899Aa7
0 ETH0.000201112.66867594
Deposit204726072024-08-06 22:46:59115 days ago1722984419IN
0x30394955...94c899Aa7
0 ETH0.000084562.30840035
Deposit204726062024-08-06 22:46:47115 days ago1722984407IN
0x30394955...94c899Aa7
0 ETH0.000083962.29203218
Deposit204726052024-08-06 22:46:35115 days ago1722984395IN
0x30394955...94c899Aa7
0 ETH0.000241752.19992616
Deposit204687872024-08-06 9:59:35115 days ago1722938375IN
0x30394955...94c899Aa7
0 ETH0.000195773.17766077
Deposit204343922024-08-01 14:47:59120 days ago1722523679IN
0x30394955...94c899Aa7
0 ETH0.0011430811.39459228
Withdraw204343462024-08-01 14:38:47120 days ago1722523127IN
0x30394955...94c899Aa7
0 ETH0.0009301911.54923218
Harvest204343342024-08-01 14:36:23120 days ago1722522983IN
0x30394955...94c899Aa7
0 ETH0.000956612.69351007
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:
XFT_FARM

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-02-27
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

/**
 * @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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function decimals() external view returns (uint8);
    function symbol() external view returns (string memory);
    function name() external view returns (string memory);
    function getOwner() external view returns (address);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address _owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

contract XFT_FARM is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    IERC20 xft;
    IERC20 LP;
    uint256 public xftPerShare;
    uint256 public xftPerBlock;
    uint256 public lastBlock;
    bool pause;

    struct UserInfo {
        uint256 amount;
        int256 rewardDebt;
    }

    mapping (address => UserInfo) public Stakers;

    constructor(address _xft, address _LP, uint256 _perBlock) {
        xft = IERC20(_xft);
        LP = IERC20(_LP);
        xftPerBlock = _perBlock;
        lastBlock = block.number;
        pause = false;
    }

    modifier paused() {
        require(!pause, "farm is paused");
        _;
    }

    modifier deposited() {
        require(Stakers[msg.sender].amount > 0, "0 deposits");
        _;
    }

    function update_farm() internal {
        uint256 lp_supply = LP.balanceOf(address(this));
        if(block.number > lastBlock ){
            if(lp_supply != 0){
                uint256 blocks = block.number.sub(lastBlock);
                uint256 reward = blocks.mul(xftPerBlock);
                xftPerShare = xftPerShare.add((reward.mul(1e18) / lp_supply));
            }
            lastBlock = block.number;
        }
    }

    function getPending() public view returns(uint256){
        UserInfo storage user = Stakers[msg.sender];
        uint256 lp_supply = LP.balanceOf(address(this));
        uint256 perShare = xftPerShare;
        if (block.number > lastBlock && lp_supply > 0){
            uint256 blocks = block.number.sub(lastBlock);
            uint256 xftReward = blocks.mul(xftPerBlock);
            perShare = xftPerShare.add(xftReward.mul(1e18) / lp_supply);
        }
        return uint256(int256(user.amount.mul(perShare) / 1e18) - user.rewardDebt);
    }

    function deposit(uint256 amount) public paused nonReentrant{
        require(LP.allowance(msg.sender, address(this)) >= amount, "approve");
        update_farm();
        LP.transferFrom(msg.sender, address(this), amount);

        UserInfo storage user = Stakers[msg.sender];

        user.amount += amount;
        user.rewardDebt = int256(user.amount.mul(xftPerShare).div(1e18));
    }

    function withdraw(uint256 amount) public paused deposited nonReentrant{
        update_farm();
        UserInfo storage user = Stakers[msg.sender];
        uint256 pending = getPending();

        require(pending <= xft.balanceOf(address(this)), "farm is drained");

        xft.transfer(msg.sender, pending);

        user.amount = user.amount.sub(amount);
        user.rewardDebt = int256(user.amount.mul(xftPerShare).div(1e18));

        LP.transfer(msg.sender, amount);
    }

    function emergencyWithdraw() public deposited nonReentrant{
        UserInfo storage user = Stakers[msg.sender];

        LP.transfer(msg.sender, user.amount);

        user.amount = 0;
        user.rewardDebt = 0;
    }

    function harvest() public paused deposited nonReentrant{
        UserInfo storage user = Stakers[msg.sender];
        update_farm();
        uint256 pending = getPending();
        require(pending <= xft.balanceOf(address(this)), "farm is drained");
        user.rewardDebt = int256(user.amount.mul(xftPerShare).div(1e18));

        xft.transfer(msg.sender, pending);
    }

    function stop() public onlyOwner{
        pause = !pause;
    }

    function adjustPerBlock(uint256 perBlock) public onlyOwner{
        xftPerBlock = perBlock;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_xft","type":"address"},{"internalType":"address","name":"_LP","type":"address"},{"internalType":"uint256","name":"_perBlock","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"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"Stakers","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"int256","name":"rewardDebt","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"perBlock","type":"uint256"}],"name":"adjustPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xftPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xftPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516110db3803806110db83398101604081905261002f916100f9565b61003f61003a610089565b61008d565b60018055600280546001600160a01b039485166001600160a01b0319918216179091556003805493909416921691909117909155600555436006556007805460ff19169055610134565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100f457600080fd5b919050565b60008060006060848603121561010d578283fd5b610116846100dd565b9250610124602085016100dd565b9150604084015190509250925092565b610f98806101436000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c578063b6b55f2511610066578063b6b55f251461017a578063db2e21bc1461018d578063ede85eb714610195578063f2fde38b146101b6576100ea565b8063715018a614610155578063806b984f1461015d5780638da5cb5b14610165576100ea565b806311ae9ed2116100c857806311ae9ed21461011f5780632e1a7d4d1461012757806341e135541461013a5780634641257d1461014d576100ea565b8063068bf2df146100ef57806307da68f51461010d5780630d539cfe14610117575b600080fd5b6100f76101c9565b6040516101049190610e88565b60405180910390f35b6101156101cf565b005b6100f76101eb565b6100f76101f1565b610115610135366004610ca5565b610338565b610115610148366004610ca5565b6105a4565b6101156105b1565b61011561077b565b6100f761078d565b61016d610793565b6040516101049190610cd5565b610115610188366004610ca5565b6107a2565b61011561094e565b6101a86101a3366004610c5e565b610a2c565b604051610104929190610e91565b6101156101c4366004610c5e565b610a45565b60045481565b6101d7610a7c565b6007805460ff19811660ff90911615179055565b60055481565b3360009081526008602052604080822060035491516370a0823160e01b8152909183916001600160a01b03909116906370a0823190610234903090600401610cd5565b60206040518083038186803b15801561024c57600080fd5b505afa158015610260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102849190610cbd565b600454600654919250904311801561029c5750600082115b156103015760006102b860065443610abb90919063ffffffff16565b905060006102d160055483610ace90919063ffffffff16565b90506102fc846102e983670de0b6b3a7640000610ace565b6102f39190610eb7565b60045490610ada565b925050505b60018301548354670de0b6b3a76400009061031c9084610ace565b6103269190610eb7565b6103309190610ef6565b935050505090565b60075460ff16156103645760405162461bcd60e51b815260040161035b90610d40565b60405180910390fd5b336000908152600860205260409020546103905760405162461bcd60e51b815260040161035b90610e64565b610398610ae6565b6103a0610b10565b336000908152600860205260408120906103b86101f1565b6002546040516370a0823160e01b81529192506001600160a01b0316906370a08231906103e9903090600401610cd5565b60206040518083038186803b15801561040157600080fd5b505afa158015610415573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104399190610cbd565b8111156104585760405162461bcd60e51b815260040161035b90610dcf565b60025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061048a9033908590600401610d27565b602060405180830381600087803b1580156104a457600080fd5b505af11580156104b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dc9190610c85565b5081546104e99084610abb565b80835560045461050d91670de0b6b3a7640000916105079190610ace565b90610bf8565b600183015560035460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906105449033908790600401610d27565b602060405180830381600087803b15801561055e57600080fd5b505af1158015610572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105969190610c85565b5050506105a1610c04565b50565b6105ac610a7c565b600555565b60075460ff16156105d45760405162461bcd60e51b815260040161035b90610d40565b336000908152600860205260409020546106005760405162461bcd60e51b815260040161035b90610e64565b610608610ae6565b33600090815260086020526040902061061f610b10565b60006106296101f1565b6002546040516370a0823160e01b81529192506001600160a01b0316906370a082319061065a903090600401610cd5565b60206040518083038186803b15801561067257600080fd5b505afa158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190610cbd565b8111156106c95760405162461bcd60e51b815260040161035b90610dcf565b60045482546106e591670de0b6b3a76400009161050791610ace565b600183015560025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061071c9033908590600401610d27565b602060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e9190610c85565b505050610779610c04565b565b610783610a7c565b6107796000610c0a565b60065481565b6000546001600160a01b031690565b60075460ff16156107c55760405162461bcd60e51b815260040161035b90610d40565b6107cd610ae6565b600354604051636eb1769f60e11b815282916001600160a01b03169063dd62ed3e906107ff9033903090600401610ce9565b60206040518083038186803b15801561081757600080fd5b505afa15801561082b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084f9190610cbd565b101561086d5760405162461bcd60e51b815260040161035b90610dae565b610875610b10565b6003546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906108a990339030908690600401610d03565b602060405180830381600087803b1580156108c357600080fd5b505af11580156108d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fb9190610c85565b5033600090815260086020526040812080549091839183919061091f908490610e9f565b9091555050600454815461094091670de0b6b3a76400009161050791610ace565b6001909101556105a1610c04565b3360009081526008602052604090205461097a5760405162461bcd60e51b815260040161035b90610e64565b610982610ae6565b33600081815260086020526040908190206003548154925163a9059cbb60e01b815291936001600160a01b039091169263a9059cbb926109c6929190600401610d27565b602060405180830381600087803b1580156109e057600080fd5b505af11580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a189190610c85565b506000808255600190910155610779610c04565b6008602052600090815260409020805460019091015482565b610a4d610a7c565b6001600160a01b038116610a735760405162461bcd60e51b815260040161035b90610d68565b6105a181610c0a565b610a84610c5a565b6001600160a01b0316610a95610793565b6001600160a01b0316146107795760405162461bcd60e51b815260040161035b90610df8565b6000610ac78284610f35565b9392505050565b6000610ac78284610ed7565b6000610ac78284610e9f565b60026001541415610b095760405162461bcd60e51b815260040161035b90610e2d565b6002600155565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610b41903090600401610cd5565b60206040518083038186803b158015610b5957600080fd5b505afa158015610b6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b919190610cbd565b90506006544311156105a1578015610bf1576000610bba60065443610abb90919063ffffffff16565b90506000610bd360055483610ace90919063ffffffff16565b9050610beb836102e983670de0b6b3a7640000610ace565b60045550505b4360065550565b6000610ac78284610eb7565b60018055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b3390565b600060208284031215610c6f578081fd5b81356001600160a01b0381168114610ac7578182fd5b600060208284031215610c96578081fd5b81518015158114610ac7578182fd5b600060208284031215610cb6578081fd5b5035919050565b600060208284031215610cce578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6020808252600e908201526d19985c9b481a5cc81c185d5cd95960921b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b602080825260079082015266617070726f766560c81b604082015260600190565b6020808252600f908201526e19985c9b481a5cc8191c985a5b9959608a1b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600a908201526930206465706f7369747360b01b604082015260600190565b90815260200190565b918252602082015260400190565b60008219821115610eb257610eb2610f4c565b500190565b600082610ed257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610ef157610ef1610f4c565b500290565b60008083128015600160ff1b850184121615610f1457610f14610f4c565b6001600160ff1b0384018313811615610f2f57610f2f610f4c565b50500390565b600082821015610f4757610f47610f4c565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220898af455daa96c8d26e69101ae76707e8afd7e400e0c75c0a00b944078ec227764736f6c6343000800003300000000000000000000000076bc677d444f1e9d57daf5187ee2b7dc852745ae000000000000000000000000dac0324debd1f036323c0e207a4cd8e78ee6bdff00000000000000000000000000000000000000000000000000401506eececf80

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c578063b6b55f2511610066578063b6b55f251461017a578063db2e21bc1461018d578063ede85eb714610195578063f2fde38b146101b6576100ea565b8063715018a614610155578063806b984f1461015d5780638da5cb5b14610165576100ea565b806311ae9ed2116100c857806311ae9ed21461011f5780632e1a7d4d1461012757806341e135541461013a5780634641257d1461014d576100ea565b8063068bf2df146100ef57806307da68f51461010d5780630d539cfe14610117575b600080fd5b6100f76101c9565b6040516101049190610e88565b60405180910390f35b6101156101cf565b005b6100f76101eb565b6100f76101f1565b610115610135366004610ca5565b610338565b610115610148366004610ca5565b6105a4565b6101156105b1565b61011561077b565b6100f761078d565b61016d610793565b6040516101049190610cd5565b610115610188366004610ca5565b6107a2565b61011561094e565b6101a86101a3366004610c5e565b610a2c565b604051610104929190610e91565b6101156101c4366004610c5e565b610a45565b60045481565b6101d7610a7c565b6007805460ff19811660ff90911615179055565b60055481565b3360009081526008602052604080822060035491516370a0823160e01b8152909183916001600160a01b03909116906370a0823190610234903090600401610cd5565b60206040518083038186803b15801561024c57600080fd5b505afa158015610260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102849190610cbd565b600454600654919250904311801561029c5750600082115b156103015760006102b860065443610abb90919063ffffffff16565b905060006102d160055483610ace90919063ffffffff16565b90506102fc846102e983670de0b6b3a7640000610ace565b6102f39190610eb7565b60045490610ada565b925050505b60018301548354670de0b6b3a76400009061031c9084610ace565b6103269190610eb7565b6103309190610ef6565b935050505090565b60075460ff16156103645760405162461bcd60e51b815260040161035b90610d40565b60405180910390fd5b336000908152600860205260409020546103905760405162461bcd60e51b815260040161035b90610e64565b610398610ae6565b6103a0610b10565b336000908152600860205260408120906103b86101f1565b6002546040516370a0823160e01b81529192506001600160a01b0316906370a08231906103e9903090600401610cd5565b60206040518083038186803b15801561040157600080fd5b505afa158015610415573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104399190610cbd565b8111156104585760405162461bcd60e51b815260040161035b90610dcf565b60025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061048a9033908590600401610d27565b602060405180830381600087803b1580156104a457600080fd5b505af11580156104b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dc9190610c85565b5081546104e99084610abb565b80835560045461050d91670de0b6b3a7640000916105079190610ace565b90610bf8565b600183015560035460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906105449033908790600401610d27565b602060405180830381600087803b15801561055e57600080fd5b505af1158015610572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105969190610c85565b5050506105a1610c04565b50565b6105ac610a7c565b600555565b60075460ff16156105d45760405162461bcd60e51b815260040161035b90610d40565b336000908152600860205260409020546106005760405162461bcd60e51b815260040161035b90610e64565b610608610ae6565b33600090815260086020526040902061061f610b10565b60006106296101f1565b6002546040516370a0823160e01b81529192506001600160a01b0316906370a082319061065a903090600401610cd5565b60206040518083038186803b15801561067257600080fd5b505afa158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190610cbd565b8111156106c95760405162461bcd60e51b815260040161035b90610dcf565b60045482546106e591670de0b6b3a76400009161050791610ace565b600183015560025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061071c9033908590600401610d27565b602060405180830381600087803b15801561073657600080fd5b505af115801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e9190610c85565b505050610779610c04565b565b610783610a7c565b6107796000610c0a565b60065481565b6000546001600160a01b031690565b60075460ff16156107c55760405162461bcd60e51b815260040161035b90610d40565b6107cd610ae6565b600354604051636eb1769f60e11b815282916001600160a01b03169063dd62ed3e906107ff9033903090600401610ce9565b60206040518083038186803b15801561081757600080fd5b505afa15801561082b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084f9190610cbd565b101561086d5760405162461bcd60e51b815260040161035b90610dae565b610875610b10565b6003546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906108a990339030908690600401610d03565b602060405180830381600087803b1580156108c357600080fd5b505af11580156108d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fb9190610c85565b5033600090815260086020526040812080549091839183919061091f908490610e9f565b9091555050600454815461094091670de0b6b3a76400009161050791610ace565b6001909101556105a1610c04565b3360009081526008602052604090205461097a5760405162461bcd60e51b815260040161035b90610e64565b610982610ae6565b33600081815260086020526040908190206003548154925163a9059cbb60e01b815291936001600160a01b039091169263a9059cbb926109c6929190600401610d27565b602060405180830381600087803b1580156109e057600080fd5b505af11580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a189190610c85565b506000808255600190910155610779610c04565b6008602052600090815260409020805460019091015482565b610a4d610a7c565b6001600160a01b038116610a735760405162461bcd60e51b815260040161035b90610d68565b6105a181610c0a565b610a84610c5a565b6001600160a01b0316610a95610793565b6001600160a01b0316146107795760405162461bcd60e51b815260040161035b90610df8565b6000610ac78284610f35565b9392505050565b6000610ac78284610ed7565b6000610ac78284610e9f565b60026001541415610b095760405162461bcd60e51b815260040161035b90610e2d565b6002600155565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610b41903090600401610cd5565b60206040518083038186803b158015610b5957600080fd5b505afa158015610b6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b919190610cbd565b90506006544311156105a1578015610bf1576000610bba60065443610abb90919063ffffffff16565b90506000610bd360055483610ace90919063ffffffff16565b9050610beb836102e983670de0b6b3a7640000610ace565b60045550505b4360065550565b6000610ac78284610eb7565b60018055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b3390565b600060208284031215610c6f578081fd5b81356001600160a01b0381168114610ac7578182fd5b600060208284031215610c96578081fd5b81518015158114610ac7578182fd5b600060208284031215610cb6578081fd5b5035919050565b600060208284031215610cce578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6020808252600e908201526d19985c9b481a5cc81c185d5cd95960921b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b602080825260079082015266617070726f766560c81b604082015260600190565b6020808252600f908201526e19985c9b481a5cc8191c985a5b9959608a1b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600a908201526930206465706f7369747360b01b604082015260600190565b90815260200190565b918252602082015260400190565b60008219821115610eb257610eb2610f4c565b500190565b600082610ed257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610ef157610ef1610f4c565b500290565b60008083128015600160ff1b850184121615610f1457610f14610f4c565b6001600160ff1b0384018313811615610f2f57610f2f610f4c565b50500390565b600082821015610f4757610f47610f4c565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220898af455daa96c8d26e69101ae76707e8afd7e400e0c75c0a00b944078ec227764736f6c63430008000033

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

00000000000000000000000076bc677d444f1e9d57daf5187ee2b7dc852745ae000000000000000000000000dac0324debd1f036323c0e207a4cd8e78ee6bdff00000000000000000000000000000000000000000000000000401506eececf80

-----Decoded View---------------
Arg [0] : _xft (address): 0x76BC677d444f1E9d57dAf5187ee2b7dC852745aE
Arg [1] : _LP (address): 0xdaC0324DEbd1F036323C0e207A4cd8e78ee6BDFF
Arg [2] : _perBlock (uint256): 18037518030000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000076bc677d444f1e9d57daf5187ee2b7dc852745ae
Arg [1] : 000000000000000000000000dac0324debd1f036323c0e207a4cd8e78ee6bdff
Arg [2] : 00000000000000000000000000000000000000000000000000401506eececf80


Deployed Bytecode Sourcemap

26832:3512:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26951:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;30169:65;;;:::i;:::-;;26984:26;;;:::i;28077:555::-;;;:::i;29045:492::-;;;;;;:::i;:::-;;:::i;30242:99::-;;;;;;:::i;:::-;;:::i;29780:381::-;;;:::i;2667:103::-;;;:::i;27017:24::-;;;:::i;2019:87::-;;;:::i;:::-;;;;;;;:::i;28640:397::-;;;;;;:::i;:::-;;:::i;29545:227::-;;;:::i;27152:44::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;2925:201::-;;;;;;:::i;:::-;;:::i;26951:26::-;;;;:::o;30169:65::-;1905:13;:11;:13::i;:::-;30221:5:::1;::::0;;-1:-1:-1;;30212:14:0;::::1;30221:5;::::0;;::::1;30220:6;30212:14;::::0;;30169:65::o;26984:26::-;;;;:::o;28077:555::-;28170:10;28119:7;28162:19;;;:7;:19;;;;;;28212:2;;:27;;-1:-1:-1;;;28212:27:0;;28162:19;;28119:7;;-1:-1:-1;;;;;28212:2:0;;;;:12;;:27;;28233:4;;28212:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;28269:11;;28310:9;;28192:47;;-1:-1:-1;28269:11:0;28295:12;:24;:41;;;;;28335:1;28323:9;:13;28295:41;28291:249;;;28352:14;28369:27;28386:9;;28369:12;:16;;:27;;;;:::i;:::-;28352:44;;28411:17;28431:23;28442:11;;28431:6;:10;;:23;;;;:::i;:::-;28411:43;-1:-1:-1;28480:48:0;28518:9;28496:19;28411:43;28510:4;28496:13;:19::i;:::-;:31;;;;:::i;:::-;28480:11;;;:15;:48::i;:::-;28469:59;;28291:249;;;28608:15;;;;28572:11;;28600:4;;28572:25;;28588:8;28572:15;:25::i;:::-;:32;;;;:::i;:::-;28565:58;;;;:::i;:::-;28550:74;;;;;28077:555;:::o;29045:492::-;27466:5;;;;27465:6;27457:33;;;;-1:-1:-1;;;27457:33:0;;;;;;;:::i;:::-;;;;;;;;;27566:10:::1;27587:1;27558:19:::0;;;:7:::1;:19;::::0;;;;:26;27550:53:::1;;;;-1:-1:-1::0;;;27550:53:0::1;;;;;;;:::i;:::-;5735:21:::2;:19;:21::i;:::-;29126:13:::3;:11;:13::i;:::-;29182:10;29150:21;29174:19:::0;;;:7:::3;:19;::::0;;;;;29222:12:::3;:10;:12::i;:::-;29266:3;::::0;:28:::3;::::0;-1:-1:-1;;;29266:28:0;;29204:30;;-1:-1:-1;;;;;;29266:3:0::3;::::0;:13:::3;::::0;:28:::3;::::0;29288:4:::3;::::0;29266:28:::3;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;29255:7;:39;;29247:67;;;;-1:-1:-1::0;;;29247:67:0::3;;;;;;;:::i;:::-;29327:3;::::0;:33:::3;::::0;-1:-1:-1;;;29327:33:0;;-1:-1:-1;;;;;29327:3:0;;::::3;::::0;:12:::3;::::0;:33:::3;::::0;29340:10:::3;::::0;29352:7;;29327:33:::3;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;29387:11:0;;:23:::3;::::0;29403:6;29387:15:::3;:23::i;:::-;29373:37:::0;;;29462:11:::3;::::0;29446:38:::3;::::0;29479:4:::3;::::0;29446:28:::3;::::0;29373:37;29446:15:::3;:28::i;:::-;:32:::0;::::3;:38::i;:::-;29421:15;::::0;::::3;:64:::0;29498:2:::3;::::0;:31:::3;::::0;-1:-1:-1;;;29498:31:0;;-1:-1:-1;;;;;29498:2:0;;::::3;::::0;:11:::3;::::0;:31:::3;::::0;29510:10:::3;::::0;29522:6;;29498:31:::3;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5767:1;;5779:20:::2;:18;:20::i;:::-;29045:492:::0;:::o;30242:99::-;1905:13;:11;:13::i;:::-;30311:11:::1;:22:::0;30242:99::o;29780:381::-;27466:5;;;;27465:6;27457:33;;;;-1:-1:-1;;;27457:33:0;;;;;;;:::i;:::-;27566:10:::1;27587:1;27558:19:::0;;;:7:::1;:19;::::0;;;;:26;27550:53:::1;;;;-1:-1:-1::0;;;27550:53:0::1;;;;;;;:::i;:::-;5735:21:::2;:19;:21::i;:::-;29878:10:::3;29846:21;29870:19:::0;;;:7:::3;:19;::::0;;;;29900:13:::3;:11;:13::i;:::-;29924:15;29942:12;:10;:12::i;:::-;29984:3;::::0;:28:::3;::::0;-1:-1:-1;;;29984:28:0;;29924:30;;-1:-1:-1;;;;;;29984:3:0::3;::::0;:13:::3;::::0;:28:::3;::::0;30006:4:::3;::::0;29984:28:::3;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;29973:7;:39;;29965:67;;;;-1:-1:-1::0;;;29965:67:0::3;;;;;;;:::i;:::-;30084:11;::::0;30068;;:38:::3;::::0;30101:4:::3;::::0;30068:28:::3;::::0;:15:::3;:28::i;:38::-;30043:15;::::0;::::3;:64:::0;30120:3:::3;::::0;:33:::3;::::0;-1:-1:-1;;;30120:33:0;;-1:-1:-1;;;;;30120:3:0;;::::3;::::0;:12:::3;::::0;:33:::3;::::0;30133:10:::3;::::0;30145:7;;30120:33:::3;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5767:1;;5779:20:::2;:18;:20::i;:::-;29780:381::o:0;2667:103::-;1905:13;:11;:13::i;:::-;2732:30:::1;2759:1;2732:18;:30::i;27017:24::-:0;;;;:::o;2019:87::-;2065:7;2092:6;-1:-1:-1;;;;;2092:6:0;2019:87;:::o;28640:397::-;27466:5;;;;27465:6;27457:33;;;;-1:-1:-1;;;27457:33:0;;;;;;;:::i;:::-;5735:21:::1;:19;:21::i;:::-;28718:2:::2;::::0;:39:::2;::::0;-1:-1:-1;;;28718:39:0;;28761:6;;-1:-1:-1;;;;;28718:2:0::2;::::0;:12:::2;::::0;:39:::2;::::0;28731:10:::2;::::0;28751:4:::2;::::0;28718:39:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;28710:69;;;;-1:-1:-1::0;;;28710:69:0::2;;;;;;;:::i;:::-;28790:13;:11;:13::i;:::-;28814:2;::::0;:50:::2;::::0;-1:-1:-1;;;28814:50:0;;-1:-1:-1;;;;;28814:2:0;;::::2;::::0;:15:::2;::::0;:50:::2;::::0;28830:10:::2;::::0;28850:4:::2;::::0;28857:6;;28814:50:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;28909:10:0::2;28877:21;28901:19:::0;;;:7:::2;:19;::::0;;;;28933:21;;28901:19;;28948:6;;28901:19;;28877:21;28933::::2;::::0;28948:6;;28933:21:::2;:::i;:::-;::::0;;;-1:-1:-1;;29006:11:0::2;::::0;28990;;:38:::2;::::0;29023:4:::2;::::0;28990:28:::2;::::0;:15:::2;:28::i;:38::-;28965:15;::::0;;::::2;:64:::0;5779:20:::1;:18;:20::i;29545:227::-:0;27566:10;27587:1;27558:19;;;:7;:19;;;;;:26;27550:53;;;;-1:-1:-1;;;27550:53:0;;;;;;;:::i;:::-;5735:21:::1;:19;:21::i;:::-;29646:10:::2;29614:21;29638:19:::0;;;:7:::2;:19;::::0;;;;;;29670:2:::2;::::0;29694:11;;29670:36;;-1:-1:-1;;;29670:36:0;;29638:19;;-1:-1:-1;;;;;29670:2:0;;::::2;::::0;:11:::2;::::0;:36:::2;::::0;29646:10;29694:11;29670:36:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;29733:1:0::2;29719:15:::0;;;29745::::2;::::0;;::::2;:19:::0;5779:20:::1;:18;:20::i;27152:44::-:0;;;;;;;;;;;;;;;;;;;:::o;2925:201::-;1905:13;:11;:13::i;:::-;-1:-1:-1;;;;;3014:22:0;::::1;3006:73;;;;-1:-1:-1::0;;;3006:73:0::1;;;;;;;:::i;:::-;3090:28;3109:8;3090:18;:28::i;2184:132::-:0;2259:12;:10;:12::i;:::-;-1:-1:-1;;;;;2248:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2248:23:0;;2240:68;;;;-1:-1:-1;;;2240:68:0;;;;;;;:::i;22296:98::-;22354:7;22381:5;22385:1;22381;:5;:::i;:::-;22374:12;22296:98;-1:-1:-1;;;22296:98:0:o;22653:::-;22711:7;22738:5;22742:1;22738;:5;:::i;21915:98::-;21973:7;22000:5;22004:1;22000;:5;:::i;5815:293::-;5217:1;5949:7;;:19;;5941:63;;;;-1:-1:-1;;;5941:63:0;;;;;;;:::i;:::-;5217:1;6082:7;:18;5815:293::o;27631:438::-;27694:2;;:27;;-1:-1:-1;;;27694:27:0;;27674:17;;-1:-1:-1;;;;;27694:2:0;;:12;;:27;;27715:4;;27694:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;27674:47;;27750:9;;27735:12;:24;27732:330;;;27779:14;;27776:236;;27813:14;27830:27;27847:9;;27830:12;:16;;:27;;;;:::i;:::-;27813:44;;27876:14;27893:23;27904:11;;27893:6;:10;;:23;;;;:::i;:::-;27876:40;-1:-1:-1;27949:47:0;27985:9;27966:16;27876:40;27977:4;27966:10;:16::i;27949:47::-;27935:11;:61;-1:-1:-1;;27776:236:0;28038:12;28026:9;:24;27631:438;:::o;23052:98::-;23110:7;23137:5;23141:1;23137;:5;:::i;6116:213::-;5173:1;6299:22;;6116:213::o;3286:191::-;3360:16;3379:6;;-1:-1:-1;;;;;3396:17:0;;;-1:-1:-1;;;;;;3396:17:0;;;;;;3429:40;;3379:6;;;;;;;3429:40;;3360:16;3429:40;3286:191;;:::o;728:98::-;808:10;728:98;:::o;14:306:1:-;;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;178:23;;-1:-1:-1;;;;;230:31:1;;220:42;;210:2;;281:6;273;266:22;325:297;;445:2;433:9;424:7;420:23;416:32;413:2;;;466:6;458;451:22;413:2;503:9;497:16;556:5;549:13;542:21;535:5;532:32;522:2;;583:6;575;568:22;627:190;;739:2;727:9;718:7;714:23;710:32;707:2;;;760:6;752;745:22;707:2;-1:-1:-1;788:23:1;;697:120;-1:-1:-1;697:120:1:o;822:194::-;;945:2;933:9;924:7;920:23;916:32;913:2;;;966:6;958;951:22;913:2;-1:-1:-1;994:16:1;;903:113;-1:-1:-1;903:113:1:o;1021:203::-;-1:-1:-1;;;;;1185:32:1;;;;1167:51;;1155:2;1140:18;;1122:102::o;1229:304::-;-1:-1:-1;;;;;1459:15:1;;;1441:34;;1511:15;;1506:2;1491:18;;1484:43;1391:2;1376:18;;1358:175::o;1538:375::-;-1:-1:-1;;;;;1796:15:1;;;1778:34;;1848:15;;;;1843:2;1828:18;;1821:43;1895:2;1880:18;;1873:34;;;;1728:2;1713:18;;1695:218::o;1918:274::-;-1:-1:-1;;;;;2110:32:1;;;;2092:51;;2174:2;2159:18;;2152:34;2080:2;2065:18;;2047:145::o;2197:338::-;2399:2;2381:21;;;2438:2;2418:18;;;2411:30;-1:-1:-1;;;2472:2:1;2457:18;;2450:44;2526:2;2511:18;;2371:164::o;2540:402::-;2742:2;2724:21;;;2781:2;2761:18;;;2754:30;2820:34;2815:2;2800:18;;2793:62;-1:-1:-1;;;2886:2:1;2871:18;;2864:36;2932:3;2917:19;;2714:228::o;2947:330::-;3149:2;3131:21;;;3188:1;3168:18;;;3161:29;-1:-1:-1;;;3221:2:1;3206:18;;3199:37;3268:2;3253:18;;3121:156::o;3282:339::-;3484:2;3466:21;;;3523:2;3503:18;;;3496:30;-1:-1:-1;;;3557:2:1;3542:18;;3535:45;3612:2;3597:18;;3456:165::o;3626:356::-;3828:2;3810:21;;;3847:18;;;3840:30;3906:34;3901:2;3886:18;;3879:62;3973:2;3958:18;;3800:182::o;3987:355::-;4189:2;4171:21;;;4228:2;4208:18;;;4201:30;4267:33;4262:2;4247:18;;4240:61;4333:2;4318:18;;4161:181::o;4347:334::-;4549:2;4531:21;;;4588:2;4568:18;;;4561:30;-1:-1:-1;;;4622:2:1;4607:18;;4600:40;4672:2;4657:18;;4521:160::o;4686:177::-;4832:25;;;4820:2;4805:18;;4787:76::o;4868:246::-;5040:25;;;5096:2;5081:18;;5074:34;5028:2;5013:18;;4995:119::o;5119:128::-;;5190:1;5186:6;5183:1;5180:13;5177:2;;;5196:18;;:::i;:::-;-1:-1:-1;5232:9:1;;5167:80::o;5252:217::-;;5318:1;5308:2;;-1:-1:-1;;;5343:31:1;;5397:4;5394:1;5387:15;5425:4;5350:1;5415:15;5308:2;-1:-1:-1;5454:9:1;;5298:171::o;5474:168::-;;5580:1;5576;5572:6;5568:14;5565:1;5562:21;5557:1;5550:9;5543:17;5539:45;5536:2;;;5587:18;;:::i;:::-;-1:-1:-1;5627:9:1;;5526:116::o;5647:270::-;;5715:12;;;5743:10;;-1:-1:-1;;;5762:19:1;;5755:27;;5739:44;5736:2;;;5786:18;;:::i;:::-;-1:-1:-1;;;;;5833:27:1;;5826:35;;5818:44;;5815:2;;;5865:18;;:::i;:::-;-1:-1:-1;;5902:9:1;;5695:222::o;5922:125::-;;5990:1;5987;5984:8;5981:2;;;5995:18;;:::i;:::-;-1:-1:-1;6032:9:1;;5971:76::o;6052:127::-;6113:10;6108:3;6104:20;6101:1;6094:31;6144:4;6141:1;6134:15;6168:4;6165:1;6158:15

Swarm Source

ipfs://898af455daa96c8d26e69101ae76707e8afd7e400e0c75c0a00b944078ec2277

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.