Contract 0xf513819fd029645dE6Fe7BA92AE753BD2782003b

Contract Overview

Balance:
0 FTM

FTM Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9e8655613250c0ce2bb50af5a85bfc440d647b24480fecb4a1dce260fa65a90cEmergency Reward...191082282021-10-14 21:42:1910 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.006866587514
0x3a11d796c4103a2fd0b7c073681ae18b4977385e6f67cf23a5a2cb4f64fb7020Emergency Reward...191081792021-10-14 21:41:3710 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.00700792025
0xfe65f00327bc28d386d3e1fdc4d66ffe5578f7afb2c9f382e0afb31042935299Emergency Reward...191081202021-10-14 21:40:4610 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.007009890043
0xea9106d34f0f8e9e73dc06f704ad5eeece6a2726ae2e94104c13f5f3eeb64fe8Emergency Reward...191080852021-10-14 21:40:1910 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.007124765699
0x039057426ee7c51193e8c11e496b3b6cfabf747ae8728c56430fd1dc38d95d80Emergency Reward...191080142021-10-14 21:39:2910 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.007126613767
0x90d2785c3a458c18ece346ef13c6e218b18cdeb63c0cb288a2fa76004bc68ce1Emergency Reward...191079482021-10-14 21:38:4010 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.00723447125
0x958ed8db8c36d5b16979ea295ab226447689bfb3be1a6acb87b1d44d7e667c5bEmergency Reward...191078112021-10-14 21:37:0010 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.009670682736
0x086ea8c4904a2afe7c35a579b3b962de6c33a046b2adfefff822a98dc8da9f3cDeposit191076352021-10-14 21:34:2210 days 2 hrs ago0x3a4200e38a0cc42254d80d0ce32cf5903f16a205 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.011847512358
0x0b695be213160f0aa218517d996c8d9cd19494463080e7bac3c7b22757d21240Emergency Withdr...191074622021-10-14 21:32:0010 days 2 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.00924007106
0x78dee360105ec34db7ee6ac3763169a05bdaa913cd9127bf04a282ad10cec39aEmergency Reward...191071552021-10-14 21:27:4410 days 2 hrs ago0x3a4200e38a0cc42254d80d0ce32cf5903f16a205 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.004483578582
0x06d6984a3b4e2d5c92543d5cccfa8dc4f5e8195f1043b15cafc2ca2711e3ae68Emergency Withdr...191070642021-10-14 21:26:2110 days 2 hrs ago0x3a4200e38a0cc42254d80d0ce32cf5903f16a205 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.0130138718
0x4671ac188070d5127660b506a891d4f67224dfd727ffb83cd0f0bf736d474990Stop Reward191065262021-10-14 21:18:0010 days 3 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.005759227405
0x77ce2008bc7c4dfab76318ff278cf181bf0c6de4e3d1d62da35b240acf6a03dcDeposit190996982021-10-14 19:35:5110 days 4 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  0xf513819fd029645de6fe7ba92ae753bd2782003b0 FTM0.026832909707
0x3028842ebe2557ba9c191f63dcb1783e0a84a69935cada05f894267b936026360x60806040190909472021-10-14 17:13:0110 days 7 hrs ago0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3 IN  Contract Creation0 FTM0.281521309723
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x3028842ebe2557ba9c191f63dcb1783e0a84a69935cada05f894267b93602636190909472021-10-14 17:13:0110 days 7 hrs ago 0xdbbbb1017136aede803ebfa2b2e5a0e62a6d38c3  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SmartChef

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at FtmScan.com on 2021-10-14
*/

pragma solidity >=0.6.0 <0.8.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

// File: contracts\Context.sol



pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

// File: contracts\Ownable.sol



pragma solidity >=0.6.0 <0.8.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.
 *
 * 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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @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(_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 {
        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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts\IBEP20.sol

pragma solidity >=0.6.4;

interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the token name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

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

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

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

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

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

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

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

// File: contracts\Address.sol



pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

// File: contracts\SafeBEP20.sol



pragma solidity >=0.6.0 <0.8.0;




/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IBEP20 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),
            "SafeBEP20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IBEP20 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(IBEP20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeBEP20: 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(IBEP20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

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

// File: contracts\BEP20.sol



pragma solidity >=0.4.0;





/**
 * @dev Implementation of the {IBEP20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {BEP20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of BEP20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IBEP20-approve}.
 */
contract BEP20 is Context, IBEP20, Ownable {
    using SafeMath for uint256;

    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external override view returns (address) {
        return owner();
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public override view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public override view returns (string memory) {
        return _symbol;
    }

    /**
    * @dev Returns the number of decimals used to get its user representation.
    */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {BEP20-totalSupply}.
     */
    function totalSupply() public override view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {BEP20-balanceOf}.
     */
    function balanceOf(address account) public override view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {BEP20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {BEP20-allowance}.
     */
    function allowance(address owner, address spender) public override view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {BEP20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {BEP20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {BEP20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom (address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance')
        );
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {BEP20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {BEP20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero'));
        return true;
    }

    /**
     * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
     * the total supply.
     *
     * Requirements
     *
     * - `msg.sender` must be the token owner
     */
    function mint(uint256 amount) public onlyOwner returns (bool) {
        _mint(_msgSender(), amount);
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer (address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), 'BEP20: transfer from the zero address');
        require(recipient != address(0), 'BEP20: transfer to the zero address');

        _balances[sender] = _balances[sender].sub(amount, 'BEP20: transfer amount exceeds balance');
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), 'BEP20: mint to the zero address');

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal {
        require(account != address(0), 'BEP20: burn from the zero address');

        _balances[account] = _balances[account].sub(amount, 'BEP20: burn amount exceeds balance');
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve (address owner, address spender, uint256 amount) internal {
        require(owner != address(0), 'BEP20: approve from the zero address');
        require(spender != address(0), 'BEP20: approve to the zero address');

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance'));
    }
}

// File: contracts\IUniswapV2Router01.sol

pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

// File: contracts\IUniswapV2Router02.sol

pragma solidity >=0.6.2;


interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

// File: contracts\IUniswapV2Pair.sol

pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

// File: contracts\IUniswapV2Factory.sol

pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

// File: contracts\VAULTWToken.sol

pragma solidity 0.6.12;





library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, 'EnumerableSet: index out of bounds');
        return set._values[index];
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

// VaultwToken with Governance.
contract VaultwToken is BEP20 {
    // Transfer tax rate in basis points. (default 2%)
    uint16 public transferTaxRate = 200;
    // Burn rate % of transfer tax. (default 100% x 2% = 2% of total amount).
    uint16 public burnRate = 100;
    // Max transfer tax rate: 10%.
    uint16 public constant MAXIMUM_TRANSFER_TAX_RATE = 1000;
    // Burn address
    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;

    // Max transfer amount rate in basis points. (default is 0.5% of total supply)
    uint16 public maxTransferAmountRate = 50;
    // Addresses that excluded from antiWhale
    mapping(address => bool) private _excludedFromAntiWhale;
    // Automatic swap and liquify enabled
    bool public swapAndLiquifyEnabled = false;
    // Min amount to liquify. (default 500 VAULTWs)
    uint256 public minAmountToLiquify = 500 ether;
    // The swap router, modifiable. Will be changed to VaultWorld's router when our own AMM release
    IUniswapV2Router02 public vaultworldRouter;
    // The trading pair
    address public vaultworldPair;
    // In swap and liquify
    bool private _inSwapAndLiquify;
    

    // The operator can only update the transfer tax rate
    address private _operator;

    EnumerableSet.AddressSet private _minters;
    EnumerableSet.AddressSet private _blockAddrs;

    // Events
    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);
    event TransferTaxRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event BurnRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event MaxTransferAmountRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event SwapAndLiquifyEnabledUpdated(address indexed operator, bool enabled);
    event MinAmountToLiquifyUpdated(address indexed operator, uint256 previousAmount, uint256 newAmount);
    event VaultWorldRouterUpdated(address indexed operator, address indexed router, address indexed pair);
    event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    modifier antiWhale(address sender, address recipient, uint256 amount) {
        if (maxTransferAmount() > 0) {
            if (
                _excludedFromAntiWhale[sender] == false
                && _excludedFromAntiWhale[recipient] == false
            ) {
                require(amount <= maxTransferAmount(), "VAULTW::antiWhale: Transfer amount exceeds the maxTransferAmount");
            }
        }
        _;
    }

    modifier lockTheSwap {
        _inSwapAndLiquify = true;
        _;
        _inSwapAndLiquify = false;
    }

    modifier transferTaxFree {
        uint16 _transferTaxRate = transferTaxRate;
        transferTaxRate = 0;
        _;
        transferTaxRate = _transferTaxRate;
    }

    /**
     * @notice Constructs the VAULTW Token contract.
     */
    constructor() public BEP20("VAULTWORLD", "VAULTW") {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);

        _excludedFromAntiWhale[msg.sender] = true;
        _excludedFromAntiWhale[address(0)] = true;
        _excludedFromAntiWhale[address(this)] = true;
        _excludedFromAntiWhale[BURN_ADDRESS] = true;
    }

    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyMinter returns(bool) {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
        return true;
    }

    /// @dev overrides transfer function to meet tokenomics of VAULTW
    function _transfer(address sender, address recipient, uint256 amount) internal virtual override antiWhale(sender, recipient, amount) {
        require(sender != address(0), "VAULTW::sender is not valid");
        require(!isBlockAddr(sender), "sender can't be blockaddr");
        require(!isBlockAddr(recipient), "recipient can't be blockaddr");

        // swap and liquify
        if (
            swapAndLiquifyEnabled == true
            && _inSwapAndLiquify == false
            && address(vaultworldRouter) != address(0)
            && vaultworldPair != address(0)
            && sender != vaultworldPair
            && sender != owner()
        ) {
            swapAndLiquify();
        }

        if (recipient == BURN_ADDRESS || transferTaxRate == 0) {
            super._transfer(sender, recipient, amount);
        } else {
            // default tax is 2% of every transfer
            uint256 taxAmount = amount.mul(transferTaxRate).div(10000);
            uint256 burnAmount = taxAmount.mul(burnRate).div(100);
            uint256 liquidityAmount = taxAmount.sub(burnAmount);
            require(taxAmount == burnAmount + liquidityAmount, "VAULTW::transfer: Burn value invalid");

            // default 98% of transfer sent to recipient
            uint256 sendAmount = amount.sub(taxAmount);
            require(amount == sendAmount + taxAmount, "VAULTW::transfer: Tax value invalid");

            super._transfer(sender, BURN_ADDRESS, burnAmount);
            super._transfer(sender, address(this), liquidityAmount);
            super._transfer(sender, recipient, sendAmount);
            amount = sendAmount;
        }
    }

    /// @dev Swap and liquify
    function swapAndLiquify() private lockTheSwap transferTaxFree {
        uint256 contractTokenBalance = balanceOf(address(this));
        uint256 maxTransferAmount = maxTransferAmount();
        contractTokenBalance = contractTokenBalance > maxTransferAmount ? maxTransferAmount : contractTokenBalance;

        if (contractTokenBalance >= minAmountToLiquify) {
            // only min amount to liquify
            uint256 liquifyAmount = minAmountToLiquify;

            // split the liquify amount into halves
            uint256 half = liquifyAmount.div(2);
            uint256 otherHalf = liquifyAmount.sub(half);

            // capture the contract's current ETH balance.
            // this is so that we can capture exactly the amount of ETH that the
            // swap creates, and not make the liquidity event include any ETH that
            // has been manually sent to the contract
            uint256 initialBalance = address(this).balance;

            // swap tokens for ETH
            swapTokensForEth(half);

            // how much ETH did we just swap into?
            uint256 newBalance = address(this).balance.sub(initialBalance);

            // add liquidity
            addLiquidity(otherHalf, newBalance);

            emit SwapAndLiquify(half, newBalance, otherHalf);
        }
    }

    /// @dev Swap tokens for eth
    function swapTokensForEth(uint256 tokenAmount) private {
        // generate the vaultworld pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = vaultworldRouter.WETH();

        _approve(address(this), address(vaultworldRouter), tokenAmount);

        // make the swap
        vaultworldRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }

    /// @dev Add liquidity
    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(vaultworldRouter), tokenAmount);

        // add the liquidity
        vaultworldRouter.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            operator(),
            block.timestamp
        );
    }

    /**
     * @dev Returns the max transfer amount.
     */
    function maxTransferAmount() public view returns (uint256) {
        return totalSupply().mul(maxTransferAmountRate).div(10000);
    }

    /**
     * @dev Returns the address is excluded from antiWhale or not.
     */
    function isExcludedFromAntiWhale(address _account) public view returns (bool) {
        return _excludedFromAntiWhale[_account];
    }

    // To receive BNB from vaultworldRouter when swapping
    receive() external payable {}

    /**
     * @dev Update the transfer tax rate.
     * Can only be called by the current operator.
     */
    function updateTransferTaxRate(uint16 _transferTaxRate) public onlyOperator {
        require(_transferTaxRate <= MAXIMUM_TRANSFER_TAX_RATE, "VAULTW::updateTransferTaxRate: Transfer tax rate must not exceed the maximum rate.");
        emit TransferTaxRateUpdated(msg.sender, transferTaxRate, _transferTaxRate);
        transferTaxRate = _transferTaxRate;
    }

    /**
     * @dev Update the burn rate.
     * Can only be called by the current operator.
     */
    function updateBurnRate(uint16 _burnRate) public onlyOperator {
        require(_burnRate <= 100, "VAULTW::updateBurnRate: Burn rate must not exceed the maximum rate.");
        emit BurnRateUpdated(msg.sender, burnRate, _burnRate);
        burnRate = _burnRate;
    }

    /**
     * @dev Update the max transfer amount rate.
     * Can only be called by the current operator.
     */
    function updateMaxTransferAmountRate(uint16 _maxTransferAmountRate) public onlyOperator {
        require(_maxTransferAmountRate <= 10000, "VAULTW::updateMaxTransferAmountRate: Max transfer amount rate must not exceed the maximum rate.");
        emit MaxTransferAmountRateUpdated(msg.sender, maxTransferAmountRate, _maxTransferAmountRate);
        maxTransferAmountRate = _maxTransferAmountRate;
    }

    /**
     * @dev Update the min amount to liquify.
     * Can only be called by the current operator.
     */
    function updateMinAmountToLiquify(uint256 _minAmount) public onlyOperator {
        emit MinAmountToLiquifyUpdated(msg.sender, minAmountToLiquify, _minAmount);
        minAmountToLiquify = _minAmount;
    }

    /**
     * @dev Exclude or include an address from antiWhale.
     * Can only be called by the current operator.
     */
    function setExcludedFromAntiWhale(address _account, bool _excluded) public onlyOperator {
        _excludedFromAntiWhale[_account] = _excluded;
    }

    /**
     * @dev Update the swapAndLiquifyEnabled.
     * Can only be called by the current operator.
     */
    function updateSwapAndLiquifyEnabled(bool _enabled) public onlyOperator {
        emit SwapAndLiquifyEnabledUpdated(msg.sender, _enabled);
        swapAndLiquifyEnabled = _enabled;
    }

    /**
     * @dev Update the swap router.
     * Can only be called by the current operator.
     */
    function updateVaultWorldRouter(address _router) public onlyOperator {
        vaultworldRouter = IUniswapV2Router02(_router);
        vaultworldPair = IUniswapV2Factory(vaultworldRouter.factory()).getPair(address(this), vaultworldRouter.WETH());
        require(vaultworldPair != address(0), "VAULTW::updateVaultWorldRouter: Invalid pair address.");
        emit VaultWorldRouterUpdated(msg.sender, address(vaultworldRouter), vaultworldPair);
    }

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

    /**
     * @dev Transfers operator of the contract to a new account (`newOperator`).
     * Can only be called by the current operator.
     */
    function transferOperator(address newOperator) public onlyOperator {
        require(newOperator != address(0), "VAULTW::transferOperator: new operator is the zero address");
        emit OperatorTransferred(_operator, newOperator);
        _operator = newOperator;
    }

    // Copied and modified from YAM code:
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
    // Which is copied and modified from COMPOUND:
    // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol

    /// @dev A record of each accounts delegate
    mapping (address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

      /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegator The address to get delegatee for
     */
    function delegates(address delegator)
        external
        view
        returns (address)
    {
        return _delegates[delegator];
    }

   /**
    * @notice Delegate votes from `msg.sender` to `delegatee`
    * @param delegatee The address to delegate votes to
    */
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint nonce,
        uint expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
    {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(
                DELEGATION_TYPEHASH,
                delegatee,
                nonce,
                expiry
            )
        );

        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                structHash
            )
        );

        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "VAULTW::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "VAULTW::delegateBySig: invalid nonce");
        require(now <= expiry, "VAULTW::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account)
        external
        view
        returns (uint256)
    {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint blockNumber)
        external
        view
        returns (uint256)
    {
        require(blockNumber < block.number, "VAULTW::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee)
        internal
    {
        address currentDelegate = _delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator); // balance of underlying VAULTWs (not scaled);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                // decrease old representative
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                // increase new representative
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    )
        internal
    {
        uint32 blockNumber = safe32(block.number, "VAULTW::_writeCheckpoint: block number exceeds 32 bits");

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function getChainId() internal pure returns (uint) {
        uint256 chainId;
        assembly { chainId := chainid() }
        return chainId;
    }

    function addMinter(address _addMinter) public onlyOwner returns (bool) {
        require(_addMinter != address(0), "VAULTW: _addMinter is the zero address");
        return EnumerableSet.add(_minters, _addMinter);
    }

    function delMinter(address _delMinter) public onlyOwner returns (bool) {
        require(_delMinter != address(0), "VAULTW: _delMinter is the zero address");
        return EnumerableSet.remove(_minters, _delMinter);
    }

    function getMinterLength() public view returns (uint256) {
        return EnumerableSet.length(_minters);
    }

    function isMinter(address account) public view returns (bool) {
        return EnumerableSet.contains(_minters, account);
    }

    function getMinter(uint256 _index) public view onlyOwner returns (address){
        require(_index <= getMinterLength() - 1, "VAULTW: index out of bounds");
        return EnumerableSet.at(_minters, _index);
    }

    // modifier for mint function
    modifier onlyMinter() {
        require(isMinter(msg.sender), "caller is not the minter");
        _;
    }
    
    function addBlockAddr(address _addBlockAddr) public onlyOwner returns (bool) {
        require(_addBlockAddr != address(0), "VAULTW: _addBlockAddr is the zero address");
        return EnumerableSet.add(_blockAddrs, _addBlockAddr);
    }

    function delBlockAddr(address _delblockAddr) public onlyOwner returns (bool) {
        require(_delblockAddr != address(0), "VAULTW: _delblockAddr is the zero address");
        return EnumerableSet.remove(_blockAddrs, _delblockAddr);
    }

    function getBlockAddrLength() public view returns (uint256) {
        return EnumerableSet.length(_blockAddrs);
    }

    function isBlockAddr(address account) public view returns (bool) {
        return EnumerableSet.contains(_blockAddrs, account);
    }

    function getBlockAddr(uint256 _index) public view onlyOwner returns (address){
        require(_index <= getBlockAddrLength() - 1, "VAULTW: index out of bounds");
        return EnumerableSet.at(_blockAddrs, _index);
    }

    // modifier for mint function
    modifier notBlockAddr() {
        require(!isBlockAddr(msg.sender), "caller is not the minter");
        _;
    }
}

// File: contracts\SmartChef.sol

pragma solidity 0.6.12;

// based on PanCakeSwap SmartChef contract
// added functionnalities by the vaultworld's devs
//
// - possibility to update reward per block
// - possibility to update end bonus block
// - possibility to update and add deposit fees






contract SmartChef is Ownable {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
    }

    // Info of each pool.
    struct PoolInfo {
        IBEP20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. VAULTWs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that VAULTWs distribution occurs.
        uint256 accVaultwPerShare; // Accumulated VAULTWs per share, times 1e12. See below.
        uint16 depositFeeBP;      // V1 Deposit fee in basis points
    }

    // The VAULTW TOKEN!
    VaultwToken public vaultw;
    IBEP20 public rewardToken;
    uint256 public rewardTokenDecimals;

    // VAULTW tokens created per block.
    uint256 public rewardPerBlock;
    
    // V1
    // Deposit burn address
    address public burnAddress;
    // V1
    // Deposit fee to burn
    uint16 public depositFeeToBurn;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (address => UserInfo) public userInfo;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 private totalAllocPoint = 0;
    // The block number when VAULTW mining starts.
    uint256 public startBlock;
    // The block number when VAULTW mining ends.
    uint256 public bonusEndBlock;
    // Deposited amount VAULTW in SmartChef
    uint256 public depositedVaultw;

    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);

    constructor(
        VaultwToken _vaultw,
        IBEP20 _rewardToken,
        uint256 _rewardTokenDecimals,
        uint256 _rewardPerBlock,
        address _burnAddress, // V1
        uint16 _depositFeeBP, // V1
        uint256 _startBlock,
        uint256 _bonusEndBlock
    ) public {
        vaultw = _vaultw;
        rewardToken = _rewardToken;
        rewardTokenDecimals = _rewardTokenDecimals;
        rewardPerBlock = _rewardPerBlock;
        burnAddress = _burnAddress; // V1
        depositFeeToBurn = _depositFeeBP; // V1
        startBlock = _startBlock;
        bonusEndBlock = _bonusEndBlock;

        // V1 / Deposit fee limited to 10% No way for contract owner to set higher deposit fee
        require(depositFeeToBurn <= 1000, "contract: invalid deposit fee basis points");

        // staking pool
        poolInfo.push(PoolInfo({
            lpToken: _vaultw,
            allocPoint: 1000,
            lastRewardBlock: startBlock,
            accVaultwPerShare: 0,
            depositFeeBP: depositFeeToBurn // V1
        }));

        totalAllocPoint = 1000;

    }

    function stopReward() public onlyOwner {
        bonusEndBlock = block.number;
    }


    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        if (_to <= bonusEndBlock) {
            return _to.sub(_from);
        } else if (_from >= bonusEndBlock) {
            return 0;
        } else {
            return bonusEndBlock.sub(_from);
        }
    }

    // View function to see pending Reward on frontend.
    function pendingReward(address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[_user];
        uint256 accVaultwPerShare = pool.accVaultwPerShare;
        // uint256 lpSupply = pool.lpToken.balanceOf(address(this));
	uint256 lpSupply = depositedVaultw;
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 vaultwReward = multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accVaultwPerShare = accVaultwPerShare.add(vaultwReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accVaultwPerShare).div(1e12).sub(user.rewardDebt);
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        // uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        uint256 lpSupply = depositedVaultw;
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 vaultwReward = multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        pool.accVaultwPerShare = pool.accVaultwPerShare.add(vaultwReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }


    // Stake VAULTW tokens to TheBushV1
    function deposit(uint256 _amount) public {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[msg.sender];

        updatePool(0);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accVaultwPerShare).div(1e12).sub(user.rewardDebt);
            uint256 pendingReward = pending.mul(10**rewardTokenDecimals).div(1e18);
            if(pending > 0) {
                rewardToken.safeTransfer(address(msg.sender), pendingReward);
            }
        }
        // V0
        //if(_amount > 0) {
        //    pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
        //    user.amount = user.amount.add(_amount);
        //}
        // V1 Add the possibility of deposit fees sent to burn address
        if(_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            if(pool.depositFeeBP > 0){
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                uint256 transferTax = _amount.mul(vaultw.transferTaxRate()).div(10000);
                pool.lpToken.safeTransfer(burnAddress, depositFee);
                user.amount = user.amount.add(_amount).sub(depositFee).sub(transferTax);
                depositedVaultw = depositedVaultw.add(_amount).sub(depositFee).sub(transferTax);
            }else{
                uint256 transferTax = _amount.mul(vaultw.transferTaxRate()).div(10000);
                user.amount = user.amount.add(_amount).sub(transferTax);
                depositedVaultw = depositedVaultw.add(_amount).sub(transferTax);
            }
        }        
        
        
        user.rewardDebt = user.amount.mul(pool.accVaultwPerShare).div(1e12);

        emit Deposit(msg.sender, _amount);
    }

    // Withdraw VAULTW tokens from STAKING.
    function withdraw(uint256 _amount) public {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(0);
        uint256 pending = user.amount.mul(pool.accVaultwPerShare).div(1e12).sub(user.rewardDebt);
        uint256 pendingReward = pending.mul(10**rewardTokenDecimals).div(1e18);
        if(pending > 0) {
            rewardToken.safeTransfer(address(msg.sender), pendingReward);
        }
        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
            depositedVaultw = depositedVaultw.sub(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accVaultwPerShare).div(1e12);

        emit Withdraw(msg.sender, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw() public {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[msg.sender];
        pool.lpToken.safeTransfer(address(msg.sender), user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
        emit EmergencyWithdraw(msg.sender, user.amount);
    }

    // Withdraw reward. EMERGENCY ONLY.
    function emergencyRewardWithdraw(uint256 _amount) public onlyOwner {
        require(_amount < rewardToken.balanceOf(address(this)), 'not enough token');
        rewardToken.safeTransfer(address(msg.sender), _amount);
    }
    
    // V1 Add a function to update rewardPerBlock. Can only be called by the owner.
    function updateRewardPerBlock(uint256 _rewardPerBlock) public onlyOwner {
        rewardPerBlock = _rewardPerBlock;
        //Automatically updatePool 0
        updatePool(0);        
    } 
    
    // V1 Add a function to update bonusEndBlock. Can only be called by the owner.
    function updateBonusEndBlock(uint256 _bonusEndBlock) public onlyOwner {
        bonusEndBlock = _bonusEndBlock;
    }   
    
    // V1 Update the given pool's deposit fee. Can only be called by the owner.
    function updateDepositFeeBP(uint256 _pid, uint16 _depositFeeBP) public onlyOwner {
        require(_depositFeeBP <= 10000, "updateDepositFeeBP: invalid deposit fee basis points");
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
        depositFeeToBurn = _depositFeeBP;
    }    
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract VaultwToken","name":"_vaultw","type":"address"},{"internalType":"contract IBEP20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardTokenDecimals","type":"uint256"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"address","name":"_burnAddress","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFeeToBurn","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositedVaultw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accVaultwPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTokenDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"}],"name":"updateBonusEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"}],"name":"updateDepositFeeBP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"updateRewardPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultw","outputs":[{"internalType":"contract VaultwToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060085534801561001557600080fd5b50604051611ab9380380611ab9833981810160405261010081101561003957600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015195969495939492939192909160006100766102c4565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b03199081166001600160a01b038b8116919091179092556002805482168a841617905560038890556004879055600580549091169186169190911761ffff60a01b1916600160a01b61ffff868116820292909217928390556009859055600a8490556103e892041611156101705760405162461bcd60e51b815260040180806020018281038252602a815260200180611a8f602a913960400191505060405180910390fd5b50506040805160a0810182526001600160a01b0397881681526103e86020820181815260095493830193845260006060840181815260058054600160a01b900461ffff9081166080880190815260068054600181018255955296517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9490920293840180546001600160a01b03191692909e1691909117909c5591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4082015593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d41850155517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4284015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d43909201805461ffff19169290981691909117909655505050600892909255506102c89050565b3390565b6117b8806102d76000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c8063715018a6116100de578063a4da982d11610097578063f0fe603f11610071578063f0fe603f146103b2578063f2fde38b146103cf578063f40f0f52146103f5578063f7c618c11461041b5761018e565b8063a4da982d1461036e578063b6b55f251461038d578063db2e21bc146103aa5761018e565b8063715018a61461032357806380dc06721461032b5780638ae39cac146103335780638da5cb5b1461033b5780638dbb1e3a146103435780639bdcecd1146103665761018e565b80631ef80fcc1161014b57806348cd4cb11161012557806348cd4cb1146102ee57806351eb05a6146102f6578063630b5ba11461031357806370d5ae051461031b5761018e565b80631ef80fcc146102ac5780632e1a7d4d146102b45780633279beab146102d15761018e565b806301f8a976146101935780630f203e79146101b2578063110d4ff5146101d65780631526fe27146101fd5780631959a002146102535780631aed655314610292575b600080fd5b6101b0600480360360208110156101a957600080fd5b5035610423565b005b6101ba61048d565b604080516001600160a01b039092168252519081900360200190f35b6101b0600480360360408110156101ec57600080fd5b508035906020013561ffff1661049c565b61021a6004803603602081101561021357600080fd5b5035610587565b604080516001600160a01b039096168652602086019490945284840192909252606084015261ffff166080830152519081900360a00190f35b6102796004803603602081101561026957600080fd5b50356001600160a01b03166105d3565b6040805192835260208301919091528051918290030190f35b61029a6105ec565b60408051918252519081900360200190f35b61029a6105f2565b6101b0600480360360208110156102ca57600080fd5b50356105f8565b6101b0600480360360208110156102e757600080fd5b5035610797565b61029a6108c3565b6101b06004803603602081101561030c57600080fd5b50356108c9565b6101b0610983565b6101ba6109a6565b6101b06109b5565b6101b0610a57565b61029a610ab5565b6101ba610abb565b61029a6004803603604081101561035957600080fd5b5080359060200135610aca565b61029a610b0a565b610376610b10565b6040805161ffff9092168252519081900360200190f35b6101b0600480360360208110156103a357600080fd5b5035610b21565b6101b0610e30565b6101b0600480360360208110156103c857600080fd5b5035610ec3565b6101b0600480360360208110156103e557600080fd5b50356001600160a01b0316610f20565b61029a6004803603602081101561040b57600080fd5b50356001600160a01b0316611018565b6101ba611103565b61042b611112565b6000546001600160a01b0390811691161461047b576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b600481905561048a60006108c9565b50565b6001546001600160a01b031681565b6104a4611112565b6000546001600160a01b039081169116146104f4576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b6127108161ffff1611156105395760405162461bcd60e51b815260040180806020018281038252603481526020018061174f6034913960400191505060405180910390fd5b806006838154811061054757fe5b60009182526020909120600591820201600401805461ffff191661ffff938416179055805461ffff60a01b1916600160a01b939092169290920217905550565b6006818154811061059457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909161ffff1685565b6007602052600090815260409020805460019091015482565b600a5481565b600b5481565b6000600660008154811061060857fe5b6000918252602080832033845260079091526040909220805460059092029092019250831115610674576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61067e60006108c9565b60006106b882600101546106b264e8d4a510006106ac8760030154876000015461111690919063ffffffff16565b90611176565b906111b8565b905060006106e0670de0b6b3a76400006106ac600354600a0a8561111690919063ffffffff16565b905081156106ff576002546106ff906001600160a01b031633836111fa565b841561073a57825461071190866111b8565b83558354610729906001600160a01b031633876111fa565b600b5461073690866111b8565b600b555b600384015483546107559164e8d4a51000916106ac91611116565b600184015560408051868152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a25050505050565b61079f611112565b6000546001600160a01b039081169116146107ef576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b600254604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561083a57600080fd5b505afa15801561084e573d6000803e3d6000fd5b505050506040513d602081101561086457600080fd5b505181106108ac576040805162461bcd60e51b815260206004820152601060248201526f3737ba1032b737bab3b4103a37b5b2b760811b604482015290519081900360640190fd5b60025461048a906001600160a01b031633836111fa565b60095481565b6000600682815481106108d857fe5b90600052602060002090600502019050806002015443116108f9575061048a565b600b548061090e57504360029091015561048a565b600061091e836002015443610aca565b9050600061094b6008546106ac86600101546109456004548761111690919063ffffffff16565b90611116565b905061096e610963846106ac8464e8d4a51000611116565b600386015490611251565b60038501555050436002909201919091555050565b60065460005b818110156109a25761099a816108c9565b600101610989565b5050565b6005546001600160a01b031681565b6109bd611112565b6000546001600160a01b03908116911614610a0d576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610a5f611112565b6000546001600160a01b03908116911614610aaf576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b43600a55565b60045481565b6000546001600160a01b031690565b6000600a548211610ae657610adf82846111b8565b9050610b04565b600a548310610af757506000610b04565b600a54610adf90846111b8565b92915050565b60035481565b600554600160a01b900461ffff1681565b60006006600081548110610b3157fe5b60009182526020808320338452600790915260408320600590920201925090610b59906108c9565b805415610bd8576000610b8e82600101546106b264e8d4a510006106ac8760030154876000015461111690919063ffffffff16565b90506000610bb6670de0b6b3a76400006106ac600354600a0a8561111690919063ffffffff16565b90508115610bd557600254610bd5906001600160a01b031633836111fa565b50505b8215610dd5578154610bf5906001600160a01b03163330866112ab565b600482015461ffff1615610d16576004820154600090610c2290612710906106ac90879061ffff16611116565b90506000610cb46127106106ac600160009054906101000a90046001600160a01b03166001600160a01b031663b65d08b06040518163ffffffff1660e01b815260040160206040518083038186803b158015610c7d57600080fd5b505afa158015610c91573d6000803e3d6000fd5b505050506040513d6020811015610ca757600080fd5b5051889061ffff16611116565b6005548554919250610cd3916001600160a01b039081169116846111fa565b610cf2816106b2846106b289886000015461125190919063ffffffff16565b8355600b54610d0b9082906106b290859082908a611251565b600b5550610dd59050565b6000610da66127106106ac600160009054906101000a90046001600160a01b03166001600160a01b031663b65d08b06040518163ffffffff1660e01b815260040160206040518083038186803b158015610d6f57600080fd5b505afa158015610d83573d6000803e3d6000fd5b505050506040513d6020811015610d9957600080fd5b5051879061ffff16611116565b8254909150610dbb9082906106b29087611251565b8255600b54610dd09082906106b29087611251565b600b55505b60038201548154610df09164e8d4a51000916106ac91611116565b600182015560408051848152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2505050565b60006006600081548110610e4057fe5b600091825260208083203380855260079092526040909320805460059093029093018054909450610e7e926001600160a01b039190911691906111fa565b600080825560018201819055604080519182525133917f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695919081900360200190a25050565b610ecb611112565b6000546001600160a01b03908116911614610f1b576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b600a55565b610f28611112565b6000546001600160a01b03908116911614610f78576040805162461bcd60e51b8152602060048201819052602482015260008051602061172f833981519152604482015290519081900360640190fd5b6001600160a01b038116610fbd5760405162461bcd60e51b81526004018080602001828103825260268152602001806116c26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600660008154811061102957fe5b600091825260208083206001600160a01b0387168452600790915260409092206003600590920290920190810154600b54600283015492945090914311801561107157508015155b156110d1576000611086856002015443610aca565b905060006110ad6008546106ac88600101546109456004548761111690919063ffffffff16565b90506110cc6110c5846106ac8464e8d4a51000611116565b8590611251565b935050505b6110f983600101546106b264e8d4a510006106ac86886000015461111690919063ffffffff16565b9695505050505050565b6002546001600160a01b031681565b3390565b60008261112557506000610b04565b8282028284828161113257fe5b041461116f5760405162461bcd60e51b815260040180806020018281038252602181526020018061170e6021913960400191505060405180910390fd5b9392505050565b600061116f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061130b565b600061116f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113ad565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261124c908490611407565b505050565b60008282018381101561116f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611305908590611407565b50505050565b600081836113975760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561135c578181015183820152602001611344565b50505050905090810190601f1680156113895780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816113a357fe5b0495945050505050565b600081848411156113ff5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561135c578181015183820152602001611344565b505050900390565b606061145c826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114b89092919063ffffffff16565b80519091501561124c5780806020019051602081101561147b57600080fd5b505161124c5760405162461bcd60e51b815260040180806020018281038252602a815260200180611698602a913960400191505060405180910390fd5b60606114c784846000856114cf565b949350505050565b6060824710156115105760405162461bcd60e51b81526004018080602001828103825260268152602001806116e86026913960400191505060405180910390fd5b6115198561162b565b61156a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106115a95780518252601f19909201916020918201910161158a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461160b576040519150601f19603f3d011682016040523d82523d6000602084013e611610565b606091505b5091509150611620828286611631565b979650505050505050565b3b151590565b6060831561164057508161116f565b8251156116505782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561135c57818101518382015260200161134456fe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727570646174654465706f73697446656542503a20696e76616c6964206465706f7369742066656520626173697320706f696e7473a26469706673582212202d945b1f920c5db9e4d96de600c274d9c680c85e2e60d51bf6c9d46abb76cdd664736f6c634300060c0033636f6e74726163743a20696e76616c6964206465706f7369742066656520626173697320706f696e74730000000000000000000000008274921e9d4a53b9aef220a7e69251c2dd99641600000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7500000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000820ec833f000000000000000000000000000000000000000000000000000000000000000dead000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000123625900000000000000000000000000000000000000000000000000000000012e10b9

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

0000000000000000000000008274921e9d4a53b9aef220a7e69251c2dd99641600000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7500000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000820ec833f000000000000000000000000000000000000000000000000000000000000000dead000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000123625900000000000000000000000000000000000000000000000000000000012e10b9

-----Decoded View---------------
Arg [0] : _vaultw (address): 0x8274921e9d4a53b9aef220a7e69251c2dd996416
Arg [1] : _rewardToken (address): 0x04068da6c83afcfa0e13ba15a6696662335d5b75
Arg [2] : _rewardTokenDecimals (uint256): 18
Arg [3] : _rewardPerBlock (uint256): 143000000000000
Arg [4] : _burnAddress (address): 0x000000000000000000000000000000000000dead
Arg [5] : _depositFeeBP (uint16): 300
Arg [6] : _startBlock (uint256): 19096153
Arg [7] : _bonusEndBlock (uint256): 19796153

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000008274921e9d4a53b9aef220a7e69251c2dd996416
Arg [1] : 00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 0000000000000000000000000000000000000000000000000000820ec833f000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000dead
Arg [5] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [6] : 0000000000000000000000000000000000000000000000000000000001236259
Arg [7] : 00000000000000000000000000000000000000000000000000000000012e10b9


Deployed ByteCode Sourcemap

71577:9829:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80610:193;;;;;;;;;;;;;;;;-1:-1:-1;80610:193:0;;:::i;:::-;;72409:25;;;:::i;:::-;;;;-1:-1:-1;;;;;72409:25:0;;;;;;;;;;;;;;81115:284;;;;;;;;;;;;;;;;-1:-1:-1;81115:284:0;;;;;;;;;:::i;72777:26::-;;;;;;;;;;;;;;;;-1:-1:-1;72777:26:0;;:::i;:::-;;;;-1:-1:-1;;;;;72777:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;72859:45;;;;;;;;;;;;;;;;-1:-1:-1;72859:45:0;-1:-1:-1;;;;;72859:45:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;73175:28;;;:::i;:::-;;;;;;;;;;;;;;;;73255:30;;;:::i;78959:879::-;;;;;;;;;;;;;;;;-1:-1:-1;78959:879:0;;:::i;80287:226::-;;;;;;;;;;;;;;;;-1:-1:-1;80287:226:0;;:::i;73093:25::-;;;:::i;76016:743::-;;;;;;;;;;;;;;;;-1:-1:-1;76016:743:0;;:::i;76842:180::-;;;:::i;72639:26::-;;;:::i;8037:148::-;;;:::i;74610:86::-;;;:::i;72557:29::-;;;:::i;7395:79::-;;;:::i;74774:306::-;;;;;;;;;;;;;;;;-1:-1:-1;74774:306:0;;;;;;;:::i;72473:34::-;;;:::i;72711:30::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;77073:1833;;;;;;;;;;;;;;;;-1:-1:-1;77073:1833:0;;:::i;79909:329::-;;;:::i;80900:119::-;;;;;;;;;;;;;;;;-1:-1:-1;80900:119:0;;:::i;8340:244::-;;;;;;;;;;;;;;;;-1:-1:-1;8340:244:0;-1:-1:-1;;;;;8340:244:0;;:::i;75145:795::-;;;;;;;;;;;;;;;;-1:-1:-1;75145:795:0;-1:-1:-1;;;;;75145:795:0;;:::i;72441:25::-;;;:::i;80610:193::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;80693:14:::1;:32:::0;;;80774:13:::1;80785:1;80774:10;:13::i;:::-;80610:193:::0;:::o;72409:25::-;;;-1:-1:-1;;;;;72409:25:0;;:::o;81115:284::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;81232:5:::1;81215:13;:22;;;;81207:87;;;;-1:-1:-1::0;;;81207:87:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81335:13;81305:8;81314:4;81305:14;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:27;;:43:::0;;-1:-1:-1;;81305:43:0::1;;::::0;;::::1;;::::0;;81359:32;;-1:-1:-1;;;;81359:32:0::1;-1:-1:-1::0;;;81359:32:0;;;::::1;::::0;;;::::1;;::::0;;-1:-1:-1;81115:284:0:o;72777:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;72777:26:0;;;;-1:-1:-1;72777:26:0;;;;;;;:::o;72859:45::-;;;;;;;;;;;;;;;;;;;:::o;73175:28::-;;;;:::o;73255:30::-;;;;:::o;78959:879::-;79012:21;79036:8;79045:1;79036:11;;;;;;;;;;;;;;;;79091:10;79082:20;;:8;:20;;;;;;;79121:11;;79036;;;;;;;;-1:-1:-1;79121:22:0;-1:-1:-1;79121:22:0;79113:53;;;;;-1:-1:-1;;;79113:53:0;;;;;;;;;;;;-1:-1:-1;;;79113:53:0;;;;;;;;;;;;;;;79177:13;79188:1;79177:10;:13::i;:::-;79201:15;79219:70;79273:4;:15;;;79219:49;79263:4;79219:39;79235:4;:22;;;79219:4;:11;;;:15;;:39;;;;:::i;:::-;:43;;:49::i;:::-;:53;;:70::i;:::-;79201:88;;79300:21;79324:46;79365:4;79324:36;79340:19;;79336:2;:23;79324:7;:11;;:36;;;;:::i;:46::-;79300:70;-1:-1:-1;79384:11:0;;79381:103;;79412:11;;:60;;-1:-1:-1;;;;;79412:11:0;79445:10;79458:13;79412:24;:60::i;:::-;79497:11;;79494:212;;79539:11;;:24;;79555:7;79539:15;:24::i;:::-;79525:38;;79578:12;;:55;;-1:-1:-1;;;;;79578:12:0;79612:10;79625:7;79578:25;:55::i;:::-;79666:15;;:28;;79686:7;79666:19;:28::i;:::-;79648:15;:46;79494:212;79750:22;;;;79734:11;;:49;;79778:4;;79734:39;;:15;:39::i;:49::-;79716:15;;;:67;79801:29;;;;;;;;79810:10;;79801:29;;;;;;;;;;78959:879;;;;;:::o;80287:226::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;80383:11:::1;::::0;:36:::1;::::0;;-1:-1:-1;;;80383:36:0;;80413:4:::1;80383:36;::::0;::::1;::::0;;;-1:-1:-1;;;;;80383:11:0;;::::1;::::0;:21:::1;::::0;:36;;;;;::::1;::::0;;;;;;;;;:11;:36;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;80383:36:0;80373:46;::::1;80365:75;;;::::0;;-1:-1:-1;;;80365:75:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;80365:75:0;;;;;;;;;;;;;::::1;;80451:11;::::0;:54:::1;::::0;-1:-1:-1;;;;;80451:11:0::1;80484:10;80497:7:::0;80451:24:::1;:54::i;73093:25::-:0;;;;:::o;76016:743::-;76068:21;76092:8;76101:4;76092:14;;;;;;;;;;;;;;;;;;76068:38;;76137:4;:20;;;76121:12;:36;76117:75;;76174:7;;;76117:75;76291:15;;76321:13;76317:102;;-1:-1:-1;76374:12:0;76351:20;;;;:35;76401:7;;76317:102;76429:18;76450:49;76464:4;:20;;;76486:12;76450:13;:49::i;:::-;76429:70;;76510:20;76533:72;76589:15;;76533:51;76568:4;:15;;;76533:30;76548:14;;76533:10;:14;;:30;;;;:::i;:::-;:34;;:51::i;:72::-;76510:95;-1:-1:-1;76641:64:0;76668:36;76695:8;76668:22;76510:95;76685:4;76668:16;:22::i;:36::-;76641:22;;;;;:26;:64::i;:::-;76616:22;;;:89;-1:-1:-1;;76739:12:0;76716:20;;;;:35;;;;-1:-1:-1;76016:743:0;:::o;76842:180::-;76904:8;:15;76887:14;76930:85;76958:6;76952:3;:12;76930:85;;;76988:15;76999:3;76988:10;:15::i;:::-;76966:5;;76930:85;;;;76842:180;:::o;72639:26::-;;;-1:-1:-1;;;;;72639:26:0;;:::o;8037:148::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;8144:1:::1;8128:6:::0;;8107:40:::1;::::0;-1:-1:-1;;;;;8128:6:0;;::::1;::::0;8107:40:::1;::::0;8144:1;;8107:40:::1;8175:1;8158:19:::0;;-1:-1:-1;;;;;;8158:19:0::1;::::0;;8037:148::o;74610:86::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;74676:12:::1;74660:13;:28:::0;74610:86::o;72557:29::-;;;;:::o;7395:79::-;7433:7;7460:6;-1:-1:-1;;;;;7460:6:0;7395:79;:::o;74774:306::-;74846:7;74877:13;;74870:3;:20;74866:207;;74914:14;:3;74922:5;74914:7;:14::i;:::-;74907:21;;;;74866:207;74959:13;;74950:5;:22;74946:127;;-1:-1:-1;74996:1:0;74989:8;;74946:127;75037:13;;:24;;75055:5;75037:17;:24::i;74946:127::-;74774:306;;;;:::o;72473:34::-;;;;:::o;72711:30::-;;;-1:-1:-1;;;72711:30:0;;;;;:::o;77073:1833::-;77125:21;77149:8;77158:1;77149:11;;;;;;;;;;;;;;;;77204:10;77195:20;;:8;:20;;;;;;77149:11;;;;;;-1:-1:-1;77195:20:0;77228:13;;:10;:13::i;:::-;77256:11;;:15;77252:346;;77288:15;77306:70;77360:4;:15;;;77306:49;77350:4;77306:39;77322:4;:22;;;77306:4;:11;;;:15;;:39;;;;:::i;:70::-;77288:88;;77391:21;77415:46;77456:4;77415:36;77431:19;;77427:2;:23;77415:7;:11;;:36;;;;:::i;:46::-;77391:70;-1:-1:-1;77479:11:0;;77476:111;;77511:11;;:60;;-1:-1:-1;;;;;77511:11:0;77544:10;77557:13;77511:24;:60::i;:::-;77252:346;;;77886:11;;77883:864;;77914:12;;:74;;-1:-1:-1;;;;;77914:12:0;77952:10;77973:4;77980:7;77914:29;:74::i;:::-;78006:17;;;;;;:21;78003:733;;78080:17;;;;78047:18;;78068:41;;78103:5;;78068:30;;:7;;78080:17;;78068:11;:30::i;:41::-;78047:62;;78128:19;78150:48;78192:5;78150:37;78162:6;;;;;;;;;-1:-1:-1;;;;;78162:6:0;-1:-1:-1;;;;;78162:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;78162:24:0;78150:7;;:37;;:11;:37::i;:48::-;78243:11;;78217:12;;78128:70;;-1:-1:-1;78217:50:0;;-1:-1:-1;;;;;78217:12:0;;;;78243:11;78256:10;78217:25;:50::i;:::-;78300:57;78345:11;78300:40;78329:10;78300:24;78316:7;78300:4;:11;;;:15;;:24;;;;:::i;:57::-;78286:71;;78394:15;;:61;;78443:11;;78394:44;;78427:10;;78394:44;;78414:7;78394:19;:28::i;:61::-;78376:15;:79;-1:-1:-1;78003:733:0;;-1:-1:-1;78003:733:0;;78494:19;78516:48;78558:5;78516:37;78528:6;;;;;;;;;-1:-1:-1;;;;;78528:6:0;-1:-1:-1;;;;;78528:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;78528:24:0;78516:7;;:37;;:11;:37::i;:48::-;78597:11;;78494:70;;-1:-1:-1;78597:41:0;;78494:70;;78597:24;;78613:7;78597:15;:24::i;:41::-;78583:55;;78675:15;;:45;;78708:11;;78675:28;;78695:7;78675:19;:28::i;:45::-;78657:15;:63;-1:-1:-1;78003:733:0;78819:22;;;;78803:11;;:49;;78847:4;;78803:39;;:15;:39::i;:49::-;78785:15;;;:67;78870:28;;;;;;;;78878:10;;78870:28;;;;;;;;;;77073:1833;;;:::o;79909:329::-;79956:21;79980:8;79989:1;79980:11;;;;;;;;;;;;;;;;80035:10;80026:20;;;:8;:20;;;;;;;80104:11;;79980;;;;;;;80057:12;;79980:11;;-1:-1:-1;80057:59:0;;-1:-1:-1;;;;;80057:12:0;;;;;80035:10;80057:25;:59::i;:::-;80141:1;80127:15;;;80153;;;:19;;;80188:42;;;;;;;80206:10;;80188:42;;;;;;;;;;79909:329;;:::o;80900:119::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;80981:13:::1;:30:::0;80900:119::o;8340:244::-;7617:12;:10;:12::i;:::-;7607:6;;-1:-1:-1;;;;;7607:6:0;;;:22;;;7599:67;;;;;-1:-1:-1;;;7599:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7599:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;8429:22:0;::::1;8421:73;;;;-1:-1:-1::0;;;8421:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8531:6;::::0;;8510:38:::1;::::0;-1:-1:-1;;;;;8510:38:0;;::::1;::::0;8531:6;::::1;::::0;8510:38:::1;::::0;::::1;8559:6;:17:::0;;-1:-1:-1;;;;;;8559:17:0::1;-1:-1:-1::0;;;;;8559:17:0;;;::::1;::::0;;;::::1;::::0;;8340:244::o;75145:795::-;75206:7;75226:21;75250:8;75259:1;75250:11;;;;;;;;;;;;;;;;-1:-1:-1;;;;;75296:15:0;;;;:8;:15;;;;;;;75350:22;75250:11;;;;;;;75350:22;;;;75465:15;;75510:20;;;;75250:11;;-1:-1:-1;75350:22:0;;75495:12;:35;:52;;;;-1:-1:-1;75534:13:0;;;75495:52;75491:359;;;75564:18;75585:49;75599:4;:20;;;75621:12;75585:13;:49::i;:::-;75564:70;;75649:20;75672:72;75728:15;;75672:51;75707:4;:15;;;75672:30;75687:14;;75672:10;:14;;:30;;;;:::i;:72::-;75649:95;-1:-1:-1;75779:59:0;75801:36;75828:8;75801:22;75649:95;75818:4;75801:16;:22::i;:36::-;75779:17;;:21;:59::i;:::-;75759:79;;75491:359;;;75867:65;75916:4;:15;;;75867:44;75906:4;75867:34;75883:17;75867:4;:11;;;:15;;:34;;;;:::i;:65::-;75860:72;75145:795;-1:-1:-1;;;;;;75145:795:0:o;72441:25::-;;;-1:-1:-1;;;;;72441:25:0;;:::o;5951:106::-;6039:10;5951:106;:::o;2229:471::-;2287:7;2532:6;2528:47;;-1:-1:-1;2562:1:0;2555:8;;2528:47;2599:5;;;2603:1;2599;:5;:1;2623:5;;;;;:10;2615:56;;;;-1:-1:-1;;;2615:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2691:1;2229:471;-1:-1:-1;;;2229:471:0:o;3176:132::-;3234:7;3261:39;3265:1;3268;3261:39;;;;;;;;;;;;;;;;;:3;:39::i;1339:136::-;1397:7;1424:43;1428:1;1431;1424:43;;;;;;;;;;;;;;;;;:3;:43::i;19416:177::-;19526:58;;;-1:-1:-1;;;;;19526:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19526:58:0;-1:-1:-1;;;19526:58:0;;;19499:86;;19519:5;;19499:19;:86::i;:::-;19416:177;;;:::o;875:181::-;933:7;965:5;;;989:6;;;;981:46;;;;;-1:-1:-1;;;981:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;19601:205;19729:68;;;-1:-1:-1;;;;;19729:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19729:68:0;-1:-1:-1;;;19729:68:0;;;19702:96;;19722:5;;19702:19;:96::i;:::-;19601:205;;;;:::o;3804:278::-;3890:7;3925:12;3918:5;3910:28;;;;-1:-1:-1;;;3910:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3949:9;3965:1;3961;:5;;;;;;;3804:278;-1:-1:-1;;;;;3804:278:0:o;1778:192::-;1864:7;1900:12;1892:6;;;;1884:29;;;;-1:-1:-1;;;1884:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1936:5:0;;;1778:192::o;21721:761::-;22145:23;22171:69;22199:4;22171:69;;;;;;;;;;;;;;;;;22179:5;-1:-1:-1;;;;;22171:27:0;;;:69;;;;;:::i;:::-;22255:17;;22145:95;;-1:-1:-1;22255:21:0;22251:224;;22397:10;22386:30;;;;;;;;;;;;;;;-1:-1:-1;22386:30:0;22378:85;;;;-1:-1:-1;;;22378:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15439:195;15542:12;15574:52;15596:6;15604:4;15610:1;15613:12;15574:21;:52::i;:::-;15567:59;15439:195;-1:-1:-1;;;;15439:195:0:o;16491:530::-;16618:12;16676:5;16651:21;:30;;16643:81;;;;-1:-1:-1;;;16643:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16743:18;16754:6;16743:10;:18::i;:::-;16735:60;;;;;-1:-1:-1;;;16735:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16869:12;16883:23;16910:6;-1:-1:-1;;;;;16910:11:0;16930:5;16938:4;16910:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16910:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16868:75;;;;16961:52;16979:7;16988:10;17000:12;16961:17;:52::i;:::-;16954:59;16491:530;-1:-1:-1;;;;;;;16491:530:0:o;12521:422::-;12888:20;12927:8;;;12521:422::o;18027:742::-;18142:12;18171:7;18167:595;;;-1:-1:-1;18202:10:0;18195:17;;18167:595;18316:17;;:21;18312:439;;18579:10;18573:17;18640:15;18627:10;18623:2;18619:19;18612:44;18527:148;18715:20;;-1:-1:-1;;;18715:20:0;;;;;;;;;;;;;;;;;18722:12;;18715:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://2d945b1f920c5db9e4d96de600c274d9c680c85e2e60d51bf6c9d46abb76cdd6
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.