ETH Price: $3,415.81 (-0.16%)

Contract

0xAB4549F042A27Ab278eceE098Fe9E89a8d6594E9
 

Overview

ETH Balance

0.099534086286874316 ETH

Eth Value

$339.99 (@ $3,415.81/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add LP205444702024-08-16 23:28:23102 days ago1723850903IN
0xAB4549F0...a8d6594E9
0 ETH0.000423851.00766178
Add LP205442212024-08-16 22:38:11102 days ago1723847891IN
0xAB4549F0...a8d6594E9
0 ETH0.000663461.51974159
Add LP202477792024-07-06 13:31:23143 days ago1720272683IN
0xAB4549F0...a8d6594E9
0 ETH0.000905982.14245483
Add LP202105352024-07-01 8:40:23148 days ago1719823223IN
0xAB4549F0...a8d6594E9
0 ETH0.001684733.97621758
Add LP201030302024-06-16 8:02:47163 days ago1718524967IN
0xAB4549F0...a8d6594E9
0 ETH0.001530253.6125557
Add LP200932262024-06-14 23:07:23165 days ago1718406443IN
0xAB4549F0...a8d6594E9
0 ETH0.002232135.08722735
Add LP200886642024-06-14 7:50:35165 days ago1718351435IN
0xAB4549F0...a8d6594E9
0 ETH0.0069108715.6930234
Add LP200886342024-06-14 7:44:35165 days ago1718351075IN
0xAB4549F0...a8d6594E9
0 ETH0.0071634715.10637216
Add LP200847002024-06-13 18:31:35166 days ago1718303495IN
0xAB4549F0...a8d6594E9
0 ETH0.0052474812.38535318
Add LP200843512024-06-13 17:20:35166 days ago1718299235IN
0xAB4549F0...a8d6594E9
0 ETH0.0063808915.22356364
Add LP200814062024-06-13 7:26:47166 days ago1718263607IN
0xAB4549F0...a8d6594E9
0 ETH0.0004958611.60546275
Add LP200814022024-06-13 7:25:59166 days ago1718263559IN
0xAB4549F0...a8d6594E9
0 ETH0.0004443710.40034305
Add LP200813982024-06-13 7:25:11166 days ago1718263511IN
0xAB4549F0...a8d6594E9
0 ETH0.0005061411.84608014
Add LP200813922024-06-13 7:23:59166 days ago1718263439IN
0xAB4549F0...a8d6594E9
0 ETH0.0048072210.93620366
Send To Vault200783432024-06-12 21:10:23167 days ago1718226623IN
0xAB4549F0...a8d6594E9
0 ETH0.0005342414.93298932
Set Percentages200780802024-06-12 20:17:35167 days ago1718223455IN
0xAB4549F0...a8d6594E9
0 ETH0.0004081517
Add LP200570852024-06-09 21:54:59170 days ago1717970099IN
0xAB4549F0...a8d6594E9
0 ETH0.002653946.57945523
Add LP200570722024-06-09 21:52:23170 days ago1717969943IN
0xAB4549F0...a8d6594E9
0 ETH0.002958287.03108331
Add LP200568412024-06-09 21:06:11170 days ago1717967171IN
0xAB4549F0...a8d6594E9
0 ETH0.002993627.0515017
Add LP200568042024-06-09 20:58:35170 days ago1717966715IN
0xAB4549F0...a8d6594E9
0 ETH0.00303597.2145754
Add LP200567652024-06-09 20:50:47170 days ago1717966247IN
0xAB4549F0...a8d6594E9
0 ETH0.003763429.61742073
Add LP200567652024-06-09 20:50:47170 days ago1717966247IN
0xAB4549F0...a8d6594E9
0 ETH0.004200059.61742073
Add LP200567182024-06-09 20:41:23170 days ago1717965683IN
0xAB4549F0...a8d6594E9
0 ETH0.000425039.94482616
Add LP200567172024-06-09 20:41:11170 days ago1717965671IN
0xAB4549F0...a8d6594E9
0 ETH0.000399529.34802028
Add LP200567152024-06-09 20:40:47170 days ago1717965647IN
0xAB4549F0...a8d6594E9
0 ETH0.00407119.20282571
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
212725632024-11-26 14:37:1113 hrs ago1732631831
0xAB4549F0...a8d6594E9
0.00002 ETH
212700442024-11-26 6:10:1122 hrs ago1732601411
0xAB4549F0...a8d6594E9
0.00002002 ETH
212653732024-11-25 14:28:5937 hrs ago1732544939
0xAB4549F0...a8d6594E9
0.00002 ETH
212639552024-11-25 9:43:4742 hrs ago1732527827
0xAB4549F0...a8d6594E9
0.00002 ETH
212517862024-11-23 16:58:353 days ago1732381115
0xAB4549F0...a8d6594E9
0.00002002 ETH
212509932024-11-23 14:19:233 days ago1732371563
0xAB4549F0...a8d6594E9
0.00002 ETH
212492572024-11-23 8:30:593 days ago1732350659
0xAB4549F0...a8d6594E9
0.00002002 ETH
212453652024-11-22 19:29:594 days ago1732303799
0xAB4549F0...a8d6594E9
0.00002 ETH
212429632024-11-22 11:26:234 days ago1732274783
0xAB4549F0...a8d6594E9
0.00002008 ETH
212391002024-11-21 22:29:475 days ago1732228187
0xAB4549F0...a8d6594E9
0.00002006 ETH
212368772024-11-21 15:03:235 days ago1732201403
0xAB4549F0...a8d6594E9
0.00002004 ETH
212368722024-11-21 15:02:235 days ago1732201343
0xAB4549F0...a8d6594E9
0.00002002 ETH
212368672024-11-21 15:01:235 days ago1732201283
0xAB4549F0...a8d6594E9
0.00002 ETH
212299682024-11-20 15:53:356 days ago1732118015
0xAB4549F0...a8d6594E9
0.00002 ETH
212228352024-11-19 16:00:357 days ago1732032035
0xAB4549F0...a8d6594E9
0.00006006 ETH
212223812024-11-19 14:29:117 days ago1732026551
0xAB4549F0...a8d6594E9
0.00002 ETH
212167672024-11-18 19:42:598 days ago1731958979
0xAB4549F0...a8d6594E9
0.00002002 ETH
212151882024-11-18 14:25:478 days ago1731939947
0xAB4549F0...a8d6594E9
0.00002 ETH
212092992024-11-17 18:44:359 days ago1731869075
0xAB4549F0...a8d6594E9
0.00002002 ETH
212080052024-11-17 14:24:359 days ago1731853475
0xAB4549F0...a8d6594E9
0.00002 ETH
212055052024-11-17 6:02:119 days ago1731823331
0xAB4549F0...a8d6594E9
0.00002006 ETH
212016542024-11-16 17:08:5910 days ago1731776939
0xAB4549F0...a8d6594E9
0.00002004 ETH
212010902024-11-16 15:15:4710 days ago1731770147
0xAB4549F0...a8d6594E9
0.00002002 ETH
212007472024-11-16 14:06:3510 days ago1731765995
0xAB4549F0...a8d6594E9
0.00002 ETH
211965272024-11-15 23:59:1111 days ago1731715151
0xAB4549F0...a8d6594E9
0.00002 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
QDistributor

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 10 : QDistributor.sol
pragma solidity >=0.8.0;

import "./interfaces/IV3Oracle.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./interfaces/IV2Oracle.sol";
import "./interfaces/ILPGateway.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";

contract QDistributor {
    error GotNothing();
    error NotGovernance();
    error FailedToSend();
    error SumNot10000();

    event Received(
        address from, uint256 ethAmount, uint256 amountToVault, uint256 amountToProtocol, uint256 amountToLP
    );
    event SentToProtocol(uint256 amount);
    event SentToVault(uint256 amount);
    event AddedLP(uint256 amount);
    event UpdatedPercentages(uint256 vaultPercentage, uint256 protocolPercentage, uint256 lpPercentage);
    event UpdatedMaxSlippage(uint256 maxSlippageForETHDXNSwap, uint256 maxSlippageForDXNNXDSwap);
    event UpdatedLPGateway(address lpGateway);
    event UpdatedGovernance(address governance);

    uint256 public constant PERCENTAGE_DIVISOR = 10000;
    address public constant nxdStakingVault = 0xa1B56E42137D06280E34B3E1352d80Ac3BECAF79;
    address public constant nxdProtocol = 0xE05430D42842C7B757E5633D19ca65350E01aE11;

    uint256 public vaultPercentage = 3334;
    uint256 public protocolPercentage = 3333;
    uint256 public lpPercentage = 3333;

    uint256 public pendingAmountVault;
    uint256 public pendingAmountProtocol;
    uint256 public pendingAmountLP;

    address public governance;

    ISwapRouter public constant UNISWAP_V3_ROUTER = ISwapRouter(payable(0xE592427A0AEce92De3Edee1F18E0157C05861564));

    address public constant DXN_WETH_POOL = 0x7F808fD904FFA3eb6A6F259e6965Fb1466A05372;
    address public constant WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    IERC20 public constant dxn = IERC20(0x80f0C1c49891dcFDD40b6e0F960F84E6042bcB6F);
    IERC20 public constant nxd = IERC20(0x70536D44820fE3ddd4A2e3eEdbC937b8B9D566C7);

    IUniswapV2Router02 public constant UNISWAP_V2_ROUTER =
        IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);

    IV3Oracle public constant v3Oracle = IV3Oracle(0x21c6e0427fb2bA0E827253f48241aAbDd8051eAa);
    IUniswapV2Pair constant nxdDXNPair = IUniswapV2Pair(0x98134CDE70ff7280bb4b9f4eBa2154009f2C13aC);
    IV2Oracle public constant v2Oracle = IV2Oracle(0x14D558267A97c7a61554d7F7b23a594781E04495);

    uint256 public maxSlippageForETHDXNSwap = 300; // 3%
    uint256 public maxSlippageForDXNNXDSwap = 300; // 3%

    ILPGateway public lpGateway;

    constructor(address _lpGateway) {
        governance = msg.sender;
        lpGateway = ILPGateway(_lpGateway);
    }

    function setLPGateway(address _lpGateway) public {
        if (msg.sender != governance) {
            revert NotGovernance();
        }
        lpGateway = ILPGateway(_lpGateway);
        emit UpdatedLPGateway(_lpGateway);
    }

    function setMaxSlippageForSwap(uint256 _maxSlippageForETHDXNSwap, uint256 _maxSlippageForDXNNXDSwap) public {
        if (msg.sender != governance) {
            revert NotGovernance();
        }
        maxSlippageForETHDXNSwap = _maxSlippageForETHDXNSwap;
        maxSlippageForDXNNXDSwap = _maxSlippageForDXNNXDSwap;
        emit UpdatedMaxSlippage(_maxSlippageForETHDXNSwap, _maxSlippageForDXNNXDSwap);
    }

    function setGovernance(address _governance) public {
        if (msg.sender != governance) {
            revert NotGovernance();
        }
        governance = _governance;
        emit UpdatedGovernance(_governance);
    }

    function sendToVault() public {
        uint256 amount = pendingAmountVault;
        pendingAmountVault = 0;
        (bool sent,) = nxdStakingVault.call{value: amount}("");
        if (!sent) {
            revert FailedToSend();
        }
        emit SentToVault(amount);
    }

    function sendToProtocol(uint256 amount) public {
        if (amount > pendingAmountProtocol) {
            amount = pendingAmountProtocol;
        }
        pendingAmountProtocol -= amount;
        (bool sent,) = nxdProtocol.call{value: amount}("");
        if (!sent) {
            revert FailedToSend();
        }
        emit SentToProtocol(amount);
    }

    function addLP(uint256 amount) public {
        if (amount > pendingAmountLP) {
            amount = pendingAmountLP;
        }
        pendingAmountLP -= amount;

        // Sell 50% of the ETH for DXN
        uint256 quote = v3Oracle.getHumanQuote(DXN_WETH_POOL, 5 minutes, 1 ether, WETH9, address(dxn));
        uint256 minOut = (amount * quote) / 1e18;
        // slippage tolerance
        minOut = (minOut * (10000 - maxSlippageForETHDXNSwap)) / 10000;
        UNISWAP_V3_ROUTER.exactInputSingle{value: amount}(
            ISwapRouter.ExactInputSingleParams(
                WETH9, address(dxn), 10000, address(this), block.timestamp, amount, minOut, 0
            )
        );

        uint256 dxnPriceInEth = (1e18 * 1 ether) / quote;
        uint256 dxnAmountToAdd = (amount / 2) * 1e18 / dxnPriceInEth;
        uint256 dxnToSwapForNXD = dxn.balanceOf(address(this)) - dxnAmountToAdd;

        if (v2Oracle.canUpdate()) {
            v2Oracle.update();
        }
        // Buy NXD with remaining DXN
        uint256 amountOutMin = v2Oracle.consult(address(dxn), dxnToSwapForNXD);
        // slippage tolerance
        amountOutMin = (amountOutMin * (10000 - maxSlippageForDXNNXDSwap)) / 10000;
        address[] memory path = new address[](2);
        path[0] = address(dxn);
        path[1] = address(nxd);

        dxn.approve(address(UNISWAP_V2_ROUTER), dxnToSwapForNXD);

        uint256[] memory amounts = UNISWAP_V2_ROUTER.swapExactTokensForTokens(
            dxnToSwapForNXD, amountOutMin, path, address(this), block.timestamp
        );
        if (amounts[1] == 0) {
            revert GotNothing();
        }

        dxn.approve(address(lpGateway), dxn.balanceOf(address(this)));
        nxd.approve(address(lpGateway), nxd.balanceOf(address(this)));

        lpGateway.addLiquidity(
            address(dxn),
            nxd.balanceOf(address(this)),
            dxn.balanceOf(address(this)),
            0,
            0,
            address(this),
            block.timestamp
        );

        emit AddedLP(amount);
    }

    function setPercentages(uint256 _vaultPercentage, uint256 _protocolPercentage, uint256 _lpPercentage) public {
        if (msg.sender != governance) {
            revert NotGovernance();
        }
        if (_vaultPercentage + _protocolPercentage + _lpPercentage != PERCENTAGE_DIVISOR) {
            revert SumNot10000();
        }
        vaultPercentage = _vaultPercentage;
        protocolPercentage = _protocolPercentage;
        lpPercentage = _lpPercentage;
        emit UpdatedPercentages(_vaultPercentage, _protocolPercentage, _lpPercentage);
    }

    receive() external payable {
        uint256 amount = address(this).balance;

        uint256 amountToVault = (amount * vaultPercentage) / PERCENTAGE_DIVISOR;
        uint256 amountToProtocol = (amount * protocolPercentage) / PERCENTAGE_DIVISOR;
        uint256 amountToLP = (amount * lpPercentage) / PERCENTAGE_DIVISOR;

        pendingAmountVault += amountToVault;
        pendingAmountProtocol += amountToProtocol;
        pendingAmountLP += amountToLP;
        emit Received(msg.sender, amount, amountToVault, amountToProtocol, amountToLP);
    }
}

File 2 of 10 : IV3Oracle.sol
pragma solidity ^0.8.13;

interface IV3Oracle {
    function getHumanQuote(
        address uniswapV3Pool,
        uint32 secondsAgo,
        uint128 baseAmount,
        address baseToken,
        address quoteToken
    ) external view returns (uint256 quoteAmount);
}

File 3 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @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);

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

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

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

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

File 4 of 10 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 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 (uint256);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

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

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

File 5 of 10 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import "./IUniswapV2Router01.sol";

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 6 of 10 : IV2Oracle.sol
pragma solidity ^0.8.13;

interface IV2Oracle {
    function update() external;

    // note this will always return 0 before update has been called successfully for the first time.
    function consult(address token, uint256 amountIn) external view returns (uint256 amountOut);

    function canUpdate() external view returns (bool);
}

File 7 of 10 : ILPGateway.sol
pragma solidity ^0.8.13;

interface ILPGateway {
    function addLiquidity(
        address tokenB,
        uint256 amountNXDDesired,
        uint256 amountBDesired,
        uint256 amountNXDMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
}

File 8 of 10 : ISwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 9 of 10 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

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

    function WETH() external returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

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

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline)
        external
        payable
        returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

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

    function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline)
        external
        payable
        returns (uint256[] memory amounts);

    function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);

    function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
        external
        pure
        returns (uint256 amountOut);

    function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
        external
        pure
        returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

File 10 of 10 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "@uniswap/lib/=lib/solidity-lib/",
    "@uniswap/v2-core/=lib/v2-core/",
    "abdk-libraries-solidity/=lib/abdk-libraries-solidity/",
    "@uniswap/v3-core/=lib/v3-core/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "base64-sol/=lib/base64/",
    "base64/=lib/base64/",
    "solidity-lib/=lib/solidity-lib/contracts/",
    "v2-core/=lib/v2-core/contracts/",
    "v3-core/=lib/v3-core/contracts/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_lpGateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedToSend","type":"error"},{"inputs":[],"name":"GotNothing","type":"error"},{"inputs":[],"name":"NotGovernance","type":"error"},{"inputs":[],"name":"SumNot10000","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddedLP","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToVault","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToProtocol","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToLP","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SentToProtocol","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SentToVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"governance","type":"address"}],"name":"UpdatedGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lpGateway","type":"address"}],"name":"UpdatedLPGateway","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxSlippageForETHDXNSwap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxSlippageForDXNNXDSwap","type":"uint256"}],"name":"UpdatedMaxSlippage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"vaultPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolPercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpPercentage","type":"uint256"}],"name":"UpdatedPercentages","type":"event"},{"inputs":[],"name":"DXN_WETH_POOL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENTAGE_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V2_ROUTER","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V3_ROUTER","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dxn","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpGateway","outputs":[{"internalType":"contract ILPGateway","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSlippageForDXNNXDSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSlippageForETHDXNSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nxd","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nxdProtocol","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nxdStakingVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAmountLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAmountProtocol","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAmountVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendToProtocol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendToVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpGateway","type":"address"}],"name":"setLPGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSlippageForETHDXNSwap","type":"uint256"},{"internalType":"uint256","name":"_maxSlippageForDXNNXDSwap","type":"uint256"}],"name":"setMaxSlippageForSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vaultPercentage","type":"uint256"},{"internalType":"uint256","name":"_protocolPercentage","type":"uint256"},{"internalType":"uint256","name":"_lpPercentage","type":"uint256"}],"name":"setPercentages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"v2Oracle","outputs":[{"internalType":"contract IV2Oracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"v3Oracle","outputs":[{"internalType":"contract IV3Oracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052610d06600055610d05600155610d0560025561012c60075561012c60085534801561002e57600080fd5b5060405161188838038061188883398101604081905261004d91610080565b60068054336001600160a01b031991821617909155600980549091166001600160a01b03929092169190911790556100b0565b60006020828403121561009257600080fd5b81516001600160a01b03811681146100a957600080fd5b9392505050565b6117c9806100bf6000396000f3fe6080604052600436106101bb5760003560e01c80638778ea3c116100ec578063ab033ea91161008a578063d2a5276b11610064578063d2a5276b146105c8578063d7ac9b10146105f0578063ebb2cc4c14610618578063fc7ebebd1461064057600080fd5b8063ab033ea914610572578063caf2976514610592578063ce024dfe146105a857600080fd5b8063a26b90f2116100c6578063a26b90f2146104fe578063a82ed9ec14610514578063a9d3ce991461053c578063aa5d6b991461055c57600080fd5b80638778ea3c146104bd578063940c6c3d146104d35780639ee347fc146104e957600080fd5b80635afe54d21161015957806376929d011161013357806376929d0114610449578063782d21f71461046957806382d68b771461047f57806386bc75601461049557600080fd5b80635afe54d2146103d95780635f8dccec146104015780636e0c63d91461042957600080fd5b806341c64a2f1161019557806341c64a2f146103495780634aa4a4fc146103715780634e7f96d3146103995780635aa6e675146103b957600080fd5b80631b59f23f146102be578063263d5ad0146102e057806331b703db1461030957600080fd5b366102b95760008054479190612710906101d590846114d3565b6101df91906114f0565b90506000612710600154846101f491906114d3565b6101fe91906114f0565b905060006127106002548561021391906114d3565b61021d91906114f0565b905082600360008282546102319190611512565b92505081905550816004600082825461024a9190611512565b9250508190555080600560008282546102639190611512565b9091555050604080513381526020810186905290810184905260608101839052608081018290527f5a53e6f40fb9f31e40ec002f36f96e1aeaa0af51cc934b70a78f7dbfcc132b909060a00160405180910390a1005b600080fd5b3480156102ca57600080fd5b506102de6102d9366004611525565b610656565b005b3480156102ec57600080fd5b506102f660005481565b6040519081526020015b60405180910390f35b34801561031557600080fd5b506103317370536d44820fe3ddd4a2e3eedbc937b8b9d566c781565b6040516001600160a01b039091168152602001610300565b34801561035557600080fd5b5061033173e592427a0aece92de3edee1f18e0157c0586156481565b34801561037d57600080fd5b5061033173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156103a557600080fd5b506102de6103b4366004611555565b6106d6565b3480156103c557600080fd5b50600654610331906001600160a01b031681565b3480156103e557600080fd5b506103317380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f81565b34801561040d57600080fd5b5061033173a1b56e42137d06280e34b3e1352d80ac3becaf7981565b34801561043557600080fd5b506102de610444366004611555565b6107b1565b34801561045557600080fd5b50600954610331906001600160a01b031681565b34801561047557600080fd5b506102f660055481565b34801561048b57600080fd5b506102f660035481565b3480156104a157600080fd5b506103317321c6e0427fb2ba0e827253f48241aabdd8051eaa81565b3480156104c957600080fd5b506102f660085481565b3480156104df57600080fd5b506102f660045481565b3480156104f557600080fd5b506102de61126c565b34801561050a57600080fd5b506102f660015481565b34801561052057600080fd5b50610331737a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561054857600080fd5b506102de61055736600461156e565b611323565b34801561056857600080fd5b506102f660075481565b34801561057e57600080fd5b506102de61058d366004611525565b6113d9565b34801561059e57600080fd5b506102f661271081565b3480156105b457600080fd5b506102de6105c336600461159a565b611452565b3480156105d457600080fd5b5061033173e05430d42842c7b757e5633d19ca65350e01ae1181565b3480156105fc57600080fd5b506103317314d558267a97c7a61554d7f7b23a594781e0449581565b34801561062457600080fd5b50610331737f808fd904ffa3eb6a6f259e6965fb1466a0537281565b34801561064c57600080fd5b506102f660025481565b6006546001600160a01b0316331461068157604051632d5be4cb60e21b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527f1f714ddc9942a05cbeb02e9c531237e727fb74458315b7d3cebac77e7e808d85906020015b60405180910390a150565b6004548111156106e557506004545b80600460008282546106f791906115bc565b909155505060405160009073e05430d42842c7b757e5633d19ca65350e01ae119083908381818185875af1925050503d8060008114610752576040519150601f19603f3d011682016040523d82523d6000602084013e610757565b606091505b50509050806107795760405163467d86d160e01b815260040160405180910390fd5b6040518281527fd1bed6509c476f237ee1244196a137261594ac339dd7427867bbf1a2e9104641906020015b60405180910390a15050565b6005548111156107c057506005545b80600560008282546107d291906115bc565b909155505060405163d465fe0b60e01b8152737f808fd904ffa3eb6a6f259e6965fb1466a05372600482015261012c6024820152670de0b6b3a7640000604482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260648201527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f60848201526000907321c6e0427fb2ba0e827253f48241aabdd8051eaa9063d465fe0b9060a401602060405180830381865afa158015610887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ab91906115cf565b90506000670de0b6b3a76400006108c283856114d3565b6108cc91906114f0565b90506127106007546127106108e191906115bc565b6108eb90836114d3565b6108f591906114f0565b604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f602082019081526127108284019081523060608401908152426080850190815260a085018a815260c08601888152600060e08801908152975163414bf38960e01b815296516001600160a01b039081166004890152955186166024880152935162ffffff1660448701529151841660648601525160848501525160a48401525160c4830152915190911660e482015290915073e592427a0aece92de3edee1f18e0157c058615649063414bf3899085906101040160206040518083038185885af11580156109fe573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a2391906115cf565b506000610a3f836ec097ce7bc90715b34b9f10000000006114f0565b9050600081610a4f6002876114f0565b610a6190670de0b6b3a76400006114d3565b610a6b91906114f0565b6040516370a0823160e01b815230600482015290915060009082907380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f906370a0823190602401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae691906115cf565b610af091906115bc565b90507314d558267a97c7a61554d7f7b23a594781e044956001600160a01b031663a17a26856040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906115e8565b15610bd5577314d558267a97c7a61554d7f7b23a594781e044956001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610bbc57600080fd5b505af1158015610bd0573d6000803e3d6000fd5b505050505b604051633ddac95360e01b81527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f6004820152602481018290526000907314d558267a97c7a61554d7f7b23a594781e0449590633ddac95390604401602060405180830381865afa158015610c42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6691906115cf565b9050612710600854612710610c7b91906115bc565b610c8590836114d3565b610c8f91906114f0565b60408051600280825260608201835292935060009290916020830190803683370190505090507380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f81600081518110610cdd57610cdd611620565b60200260200101906001600160a01b031690816001600160a01b0316815250507370536d44820fe3ddd4a2e3eedbc937b8b9d566c781600181518110610d2557610d25611620565b6001600160a01b03929092166020928302919091019091015260405163095ea7b360e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d6004820152602481018490527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f9063095ea7b3906044016020604051808303816000875af1158015610daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dce91906115e8565b506040516338ed173960e01b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d906338ed173990610e119087908790879030904290600401611636565b6000604051808303816000875af1158015610e30573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e5891908101906116a7565b905080600181518110610e6d57610e6d611620565b6020026020010151600003610e9557604051635070cdd160e01b815260040160405180910390fd5b6009546040516370a0823160e01b81523060048201527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f9163095ea7b3916001600160a01b039091169083906370a0823190602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f91906115cf565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8e91906115e8565b506009546040516370a0823160e01b81523060048201527370536d44820fe3ddd4a2e3eedbc937b8b9d566c79163095ea7b3916001600160a01b039091169083906370a0823190602401602060405180830381865afa158015610ff5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101991906115cf565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611064573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108891906115e8565b506009546040516370a0823160e01b81523060048201526001600160a01b0390911690639187aaca907380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f907370536d44820fe3ddd4a2e3eedbc937b8b9d566c7906370a0823190602401602060405180830381865afa158015611103573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112791906115cf565b6040516370a0823160e01b81523060048201527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f906370a0823190602401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a91906115cf565b6040516001600160e01b031960e086901b1681526001600160a01b0390931660048401526024830191909152604482015260006064820181905260848201523060a48201524260c482015260e4016060604051808303816000875af1158015611207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122b9190611765565b50506040518a81527fb217f5a5c00ed57944941300c478b46c15f909fee78519b51d372d788caeadfe915060200160405180910390a1505050505050505050565b6003805460009182905560405190919073a1b56e42137d06280e34b3e1352d80ac3becaf799083908381818185875af1925050503d80600081146112cc576040519150601f19603f3d011682016040523d82523d6000602084013e6112d1565b606091505b50509050806112f35760405163467d86d160e01b815260040160405180910390fd5b6040518281527f9daa87058a39ded41fcbb572d2e3622388b5b6bb943d63226e37ddf6ef937e85906020016107a5565b6006546001600160a01b0316331461134e57604051632d5be4cb60e21b815260040160405180910390fd5b6127108161135c8486611512565b6113669190611512565b14611384576040516302777ec560e11b815260040160405180910390fd5b60008390556001829055600281905560408051848152602081018490529081018290527f1a9c7b51149f1736f1cdaf2c64576ac08a15e1a84d04408ed0e9620e7214e53c9060600160405180910390a1505050565b6006546001600160a01b0316331461140457604051632d5be4cb60e21b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f17fdeaa3d89b13aa2b63d35b4629f020be603156d5afcf4aba89bfa93d5f579d906020016106cb565b6006546001600160a01b0316331461147d57604051632d5be4cb60e21b815260040160405180910390fd5b6007829055600881905560408051838152602081018390527fb725deafdd769ba20025c2beb2a65d88b1bc04a0231f4bc2a57bc7eacdabe9d191016107a5565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176114ea576114ea6114bd565b92915050565b60008261150d57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156114ea576114ea6114bd565b60006020828403121561153757600080fd5b81356001600160a01b038116811461154e57600080fd5b9392505050565b60006020828403121561156757600080fd5b5035919050565b60008060006060848603121561158357600080fd5b505081359360208301359350604090920135919050565b600080604083850312156115ad57600080fd5b50508035926020909101359150565b818103818111156114ea576114ea6114bd565b6000602082840312156115e157600080fd5b5051919050565b6000602082840312156115fa57600080fd5b8151801515811461154e57600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156116865784516001600160a01b031683529383019391830191600101611661565b50506001600160a01b03969096166060850152505050608001529392505050565b600060208083850312156116ba57600080fd5b825167ffffffffffffffff808211156116d257600080fd5b818501915085601f8301126116e657600080fd5b8151818111156116f8576116f861160a565b8060051b604051601f19603f8301168101818110858211171561171d5761171d61160a565b60405291825284820192508381018501918883111561173b57600080fd5b938501935b8285101561175957845184529385019392850192611740565b98975050505050505050565b60008060006060848603121561177a57600080fd5b835192506020840151915060408401519050925092509256fea26469706673582212202ebf1b682f8b36415352c48b30044e1b85b3d69cd0e80346f051738d5c91e33564736f6c634300081400330000000000000000000000004f4ef460478240ee5b398cf2994a42cb3d061922

Deployed Bytecode

0x6080604052600436106101bb5760003560e01c80638778ea3c116100ec578063ab033ea91161008a578063d2a5276b11610064578063d2a5276b146105c8578063d7ac9b10146105f0578063ebb2cc4c14610618578063fc7ebebd1461064057600080fd5b8063ab033ea914610572578063caf2976514610592578063ce024dfe146105a857600080fd5b8063a26b90f2116100c6578063a26b90f2146104fe578063a82ed9ec14610514578063a9d3ce991461053c578063aa5d6b991461055c57600080fd5b80638778ea3c146104bd578063940c6c3d146104d35780639ee347fc146104e957600080fd5b80635afe54d21161015957806376929d011161013357806376929d0114610449578063782d21f71461046957806382d68b771461047f57806386bc75601461049557600080fd5b80635afe54d2146103d95780635f8dccec146104015780636e0c63d91461042957600080fd5b806341c64a2f1161019557806341c64a2f146103495780634aa4a4fc146103715780634e7f96d3146103995780635aa6e675146103b957600080fd5b80631b59f23f146102be578063263d5ad0146102e057806331b703db1461030957600080fd5b366102b95760008054479190612710906101d590846114d3565b6101df91906114f0565b90506000612710600154846101f491906114d3565b6101fe91906114f0565b905060006127106002548561021391906114d3565b61021d91906114f0565b905082600360008282546102319190611512565b92505081905550816004600082825461024a9190611512565b9250508190555080600560008282546102639190611512565b9091555050604080513381526020810186905290810184905260608101839052608081018290527f5a53e6f40fb9f31e40ec002f36f96e1aeaa0af51cc934b70a78f7dbfcc132b909060a00160405180910390a1005b600080fd5b3480156102ca57600080fd5b506102de6102d9366004611525565b610656565b005b3480156102ec57600080fd5b506102f660005481565b6040519081526020015b60405180910390f35b34801561031557600080fd5b506103317370536d44820fe3ddd4a2e3eedbc937b8b9d566c781565b6040516001600160a01b039091168152602001610300565b34801561035557600080fd5b5061033173e592427a0aece92de3edee1f18e0157c0586156481565b34801561037d57600080fd5b5061033173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156103a557600080fd5b506102de6103b4366004611555565b6106d6565b3480156103c557600080fd5b50600654610331906001600160a01b031681565b3480156103e557600080fd5b506103317380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f81565b34801561040d57600080fd5b5061033173a1b56e42137d06280e34b3e1352d80ac3becaf7981565b34801561043557600080fd5b506102de610444366004611555565b6107b1565b34801561045557600080fd5b50600954610331906001600160a01b031681565b34801561047557600080fd5b506102f660055481565b34801561048b57600080fd5b506102f660035481565b3480156104a157600080fd5b506103317321c6e0427fb2ba0e827253f48241aabdd8051eaa81565b3480156104c957600080fd5b506102f660085481565b3480156104df57600080fd5b506102f660045481565b3480156104f557600080fd5b506102de61126c565b34801561050a57600080fd5b506102f660015481565b34801561052057600080fd5b50610331737a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561054857600080fd5b506102de61055736600461156e565b611323565b34801561056857600080fd5b506102f660075481565b34801561057e57600080fd5b506102de61058d366004611525565b6113d9565b34801561059e57600080fd5b506102f661271081565b3480156105b457600080fd5b506102de6105c336600461159a565b611452565b3480156105d457600080fd5b5061033173e05430d42842c7b757e5633d19ca65350e01ae1181565b3480156105fc57600080fd5b506103317314d558267a97c7a61554d7f7b23a594781e0449581565b34801561062457600080fd5b50610331737f808fd904ffa3eb6a6f259e6965fb1466a0537281565b34801561064c57600080fd5b506102f660025481565b6006546001600160a01b0316331461068157604051632d5be4cb60e21b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527f1f714ddc9942a05cbeb02e9c531237e727fb74458315b7d3cebac77e7e808d85906020015b60405180910390a150565b6004548111156106e557506004545b80600460008282546106f791906115bc565b909155505060405160009073e05430d42842c7b757e5633d19ca65350e01ae119083908381818185875af1925050503d8060008114610752576040519150601f19603f3d011682016040523d82523d6000602084013e610757565b606091505b50509050806107795760405163467d86d160e01b815260040160405180910390fd5b6040518281527fd1bed6509c476f237ee1244196a137261594ac339dd7427867bbf1a2e9104641906020015b60405180910390a15050565b6005548111156107c057506005545b80600560008282546107d291906115bc565b909155505060405163d465fe0b60e01b8152737f808fd904ffa3eb6a6f259e6965fb1466a05372600482015261012c6024820152670de0b6b3a7640000604482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260648201527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f60848201526000907321c6e0427fb2ba0e827253f48241aabdd8051eaa9063d465fe0b9060a401602060405180830381865afa158015610887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ab91906115cf565b90506000670de0b6b3a76400006108c283856114d3565b6108cc91906114f0565b90506127106007546127106108e191906115bc565b6108eb90836114d3565b6108f591906114f0565b604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f602082019081526127108284019081523060608401908152426080850190815260a085018a815260c08601888152600060e08801908152975163414bf38960e01b815296516001600160a01b039081166004890152955186166024880152935162ffffff1660448701529151841660648601525160848501525160a48401525160c4830152915190911660e482015290915073e592427a0aece92de3edee1f18e0157c058615649063414bf3899085906101040160206040518083038185885af11580156109fe573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a2391906115cf565b506000610a3f836ec097ce7bc90715b34b9f10000000006114f0565b9050600081610a4f6002876114f0565b610a6190670de0b6b3a76400006114d3565b610a6b91906114f0565b6040516370a0823160e01b815230600482015290915060009082907380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f906370a0823190602401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae691906115cf565b610af091906115bc565b90507314d558267a97c7a61554d7f7b23a594781e044956001600160a01b031663a17a26856040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6891906115e8565b15610bd5577314d558267a97c7a61554d7f7b23a594781e044956001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610bbc57600080fd5b505af1158015610bd0573d6000803e3d6000fd5b505050505b604051633ddac95360e01b81527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f6004820152602481018290526000907314d558267a97c7a61554d7f7b23a594781e0449590633ddac95390604401602060405180830381865afa158015610c42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6691906115cf565b9050612710600854612710610c7b91906115bc565b610c8590836114d3565b610c8f91906114f0565b60408051600280825260608201835292935060009290916020830190803683370190505090507380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f81600081518110610cdd57610cdd611620565b60200260200101906001600160a01b031690816001600160a01b0316815250507370536d44820fe3ddd4a2e3eedbc937b8b9d566c781600181518110610d2557610d25611620565b6001600160a01b03929092166020928302919091019091015260405163095ea7b360e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d6004820152602481018490527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f9063095ea7b3906044016020604051808303816000875af1158015610daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dce91906115e8565b506040516338ed173960e01b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d906338ed173990610e119087908790879030904290600401611636565b6000604051808303816000875af1158015610e30573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e5891908101906116a7565b905080600181518110610e6d57610e6d611620565b6020026020010151600003610e9557604051635070cdd160e01b815260040160405180910390fd5b6009546040516370a0823160e01b81523060048201527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f9163095ea7b3916001600160a01b039091169083906370a0823190602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f91906115cf565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8e91906115e8565b506009546040516370a0823160e01b81523060048201527370536d44820fe3ddd4a2e3eedbc937b8b9d566c79163095ea7b3916001600160a01b039091169083906370a0823190602401602060405180830381865afa158015610ff5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101991906115cf565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611064573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108891906115e8565b506009546040516370a0823160e01b81523060048201526001600160a01b0390911690639187aaca907380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f907370536d44820fe3ddd4a2e3eedbc937b8b9d566c7906370a0823190602401602060405180830381865afa158015611103573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112791906115cf565b6040516370a0823160e01b81523060048201527380f0c1c49891dcfdd40b6e0f960f84e6042bcb6f906370a0823190602401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a91906115cf565b6040516001600160e01b031960e086901b1681526001600160a01b0390931660048401526024830191909152604482015260006064820181905260848201523060a48201524260c482015260e4016060604051808303816000875af1158015611207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122b9190611765565b50506040518a81527fb217f5a5c00ed57944941300c478b46c15f909fee78519b51d372d788caeadfe915060200160405180910390a1505050505050505050565b6003805460009182905560405190919073a1b56e42137d06280e34b3e1352d80ac3becaf799083908381818185875af1925050503d80600081146112cc576040519150601f19603f3d011682016040523d82523d6000602084013e6112d1565b606091505b50509050806112f35760405163467d86d160e01b815260040160405180910390fd5b6040518281527f9daa87058a39ded41fcbb572d2e3622388b5b6bb943d63226e37ddf6ef937e85906020016107a5565b6006546001600160a01b0316331461134e57604051632d5be4cb60e21b815260040160405180910390fd5b6127108161135c8486611512565b6113669190611512565b14611384576040516302777ec560e11b815260040160405180910390fd5b60008390556001829055600281905560408051848152602081018490529081018290527f1a9c7b51149f1736f1cdaf2c64576ac08a15e1a84d04408ed0e9620e7214e53c9060600160405180910390a1505050565b6006546001600160a01b0316331461140457604051632d5be4cb60e21b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f17fdeaa3d89b13aa2b63d35b4629f020be603156d5afcf4aba89bfa93d5f579d906020016106cb565b6006546001600160a01b0316331461147d57604051632d5be4cb60e21b815260040160405180910390fd5b6007829055600881905560408051838152602081018390527fb725deafdd769ba20025c2beb2a65d88b1bc04a0231f4bc2a57bc7eacdabe9d191016107a5565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176114ea576114ea6114bd565b92915050565b60008261150d57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156114ea576114ea6114bd565b60006020828403121561153757600080fd5b81356001600160a01b038116811461154e57600080fd5b9392505050565b60006020828403121561156757600080fd5b5035919050565b60008060006060848603121561158357600080fd5b505081359360208301359350604090920135919050565b600080604083850312156115ad57600080fd5b50508035926020909101359150565b818103818111156114ea576114ea6114bd565b6000602082840312156115e157600080fd5b5051919050565b6000602082840312156115fa57600080fd5b8151801515811461154e57600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156116865784516001600160a01b031683529383019391830191600101611661565b50506001600160a01b03969096166060850152505050608001529392505050565b600060208083850312156116ba57600080fd5b825167ffffffffffffffff808211156116d257600080fd5b818501915085601f8301126116e657600080fd5b8151818111156116f8576116f861160a565b8060051b604051601f19603f8301168101818110858211171561171d5761171d61160a565b60405291825284820192508381018501918883111561173b57600080fd5b938501935b8285101561175957845184529385019392850192611740565b98975050505050505050565b60008060006060848603121561177a57600080fd5b835192506020840151915060408401519050925092509256fea26469706673582212202ebf1b682f8b36415352c48b30044e1b85b3d69cd0e80346f051738d5c91e33564736f6c63430008140033

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

0000000000000000000000004f4ef460478240ee5b398cf2994a42cb3d061922

-----Decoded View---------------
Arg [0] : _lpGateway (address): 0x4f4EF460478240Ee5b398CF2994a42CB3d061922

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004f4ef460478240ee5b398cf2994a42cb3d061922


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.