Contract 0x03DAa61d8007443a6584e3d8f85105096543C19c 1

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x601316ba78e34d3ac0cd974b406ef2dfdd956db5fcc738da969ac43b51464195Create Pair262324792022-03-22 15:49:20195 days 6 hrs ago0x258de6d045aeb7b16e88ef41e0f9534229bc34d7 IN  0x03daa61d8007443a6584e3d8f85105096543c19c0 MATIC0.078330311755 32.927999978
0x03b996060101de0a01a6403cb50b47698f0e169eadca23f2ba5d895b2af35c84Create Pair261300592022-03-20 1:09:29197 days 20 hrs ago0x258de6d045aeb7b16e88ef41e0f9534229bc34d7 IN  0x03daa61d8007443a6584e3d8f85105096543c19c0 MATIC0.078365932 32.943112275
0x9a99dabfa05a7f2676fcacf6a755bbf1b3cec5fa0deba4ce417b8bb5205d0d19Set Fee To173262012021-07-27 14:39:02433 days 7 hrs ago0xdf456b614fe9ff1c7c0b380330da29c96d40fb02 IN  0x03daa61d8007443a6584e3d8f85105096543c19c0 MATIC0.000229915
0xede645872162e4f999b4a96d09fc9835e7b28a7ada5179af715f9495f2c01b540x60806040145998902021-05-17 9:52:56504 days 12 hrs ago0xdf456b614fe9ff1c7c0b380330da29c96d40fb02 IN  Create: DXswapFactory0 MATIC0.0032625131
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x8c033e76254448e5fb9fbe6a4c16572e0515c8b4973120eaab4ac7dc5015b2ec335009532022-09-24 8:48:059 days 13 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xf58952b42db8cb875aa0c5406539298414ea1256c5d6817e8d089899a29df099334966562022-09-24 6:20:209 days 15 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xcd117044a3de20f8b04eba2b18d7d800caf38aadcb817dcefb02dc276a1e09d9334962082022-09-24 6:04:569 days 16 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x08c60623940a32b8b77af2ede39ef09a6bd831a9200bb0fd4d56912837f9c367329016302022-09-09 20:42:2424 days 1 hr ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x9ff9a39d9e47f812d839bb427b44cf145b0fd25938b07e2f2532951dd48d8045326623342022-09-04 2:19:4029 days 19 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x14f79438309762cef17a842963ab3c4de1cc893608f0ddaea9fefe04a8c8da57325003342022-08-31 0:55:4333 days 21 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xe0d9f717e2531ee6272d52ad56e308d2842d068054a9077d5881ad73c87bbe8b322974102022-08-25 7:19:1639 days 14 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x082b971ee277d2f275e060790e4ad38009a1b51daf6f34de9426a7085fbb8a34322972312022-08-25 7:13:0639 days 14 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x8ae44a947968bdabc2775f41664311ac97de81b03f3c55a6250cdb2e3a4abe2c322970472022-08-25 7:06:4639 days 14 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xde2bd6ff22abaa7158f8377f91685b877041a331386aa63b2cf632c9d23666f5322968382022-08-25 6:57:2839 days 15 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x91da07ac183321a5c728b3da1f7a40bb9677a202d5cfee56b269d357f95df759322965682022-08-25 6:48:0839 days 15 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x3da38d9c1cbac8e3ad939b35a88214482b64810c60b06bbfc8cf5b678b7e1687322960562022-08-25 6:30:3239 days 15 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x6d698a8e92c069ea67d3d424b931db286921db57ee868333a8764c113e12b954322953782022-08-25 6:05:0539 days 16 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xe8dc4e937bb2af27909b17424daa42dc2122dc19d955e08b1ebd3a6533bbc8ca321305942022-08-21 0:07:4543 days 21 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x84c2ea2ecee54f0300b73d80a1e742e8b2663377108d8f37f57734cea9493d89317092552022-08-09 21:05:1555 days 1 hr ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x8b62c904dc7dd50f46508c3eef0ce4828fdc1fc617fc6be3b5102b0f1c714fe9312647272022-07-29 5:51:2466 days 16 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x520a6db574958432de1003a4d4325b723aa243d5ddffe6268cecf5426fa09bde312645442022-07-29 5:45:0666 days 16 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x93e23f56e737ec72e3e947d6fe5170156aacde2778ae0a97b57d88a8daa13003308188542022-07-17 9:56:5278 days 12 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xc0c3e5f96d2b2a003786ee03ec5e63df393f7b44e64f66734b4b8f1a0005a321307813402022-07-16 8:46:3879 days 13 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xfafee96907170cf76b810a34247a450db44d2e94649df82d1faa6fe67e5de132304841212022-07-08 13:09:1387 days 8 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xa7b80becd288672727d77d303690f0e8f8f3832dedce458c62097ac44564eff1303775702022-07-05 19:38:0890 days 2 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x0913707a7ba74fcf6be9cd9212ad15c2f8e0b2ee6261275a28bc39b8c3f462b6301402132022-06-29 14:53:2596 days 7 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xe8bdafd0112ac0df5d944190a1d9a86322d85d524637cb6264f9c775dad2fea7301401462022-06-29 14:50:4196 days 7 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0x2eb1cc578b3c0ba2c42bf82cd2e2742ea1b10f1ab4fa8d6e6bdd66e15ccd72fa301384952022-06-29 13:50:0096 days 8 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
0xdb0a5a0b7cecf2ebb2fcda704a24df6b695a7fd5731ba8e42e785d29e8b2ca5d301263952022-06-29 6:22:3396 days 15 hrs ago 0x03daa61d8007443a6584e3d8f85105096543c19c  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DXswapFactory

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-06-30
*/

// File: contracts/interfaces/IDXswapFactory.sol

pragma solidity >=0.5.0;

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

    function INIT_CODE_PAIR_HASH() external pure returns (bytes32);
    function feeTo() external view returns (address);
    function protocolFeeDenominator() external view returns (uint8);
    function feeToSetter() external view returns (address);

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

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

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
    function setProtocolFee(uint8 _protocolFee) external;
    function setSwapFee(address pair, uint32 swapFee) external;
}

// File: contracts/interfaces/IDXswapPair.sol

pragma solidity >=0.5.0;

interface IDXswapPair {
    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 swapFee() external view returns (uint32);

    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;
    function setSwapFee(uint32) external;
}

// File: contracts/interfaces/IDXswapERC20.sol

pragma solidity >=0.5.0;

interface IDXswapERC20 {
    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;
}

// File: contracts/libraries/SafeMath.sol

pragma solidity =0.5.16;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
    }
}

// File: contracts/DXswapERC20.sol

pragma solidity =0.5.16;



contract DXswapERC20 is IDXswapERC20 {
    using SafeMath for uint;

    string public constant name = 'HoneySwap';
    string public constant symbol = 'HNS';
    uint8 public constant decimals = 18;
    uint  public totalSupply;
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;

    bytes32 public DOMAIN_SEPARATOR;
    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
    mapping(address => uint) public nonces;

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

    constructor() public {
        uint chainId;
        assembly {
            chainId := chainid
        }
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
                keccak256(bytes(name)),
                keccak256(bytes('1')),
                chainId,
                address(this)
            )
        );
    }

    function _mint(address to, uint value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint value) internal {
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Transfer(from, address(0), value);
    }

    function _approve(address owner, address spender, uint value) private {
        allowance[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    function _transfer(address from, address to, uint value) private {
        balanceOf[from] = balanceOf[from].sub(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(from, to, value);
    }

    function approve(address spender, uint value) external returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    function transfer(address to, uint value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint value) external returns (bool) {
        if (allowance[from][msg.sender] != uint(-1)) {
            allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
        }
        _transfer(from, to, value);
        return true;
    }

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
        require(deadline >= block.timestamp, 'DXswapERC20: EXPIRED');
        bytes32 digest = keccak256(
            abi.encodePacked(
                '\x19\x01',
                DOMAIN_SEPARATOR,
                keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
            )
        );
        address recoveredAddress = ecrecover(digest, v, r, s);
        require(recoveredAddress != address(0) && recoveredAddress == owner, 'DXswapERC20: INVALID_SIGNATURE');
        _approve(owner, spender, value);
    }
}

// File: contracts/libraries/Math.sol

pragma solidity =0.5.16;

// a library for performing various math operations

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

// File: contracts/libraries/UQ112x112.sol

pragma solidity =0.5.16;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))

// range: [0, 2**112 - 1]
// resolution: 1 / 2**112

library UQ112x112 {
    uint224 constant Q112 = 2**112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }
}

// File: contracts/interfaces/IERC20.sol

pragma solidity >=0.5.0;

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

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view 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);
}

// File: contracts/interfaces/IDXswapCallee.sol

pragma solidity >=0.5.0;

interface IDXswapCallee {
    function DXswapCall(address sender, uint amount0, uint amount1, bytes calldata data) external;
}

// File: contracts/DXswapPair.sol

pragma solidity =0.5.16;








contract DXswapPair is IDXswapPair, DXswapERC20 {
    using SafeMath  for uint;
    using UQ112x112 for uint224;

    uint public constant MINIMUM_LIQUIDITY = 10**3;
    bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));

    address public factory;
    address public token0;
    address public token1;

    uint112 private reserve0;           // uses single storage slot, accessible via getReserves
    uint112 private reserve1;           // uses single storage slot, accessible via getReserves
    uint32  private blockTimestampLast; // uses single storage slot, accessible via getReserves

    uint public price0CumulativeLast;
    uint public price1CumulativeLast;
    uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
    uint32 public swapFee = 30; // uses 0.3% fee as default

    uint private unlocked = 1;
    modifier lock() {
        require(unlocked == 1, 'DXswapPair: LOCKED');
        unlocked = 0;
        _;
        unlocked = 1;
    }

    function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
        _reserve0 = reserve0;
        _reserve1 = reserve1;
        _blockTimestampLast = blockTimestampLast;
    }

    function _safeTransfer(address token, address to, uint value) private {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'DXswapPair: TRANSFER_FAILED');
    }

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

    constructor() public {
        factory = msg.sender;
    }

    // called once by the factory at time of deployment
    function initialize(address _token0, address _token1) external {
        require(msg.sender == factory, 'DXswapPair: FORBIDDEN'); // sufficient check
        token0 = _token0;
        token1 = _token1;
    }

    // called by the factory to set the swapFee
    function setSwapFee(uint32 _swapFee) external {
        require(msg.sender == factory, 'DXswapPair: FORBIDDEN'); // sufficient check
        require(_swapFee <= 1000, 'DXswapPair: FORBIDDEN_FEE'); // fee percentage check
        swapFee = _swapFee;
    }

    // update reserves and, on the first call per block, price accumulators
    function _update(uint balance0, uint balance1, uint112 _reserve0, uint112 _reserve1) private {
        require(balance0 <= uint112(-1) && balance1 <= uint112(-1), 'DXswapPair: OVERFLOW');
        uint32 blockTimestamp = uint32(block.timestamp % 2**32);
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
            // * never overflows, and + overflow is desired
            price0CumulativeLast += uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;
            price1CumulativeLast += uint(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed;
        }
        reserve0 = uint112(balance0);
        reserve1 = uint112(balance1);
        blockTimestampLast = blockTimestamp;
        emit Sync(reserve0, reserve1);
    }

    // if fee is on, mint liquidity equivalent to 1/ (protocolFeeDenominator + ~1) share of the growth in sqrt(k)
    function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) {
        address feeTo = IDXswapFactory(factory).feeTo();
        uint8 protocolFeeDenominator = IDXswapFactory(factory).protocolFeeDenominator();
        feeOn = feeTo != address(0);
        uint _kLast = kLast; // gas savings
        if (feeOn) {
            if (_kLast != 0) {
                uint rootK = Math.sqrt(uint(_reserve0).mul(_reserve1));
                uint rootKLast = Math.sqrt(_kLast);
                if (rootK > rootKLast) {
                    uint numerator = totalSupply.mul(rootK.sub(rootKLast));
                    uint denominator = rootK.mul(protocolFeeDenominator).add(rootKLast);
                    uint liquidity = numerator / denominator;
                    if (liquidity > 0) _mint(feeTo, liquidity);
                }
            }
        } else if (_kLast != 0) {
            kLast = 0;
        }
    }

    // this low-level function should be called from a contract which performs important safety checks
    function mint(address to) external lock returns (uint liquidity) {
        (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
        uint balance0 = IERC20(token0).balanceOf(address(this));
        uint balance1 = IERC20(token1).balanceOf(address(this));
        uint amount0 = balance0.sub(_reserve0);
        uint amount1 = balance1.sub(_reserve1);

        bool feeOn = _mintFee(_reserve0, _reserve1);
        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        if (_totalSupply == 0) {
            liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
            _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
        } else {
            liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
        }
        require(liquidity > 0, 'DXswapPair: INSUFFICIENT_LIQUIDITY_MINTED');
        _mint(to, liquidity);

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Mint(msg.sender, amount0, amount1);
    }

    // this low-level function should be called from a contract which performs important safety checks
    function burn(address to) external lock returns (uint amount0, uint amount1) {
        (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
        address _token0 = token0;                                // gas savings
        address _token1 = token1;                                // gas savings
        uint balance0 = IERC20(_token0).balanceOf(address(this));
        uint balance1 = IERC20(_token1).balanceOf(address(this));
        uint liquidity = balanceOf[address(this)];

        bool feeOn = _mintFee(_reserve0, _reserve1);
        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution
        amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution
        require(amount0 > 0 && amount1 > 0, 'DXswapPair: INSUFFICIENT_LIQUIDITY_BURNED');
        _burn(address(this), liquidity);
        _safeTransfer(_token0, to, amount0);
        _safeTransfer(_token1, to, amount1);
        balance0 = IERC20(_token0).balanceOf(address(this));
        balance1 = IERC20(_token1).balanceOf(address(this));

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Burn(msg.sender, amount0, amount1, to);
    }

    // this low-level function should be called from a contract which performs important safety checks
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
        require(amount0Out > 0 || amount1Out > 0, 'DXswapPair: INSUFFICIENT_OUTPUT_AMOUNT');
        (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
        require(amount0Out < _reserve0 && amount1Out < _reserve1, 'DXswapPair: INSUFFICIENT_LIQUIDITY');

        uint balance0;
        uint balance1;
        { // scope for _token{0,1}, avoids stack too deep errors
            address _token0 = token0;
            address _token1 = token1;
            require(to != _token0 && to != _token1, 'DXswapPair: INVALID_TO');
            if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
            if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
            if (data.length > 0) IDXswapCallee(to).DXswapCall(msg.sender, amount0Out, amount1Out, data);
            balance0 = IERC20(_token0).balanceOf(address(this));
            balance1 = IERC20(_token1).balanceOf(address(this));
        }
        uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;
        uint amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;
        require(amount0In > 0 || amount1In > 0, 'DXswapPair: INSUFFICIENT_INPUT_AMOUNT');
        { // scope for reserve{0,1}Adjusted, avoids stack too deep errors
            uint balance0Adjusted = balance0.mul(10000).sub(amount0In.mul(swapFee));
            uint balance1Adjusted = balance1.mul(10000).sub(amount1In.mul(swapFee));
            require(balance0Adjusted.mul(balance1Adjusted) >= uint(_reserve0).mul(_reserve1).mul(10000**2), 'DXswapPair: K');
        }

        _update(balance0, balance1, _reserve0, _reserve1);
        emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
    }

    // force balances to match reserves
    function skim(address to) external lock {
        address _token0 = token0; // gas savings
        address _token1 = token1; // gas savings
        _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0));
        _safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1));
    }

    // force reserves to match balances
    function sync() external lock {
        _update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1);
    }
}

// File: contracts/DXswapFactory.sol

pragma solidity =0.5.16;



contract DXswapFactory is IDXswapFactory {
    address public feeTo;
    address public feeToSetter;
    address public halfFeeToken;
    uint8 public protocolFeeDenominator = 5; // uses 1/6 ~16% of each swap fee
    uint32 public constant HALF_SWAP_FEE = 15;
    bytes32 public constant INIT_CODE_PAIR_HASH = keccak256(abi.encodePacked(type(DXswapPair).creationCode));

    mapping(address => mapping(address => address)) public getPair;
    address[] public allPairs;

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

    constructor(address _feeToSetter, address _halfFeeToken) public {
        feeToSetter = _feeToSetter;
        halfFeeToken = _halfFeeToken;
    }

    function allPairsLength() external view returns (uint) {
        return allPairs.length;
    }

    function createPair(address tokenA, address tokenB) external returns (address pair) {
        require(tokenA != tokenB, 'DXswapFactory: IDENTICAL_ADDRESSES');
        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'DXswapFactory: ZERO_ADDRESS');
        require(getPair[token0][token1] == address(0), 'DXswapFactory: PAIR_EXISTS'); // single check is sufficient
        bytes memory bytecode = type(DXswapPair).creationCode;
        bytes32 salt = keccak256(abi.encodePacked(token0, token1));
        assembly {
            pair := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }
        IDXswapPair(pair).initialize(token0, token1);
        if (token0 == halfFeeToken || token1 == halfFeeToken) {
            IDXswapPair(pair).setSwapFee(HALF_SWAP_FEE);
        }
        getPair[token0][token1] = pair;
        getPair[token1][token0] = pair; // populate mapping in the reverse direction
        allPairs.push(pair);
        emit PairCreated(token0, token1, pair, allPairs.length);
    }

    function setFeeTo(address _feeTo) external {
        require(msg.sender == feeToSetter, 'DXswapFactory: FORBIDDEN');
        feeTo = _feeTo;
    }

    function setFeeToSetter(address _feeToSetter) external {
        require(msg.sender == feeToSetter, 'DXswapFactory: FORBIDDEN');
        feeToSetter = _feeToSetter;
    }

    function setProtocolFee(uint8 _protocolFeeDenominator) external {
        require(msg.sender == feeToSetter, 'DXswapFactory: FORBIDDEN');
        require(_protocolFeeDenominator > 0, 'DXswapFactory: FORBIDDEN_FEE');
        protocolFeeDenominator = _protocolFeeDenominator;
    }

    function setSwapFee(address _pair, uint32 _swapFee) external {
        require(msg.sender == feeToSetter, 'DXswapFactory: FORBIDDEN');
        IDXswapPair(_pair).setSwapFee(_swapFee);
    }

    function setHalfFeeToken(address _halfFeeToken) external {
        require(msg.sender == feeToSetter, 'DXswapFactory: FORBIDDEN');
        halfFeeToken = _halfFeeToken;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"},{"internalType":"address","name":"_halfFeeToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"constant":true,"inputs":[],"name":"HALF_SWAP_FEE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"INIT_CODE_PAIR_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeToSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"halfFeeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"protocolFeeDenominator","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"name":"setFeeToSetter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_halfFeeToken","type":"address"}],"name":"setHalfFeeToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint8","name":"_protocolFeeDenominator","type":"uint8"}],"name":"setProtocolFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint32","name":"_swapFee","type":"uint32"}],"name":"setSwapFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040526002805460ff60a01b1916600560a01b17905534801561002357600080fd5b50604051613a0e380380613a0e8339818101604052604081101561004657600080fd5b508051602090910151600180546001600160a01b039384166001600160a01b031991821617909155600280549390921692169190911790556139818061008d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80635855a25a11610097578063c9c6539611610066578063c9c6539614610278578063e6a43905146102b3578063e8d6322c146102ee578063f46901ed146102f6576100f5565b80635855a25a146101cb5780638f8e25c8146101d35780639e68ceb814610206578063a2e74af614610245576100f5565b80632ff7042a116100d35780632ff7042a146101505780634e91f8111461016e5780634ea731e114610190578063574f2ba3146101b1576100f5565b8063017e7e58146100fa578063094b74151461012b5780631e3dd18b14610133575b600080fd5b610102610329565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610102610345565b6101026004803603602081101561014957600080fd5b5035610361565b610158610395565b6040805160ff9092168252519081900360200190f35b61018e6004803603602081101561018457600080fd5b503560ff166103b6565b005b6101986104fa565b6040805163ffffffff9092168252519081900360200190f35b6101b96104ff565b60408051918252519081900360200190f35b6101b9610505565b61018e600480360360208110156101e957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166105b6565b61018e6004803603604081101561021c57600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16610683565b61018e6004803603602081101561025b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610798565b6101026004803603604081101561028e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610865565b610102600480360360408110156102c957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610d73565b610102610da6565b61018e6004803603602081101561030c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610dc2565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6004818154811061036e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025474010000000000000000000000000000000000000000900460ff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461043c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f445873776170466163746f72793a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b60008160ff16116104ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f445873776170466163746f72793a20464f5242494444454e5f46454500000000604482015290519081900360640190fd5b6002805460ff90921674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b600f81565b60045490565b60405161051460208201610e8f565b6020820181038252601f19601f820116604052506040516020018082805190602001908083835b6020831061057857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161053b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012081565b60015473ffffffffffffffffffffffffffffffffffffffff16331461063c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f445873776170466163746f72793a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461070957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f445873776170466163746f72793a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b604080517fd6d788c300000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152905173ffffffffffffffffffffffffffffffffffffffff84169163d6d788c391602480830192600092919082900301818387803b15801561077c57600080fd5b505af1158015610790573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461081e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f445873776170466163746f72793a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061392b6022913960400191505060405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161061092957838561092c565b84845b909250905073ffffffffffffffffffffffffffffffffffffffff82166109b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f445873776170466163746f72793a205a45524f5f414444524553530000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff828116600090815260036020908152604080832085851684529091529020541615610a5457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f445873776170466163746f72793a20504149525f455849535453000000000000604482015290519081900360640190fd5b606060405180602001610a6690610e8f565b6020820181038252601f19601f82011660405250905060008383604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f5604080517f485cc95500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152868116602483015291519297509087169163485cc9559160448082019260009290919082900301818387803b158015610b9357600080fd5b505af1158015610ba7573d6000803e3d6000fd5b505060025473ffffffffffffffffffffffffffffffffffffffff8781169116149150819050610bf0575060025473ffffffffffffffffffffffffffffffffffffffff8481169116145b15610c7c57604080517fd6d788c3000000000000000000000000000000000000000000000000000000008152600f6004820152905173ffffffffffffffffffffffffffffffffffffffff87169163d6d788c391602480830192600092919082900301818387803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b505050505b73ffffffffffffffffffffffffffffffffffffffff80851660008181526003602081815260408084208987168086529083528185208054978d167fffffffffffffffffffffffff000000000000000000000000000000000000000098891681179091559383528185208686528352818520805488168517905560048054600181018255958190527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90950180549097168417909655925483519283529082015281517f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9929181900390910190a35050505092915050565b600360209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff163314610e4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f445873776170466163746f72793a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b612a8e80610e9d8339019056fe6080604052600c805463ffffffff1916601e1790556001600d5534801561002557600080fd5b506040514690806052612a3c823960408051918290036052018220828201825260098352680486f6e6579537761760bc1b6020938401528151808301835260018152603160f81b908401528151808401919091527ff06124be02c58ef1563a8f85f1490aeefc91aee7813f3fc6b96793c4b898a65a818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060035550600580546001600160a01b03191633179055612928806101146000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80636a62784211610104578063ba9a7a56116100a2578063d505accf11610071578063d505accf1461058a578063d6d788c3146105db578063dd62ed3e146105fe578063fff6cae91461062c576101cf565b8063ba9a7a561461054c578063bc25cf7714610554578063c45a01551461057a578063d21220a714610582576101cf565b80637ecebe00116100de5780637ecebe00146104b357806389afcb44146104d957806395d89b4114610518578063a9059cbb14610520576101cf565b80636a6278421461045f57806370a08231146104855780637464fc3d146104ab576101cf565b806330adf81f11610171578063485cc9551161014b578063485cc9551461040057806354cf2aeb1461042e5780635909c0d51461044f5780635a3d549314610457576101cf565b806330adf81f146103d2578063313ce567146103da5780633644e515146103f8576101cf565b8063095ea7b3116101ad578063095ea7b31461031e5780630dfe16811461035e57806318160ddd1461038257806323b872dd1461039c576101cf565b8063022c0d9f146101d457806306fdde03146102625780630902f1ac146102df575b600080fd5b610260600480360360808110156101ea57600080fd5b8135916020810135916001600160a01b03604083013516919081019060808101606082013564010000000081111561022157600080fd5b82018360208201111561023357600080fd5b8035906020019184600183028401116401000000008311171561025557600080fd5b509092509050610634565b005b61026a610c0b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a457818101518382015260200161028c565b50505050905090810190601f1680156102d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e7610c44565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034a6004803603604081101561033457600080fd5b506001600160a01b038135169060200135610c99565b604080519115158252519081900360200190f35b610366610cb0565b604080516001600160a01b039092168252519081900360200190f35b61038a610cbf565b60408051918252519081900360200190f35b61034a600480360360608110156103b257600080fd5b506001600160a01b03813581169160208101359091169060400135610cc5565b61038a610d7d565b6103e2610da1565b6040805160ff9092168252519081900360200190f35b61038a610da6565b6102606004803603604081101561041657600080fd5b506001600160a01b0381358116916020013516610dac565b610436610e51565b6040805163ffffffff9092168252519081900360200190f35b61038a610e5d565b61038a610e63565b61038a6004803603602081101561047557600080fd5b50356001600160a01b0316610e69565b61038a6004803603602081101561049b57600080fd5b50356001600160a01b03166111d5565b61038a6111e7565b61038a600480360360208110156104c957600080fd5b50356001600160a01b03166111ed565b6104ff600480360360208110156104ef57600080fd5b50356001600160a01b03166111ff565b6040805192835260208301919091528051918290030190f35b61026a611627565b61034a6004803603604081101561053657600080fd5b506001600160a01b038135169060200135611660565b61038a61166d565b6102606004803603602081101561056a57600080fd5b50356001600160a01b0316611673565b610366611835565b610366611844565b610260600480360360e08110156105a057600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611853565b610260600480360360208110156105f157600080fd5b503563ffffffff16611ab7565b61038a6004803603604081101561061457600080fd5b506001600160a01b0381358116916020013516611baa565b610260611bc7565b600d5460011461068b576040805162461bcd60e51b815260206004820152601260248201527f445873776170506169723a204c4f434b45440000000000000000000000000000604482015290519081900360640190fd5b6000600d558415158061069e5750600084115b6106d95760405162461bcd60e51b81526004018080602001828103825260268152602001806128806026913960400191505060405180910390fd5b6000806106e4610c44565b5091509150816dffffffffffffffffffffffffffff16871080156107175750806dffffffffffffffffffffffffffff1686105b6107525760405162461bcd60e51b815260040180806020018281038252602281526020018061285e6022913960400191505060405180910390fd5b60065460075460009182916001600160a01b039182169190811690891682148015906107905750806001600160a01b0316896001600160a01b031614155b6107e1576040805162461bcd60e51b815260206004820152601660248201527f445873776170506169723a20494e56414c49445f544f00000000000000000000604482015290519081900360640190fd5b8a156107f2576107f2828a8d611d79565b891561080357610803818a8c611d79565b86156108be57886001600160a01b03166378b94ae6338d8d8c8c6040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050505b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561091d57600080fd5b505afa158015610931573d6000803e3d6000fd5b505050506040513d602081101561094757600080fd5b5051604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519195506001600160a01b038316916370a0823191602480820192602092909190829003018186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610a00576000610a16565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610a3a576000610a50565b89856dffffffffffffffffffffffffffff160383035b90506000821180610a615750600081115b610a9c5760405162461bcd60e51b81526004018080602001828103825260258152602001806128a66025913960400191505060405180910390fd5b600c54600090610ad990610abb90859063ffffffff90811690611f5f16565b610acd8761271063ffffffff611f5f16565b9063ffffffff611fcb16565b600c54909150600090610afb90610abb90859063ffffffff90811690611f5f16565b9050610b346305f5e100610b286dffffffffffffffffffffffffffff8b8116908b1663ffffffff611f5f16565b9063ffffffff611f5f16565b610b44838363ffffffff611f5f16565b1015610b97576040805162461bcd60e51b815260206004820152600d60248201527f445873776170506169723a204b00000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ba584848888612023565b60408051838152602081018390528082018d9052606081018c905290516001600160a01b038b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600d55505050505050505050565b6040518060400160405280600981526020017f486f6e657953776170000000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610ca63384846122c5565b5060015b92915050565b6006546001600160a01b031681565b60005481565b6001600160a01b03831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610d68576001600160a01b0384166000908152600260209081526040808320338452909152902054610d43908363ffffffff611fcb16565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b610d73848484612327565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b6005546001600160a01b03163314610e0b576040805162461bcd60e51b815260206004820152601560248201527f445873776170506169723a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b600680546001600160a01b039384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b600c5463ffffffff1681565b60095481565b600a5481565b6000600d54600114610ec2576040805162461bcd60e51b815260206004820152601260248201527f445873776170506169723a204c4f434b45440000000000000000000000000000604482015290519081900360640190fd5b6000600d81905580610ed2610c44565b50600654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519395509193506000926001600160a01b03909116916370a08231916024808301926020929190829003018186803b158015610f3f57600080fd5b505afa158015610f53573d6000803e3d6000fd5b505050506040513d6020811015610f6957600080fd5b5051600754604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610fd557600080fd5b505afa158015610fe9573d6000803e3d6000fd5b505050506040513d6020811015610fff57600080fd5b505190506000611025836dffffffffffffffffffffffffffff871663ffffffff611fcb16565b90506000611049836dffffffffffffffffffffffffffff871663ffffffff611fcb16565b9050600061105787876123e1565b60005490915080611094576110806103e8610acd61107b878763ffffffff611f5f16565b6125d9565b985061108f60006103e861262b565b6110f1565b6110ee6dffffffffffffffffffffffffffff89166110b8868463ffffffff611f5f16565b816110bf57fe5b046dffffffffffffffffffffffffffff89166110e1868563ffffffff611f5f16565b816110e857fe5b046126c1565b98505b600089116111305760405162461bcd60e51b81526004018080602001828103825260298152602001806128356029913960400191505060405180910390fd5b61113a8a8a61262b565b61114686868a8a612023565b811561118857600854611184906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff611f5f16565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600d5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600d54600114611259576040805162461bcd60e51b815260206004820152601260248201527f445873776170506169723a204c4f434b45440000000000000000000000000000604482015290519081900360640190fd5b6000600d81905580611269610c44565b50600654600754604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519496509294506001600160a01b039182169391169160009184916370a08231916024808301926020929190829003018186803b1580156112de57600080fd5b505afa1580156112f2573d6000803e3d6000fd5b505050506040513d602081101561130857600080fd5b5051604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519192506000916001600160a01b038516916370a08231916024808301926020929190829003018186803b15801561136f57600080fd5b505afa158015611383573d6000803e3d6000fd5b505050506040513d602081101561139957600080fd5b5051306000908152600160205260408120549192506113b888886123e1565b600054909150806113cf848763ffffffff611f5f16565b816113d657fe5b049a50806113ea848663ffffffff611f5f16565b816113f157fe5b04995060008b118015611404575060008a115b61143f5760405162461bcd60e51b81526004018080602001828103825260298152602001806128cb6029913960400191505060405180910390fd5b61144930846126d9565b611454878d8d611d79565b61145f868d8c611d79565b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b038916916370a08231916024808301926020929190829003018186803b1580156114be57600080fd5b505afa1580156114d2573d6000803e3d6000fd5b505050506040513d60208110156114e857600080fd5b5051604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519196506001600160a01b038816916370a0823191602480820192602092909190829003018186803b15801561154d57600080fd5b505afa158015611561573d6000803e3d6000fd5b505050506040513d602081101561157757600080fd5b5051935061158785858b8b612023565b81156115c9576008546115c5906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff611f5f16565b600b555b604080518c8152602081018c905281516001600160a01b038f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600d81905550915091565b6040518060400160405280600381526020017f484e53000000000000000000000000000000000000000000000000000000000081525081565b6000610ca6338484612327565b6103e881565b600d546001146116ca576040805162461bcd60e51b815260206004820152601260248201527f445873776170506169723a204c4f434b45440000000000000000000000000000604482015290519081900360640190fd5b6000600d55600654600754600854604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b0394851694909316926117999285928792611794926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b15801561175c57600080fd5b505afa158015611770573d6000803e3d6000fd5b505050506040513d602081101561178657600080fd5b50519063ffffffff611fcb16565b611d79565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161182b9284928792611794926e01000000000000000000000000000090046dffffffffffffffffffffffffffff16916001600160a01b038616916370a0823191602480820192602092909190829003018186803b15801561175c57600080fd5b50506001600d5550565b6005546001600160a01b031681565b6007546001600160a01b031681565b428410156118a8576040805162461bcd60e51b815260206004820152601460248201527f44587377617045524332303a2045585049524544000000000000000000000000604482015290519081900360640190fd5b6003546001600160a01b0380891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156119fc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b03811615801590611a505750886001600160a01b0316816001600160a01b0316145b611aa1576040805162461bcd60e51b815260206004820152601e60248201527f44587377617045524332303a20494e56414c49445f5349474e41545552450000604482015290519081900360640190fd5b611aac8989896122c5565b505050505050505050565b6005546001600160a01b03163314611b16576040805162461bcd60e51b815260206004820152601560248201527f445873776170506169723a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b6103e88163ffffffff161115611b73576040805162461bcd60e51b815260206004820152601960248201527f445873776170506169723a20464f5242494444454e5f46454500000000000000604482015290519081900360640190fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff92909216919091179055565b600260209081526000928352604080842090915290825290205481565b600d54600114611c1e576040805162461bcd60e51b815260206004820152601260248201527f445873776170506169723a204c4f434b45440000000000000000000000000000604482015290519081900360640190fd5b6000600d55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611d72926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611c8857600080fd5b505afa158015611c9c573d6000803e3d6000fd5b505050506040513d6020811015611cb257600080fd5b5051600754604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611d1857600080fd5b505afa158015611d2c573d6000803e3d6000fd5b505050506040513d6020811015611d4257600080fd5b50516008546dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416612023565b6001600d55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b60208310611e7257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611e35565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611ed4576040519150601f19603f3d011682016040523d82523d6000602084013e611ed9565b606091505b5091509150818015611f07575080511580611f075750808060200190516020811015611f0457600080fd5b50515b611f58576040805162461bcd60e51b815260206004820152601b60248201527f445873776170506169723a205452414e534645525f4641494c45440000000000604482015290519081900360640190fd5b5050505050565b6000811580611f7a57505080820282828281611f7757fe5b04145b610caa576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610caa576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061204f57506dffffffffffffffffffffffffffff8311155b6120a0576040805162461bcd60e51b815260206004820152601460248201527f445873776170506169723a204f564552464c4f57000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906120f057506dffffffffffffffffffffffffffff841615155b801561210b57506dffffffffffffffffffffffffffff831615155b156121bb578063ffffffff1661214e8561212486612777565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61279b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff811661218e8461212487612777565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316600090815260016020526040902054612350908263ffffffff611fcb16565b6001600160a01b038085166000908152600160205260408082209390935590841681522054612385908263ffffffff6127dc16565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561243257600080fd5b505afa158015612446573d6000803e3d6000fd5b505050506040513d602081101561245c57600080fd5b5051600554604080517f2ff7042a00000000000000000000000000000000000000000000000000000000815290519293506000926001600160a01b0390921691632ff7042a91600480820192602092909190829003018186803b1580156124c257600080fd5b505afa1580156124d6573d6000803e3d6000fd5b505050506040513d60208110156124ec57600080fd5b5051600b546001600160a01b0384161580159550919250906125c45780156125bf57600061253661107b6dffffffffffffffffffffffffffff89811690891663ffffffff611f5f16565b90506000612543836125d9565b9050808211156125bc576000612571612562848463ffffffff611fcb16565b6000549063ffffffff611f5f16565b905060006125988361258c8660ff8a1663ffffffff611f5f16565b9063ffffffff6127dc16565b905060008183816125a557fe5b04905080156125b8576125b8888261262b565b5050505b50505b6125d0565b80156125d0576000600b555b50505092915050565b6000600382111561261c575080600160028204015b818110156126165780915060028182858161260557fe5b04018161260e57fe5b0490506125ee565b50612626565b8115612626575060015b919050565b60005461263e908263ffffffff6127dc16565b60009081556001600160a01b038316815260016020526040902054612669908263ffffffff6127dc16565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008183106126d057816126d2565b825b9392505050565b6001600160a01b038216600090815260016020526040902054612702908263ffffffff611fcb16565b6001600160a01b0383166000908152600160205260408120919091555461272f908263ffffffff611fcb16565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8416816127d457fe5b049392505050565b80820182811015610caa576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe445873776170506169723a20494e53554646494349454e545f4c49515549444954595f4d494e544544445873776170506169723a20494e53554646494349454e545f4c4951554944495459445873776170506169723a20494e53554646494349454e545f4f55545055545f414d4f554e54445873776170506169723a20494e53554646494349454e545f494e5055545f414d4f554e54445873776170506169723a20494e53554646494349454e545f4c49515549444954595f4255524e4544a265627a7a723158200ca0ad5c770d194dd19ea92ea530e809ac1c89e730183845330630a64834ec7664736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429445873776170466163746f72793a204944454e544943414c5f414444524553534553a265627a7a7231582068eae8bb6b8c606d3a47ec4fcd7e8d5b47d578bfe0263286407609b5c99077f064736f6c63430005100032000000000000000000000000df456b614fe9ff1c7c0b380330da29c96d40fb020000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619

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

000000000000000000000000df456b614fe9ff1c7c0b380330da29c96d40fb020000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619

-----Decoded View---------------
Arg [0] : _feeToSetter (address): 0xdf456b614fe9ff1c7c0b380330da29c96d40fb02
Arg [1] : _halfFeeToken (address): 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000df456b614fe9ff1c7c0b380330da29c96d40fb02
Arg [1] : 0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.