ETH Price: $2,456.94 (-2.48%)

Contract

0x4CC82A3C28E759D677308985D3efA93f13C0134a
 

Overview

ETH Balance

1 wei

Eth Value

Less Than $0.01 (@ $2,456.94/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Liquidity134218652021-10-15 9:32:171054 days ago1634290337IN
0x4CC82A3C...f13C0134a
0.1 ETH0.0266757796.21003048
Add Liquidity134213492021-10-15 7:36:471054 days ago1634283407IN
0x4CC82A3C...f13C0134a
0.1 ETH0.0282399992.03791922
Add Liquidity134138062021-10-14 2:53:211055 days ago1634180001IN
0x4CC82A3C...f13C0134a
3 ETH0.0238469678.71479782
Add Liquidity133914452021-10-10 14:32:051058 days ago1633876325IN
0x4CC82A3C...f13C0134a
3 ETH0.0250046979.72037423
Add Liquidity133895382021-10-10 7:21:111059 days ago1633850471IN
0x4CC82A3C...f13C0134a
1.47701729 ETH0.0171477355.04450514
Add Liquidity132654532021-09-20 22:50:261078 days ago1632178226IN
0x4CC82A3C...f13C0134a
2.7 ETH0.0172860950.66428458
Add Liquidity132227192021-09-14 8:17:341085 days ago1631607454IN
0x4CC82A3C...f13C0134a
0.5 ETH0.0132152942.11361658
Add Liquidity132120882021-09-12 16:44:151086 days ago1631465055IN
0x4CC82A3C...f13C0134a
0.88 ETH0.0246099282
Add Liquidity132120742021-09-12 16:41:261086 days ago1631464886IN
0x4CC82A3C...f13C0134a
0.88 ETH0.001770779.28987154
Add Liquidity132119502021-09-12 16:11:571086 days ago1631463117IN
0x4CC82A3C...f13C0134a
17.4 ETH0.021141468.71924389
Add Liquidity132049442021-09-11 14:17:431087 days ago1631369863IN
0x4CC82A3C...f13C0134a
1.35 ETH0.0160381451.10928134
Add Liquidity132043532021-09-11 12:06:341088 days ago1631361994IN
0x4CC82A3C...f13C0134a
1 ETH0.0193145562
Add Liquidity131998832021-09-10 19:17:051088 days ago1631301425IN
0x4CC82A3C...f13C0134a
0.1 ETH0.03573547114.71143225
Add Liquidity131909982021-09-09 10:30:111090 days ago1631183411IN
0x4CC82A3C...f13C0134a
0.3 ETH0.03147722104.88176972
Add Liquidity131780232021-09-07 10:05:081092 days ago1631009108IN
0x4CC82A3C...f13C0134a
0.1 ETH0.0189649566.20894319
0x60806040131717942021-09-06 11:08:361093 days ago1630926516IN
 Create: XBERouter
0 ETH0.1255427298.84755805

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
134218652021-10-15 9:32:171054 days ago1634290337
0x4CC82A3C...f13C0134a
0.00013264 ETH
134218652021-10-15 9:32:171054 days ago1634290337
0x4CC82A3C...f13C0134a
0.04986735 ETH
134218652021-10-15 9:32:171054 days ago1634290337
0x4CC82A3C...f13C0134a
0.05 ETH
134213492021-10-15 7:36:471054 days ago1634283407
0x4CC82A3C...f13C0134a
0.00013271 ETH
134213492021-10-15 7:36:471054 days ago1634283407
0x4CC82A3C...f13C0134a
0.04986728 ETH
134213492021-10-15 7:36:471054 days ago1634283407
0x4CC82A3C...f13C0134a
0.05 ETH
134138062021-10-14 2:53:211055 days ago1634180001
0x4CC82A3C...f13C0134a
1.5 ETH
134138062021-10-14 2:53:211055 days ago1634180001
0x4CC82A3C...f13C0134a
1.5 ETH
133914452021-10-10 14:32:051058 days ago1633876325
0x4CC82A3C...f13C0134a
1.5 ETH
133914452021-10-10 14:32:051058 days ago1633876325
0x4CC82A3C...f13C0134a
1.5 ETH
133895382021-10-10 7:21:111059 days ago1633850471
0x4CC82A3C...f13C0134a
0.00023284 ETH
133895382021-10-10 7:21:111059 days ago1633850471
0x4CC82A3C...f13C0134a
0.7382758 ETH
133895382021-10-10 7:21:111059 days ago1633850471
0x4CC82A3C...f13C0134a
0.73850864 ETH
132654532021-09-20 22:50:261078 days ago1632178226
0x4CC82A3C...f13C0134a
1.35 ETH
132654532021-09-20 22:50:261078 days ago1632178226
0x4CC82A3C...f13C0134a
1.35 ETH
132227192021-09-14 8:17:341085 days ago1631607454
0x4CC82A3C...f13C0134a
0.00056597 ETH
132227192021-09-14 8:17:341085 days ago1631607454
0x4CC82A3C...f13C0134a
0.24943402 ETH
132227192021-09-14 8:17:341085 days ago1631607454
0x4CC82A3C...f13C0134a
0.25 ETH
132120882021-09-12 16:44:151086 days ago1631465055
0x4CC82A3C...f13C0134a
0.00075023 ETH
132120882021-09-12 16:44:151086 days ago1631465055
0x4CC82A3C...f13C0134a
0.43924976 ETH
132120882021-09-12 16:44:151086 days ago1631465055
0x4CC82A3C...f13C0134a
0.44 ETH
132119502021-09-12 16:11:571086 days ago1631463117
0x4CC82A3C...f13C0134a
8.7 ETH
132119502021-09-12 16:11:571086 days ago1631463117
0x4CC82A3C...f13C0134a
8.7 ETH
132049442021-09-11 14:17:431087 days ago1631369863
0x4CC82A3C...f13C0134a
0.00059621 ETH
132049442021-09-11 14:17:431087 days ago1631369863
0x4CC82A3C...f13C0134a
0.67440378 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
XBERouter

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-09-06
*/

// Sources flattened with hardhat v2.6.2 https://hardhat.org

// File @openzeppelin/contracts/token/ERC20/[email protected]

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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


// File @openzeppelin/contracts/token/ERC20/extensions/[email protected]


pragma solidity ^0.8.0;

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

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


// File @openzeppelin/contracts/utils/[email protected]


pragma solidity ^0.8.0;

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

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


// File @openzeppelin/contracts/token/ERC20/[email protected]


pragma solidity ^0.8.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 Contracts guidelines: functions revert
 * instead 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, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 this function is
     * overridden;
     *
     * 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 virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual 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);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        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] + 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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This 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);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(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:
     *
     * - `account` 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 += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(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);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(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 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 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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}


// File contracts/mocks/MockERC20.sol

pragma solidity ^0.8.0;

contract MockERC20 is ERC20 {
    constructor(uint256 totalSupply) ERC20("TokenT", "TTT") {
        _mint(msg.sender, totalSupply);
    }
}


// File contracts/interfaces/IVaultTransfers.sol

pragma solidity ^0.8.0;

interface IVaultTransfers {
    function deposit(uint256 _amount) external;

    function depositFor(uint256 _amount, address _for) external;

    function depositAll() external;

    function withdraw(uint256 _amount) external;

    function withdrawAll() external;
}


// File contracts/mocks/MockVault.sol

pragma solidity ^0.8.0;

contract MockVault is IVaultTransfers {
    function deposit(uint256 _amount) external override {
    }

    function depositFor(uint256 _amount, address _for) external override {
    }

    function depositAll() external override {
    }

    function withdraw(uint256 _amount) external override {
    }

    function withdrawAll() external override {
    }
}


// File @uniswap/v2-core/contracts/interfaces/[email protected]

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 @uniswap/v2-periphery/contracts/interfaces/[email protected]

pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}


// File contracts/XBERouter.sol

pragma solidity ^0.8.0;




contract XBERouter {
    IWETH WETH;
    IERC20 XBE;
    address smallestTokenAddress;
    IUniswapV2Pair pair;
    IVaultTransfers vault;

    modifier ensure(uint256 deadline) {
        require(deadline >= block.timestamp, "EXPIRED");
        _;
    }

    constructor(
        address _vaultAddress,
        address _pair,
        address _WETH,
        address _XBE
    ) {
        pair = IUniswapV2Pair(_pair);
        WETH = IWETH(_WETH);
        XBE = IERC20(_XBE);
        vault = IVaultTransfers(_vaultAddress);
        smallestTokenAddress = _WETH < _XBE ? _WETH : _XBE;

        pair.approve(address(vault), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
    }

    function addLiquidity(uint256 _deadline, uint256 _tokenOutMin)
        public
        payable
        ensure(_deadline)
    {
        require(msg.value > 0, "ZERO_ETH");
        uint256 half = msg.value / 2;
        require(_getAmountXBE(half) >= _tokenOutMin, "PRICE_CHANGED");
        uint256 XBEfromSwap = _swapETHforXBE(half);
        (
            uint256 liquidityXBE,
            uint256 liquidityWETH,
            uint256 liquidityTokens
        ) = _addLiquidity(XBEfromSwap, half);
        if (XBEfromSwap - liquidityXBE > 0)
            XBE.transfer(msg.sender, XBEfromSwap - liquidityXBE);
        if (half - liquidityWETH > 0)
            payable(msg.sender).transfer(half - liquidityWETH);
        vault.depositFor(liquidityTokens, msg.sender);
    }

    function getMinSwapAmountXBE(uint256 _amountETH)
        public
        view
        returns (uint256)
    {
        return _getAmountXBE(_amountETH);
    }

    function _swapETHforXBE(uint256 _amountETH)
        internal
        returns (uint256 amountXBE)
    {
        amountXBE = _getAmountXBE(_amountETH);
        WETH.deposit{value: _amountETH}();
        WETH.transfer(address(pair), _amountETH);
        (uint256 amount0Out, uint256 amount1Out) = address(WETH) == smallestTokenAddress
            ? (uint256(0), amountXBE)
            : (amountXBE, uint256(0));
        pair.swap(amount0Out, amount1Out, address(this), new bytes(0));
    }

    function _getAmountXBE(uint256 _amountETH) internal view returns (uint256) {
        address pairAddress = address(pair);
        uint256 reserveETH = IERC20(address(WETH)).balanceOf(pairAddress);
        uint256 reserveXBE = XBE.balanceOf(pairAddress);
        uint256 amountInWithFee = _amountETH * 997;
        uint256 numerator = amountInWithFee * reserveXBE;
        uint256 denominator = reserveETH * 1000 + amountInWithFee;
        return numerator / denominator;
    }

    function _addLiquidity(uint256 _amountXBEdesired, uint256 _amountETHdesired)
        internal
        returns (
            uint256 liquidityXBE,
            uint256 liquidityETH,
            uint256 lpTokens
        )
    {
        uint256 reserveETH = IERC20(address(WETH)).balanceOf(address(pair));
        uint256 reserveXBE = XBE.balanceOf(address(pair));
        uint256 amountETHOptimal = (_amountXBEdesired * reserveETH) /
            reserveXBE;
        if (amountETHOptimal <= _amountETHdesired) {
            (liquidityXBE, liquidityETH) = (
                _amountXBEdesired,
                amountETHOptimal
            );
        } else {
            uint256 amountXBEOptimal = (_amountETHdesired * reserveXBE) /
                reserveETH;
            require(amountXBEOptimal <= _amountXBEdesired);
            (liquidityXBE, liquidityETH) = (
                amountXBEOptimal,
                _amountETHdesired
            );
        }
        XBE.transfer(address(pair), liquidityXBE);
        WETH.deposit{value: liquidityETH}();
        WETH.transfer(address(pair), liquidityETH);
        lpTokens = pair.mint(address(this));
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vaultAddress","type":"address"},{"internalType":"address","name":"_pair","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_XBE","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint256","name":"_tokenOutMin","type":"uint256"}],"name":"addLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountETH","type":"uint256"}],"name":"getMinSwapAmountXBE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620017b7380380620017b78339818101604052810190620000379190620002e7565b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161062000175578062000177565b815b600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040162000258929190620003ad565b602060405180830381600087803b1580156200027357600080fd5b505af115801562000288573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ae919062000359565b505050505062000471565b600081519050620002ca816200043d565b92915050565b600081519050620002e18162000457565b92915050565b6000806000806080858703121562000304576200030362000438565b5b60006200031487828801620002b9565b94505060206200032787828801620002b9565b93505060406200033a87828801620002b9565b92505060606200034d87828801620002b9565b91505092959194509250565b60006020828403121562000372576200037162000438565b5b60006200038284828501620002d0565b91505092915050565b6200039681620003da565b82525050565b620003a78162000424565b82525050565b6000604082019050620003c460008301856200038b565b620003d360208301846200039c565b9392505050565b6000620003e782620003fa565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600062000431826200041a565b9050919050565b600080fd5b6200044881620003da565b81146200045457600080fd5b50565b6200046281620003ee565b81146200046e57600080fd5b50565b61133680620004816000396000f3fe6080604052600436106100295760003560e01c80634e56e82e1461002e5780639cd441da1461006b575b600080fd5b34801561003a57600080fd5b5061005560048036038101906100509190610d69565b610087565b6040516100629190610f67565b60405180910390f35b61008560048036038101906100809190610dc3565b610099565b005b60006100928261036e565b9050919050565b81428110156100dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d490610f27565b60405180910390fd5b60003411610120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011790610f47565b60405180910390fd5b600060023461012f919061107a565b90508261013b8261036e565b101561017c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017390610f07565b60405180910390fd5b60006101878261054b565b905060008060006101988486610818565b925092509250600083856101ac9190611105565b111561026e57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3385876101fd9190611105565b6040518363ffffffff1660e01b815260040161021a929190610ede565b602060405180830381600087803b15801561023457600080fd5b505af1158015610248573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026c9190610d3c565b505b6000828661027c9190611105565b11156102d5573373ffffffffffffffffffffffffffffffffffffffff166108fc83876102a89190611105565b9081150290604051600060405180830381858888f193505050501580156102d3573d6000803e3d6000fd5b505b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166336efd16f82336040518363ffffffff1660e01b8152600401610332929190610f82565b600060405180830381600087803b15801561034c57600080fd5b505af1158015610360573d6000803e3d6000fd5b505050505050505050505050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016103f29190610ec3565b60206040518083038186803b15801561040a57600080fd5b505afa15801561041e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104429190610d96565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016104a19190610ec3565b60206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f19190610d96565b905060006103e58661050391906110ab565b90506000828261051391906110ab565b90506000826103e88661052691906110ab565b6105309190611024565b9050808261053e919061107a565b9650505050505050919050565b60006105568261036e565b905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156105c057600080fd5b505af11580156105d4573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401610656929190610ede565b602060405180830381600087803b15801561067057600080fd5b505af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190610d3c565b50600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107295782600061072d565b6000835b91509150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330600067ffffffffffffffff81111561078d5761078c611212565b5b6040519080825280601f01601f1916602001820160405280156107bf5781602001600182028036833780820191505090505b506040518563ffffffff1660e01b81526004016107df9493929190610fab565b600060405180830381600087803b1580156107f957600080fd5b505af115801561080d573d6000803e3d6000fd5b505050505050919050565b60008060008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016108999190610ec3565b60206040518083038186803b1580156108b157600080fd5b505afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e99190610d96565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161096a9190610ec3565b60206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190610d96565b905060008183896109cb91906110ab565b6109d5919061107a565b90508681116109ed5787818096508197505050610a21565b60008383896109fc91906110ab565b610a06919061107a565b905088811115610a1557600080fd5b80888097508198505050505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b8152600401610aa0929190610ede565b602060405180830381600087803b158015610aba57600080fd5b505af1158015610ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af29190610d3c565b5060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b5b57600080fd5b505af1158015610b6f573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876040518363ffffffff1660e01b8152600401610bf1929190610ede565b602060405180830381600087803b158015610c0b57600080fd5b505af1158015610c1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c439190610d3c565b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636a627842306040518263ffffffff1660e01b8152600401610c9f9190610ec3565b602060405180830381600087803b158015610cb957600080fd5b505af1158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf19190610d96565b93505050509250925092565b600081519050610d0c816112d2565b92915050565b600081359050610d21816112e9565b92915050565b600081519050610d36816112e9565b92915050565b600060208284031215610d5257610d51611241565b5b6000610d6084828501610cfd565b91505092915050565b600060208284031215610d7f57610d7e611241565b5b6000610d8d84828501610d12565b91505092915050565b600060208284031215610dac57610dab611241565b5b6000610dba84828501610d27565b91505092915050565b60008060408385031215610dda57610dd9611241565b5b6000610de885828601610d12565b9250506020610df985828601610d12565b9150509250929050565b610e0c81611139565b82525050565b6000610e1d82610ff7565b610e278185611002565b9350610e37818560208601611181565b610e4081611246565b840191505092915050565b6000610e58600d83611013565b9150610e6382611257565b602082019050919050565b6000610e7b600783611013565b9150610e8682611280565b602082019050919050565b6000610e9e600883611013565b9150610ea9826112a9565b602082019050919050565b610ebd81611177565b82525050565b6000602082019050610ed86000830184610e03565b92915050565b6000604082019050610ef36000830185610e03565b610f006020830184610eb4565b9392505050565b60006020820190508181036000830152610f2081610e4b565b9050919050565b60006020820190508181036000830152610f4081610e6e565b9050919050565b60006020820190508181036000830152610f6081610e91565b9050919050565b6000602082019050610f7c6000830184610eb4565b92915050565b6000604082019050610f976000830185610eb4565b610fa46020830184610e03565b9392505050565b6000608082019050610fc06000830187610eb4565b610fcd6020830186610eb4565b610fda6040830185610e03565b8181036060830152610fec8184610e12565b905095945050505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061102f82611177565b915061103a83611177565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561106f5761106e6111b4565b5b828201905092915050565b600061108582611177565b915061109083611177565b9250826110a05761109f6111e3565b5b828204905092915050565b60006110b682611177565b91506110c183611177565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110fa576110f96111b4565b5b828202905092915050565b600061111082611177565b915061111b83611177565b92508282101561112e5761112d6111b4565b5b828203905092915050565b600061114482611157565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561119f578082015181840152602081019050611184565b838111156111ae576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f50524943455f4348414e47454400000000000000000000000000000000000000600082015250565b7f4558504952454400000000000000000000000000000000000000000000000000600082015250565b7f5a45524f5f455448000000000000000000000000000000000000000000000000600082015250565b6112db8161114b565b81146112e657600080fd5b50565b6112f281611177565b81146112fd57600080fd5b5056fea264697066735822122077436c0b99cedbb7b94f39125024637a4df21ca581fb21557607b83c923f9fee64736f6c634300080700330000000000000000000000005220871eb8fab14400787aa27fc26774cbc46f990000000000000000000000001d46ac355f9f338d9edea6c072120abe90d67bee000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000005de7cc4bcbca31c473f6d2f27825cfb09cc0bb16

Deployed Bytecode

0x6080604052600436106100295760003560e01c80634e56e82e1461002e5780639cd441da1461006b575b600080fd5b34801561003a57600080fd5b5061005560048036038101906100509190610d69565b610087565b6040516100629190610f67565b60405180910390f35b61008560048036038101906100809190610dc3565b610099565b005b60006100928261036e565b9050919050565b81428110156100dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d490610f27565b60405180910390fd5b60003411610120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011790610f47565b60405180910390fd5b600060023461012f919061107a565b90508261013b8261036e565b101561017c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017390610f07565b60405180910390fd5b60006101878261054b565b905060008060006101988486610818565b925092509250600083856101ac9190611105565b111561026e57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3385876101fd9190611105565b6040518363ffffffff1660e01b815260040161021a929190610ede565b602060405180830381600087803b15801561023457600080fd5b505af1158015610248573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026c9190610d3c565b505b6000828661027c9190611105565b11156102d5573373ffffffffffffffffffffffffffffffffffffffff166108fc83876102a89190611105565b9081150290604051600060405180830381858888f193505050501580156102d3573d6000803e3d6000fd5b505b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166336efd16f82336040518363ffffffff1660e01b8152600401610332929190610f82565b600060405180830381600087803b15801561034c57600080fd5b505af1158015610360573d6000803e3d6000fd5b505050505050505050505050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016103f29190610ec3565b60206040518083038186803b15801561040a57600080fd5b505afa15801561041e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104429190610d96565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016104a19190610ec3565b60206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f19190610d96565b905060006103e58661050391906110ab565b90506000828261051391906110ab565b90506000826103e88661052691906110ab565b6105309190611024565b9050808261053e919061107a565b9650505050505050919050565b60006105568261036e565b905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156105c057600080fd5b505af11580156105d4573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401610656929190610ede565b602060405180830381600087803b15801561067057600080fd5b505af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190610d3c565b50600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107295782600061072d565b6000835b91509150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330600067ffffffffffffffff81111561078d5761078c611212565b5b6040519080825280601f01601f1916602001820160405280156107bf5781602001600182028036833780820191505090505b506040518563ffffffff1660e01b81526004016107df9493929190610fab565b600060405180830381600087803b1580156107f957600080fd5b505af115801561080d573d6000803e3d6000fd5b505050505050919050565b60008060008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016108999190610ec3565b60206040518083038186803b1580156108b157600080fd5b505afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e99190610d96565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161096a9190610ec3565b60206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190610d96565b905060008183896109cb91906110ab565b6109d5919061107a565b90508681116109ed5787818096508197505050610a21565b60008383896109fc91906110ab565b610a06919061107a565b905088811115610a1557600080fd5b80888097508198505050505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518363ffffffff1660e01b8152600401610aa0929190610ede565b602060405180830381600087803b158015610aba57600080fd5b505af1158015610ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af29190610d3c565b5060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b5b57600080fd5b505af1158015610b6f573d6000803e3d6000fd5b505050505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876040518363ffffffff1660e01b8152600401610bf1929190610ede565b602060405180830381600087803b158015610c0b57600080fd5b505af1158015610c1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c439190610d3c565b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636a627842306040518263ffffffff1660e01b8152600401610c9f9190610ec3565b602060405180830381600087803b158015610cb957600080fd5b505af1158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf19190610d96565b93505050509250925092565b600081519050610d0c816112d2565b92915050565b600081359050610d21816112e9565b92915050565b600081519050610d36816112e9565b92915050565b600060208284031215610d5257610d51611241565b5b6000610d6084828501610cfd565b91505092915050565b600060208284031215610d7f57610d7e611241565b5b6000610d8d84828501610d12565b91505092915050565b600060208284031215610dac57610dab611241565b5b6000610dba84828501610d27565b91505092915050565b60008060408385031215610dda57610dd9611241565b5b6000610de885828601610d12565b9250506020610df985828601610d12565b9150509250929050565b610e0c81611139565b82525050565b6000610e1d82610ff7565b610e278185611002565b9350610e37818560208601611181565b610e4081611246565b840191505092915050565b6000610e58600d83611013565b9150610e6382611257565b602082019050919050565b6000610e7b600783611013565b9150610e8682611280565b602082019050919050565b6000610e9e600883611013565b9150610ea9826112a9565b602082019050919050565b610ebd81611177565b82525050565b6000602082019050610ed86000830184610e03565b92915050565b6000604082019050610ef36000830185610e03565b610f006020830184610eb4565b9392505050565b60006020820190508181036000830152610f2081610e4b565b9050919050565b60006020820190508181036000830152610f4081610e6e565b9050919050565b60006020820190508181036000830152610f6081610e91565b9050919050565b6000602082019050610f7c6000830184610eb4565b92915050565b6000604082019050610f976000830185610eb4565b610fa46020830184610e03565b9392505050565b6000608082019050610fc06000830187610eb4565b610fcd6020830186610eb4565b610fda6040830185610e03565b8181036060830152610fec8184610e12565b905095945050505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061102f82611177565b915061103a83611177565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561106f5761106e6111b4565b5b828201905092915050565b600061108582611177565b915061109083611177565b9250826110a05761109f6111e3565b5b828204905092915050565b60006110b682611177565b91506110c183611177565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110fa576110f96111b4565b5b828202905092915050565b600061111082611177565b915061111b83611177565b92508282101561112e5761112d6111b4565b5b828203905092915050565b600061114482611157565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561119f578082015181840152602081019050611184565b838111156111ae576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f50524943455f4348414e47454400000000000000000000000000000000000000600082015250565b7f4558504952454400000000000000000000000000000000000000000000000000600082015250565b7f5a45524f5f455448000000000000000000000000000000000000000000000000600082015250565b6112db8161114b565b81146112e657600080fd5b50565b6112f281611177565b81146112fd57600080fd5b5056fea264697066735822122077436c0b99cedbb7b94f39125024637a4df21ca581fb21557607b83c923f9fee64736f6c63430008070033

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

0000000000000000000000005220871eb8fab14400787aa27fc26774cbc46f990000000000000000000000001d46ac355f9f338d9edea6c072120abe90d67bee000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000005de7cc4bcbca31c473f6d2f27825cfb09cc0bb16

-----Decoded View---------------
Arg [0] : _vaultAddress (address): 0x5220871eB8Fab14400787aA27FC26774CBC46F99
Arg [1] : _pair (address): 0x1D46AC355F9f338D9EDEa6C072120abE90D67BeE
Arg [2] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [3] : _XBE (address): 0x5DE7Cc4BcBCa31c473F6D2F27825Cfb09cc0Bb16

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000005220871eb8fab14400787aa27fc26774cbc46f99
Arg [1] : 0000000000000000000000001d46ac355f9f338d9edea6c072120abe90d67bee
Arg [2] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [3] : 0000000000000000000000005de7cc4bcbca31c473f6d2f27825cfb09cc0bb16


Deployed Bytecode Sourcemap

20419:3868:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;21936:162;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;21145:783;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;21936:162;22033:7;22065:25;22079:10;22065:13;:25::i;:::-;22058:32;;21936:162;;;:::o;21145:783::-;21257:9;20635:15;20623:8;:27;;20615:47;;;;;;;;;;;;:::i;:::-;;;;;;;;;21304:1:::1;21292:9;:13;21284:34;;;;;;;;;;;;:::i;:::-;;;;;;;;;21329:12;21356:1;21344:9;:13;;;;:::i;:::-;21329:28;;21399:12;21376:19;21390:4;21376:13;:19::i;:::-;:35;;21368:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;21440:19;21462:20;21477:4;21462:14;:20::i;:::-;21440:42;;21508:20;21543:21:::0;21579:23:::1;21616:32;21630:11;21643:4;21616:13;:32::i;:::-;21493:155;;;;;;21692:1;21677:12;21663:11;:26;;;;:::i;:::-;:30;21659:101;;;21708:3;;;;;;;;;;;:12;;;21721:10;21747:12;21733:11;:26;;;;:::i;:::-;21708:52;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;21659:101;21798:1;21782:13;21775:4;:20;;;;:::i;:::-;:24;21771:93;;;21822:10;21814:28;;:50;21850:13;21843:4;:20;;;;:::i;:::-;21814:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;21771:93;21875:5;;;;;;;;;;;:16;;;21892:15;21909:10;21875:45;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;21273:655;;;;;21145:783:::0;;;:::o;22611:484::-;22677:7;22697:19;22727:4;;;;;;;;;;;22697:35;;22743:18;22779:4;;;;;;;;;;;22764:31;;;22796:11;22764:44;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22743:65;;22819:18;22840:3;;;;;;;;;;;:13;;;22854:11;22840:26;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22819:47;;22877:23;22916:3;22903:10;:16;;;;:::i;:::-;22877:42;;22930:17;22968:10;22950:15;:28;;;;:::i;:::-;22930:48;;22989:19;23031:15;23024:4;23011:10;:17;;;;:::i;:::-;:35;;;;:::i;:::-;22989:57;;23076:11;23064:9;:23;;;;:::i;:::-;23057:30;;;;;;;;22611:484;;;:::o;22106:497::-;22186:17;22233:25;22247:10;22233:13;:25::i;:::-;22221:37;;22269:4;;;;;;;;;;:12;;;22289:10;22269:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22313:4;;;;;;;;;;:13;;;22335:4;;;;;;;;;;;22342:10;22313:40;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;22365:18;22385;22424:20;;;;;;;;;;;22407:37;;22415:4;;;;;;;;;;22407:37;;;:115;;22500:9;22519:1;22407:115;;;22469:1;22473:9;22407:115;22364:158;;;;22533:4;;;;;;;;;;;:9;;;22543:10;22555;22575:4;22592:1;22582:12;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22533:62;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22210:393;;22106:497;;;:::o;23103:1181::-;23230:20;23265;23300:16;23344:18;23380:4;;;;;;;;;;23365:31;;;23405:4;;;;;;;;;;;23365:46;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23344:67;;23422:18;23443:3;;;;;;;;;;;:13;;;23465:4;;;;;;;;;;;23443:28;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23422:49;;23482:24;23557:10;23530;23510:17;:30;;;;:::i;:::-;23509:58;;;;:::i;:::-;23482:85;;23602:17;23582:16;:37;23578:502;;23686:17;23722:16;23636:117;;;;;;;;23578:502;;;23786:24;23865:10;23834;23814:17;:30;;;;:::i;:::-;23813:62;;;;:::i;:::-;23786:89;;23918:17;23898:16;:37;;23890:46;;;;;;24001:16;24036:17;23951:117;;;;;;;;23771:309;23578:502;24090:3;;;;;;;;;;;:12;;;24111:4;;;;;;;;;;;24118:12;24090:41;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;24142:4;;;;;;;;;;:12;;;24162;24142:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24188:4;;;;;;;;;;:13;;;24210:4;;;;;;;;;;;24217:12;24188:42;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;24252:4;;;;;;;;;;;:9;;;24270:4;24252:24;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;24241:35;;23333:951;;;23103:1181;;;;;:::o;7:137:1:-;61:5;92:6;86:13;77:22;;108:30;132:5;108:30;:::i;:::-;7:137;;;;:::o;150:139::-;196:5;234:6;221:20;212:29;;250:33;277:5;250:33;:::i;:::-;150:139;;;;:::o;295:143::-;352:5;383:6;377:13;368:22;;399:33;426:5;399:33;:::i;:::-;295:143;;;;:::o;444:345::-;511:6;560:2;548:9;539:7;535:23;531:32;528:119;;;566:79;;:::i;:::-;528:119;686:1;711:61;764:7;755:6;744:9;740:22;711:61;:::i;:::-;701:71;;657:125;444:345;;;;:::o;795:329::-;854:6;903:2;891:9;882:7;878:23;874:32;871:119;;;909:79;;:::i;:::-;871:119;1029:1;1054:53;1099:7;1090:6;1079:9;1075:22;1054:53;:::i;:::-;1044:63;;1000:117;795:329;;;;:::o;1130:351::-;1200:6;1249:2;1237:9;1228:7;1224:23;1220:32;1217:119;;;1255:79;;:::i;:::-;1217:119;1375:1;1400:64;1456:7;1447:6;1436:9;1432:22;1400:64;:::i;:::-;1390:74;;1346:128;1130:351;;;;:::o;1487:474::-;1555:6;1563;1612:2;1600:9;1591:7;1587:23;1583:32;1580:119;;;1618:79;;:::i;:::-;1580:119;1738:1;1763:53;1808:7;1799:6;1788:9;1784:22;1763:53;:::i;:::-;1753:63;;1709:117;1865:2;1891:53;1936:7;1927:6;1916:9;1912:22;1891:53;:::i;:::-;1881:63;;1836:118;1487:474;;;;;:::o;1967:118::-;2054:24;2072:5;2054:24;:::i;:::-;2049:3;2042:37;1967:118;;:::o;2091:360::-;2177:3;2205:38;2237:5;2205:38;:::i;:::-;2259:70;2322:6;2317:3;2259:70;:::i;:::-;2252:77;;2338:52;2383:6;2378:3;2371:4;2364:5;2360:16;2338:52;:::i;:::-;2415:29;2437:6;2415:29;:::i;:::-;2410:3;2406:39;2399:46;;2181:270;2091:360;;;;:::o;2457:366::-;2599:3;2620:67;2684:2;2679:3;2620:67;:::i;:::-;2613:74;;2696:93;2785:3;2696:93;:::i;:::-;2814:2;2809:3;2805:12;2798:19;;2457:366;;;:::o;2829:365::-;2971:3;2992:66;3056:1;3051:3;2992:66;:::i;:::-;2985:73;;3067:93;3156:3;3067:93;:::i;:::-;3185:2;3180:3;3176:12;3169:19;;2829:365;;;:::o;3200:::-;3342:3;3363:66;3427:1;3422:3;3363:66;:::i;:::-;3356:73;;3438:93;3527:3;3438:93;:::i;:::-;3556:2;3551:3;3547:12;3540:19;;3200:365;;;:::o;3571:118::-;3658:24;3676:5;3658:24;:::i;:::-;3653:3;3646:37;3571:118;;:::o;3695:222::-;3788:4;3826:2;3815:9;3811:18;3803:26;;3839:71;3907:1;3896:9;3892:17;3883:6;3839:71;:::i;:::-;3695:222;;;;:::o;3923:332::-;4044:4;4082:2;4071:9;4067:18;4059:26;;4095:71;4163:1;4152:9;4148:17;4139:6;4095:71;:::i;:::-;4176:72;4244:2;4233:9;4229:18;4220:6;4176:72;:::i;:::-;3923:332;;;;;:::o;4261:419::-;4427:4;4465:2;4454:9;4450:18;4442:26;;4514:9;4508:4;4504:20;4500:1;4489:9;4485:17;4478:47;4542:131;4668:4;4542:131;:::i;:::-;4534:139;;4261:419;;;:::o;4686:::-;4852:4;4890:2;4879:9;4875:18;4867:26;;4939:9;4933:4;4929:20;4925:1;4914:9;4910:17;4903:47;4967:131;5093:4;4967:131;:::i;:::-;4959:139;;4686:419;;;:::o;5111:::-;5277:4;5315:2;5304:9;5300:18;5292:26;;5364:9;5358:4;5354:20;5350:1;5339:9;5335:17;5328:47;5392:131;5518:4;5392:131;:::i;:::-;5384:139;;5111:419;;;:::o;5536:222::-;5629:4;5667:2;5656:9;5652:18;5644:26;;5680:71;5748:1;5737:9;5733:17;5724:6;5680:71;:::i;:::-;5536:222;;;;:::o;5764:332::-;5885:4;5923:2;5912:9;5908:18;5900:26;;5936:71;6004:1;5993:9;5989:17;5980:6;5936:71;:::i;:::-;6017:72;6085:2;6074:9;6070:18;6061:6;6017:72;:::i;:::-;5764:332;;;;;:::o;6102:640::-;6297:4;6335:3;6324:9;6320:19;6312:27;;6349:71;6417:1;6406:9;6402:17;6393:6;6349:71;:::i;:::-;6430:72;6498:2;6487:9;6483:18;6474:6;6430:72;:::i;:::-;6512;6580:2;6569:9;6565:18;6556:6;6512:72;:::i;:::-;6631:9;6625:4;6621:20;6616:2;6605:9;6601:18;6594:48;6659:76;6730:4;6721:6;6659:76;:::i;:::-;6651:84;;6102:640;;;;;;;:::o;6829:98::-;6880:6;6914:5;6908:12;6898:22;;6829:98;;;:::o;6933:168::-;7016:11;7050:6;7045:3;7038:19;7090:4;7085:3;7081:14;7066:29;;6933:168;;;;:::o;7107:169::-;7191:11;7225:6;7220:3;7213:19;7265:4;7260:3;7256:14;7241:29;;7107:169;;;;:::o;7282:305::-;7322:3;7341:20;7359:1;7341:20;:::i;:::-;7336:25;;7375:20;7393:1;7375:20;:::i;:::-;7370:25;;7529:1;7461:66;7457:74;7454:1;7451:81;7448:107;;;7535:18;;:::i;:::-;7448:107;7579:1;7576;7572:9;7565:16;;7282:305;;;;:::o;7593:185::-;7633:1;7650:20;7668:1;7650:20;:::i;:::-;7645:25;;7684:20;7702:1;7684:20;:::i;:::-;7679:25;;7723:1;7713:35;;7728:18;;:::i;:::-;7713:35;7770:1;7767;7763:9;7758:14;;7593:185;;;;:::o;7784:348::-;7824:7;7847:20;7865:1;7847:20;:::i;:::-;7842:25;;7881:20;7899:1;7881:20;:::i;:::-;7876:25;;8069:1;8001:66;7997:74;7994:1;7991:81;7986:1;7979:9;7972:17;7968:105;7965:131;;;8076:18;;:::i;:::-;7965:131;8124:1;8121;8117:9;8106:20;;7784:348;;;;:::o;8138:191::-;8178:4;8198:20;8216:1;8198:20;:::i;:::-;8193:25;;8232:20;8250:1;8232:20;:::i;:::-;8227:25;;8271:1;8268;8265:8;8262:34;;;8276:18;;:::i;:::-;8262:34;8321:1;8318;8314:9;8306:17;;8138:191;;;;:::o;8335:96::-;8372:7;8401:24;8419:5;8401:24;:::i;:::-;8390:35;;8335:96;;;:::o;8437:90::-;8471:7;8514:5;8507:13;8500:21;8489:32;;8437:90;;;:::o;8533:126::-;8570:7;8610:42;8603:5;8599:54;8588:65;;8533:126;;;:::o;8665:77::-;8702:7;8731:5;8720:16;;8665:77;;;:::o;8748:307::-;8816:1;8826:113;8840:6;8837:1;8834:13;8826:113;;;8925:1;8920:3;8916:11;8910:18;8906:1;8901:3;8897:11;8890:39;8862:2;8859:1;8855:10;8850:15;;8826:113;;;8957:6;8954:1;8951:13;8948:101;;;9037:1;9028:6;9023:3;9019:16;9012:27;8948:101;8797:258;8748:307;;;:::o;9061:180::-;9109:77;9106:1;9099:88;9206:4;9203:1;9196:15;9230:4;9227:1;9220:15;9247:180;9295:77;9292:1;9285:88;9392:4;9389:1;9382:15;9416:4;9413:1;9406:15;9433:180;9481:77;9478:1;9471:88;9578:4;9575:1;9568:15;9602:4;9599:1;9592:15;9742:117;9851:1;9848;9841:12;9865:102;9906:6;9957:2;9953:7;9948:2;9941:5;9937:14;9933:28;9923:38;;9865:102;;;:::o;9973:163::-;10113:15;10109:1;10101:6;10097:14;10090:39;9973:163;:::o;10142:157::-;10282:9;10278:1;10270:6;10266:14;10259:33;10142:157;:::o;10305:158::-;10445:10;10441:1;10433:6;10429:14;10422:34;10305:158;:::o;10469:116::-;10539:21;10554:5;10539:21;:::i;:::-;10532:5;10529:32;10519:60;;10575:1;10572;10565:12;10519:60;10469:116;:::o;10591:122::-;10664:24;10682:5;10664:24;:::i;:::-;10657:5;10654:35;10644:63;;10703:1;10700;10693:12;10644:63;10591:122;:::o

Swarm Source

ipfs://77436c0b99cedbb7b94f39125024637a4df21ca581fb21557607b83c923f9fee

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.