Contract 0x92f347adb3a2c3fd336dce60242cde126711b9a3

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x32d68d85883030253e40dd309c9339848edfc293dec548cb651a0732412ae09554862112021-03-08 0:23:3024 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x76b4b7fdd9322368c3a02ae1b271d552fa561fb7be7bac1944bef6c37edfb04e54838072021-03-07 22:23:182 hrs 24 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x522adec483967bbe54788a4b7e75622f8265221ddacc9d077eb890efd6162bc554825822021-03-07 21:22:033 hrs 26 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0xa6616ae284fc73fa5ee6ebb31a13c6633ea5b88bbb2f73dd2c0c5f4f0f60a31b54801992021-03-07 19:22:545 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x4caf7e3f65e42294a3a821dae53052c46a5c91584a400dfac97f7ad3be70a3fa54777922021-03-07 17:22:337 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0x5c21f0c9a6edfa75fd9217827b1acc7712b9027a06ad0d1e2969e71dcedf4c2054753922021-03-07 15:22:339 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x144bc415ba0ecf8987e31ec0929d54e1128af9c1fe23784082a5c0caa37c57c554741892021-03-07 14:22:2410 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0xb965cc9d1f9a0b592ae890030f71de4cde79b03a93bb31cfc1c286ae1f973d1554717942021-03-07 12:22:3912 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x3d0e1654cf0377ad3d173df061ce8a83e1be940a09397d0883cbff7be8446aae54694032021-03-07 10:23:0614 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0x334454fadf3989dea4889ab8c55847c18da89e2aec944606e2a5db2c4279833854669862021-03-07 8:22:1516 hrs 26 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0xe795528375f161d13aa916ef19e0ddd4b2967884b7e431decfa2f3f5555f060454646032021-03-07 6:23:0618 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0xe2077e0af8b8b23bcf5ed61033e745d34b7c005a626c602c659395b3aaa9467354622082021-03-07 4:23:1120 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x8d82a3c660527db9571ecb2c51181437860b8ea46eb7a9ceaf0530dbecbb631254598052021-03-07 2:23:0222 hrs 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0xdcdc105bb4d5609fad8a0fc0ebdadca3f07e9a114fbfc795bbef00dcde187f0854578902021-03-07 0:47:171 day ago0x45c9563c114060fa6d0e7b46e6746c55bcf0c37d IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.0002309
0xcff0de5fac5ed094556aa786f69df5afd74cb8bda7789e89ade3eda719b0674354574052021-03-07 0:23:001 day 25 mins ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0x02f462719218b2b8fc729b505c953fc72abb3d1fb884c4d2e92a10516a9276cc54549922021-03-06 22:22:211 day 2 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x2855b3a6ca528960ea14d9adaf4bab5a115b930ecfe095bb4ea5d168619c527b54528112021-03-06 20:33:181 day 4 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0xdbe548cd98967d6c1825e1d8aa4d996b6e219dab923bc0c50bfd611bb6bfc3c154515942021-03-06 19:32:271 day 5 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x161c867f8379525a632ebdd3c3dc6a1789eca2b589610f3b71e312c207121ddc54492072021-03-06 17:32:331 day 7 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0xcef7f9598160e6d7f289d5dc69fee498781a912e7ad6bd49a5903b235b782c7a54480052021-03-06 16:31:421 day 8 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x51da0e52f227983efa7ee5e8e50eb518004ce9a44c6477a1aa113ff3422370af54456132021-03-06 14:32:061 day 10 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00232301
0x7b8d00177efd284437baee47062c3aa275b5ee0ee8899ef21e1eb45720ad7d8c54444062021-03-06 13:31:451 day 11 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x1ab99deea32fd6590931e2b7cc6251ef0a7483bd00b1600509f7c12f8d7a9e8254431982021-03-06 12:31:211 day 12 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x0290bb093c5e0a9d33642b589d182a25dd951d63b468fdbd74b108f37353c33f54408102021-03-06 10:31:471 day 14 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
0x50948cea662b238804e9b820460989cc9e6457d1c2d07bec236dd6befe43ee0154384192021-03-06 8:32:141 day 16 hrs ago0xd529b1894491a0a26b18939274ae8ede93e81dba IN  0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB0.00243101
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0xf7069e41c57ecc5f122093811d8c75bdb5f7c14e 0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
0x38268cb4ddbef320a22a4e2210dc3fda44ac075ed70c33001117fe179f93fa8654712962021-03-07 11:57:4512 hrs 50 mins ago 0xf7069e41c57ecc5f122093811d8c75bdb5f7c14e 0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0xf7069e41c57ecc5f122093811d8c75bdb5f7c14e 0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
0x011028853f78026529705b1774d627ff150fb0c9dfdd64c76d4c7cf40a1d787954712382021-03-07 11:54:5112 hrs 53 mins ago 0xf7069e41c57ecc5f122093811d8c75bdb5f7c14e 0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0xf7069e41c57ecc5f122093811d8c75bdb5f7c14e 0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 Beefy.Finance: BIFI Token0 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
0x197af7e2f27ce400071d5b507f7ecb33452e197da2e09b2fecd7b19dde1481af54710942021-03-07 11:47:3913 hrs ago 0xf7069e41c57ecc5f122093811d8c75bdb5f7c14e 0x92f347adb3a2c3fd336dce60242cde126711b9a30 BNB
0xb2d9e66c4f76d52c72a1089f7bb3e26d916fa225ffaaa76c5a9a22b817e3018054710892021-03-07 11:47:2413 hrs ago 0x92f347adb3a2c3fd336dce60242cde126711b9a3 0x453d4ba9a2d594314df88564248497f7d74d6b2c0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrategyBifiMaxi

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2020-11-27
*/

// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/GSN/Context.sol


pragma solidity ^0.6.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: @openzeppelin/contracts/access/Ownable.sol


pragma solidity ^0.6.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.
 */
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: @openzeppelin/contracts/token/ERC20/IERC20.sol


pragma solidity ^0.6.0;

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

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

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

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

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

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

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

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

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


pragma solidity ^0.6.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

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


pragma solidity ^0.6.2;

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

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

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

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

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

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

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

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

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

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

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

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


pragma solidity ^0.6.0;





/**
 * @dev Implementation of the {IERC20} 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 {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-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 ERC20 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 {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    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 name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

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

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

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

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

    /**
     * @dev See {IERC20-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 virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

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

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * 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 virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: 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 {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual 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 {IERC20-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 virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        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), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: 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 virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _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 virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: 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 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 virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

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


pragma solidity ^0.6.0;




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

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

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

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

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

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

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

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

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


pragma solidity ^0.6.0;


/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!_paused, "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(_paused, "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// File: contracts/BIFI/interfaces/common/IWBNB.sol


pragma solidity ^0.6.0;

interface IWBNB {
    function deposit() external payable;
    function withdraw(uint wad) external;
}

// File: contracts/BIFI/interfaces/thugs/IThugswapRouter.sol


pragma solidity ^0.6.0;

interface IThugswapRouter {
    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 addLiquidityBNB(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountBNB, 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 removeLiquidityBNB(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountBNB);

    function swapExactTokensForTokens(
        uint amountIn, 
        uint amountOutMin, 
        address[] calldata path, 
        address to, 
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactBNBForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    
    function swapExactTokensForBNB(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
}

// File: contracts/BIFI/interfaces/beefy/IRewardPool.sol


pragma solidity ^0.6.0;

interface IRewardPool {
    function stake(uint256 amount) external;
    function withdraw(uint256 amount) external;
    function getReward() external;
    function balanceOf(address account) external view returns (uint256);
}

// File: contracts/BIFI/strategies/BIFI/StrategyBifiMaxi.sol


pragma solidity ^0.6.0;










/**
 * @dev BIFI MAXIMALIST STRATEGY. DEPOSIT BIFI. USE THE BNB REWARDS TO GET MORE BIFI!
 */
contract StrategyBifiMaxi is Ownable, Pausable {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    /**
     * @dev Tokens Used:
     * {wbnb} - The token that rewards are paid in.
     * {bifi} - BeefyFinance token. The token this strategy looks to maximize.
     */
    address constant public wbnb = address(0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c);
    address constant public bifi = address(0xCa3F508B8e4Dd382eE878A314789373D80A5190A);

    /**
     * @dev Third Party Contracts:
     * {unirouter} - Streetswap router to use as AMM.
     */
    address constant public unirouter = address(0x3bc677674df90A9e5D741f28f6CA303357D0E4Ec);

    /**
     * @dev Beefy Contracts:
     * {rewards} - Reward pool where the {bifi} is staked.
     * {vault} - Address of the vault that controls the strategy's funds.
     */
    address constant public rewards  = address(0x453D4Ba9a2D594314DF88564248497F7D74d6b2C);
    address public vault;

    /**
     * @dev Distribution of fees earned. This allocations relative to the % implemented on chargeFees().
     * Current implementation separates 1% total for fees.
     *
     * {REWARDS_FEE} - 0.5% goes to BIFI holders through the {rewards} pool.
     * {CALL_FEE} - 0.5% goes to pay for harvest execution.
     * {MAX_FEE} - Aux const used to safely calc the correct amounts.
     * 
     * {WITHDRAWAL_FEE} - Fee taxed when a user withdraws funds. 5 === 0.05% fee.
     * {WITHDRAWAL_MAX} - Aux const used to safely calc the correct amounts.
     */
    uint constant public REWARDS_FEE  = 5;
    uint constant public CALL_FEE     = 5;
    uint constant public MAX_FEE      = 1000;

    uint constant public WITHDRAWAL_FEE = 5;
    uint constant public WITHDRAWAL_MAX = 10000;

    /**
     * @dev Routes we take to swap tokens using Thugswap.
     * {wbnbToBifiRoute} - Route we take to get from {wbnb} into {bifi}.
     */
    address[] public wbnbToBifiRoute = [wbnb, bifi];
  
    /**
     * @dev Initializes the strategy with the token to maximize.
     */
    constructor(address _vault) public {
        vault = _vault;

        IERC20(wbnb).safeApprove(unirouter, uint(-1));
        IERC20(bifi).safeApprove(rewards, uint(-1));
    }
    
    /**
     * @dev Function that puts the funds to work.
     * It gets called whenever someone deposits in the strategy's vault contract.
     * It stakes the received {bifi} into the {rewards} pool.
     */
    function deposit() public whenNotPaused {
        uint256 bifiBal = IERC20(bifi).balanceOf(address(this));

        if (bifiBal > 0) {
            IRewardPool(rewards).stake(bifiBal);
        }
    }

    /**
     * @dev Withdraws funds and sends them back to the vault.
     * It withdraws {bifi} from the {rewards} pool.
     * The available {bifi} minus a withdrawal fee is returned to the vault.
     */
    function withdraw(uint256 _amount) external {
        require(msg.sender == vault, "!vault");

        uint256 bifiBal = IERC20(bifi).balanceOf(address(this));

        if (bifiBal < _amount) {   
            IRewardPool(rewards).withdraw(_amount.sub(bifiBal));
            bifiBal = IERC20(bifi).balanceOf(address(this));
        }

        if (bifiBal > _amount) {
            bifiBal = _amount;    
        }
        
        uint256 withdrawalFee = bifiBal.mul(WITHDRAWAL_FEE).div(WITHDRAWAL_MAX);
        IERC20(bifi).safeTransfer(vault, bifiBal.sub(withdrawalFee));
    }

    /**
     * @dev Core function of the strat, in charge of collecting and re-investing rewards.
     * 1. It claims rewards from the RewardPool.
     * 2. It charges a small system fee.
     * 3. It swaps the {wbnb} token for more {bifi}
     * 4. It deposits the {bifi} back into the pool.
     */
    function harvest() external whenNotPaused onlyOwner {
        require(!Address.isContract(msg.sender), "!contract");
        IRewardPool(rewards).getReward();
        chargeFees();
        swapRewards();
        deposit();
    }

    /**
     * @dev Takes out 1% as system fees from the rewards. 
     * 0.5% -> Call Fee
     * 0.5% -> Rewards fee
     */
    function chargeFees() internal {
        uint256 wbnbBal = IERC20(wbnb).balanceOf(address(this));

        uint256 callFee = wbnbBal.mul(CALL_FEE).div(MAX_FEE);
        IERC20(wbnb).safeTransfer(msg.sender, callFee);

        uint256 rewardsFee = wbnbBal.mul(REWARDS_FEE).div(MAX_FEE);
        IERC20(wbnb).safeTransfer(rewards, rewardsFee);
    }

    /**
     * @dev Swaps whatever {wbnb} it has for more {bifi}.
     */
    function swapRewards() internal {
        uint256 wbnbBal = IERC20(wbnb).balanceOf(address(this));
        IThugswapRouter(unirouter).swapExactTokensForTokens(wbnbBal, 0, wbnbToBifiRoute, address(this), now.add(600));
    }

    /**
     * @dev Function to calculate the total underlaying {bifi} held by the strat.
     * It takes into account both the funds at hand, as the funds allocated in the RewardsPool.
     */
    function balanceOf() public view returns (uint256) {
        return balanceOfBifi().add(balanceOfPool());
    }

    /**
     * @dev It calculates how much {bifi} the contract holds.
     */
    function balanceOfBifi() public view returns (uint256) {
        return IERC20(bifi).balanceOf(address(this));
    }

    /**
     * @dev It calculates how much {bifi} the strategy has allocated in the RewardsPool
     */
    function balanceOfPool() public view returns (uint256) {
        return IRewardPool(rewards).balanceOf(address(this));
    }

    /**
     * @dev Function that has to be called as part of strat migration. It sends all the available funds back to the 
     * vault, ready to be migrated to the new strat.
     */ 
    function retireStrat() external onlyOwner {
        panic();

        uint256 bifiBal = IERC20(bifi).balanceOf(address(this));
        IERC20(bifi).transfer(vault, bifiBal);
    }

    /**
     * @dev Pauses deposits. Withdraws all funds from the OriginalGangster, leaving rewards behind
     */
    function panic() public onlyOwner {
        pause();
        IRewardPool(rewards).withdraw(balanceOfPool());
    }

    /**
     * @dev Pauses the strat.
     */
    function pause() public onlyOwner {
        _pause();

        IERC20(wbnb).safeApprove(unirouter, 0);
        IERC20(bifi).safeApprove(rewards, 0);
    }

    /**
     * @dev Unpauses the strat.
     */
    function unpause() external onlyOwner {
        _unpause();

        IERC20(wbnb).safeApprove(unirouter, uint(-1));
        IERC20(bifi).safeApprove(rewards, uint(-1));
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"CALL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDS_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfBifi","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bifi","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wbnb","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wbnbToBifiRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405273bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c608090815273ca3f508b8e4dd382ee878a314789373d80a5190a60a05262000045906002908162000541565b503480156200005357600080fd5b506040516200204838038062002048833981810160405260208110156200007957600080fd5b505160006200008762000186565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b0383161790556200013c73bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c733bc677674df90a9e5d741f28f6ca303357d0e4ec6000196200018a602090811b62000eda17901c565b6200017f73ca3f508b8e4dd382ee878a314789373d80a5190a73453d4ba9a2d594314df88564248497f7d74d6b2c6000196200018a602090811b62000eda17901c565b50620005cc565b3390565b80158062000214575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015620001e457600080fd5b505afa158015620001f9573d6000803e3d6000fd5b505050506040513d60208110156200021057600080fd5b5051155b620002515760405162461bcd60e51b8152600401808060200182810382526036815260200180620020126036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620002a9918591620002ae16565b505050565b60606200030a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200036a60201b62000fed179092919060201c565b805190915015620002a9578080602001905160208110156200032b57600080fd5b5051620002a95760405162461bcd60e51b815260040180806020018281038252602a81526020018062001fe8602a913960400191505060405180910390fd5b60606200037b848460008562000383565b949350505050565b606062000390856200053b565b620003e2576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310620004235780518252601f19909201916020918201910162000402565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811462000487576040519150601f19603f3d011682016040523d82523d6000602084013e6200048c565b606091505b50915091508115620004a25791506200037b9050565b805115620004b35780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620004ff578181015183820152602001620004e5565b50505050905090810190601f1680156200052d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b151590565b82805482825590600052602060002090810192821562000599579160200282015b828111156200059957825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000562565b50620005a7929150620005ab565b5090565b5b80821115620005a75780546001600160a01b0319168155600101620005ac565b611a0c80620005dc6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80638456cb59116100de578063af31431211610097578063f2fde38b11610071578063f2fde38b1461027e578063f3558460146102a4578063fb617787146102ac578063fbfa77cf146102b457610173565b8063af31431214610251578063bc063e1a1461026e578063d0e30db01461027657610173565b80638456cb59146102315780638d72647e146102395780638da5cb5b14610241578063951d6d20146101d55780639ec5a89414610249578063a5d33ed5146101d557610173565b80634641257d116101305780634641257d146101ed5780634700d305146101f557806354518b1a146101fd5780635c975abb14610205578063715018a614610221578063722713f71461022957610173565b80631158808614610178578063257ae0de146101925780632e1a7d4d146101b65780633bf39de5146101d55780633f4ba83a146101dd5780634458020b146101e5575b600080fd5b6101806102bc565b60408051918252519081900360200190f35b61019a610342565b604080516001600160a01b039092168252519081900360200190f35b6101d3600480360360208110156101cc57600080fd5b503561035a565b005b610180610581565b6101d3610586565b61019a610652565b6101d361066a565b6101d36107da565b6101806108ac565b61020d6108b2565b604080519115158252519081900360200190f35b6101d36108c2565b610180610964565b6101d3610984565b61019a610a4c565b61019a610a64565b61019a610a73565b61019a6004803603602081101561026757600080fd5b5035610a8b565b610180610ab2565b6101d3610ab8565b6101d36004803603602081101561029457600080fd5b50356001600160a01b0316610c09565b610180610d01565b6101d3610d56565b61019a610ecb565b604080516370a0823160e01b8152306004820152905160009173453d4ba9a2d594314df88564248497f7d74d6b2c916370a0823191602480820192602092909190829003018186803b15801561031157600080fd5b505afa158015610325573d6000803e3d6000fd5b505050506040513d602081101561033b57600080fd5b5051905090565b733bc677674df90a9e5d741f28f6ca303357d0e4ec81565b6001546001600160a01b031633146103a2576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b604080516370a0823160e01b8152306004820152905160009173ca3f508b8e4dd382ee878a314789373d80a5190a916370a0823191602480820192602092909190829003018186803b1580156103f757600080fd5b505afa15801561040b573d6000803e3d6000fd5b505050506040513d602081101561042157600080fd5b505190508181101561051f5773453d4ba9a2d594314df88564248497f7d74d6b2c632e1a7d4d6104518484611004565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561048757600080fd5b505af115801561049b573d6000803e3d6000fd5b5050604080516370a0823160e01b8152306004820152905173ca3f508b8e4dd382ee878a314789373d80a5190a93506370a0823192506024808301926020929190829003018186803b1580156104f057600080fd5b505afa158015610504573d6000803e3d6000fd5b505050506040513d602081101561051a57600080fd5b505190505b8181111561052a5750805b600061054361271061053d84600561104f565b906110a8565b60015490915061057c906001600160a01b03166105608484611004565b73ca3f508b8e4dd382ee878a314789373d80a5190a91906110ea565b505050565b600581565b61058e61113c565b6000546001600160a01b039081169116146105de576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b6105e6611140565b61061b73bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c733bc677674df90a9e5d741f28f6ca303357d0e4ec600019610eda565b61065073ca3f508b8e4dd382ee878a314789373d80a5190a73453d4ba9a2d594314df88564248497f7d74d6b2c600019610eda565b565b73ca3f508b8e4dd382ee878a314789373d80a5190a81565b600054600160a01b900460ff16156106bc576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6106c461113c565b6000546001600160a01b03908116911614610714576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b61071d336111e8565b1561075b576040805162461bcd60e51b81526020600482015260096024820152680858dbdb9d1c9858dd60ba1b604482015290519081900360640190fd5b73453d4ba9a2d594314df88564248497f7d74d6b2c6001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107aa57600080fd5b505af11580156107be573d6000803e3d6000fd5b505050506107ca6111ee565b6107d26112ed565b610650610ab8565b6107e261113c565b6000546001600160a01b03908116911614610832576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b61083a610984565b73453d4ba9a2d594314df88564248497f7d74d6b2c632e1a7d4d61085c6102bc565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561089257600080fd5b505af11580156108a6573d6000803e3d6000fd5b50505050565b61271081565b600054600160a01b900460ff1690565b6108ca61113c565b6000546001600160a01b0390811691161461091a576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061097f6109716102bc565b610979610d01565b9061150c565b905090565b61098c61113c565b6000546001600160a01b039081169116146109dc576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b6109e4611566565b610a1873bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c733bc677674df90a9e5d741f28f6ca303357d0e4ec6000610eda565b61065073ca3f508b8e4dd382ee878a314789373d80a5190a73453d4ba9a2d594314df88564248497f7d74d6b2c6000610eda565b73bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c81565b6000546001600160a01b031690565b73453d4ba9a2d594314df88564248497f7d74d6b2c81565b60028181548110610a9857fe5b6000918252602090912001546001600160a01b0316905081565b6103e881565b600054600160a01b900460ff1615610b0a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b604080516370a0823160e01b8152306004820152905160009173ca3f508b8e4dd382ee878a314789373d80a5190a916370a0823191602480820192602092909190829003018186803b158015610b5f57600080fd5b505afa158015610b73573d6000803e3d6000fd5b505050506040513d6020811015610b8957600080fd5b505190508015610c065773453d4ba9a2d594314df88564248497f7d74d6b2c6001600160a01b031663a694fc3a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610bed57600080fd5b505af1158015610c01573d6000803e3d6000fd5b505050505b50565b610c1161113c565b6000546001600160a01b03908116911614610c61576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b6001600160a01b038116610ca65760405162461bcd60e51b81526004018080602001828103825260268152602001806119106026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516370a0823160e01b8152306004820152905160009173ca3f508b8e4dd382ee878a314789373d80a5190a916370a0823191602480820192602092909190829003018186803b15801561031157600080fd5b610d5e61113c565b6000546001600160a01b03908116911614610dae576040805162461bcd60e51b81526020600482018190526024820152600080516020611957833981519152604482015290519081900360640190fd5b610db66107da565b604080516370a0823160e01b8152306004820152905160009173ca3f508b8e4dd382ee878a314789373d80a5190a916370a0823191602480820192602092909190829003018186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d6020811015610e3557600080fd5b50516001546040805163a9059cbb60e01b81526001600160a01b039092166004830152602482018390525191925073ca3f508b8e4dd382ee878a314789373d80a5190a9163a9059cbb916044808201926020929091908290030181600087803b158015610ea157600080fd5b505af1158015610eb5573d6000803e3d6000fd5b505050506040513d602081101561057c57600080fd5b6001546001600160a01b031681565b801580610f60575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610f3257600080fd5b505afa158015610f46573d6000803e3d6000fd5b505050506040513d6020811015610f5c57600080fd5b5051155b610f9b5760405162461bcd60e51b81526004018080602001828103825260368152602001806119a16036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261057c9084906115f4565b6060610ffc84846000856116a5565b949350505050565b600061104683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611850565b90505b92915050565b60008261105e57506000611049565b8282028284828161106b57fe5b04146110465760405162461bcd60e51b81526004018080602001828103825260218152602001806119366021913960400191505060405180910390fd5b600061104683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118aa565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261057c9084906115f4565b3390565b600054600160a01b900460ff16611195576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111cb61113c565b604080516001600160a01b039092168252519081900360200190a1565b3b151590565b604080516370a0823160e01b8152306004820152905160009173bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c916370a0823191602480820192602092909190829003018186803b15801561124357600080fd5b505afa158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051905060006112846103e861053d84600561104f565b90506112a573bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c33836110ea565b60006112b86103e861053d85600561104f565b905061057c73bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c73453d4ba9a2d594314df88564248497f7d74d6b2c836110ea565b604080516370a0823160e01b8152306004820152905160009173bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c916370a0823191602480820192602092909190829003018186803b15801561134257600080fd5b505afa158015611356573d6000803e3d6000fd5b505050506040513d602081101561136c57600080fd5b50519050733bc677674df90a9e5d741f28f6ca303357d0e4ec6338ed173982600060023061139c4261025861150c565b6040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818154815260200191508054801561141b57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113fd575b50509650505050505050600060405180830381600087803b15801561143f57600080fd5b505af1158015611453573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561147c57600080fd5b810190808051604051939291908464010000000082111561149c57600080fd5b9083019060208201858111156114b157600080fd5b82518660208202830111640100000000821117156114ce57600080fd5b82525081516020918201928201910280838360005b838110156114fb5781810151838201526020016114e3565b505050509050016040525050505050565b600082820183811015611046576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600054600160a01b900460ff16156115b8576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111cb61113c565b6060611649826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610fed9092919063ffffffff16565b80519091501561057c5780806020019051602081101561166857600080fd5b505161057c5760405162461bcd60e51b815260040180806020018281038252602a815260200180611977602a913960400191505060405180910390fd5b60606116b0856111e8565b611701576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106117405780518252601f199092019160209182019101611721565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146117a2576040519150601f19603f3d011682016040523d82523d6000602084013e6117a7565b606091505b509150915081156117bb579150610ffc9050565b8051156117cb5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118155781810151838201526020016117fd565b50505050905090810190601f1680156118425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b600081848411156118a25760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156118155781810151838201526020016117fd565b505050900390565b600081836118f95760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156118155781810151838201526020016117fd565b50600083858161190557fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a264697066735822122016599b5835a729ee1fbc6ff588148c76a79abace14662cc0ebc4f4fdd76bd27064736f6c634300060c00335361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000000000f7069e41c57ecc5f122093811d8c75bdb5f7c14e

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

000000000000000000000000f7069e41c57ecc5f122093811d8c75bdb5f7c14e

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f7069e41c57ecc5f122093811d8c75bdb5f7c14e


Deployed ByteCode Sourcemap

37043:6751:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42585:126;;;:::i;:::-;;;;;;;;;;;;;;;;37663:87;;;:::i;:::-;;;;-1:-1:-1;;;;;37663:87:0;;;;;;;;;;;;;;39996:593;;;;;;;;;;;;;;;;-1:-1:-1;39996:593:0;;:::i;:::-;;38636:37;;;:::i;43612:179::-;;;:::i;37463:82::-;;;:::i;40905:234::-;;;:::i;43220:117::-;;;:::i;38819:43::-;;;:::i;33330:78::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;2745:148;;;:::i;42150:113::-;;;:::i;43394:159::-;;;:::i;37374:82::-;;;:::i;2103:79::-;;;:::i;37942:86::-;;;:::i;39022:47::-;;;;;;;;;;;;;;;;-1:-1:-1;39022:47:0;;:::i;38724:40::-;;;:::i;39571:205::-;;;:::i;3048:244::-;;;;;;;;;;;;;;;;-1:-1:-1;3048:244:0;-1:-1:-1;;;;;3048:244:0;;:::i;42352:118::-;;;:::i;42910:184::-;;;:::i;38035:20::-;;;:::i;42585:126::-;42658:45;;;-1:-1:-1;;;42658:45:0;;42697:4;42658:45;;;;;;42631:7;;37985:42;;42658:30;;:45;;;;;;;;;;;;;;;37985:42;42658:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;42658:45:0;;-1:-1:-1;42585:126:0;:::o;37663:87::-;37707:42;37663:87;:::o;39996:593::-;40073:5;;-1:-1:-1;;;;;40073:5:0;40059:10;:19;40051:38;;;;;-1:-1:-1;;;40051:38:0;;;;;;;;;;;;-1:-1:-1;;;40051:38:0;;;;;;;;;;;;;;;40120:37;;;-1:-1:-1;;;40120:37:0;;40151:4;40120:37;;;;;;40102:15;;37502:42;;40120:22;;:37;;;;;;;;;;;;;;;37502:42;40120:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40120:37:0;;-1:-1:-1;40174:17:0;;;40170:166;;;37985:42;40211:29;40241:20;:7;40253;40241:11;:20::i;:::-;40211:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;40287:37:0;;;-1:-1:-1;;;40287:37:0;;40318:4;40287:37;;;;;;37502:42;;-1:-1:-1;40287:22:0;;-1:-1:-1;40287:37:0;;;;;;;;;;;;;;37502:42;40287:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40287:37:0;;-1:-1:-1;40170:166:0;40362:7;40352;:17;40348:71;;;-1:-1:-1;40396:7:0;40348:71;40439:21;40463:47;38857:5;40463:27;:7;38811:1;40463:11;:27::i;:::-;:31;;:47::i;:::-;40547:5;;40439:71;;-1:-1:-1;40521:60:0;;-1:-1:-1;;;;;40547:5:0;40554:26;:7;40439:71;40554:11;:26::i;:::-;37502:42;;40521:60;:25;:60::i;:::-;39996:593;;;:::o;38636:37::-;38672:1;38636:37;:::o;43612:179::-;2325:12;:10;:12::i;:::-;2315:6;;-1:-1:-1;;;;;2315:6:0;;;:22;;;2307:67;;;;;-1:-1:-1;;;2307:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;;;43661:10:::1;:8;:10::i;:::-;43684:45;37413:42;37707;-1:-1:-1::0;;43684:24:0::1;:45::i;:::-;43740:43;37502:42;37985;-1:-1:-1::0;;43740:24:0::1;:43::i;:::-;43612:179::o:0;37463:82::-;37502:42;37463:82;:::o;40905:234::-;33648:7;;-1:-1:-1;;;33648:7:0;;;;33647:8;33639:37;;;;;-1:-1:-1;;;33639:37:0;;;;;;;;;;;;-1:-1:-1;;;33639:37:0;;;;;;;;;;;;;;;2325:12:::1;:10;:12::i;:::-;2315:6;::::0;-1:-1:-1;;;;;2315:6:0;;::::1;:22:::0;::::1;;2307:67;;;::::0;;-1:-1:-1;;;2307:67:0;;::::1;;::::0;::::1;::::0;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;::::1;;40977:30:::2;40996:10;40977:18;:30::i;:::-;40976:31;40968:53;;;::::0;;-1:-1:-1;;;40968:53:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;40968:53:0;;;;;;;;;;;;;::::2;;37985:42;-1:-1:-1::0;;;;;41032:30:0::2;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;41075:12;:10;:12::i;:::-;41098:13;:11;:13::i;:::-;41122:9;:7;:9::i;43220:117::-:0;2325:12;:10;:12::i;:::-;2315:6;;-1:-1:-1;;;;;2315:6:0;;;:22;;;2307:67;;;;;-1:-1:-1;;;2307:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;;;43265:7:::1;:5;:7::i;:::-;37985:42;43283:29;43313:15;:13;:15::i;:::-;43283:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;43220:117::o:0;38819:43::-;38857:5;38819:43;:::o;33330:78::-;33369:4;33393:7;-1:-1:-1;;;33393:7:0;;;;;33330:78::o;2745:148::-;2325:12;:10;:12::i;:::-;2315:6;;-1:-1:-1;;;;;2315:6:0;;;:22;;;2307:67;;;;;-1:-1:-1;;;2307:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;;;2852:1:::1;2836:6:::0;;2815:40:::1;::::0;-1:-1:-1;;;;;2836:6:0;;::::1;::::0;2815:40:::1;::::0;2852:1;;2815:40:::1;2883:1;2866:19:::0;;-1:-1:-1;;;;;;2866:19:0::1;::::0;;2745:148::o;42150:113::-;42192:7;42219:36;42239:15;:13;:15::i;:::-;42219;:13;:15::i;:::-;:19;;:36::i;:::-;42212:43;;42150:113;:::o;43394:159::-;2325:12;:10;:12::i;:::-;2315:6;;-1:-1:-1;;;;;2315:6:0;;;:22;;;2307:67;;;;;-1:-1:-1;;;2307:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;;;43439:8:::1;:6;:8::i;:::-;43460:38;37413:42;37707;43496:1;43460:24;:38::i;:::-;43509:36;37502:42;37985;43543:1;43509:24;:36::i;37374:82::-:0;37413:42;37374:82;:::o;2103:79::-;2141:7;2168:6;-1:-1:-1;;;;;2168:6:0;2103:79;:::o;37942:86::-;37985:42;37942:86;:::o;39022:47::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;39022:47:0;;-1:-1:-1;39022:47:0;:::o;38724:40::-;38760:4;38724:40;:::o;39571:205::-;33648:7;;-1:-1:-1;;;33648:7:0;;;;33647:8;33639:37;;;;;-1:-1:-1;;;33639:37:0;;;;;;;;;;;;-1:-1:-1;;;33639:37:0;;;;;;;;;;;;;;;39640::::1;::::0;;-1:-1:-1;;;39640:37:0;;39671:4:::1;39640:37;::::0;::::1;::::0;;;39622:15:::1;::::0;37502:42:::1;::::0;39640:22:::1;::::0;:37;;;;;::::1;::::0;;;;;;;;;37502:42;39640:37;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;39640:37:0;;-1:-1:-1;39694:11:0;;39690:79:::1;;37985:42;-1:-1:-1::0;;;;;39722:26:0::1;;39749:7;39722:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;39690:79;33687:1;39571:205::o:0;3048:244::-;2325:12;:10;:12::i;:::-;2315:6;;-1:-1:-1;;;;;2315:6:0;;;:22;;;2307:67;;;;;-1:-1:-1;;;2307:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;3137:22:0;::::1;3129:73;;;;-1:-1:-1::0;;;3129:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3239:6;::::0;;3218:38:::1;::::0;-1:-1:-1;;;;;3218:38:0;;::::1;::::0;3239:6;::::1;::::0;3218:38:::1;::::0;::::1;3267:6;:17:::0;;-1:-1:-1;;;;;;3267:17:0::1;-1:-1:-1::0;;;;;3267:17:0;;;::::1;::::0;;;::::1;::::0;;3048:244::o;42352:118::-;42425:37;;;-1:-1:-1;;;42425:37:0;;42456:4;42425:37;;;;;;42398:7;;37502:42;;42425:22;;:37;;;;;;;;;;;;;;;37502:42;42425:37;;;;;;;;;;42910:184;2325:12;:10;:12::i;:::-;2315:6;;-1:-1:-1;;;;;2315:6:0;;;:22;;;2307:67;;;;;-1:-1:-1;;;2307:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2307:67:0;;;;;;;;;;;;;;;42963:7:::1;:5;:7::i;:::-;43001:37;::::0;;-1:-1:-1;;;43001:37:0;;43032:4:::1;43001:37;::::0;::::1;::::0;;;42983:15:::1;::::0;37502:42:::1;::::0;43001:22:::1;::::0;:37;;;;;::::1;::::0;;;;;;;;;37502:42;43001:37;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;43001:37:0;43071:5:::1;::::0;43049:37:::1;::::0;;-1:-1:-1;;;43049:37:0;;-1:-1:-1;;;;;43071:5:0;;::::1;43049:37;::::0;::::1;::::0;;;;;;;;43001;;-1:-1:-1;37502:42:0::1;::::0;43049:21:::1;::::0;:37;;;;;43001::::1;::::0;43049;;;;;;;;-1:-1:-1;37502:42:0;43049:37;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;38035:20:::0;;;-1:-1:-1;;;;;38035:20:0;;:::o;29846:622::-;30216:10;;;30215:62;;-1:-1:-1;30232:39:0;;;-1:-1:-1;;;30232:39:0;;30256:4;30232:39;;;;-1:-1:-1;;;;;30232:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30232:39:0;:44;30215:62;30207:152;;;;-1:-1:-1;;;30207:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30397:62;;;-1:-1:-1;;;;;30397:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30397:62:0;-1:-1:-1;;;30397:62:0;;;30370:90;;30390:5;;30370:19;:90::i;15165:196::-;15268:12;15300:53;15323:6;15331:4;15337:1;15340:12;15300:22;:53::i;:::-;15293:60;15165:196;-1:-1:-1;;;;15165:196:0:o;7487:136::-;7545:7;7572:43;7576:1;7579;7572:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;7565:50;;7487:136;;;;;:::o;8377:471::-;8435:7;8680:6;8676:47;;-1:-1:-1;8710:1:0;8703:8;;8676:47;8747:5;;;8751:1;8747;:5;:1;8771:5;;;;;:10;8763:56;;;;-1:-1:-1;;;8763:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9324:132;9382:7;9409:39;9413:1;9416;9409:39;;;;;;;;;;;;;;;;;:3;:39::i;29187:177::-;29297:58;;;-1:-1:-1;;;;;29297:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;29297:58:0;-1:-1:-1;;;29297:58:0;;;29270:86;;29290:5;;29270:19;:86::i;657:106::-;745:10;657:106;:::o;34379:120::-;33924:7;;-1:-1:-1;;;33924:7:0;;;;33916:40;;;;;-1:-1:-1;;;33916:40:0;;;;;;;;;;;;-1:-1:-1;;;33916:40:0;;;;;;;;;;;;;;;34448:5:::1;34438:15:::0;;-1:-1:-1;;;;34438:15:0::1;::::0;;34469:22:::1;34478:12;:10;:12::i;:::-;34469:22;::::0;;-1:-1:-1;;;;;34469:22:0;;::::1;::::0;;;;;;;::::1;::::0;;::::1;34379:120::o:0;12247:422::-;12614:20;12653:8;;;12247:422::o;41278:355::-;41338:37;;;-1:-1:-1;;;41338:37:0;;41369:4;41338:37;;;;;;41320:15;;37413:42;;41338:22;;:37;;;;;;;;;;;;;;;37413:42;41338:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41338:37:0;;-1:-1:-1;41388:15:0;41406:34;38760:4;41406:21;41338:37;38716:1;41406:11;:21::i;:34::-;41388:52;-1:-1:-1;41451:46:0;37413:42;41477:10;41388:52;41451:25;:46::i;:::-;41510:18;41531:37;38760:4;41531:24;:7;38672:1;41531:11;:24::i;:37::-;41510:58;-1:-1:-1;41579:46:0;37413:42;37985;41510:58;41579:25;:46::i;41718:226::-;41779:37;;;-1:-1:-1;;;41779:37:0;;41810:4;41779:37;;;;;;41761:15;;37413:42;;41779:22;;:37;;;;;;;;;;;;;;;37413:42;41779:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41779:37:0;;-1:-1:-1;37707:42:0;41827:51;41779:37;41888:1;41891:15;41916:4;41923:12;:3;41931;41923:7;:12::i;:::-;41827:109;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41827:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41827:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;41827:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41827:109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41718:226;:::o;7023:181::-;7081:7;7113:5;;;7137:6;;;;7129:46;;;;;-1:-1:-1;;;7129:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;34120:118;33648:7;;-1:-1:-1;;;33648:7:0;;;;33647:8;33639:37;;;;;-1:-1:-1;;;33639:37:0;;;;;;;;;;;;-1:-1:-1;;;33639:37:0;;;;;;;;;;;;;;;34180:7:::1;:14:::0;;-1:-1:-1;;;;34180:14:0::1;-1:-1:-1::0;;;34180:14:0::1;::::0;;34210:20:::1;34217:12;:10;:12::i;31492:761::-:0;31916:23;31942:69;31970:4;31942:69;;;;;;;;;;;;;;;;;31950:5;-1:-1:-1;;;;;31942:27:0;;;:69;;;;;:::i;:::-;32026:17;;31916:95;;-1:-1:-1;32026:21:0;32022:224;;32168:10;32157:30;;;;;;;;;;;;;;;-1:-1:-1;32157:30:0;32149:85;;;;-1:-1:-1;;;32149:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16542:979;16672:12;16705:18;16716:6;16705:10;:18::i;:::-;16697:60;;;;;-1:-1:-1;;;16697:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16831:12;16845:23;16872:6;-1:-1:-1;;;;;16872:11:0;16892:8;16903:4;16872:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16872:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16830:78;;;;16923:7;16919:595;;;16954:10;-1:-1:-1;16947:17:0;;-1:-1:-1;16947:17:0;16919:595;17068:17;;:21;17064:439;;17331:10;17325:17;17392:15;17379:10;17375:2;17371:19;17364:44;17279:148;17474:12;17467:20;;-1:-1:-1;;;17467:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7926:192;8012:7;8048:12;8040:6;;;;8032:29;;;;-1:-1:-1;;;8032:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8084:5:0;;;7926:192::o;9952:278::-;10038:7;10073:12;10066:5;10058:28;;;;-1:-1:-1;;;10058:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10097:9;10113:1;10109;:5;;;;;;;9952:278;-1:-1:-1;;;;;9952:278:0:o

Swarm Source

ipfs://16599b5835a729ee1fbc6ff588148c76a79abace14662cc0ebc4f4fdd76bd270
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.