diff --git a/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb b/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb index a7eb328ef..4a27817e6 100644 --- a/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb +++ b/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb @@ -134,7 +134,7 @@ " f\"--arb_mode={arb_mode}\",\n", " \"--default_min_profit_gas_token=60\",\n", " \"--limit_bancor3_flashloan_tokens=False\",\n", - " # \"--use_cached_events=True\",\n", + " \"--loglevel=DEBUG\",\n", " \"--alchemy_max_block_fetch=5\",\n", " \"--logging_path=fastlane_bot/data/\",\n", " \"--timeout=120\",\n", @@ -164,13 +164,13 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "c6e198d0eeba3183", "metadata": { "ExecuteTime": { + "end_time": "2023-12-10T19:05:47.318249Z", "start_time": "2023-12-10T19:04:18.176660Z" - }, - "is_executing": true + } }, "outputs": [ { @@ -217,17 +217,17 @@ "Python-dotenv could not parse statement starting at line 4\n", "Python-dotenv could not parse statement starting at line 5\n", "Python-dotenv could not parse statement starting at line 6\n", - "2023-12-10 11:04:19,435 [fastlane:INFO] - \n", - "2023-12-10 11:04:19,435 [fastlane:INFO] - **********************************************\n", - "2023-12-10 11:04:19,435 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231210-110419/bot.log\n", - "2023-12-10 11:04:19,435 [fastlane:INFO] - **********************************************\n", - "2023-12-10 11:04:19,435 [fastlane:INFO] - \n", - "2023-12-10 11:04:20,362 [fastlane:INFO] - [events.utils.get_config] Using mainnet config\n", - "2023-12-10 11:04:20,407 [fastlane:INFO] - tokens: 22225, USDC-eB48\n", - "2023-12-10 11:04:20,408 [fastlane:INFO] - [events.utils.handle_flashloan_tokens] unique_tokens: 22225\n", - "2023-12-10 11:04:20,419 [fastlane:INFO] - [events.utils.handle_flashloan_tokens] Flashloan tokens are set as: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", - "2023-12-10 11:04:20,419 [fastlane:INFO] - [events.utils] Running data fetching for exchanges: ['carbon_v1', 'bancor_v3', 'bancor_v2', 'bancor_pol', 'uniswap_v3', 'uniswap_v2', 'sushiswap_v2', 'balancer', 'pancakeswap_v2', 'pancakeswap_v3']\n", - "2023-12-10 11:04:20,419 [fastlane:INFO] - \n", + "2023-12-10 15:13:00,836 [fastlane:INFO] - \n", + "2023-12-10 15:13:00,836 [fastlane:INFO] - **********************************************\n", + "2023-12-10 15:13:00,836 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231210-151300/bot.log\n", + "2023-12-10 15:13:00,836 [fastlane:INFO] - **********************************************\n", + "2023-12-10 15:13:00,836 [fastlane:INFO] - \n", + "2023-12-10 15:13:02,033 [fastlane:INFO] - [events.utils.get_config] Using mainnet config\n", + "2023-12-10 15:13:02,090 [fastlane:INFO] - tokens: 21971, USDC-eB48\n", + "2023-12-10 15:13:02,092 [fastlane:INFO] - [events.utils.handle_flashloan_tokens] unique_tokens: 21969\n", + "2023-12-10 15:13:02,099 [fastlane:INFO] - [events.utils.handle_flashloan_tokens] Flashloan tokens are set as: ['BNT-FF1C', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", + "2023-12-10 15:13:02,099 [fastlane:INFO] - [events.utils] Running data fetching for exchanges: ['carbon_v1', 'bancor_v3', 'bancor_v2', 'bancor_pol', 'uniswap_v3', 'uniswap_v2', 'sushiswap_v2', 'balancer', 'pancakeswap_v2', 'pancakeswap_v3']\n", + "2023-12-10 15:13:02,100 [fastlane:INFO] - \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", @@ -238,15 +238,15 @@ "[Clang 14.0.6 ]\n", " python_info: sys.version_info(major=3, minor=8, micro=18, releaselevel='final', serial=0)\n", " \n", - " logging_path: fastlane_bot/data/logs/20231210-110419\n", + " logging_path: fastlane_bot/data/logs/20231210-151300\n", " arb_mode: b3_two_hop\n", " blockchain: ethereum\n", " default_min_profit_gas_token: 60\n", " exchanges: ['carbon_v1', 'bancor_v3', 'bancor_v2', 'bancor_pol', 'uniswap_v3', 'uniswap_v2', 'sushiswap_v2', 'balancer', 'pancakeswap_v2', 'pancakeswap_v3']\n", - " flashloan_tokens: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", + " flashloan_tokens: ['BNT-FF1C', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", " target_tokens: None\n", " use_specific_exchange_for_target_tokens: None\n", - " loglevel: info\n", + " loglevel: debug\n", " backdate_pools: False\n", " alchemy_max_block_fetch: 5\n", " static_pool_data_filename: static_pool_data\n", @@ -259,7 +259,7 @@ " run_data_validator: False\n", " randomizer: 3\n", " limit_bancor3_flashloan_tokens: False\n", - " timeout: 80\n", + " timeout: 120\n", " replay_from_block: None\n", " tenderly_fork_id: None\n", " tenderly_event_exchanges: []\n", @@ -280,14 +280,272 @@ " \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", - "2023-12-10 11:04:24,798 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 286307 uniswap_v2 pools to static pools\n", - "2023-12-10 11:04:24,803 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 3861 sushiswap_v2 pools to static pools\n", - "2023-12-10 11:04:24,809 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 472 pancakeswap_v2 pools to static pools\n", - "2023-12-10 11:04:24,819 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 286307 uniswap_v2 pools to static pools\n", - "2023-12-10 11:04:24,826 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 17983 uniswap_v3 pools to static pools\n", - "2023-12-10 11:04:24,831 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 158 pancakeswap_v3 pools to static pools\n", - "2023-12-10 11:04:25,087 [fastlane:INFO] - [main] Fetching events from 18757766 to 18757771... 0\n", - "2023-12-10 11:04:28,817 [fastlane:INFO] - [events.utils.get_latest_events] Found 175 new events, 82 carbon_pol_events\n" + "2023-12-10 15:13:02,879 [fastlane:DEBUG] - Retrieved 218 carbon pairs from contract\n", + "2023-12-10 15:13:05,079 [fastlane:DEBUG] - [events.utils] Time taken to add initial pools: 0.040390968322753906\n", + "2023-12-10 15:13:05,410 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-10 15:13:05,416 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 3861 sushiswap_v2 pools to static pools\n", + "2023-12-10 15:13:05,421 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 472 pancakeswap_v2 pools to static pools\n", + "2023-12-10 15:13:05,433 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-10 15:13:05,440 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 17983 uniswap_v3 pools to static pools\n", + "2023-12-10 15:13:05,446 [fastlane:INFO] - [events.utils.handle_static_pools_update] Adding 158 pancakeswap_v3 pools to static pools\n", + "2023-12-10 15:13:05,972 [fastlane:INFO] - [main] Fetching events from 18759004 to 18759009... 0\n", + "2023-12-10 15:13:08,819 [fastlane:INFO] - [events.utils.get_latest_events] Found 205 new events, 82 carbon_pol_events\n", + "2023-12-10 15:13:08,820 [fastlane:DEBUG] - [events.utils.save_events_to_json] Saved events to fastlane_bot/data/logs/20231210-151300/latest_event_data.json\n", + "2023-12-10 15:13:13,038 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token COMP-6888 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:13,039 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token AUC-5663 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:13,793 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token SNX-2a6F to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:15,081 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token DERC-a9aE to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:15,658 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token UNCX-B1D0 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:15,660 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token OPENSEA-b48e to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:16,705 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token MATTER-FEBe to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:16,711 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token XCN-fb18 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:16,727 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token BOTTO-5BBA to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-12-10 15:13:17,387 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token DS-5f94 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:17,499 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token GEM-efcC to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:18,314 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token BabyDoge-460B to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:19,739 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token CPD-5355 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:20,393 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token ML-4Cc6 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:22,830 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token BUMP-2168 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:28,514 [fastlane:INFO] - [events.managers.base] Updating carbon pools w/ multicall...\n", + "2023-12-10 15:13:28,809 [fastlane:DEBUG] - Retrieved 218 carbon pairs from contract\n", + "2023-12-10 15:13:28,809 [fastlane:DEBUG] - Retrieving carbon strategies from contract\n", + "2023-12-10 15:13:31,477 [fastlane:DEBUG] - [events.managers.base] Carbon is initialized True\n", + "2023-12-10 15:13:31,477 [fastlane:DEBUG] - [events.managers.base] Retrieved 218 carbon strategies\n", + "2023-12-10 15:13:31,477 [fastlane:DEBUG] - [events.managers.base] Setting carbon fee pairs...\n", + "2023-12-10 15:13:33,440 [fastlane:DEBUG] - Fetched 418 carbon strategies in 4.925940990447998 seconds\n", + "2023-12-10 15:13:34,152 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token AURA-3DBF to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:13:34,180 [fastlane:DEBUG] - Updated 418 carbon strategies info in 0.7404658794403076 seconds\n", + "2023-12-10 15:14:01,313 [fastlane:DEBUG] - [events.utils.verify_state_changed] State has changed...\n", + "2023-12-10 15:14:01,313 [fastlane:DEBUG] - [events.utils.verify_min_bnt_is_respected] Bot successfully updated min profit\n", + "2023-12-10 15:14:01,454 [fastlane:INFO] - [events.utils.handle_tokens_csv] Updated token data with 32 new tokens\n", + "2023-12-10 15:14:01,454 [fastlane:INFO] - \n", + "\n", + "********************************************\n", + "Average Total iteration time for loop 1: 56.000499963760376\n", + "********************************************\n", + "\n", + "\n", + "2023-12-10 15:14:13,461 [fastlane:INFO] - \n", + " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", + " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", + " \n", + " Finished first iteration of data sync. Now starting main loop arbitrage search.\n", + " \n", + " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", + " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", + " \n", + "2023-12-10 15:14:13,718 [fastlane:INFO] - [main] Checking latest version of Arbitrage Contract. Found version: 9\n", + "2023-12-10 15:14:14,017 [fastlane:INFO] - [main] Fetching events from 18759007 to 18759015... 18759009\n", + "2023-12-10 15:14:16,263 [fastlane:INFO] - [events.utils.get_latest_events] Found 239 new events, 82 carbon_pol_events\n", + "2023-12-10 15:14:16,264 [fastlane:DEBUG] - [events.utils.save_events_to_json] Saved events to fastlane_bot/data/logs/20231210-151300/latest_event_data.json\n", + "2023-12-10 15:14:17,699 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token VIRALX-b7fc to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:19,436 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token UniBridge-dEd3 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:19,527 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token HUSL-26be to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:19,659 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token FREYA-d3E0 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:20,010 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token Shaggy-d249 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:20,565 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token ETHETF-470F to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:20,709 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token Groooook-2B77 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:21,227 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token HARAMBE-38c6 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:21,770 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token WAVAX-Eda3 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:14:51,130 [fastlane:DEBUG] - [events.utils.verify_state_changed] State has changed...\n", + "2023-12-10 15:14:51,130 [fastlane:DEBUG] - [events.utils.verify_min_bnt_is_respected] Bot successfully updated min profit\n", + "2023-12-10 15:14:51,255 [fastlane:INFO] - [events.utils.handle_tokens_csv] Updated token data with 18 new tokens\n", + "2023-12-10 15:14:51,258 [fastlane:DEBUG] - Removed 0 unmapped uniswap_v2/sushi pools. 1784 uniswap_v2/sushi pools remaining\n", + "2023-12-10 15:14:51,258 [fastlane:DEBUG] - Unmapped uniswap_v2/sushi pools:\n", + "2023-12-10 15:14:51,278 [fastlane:DEBUG] - [events.interface] uniswap_v2: 0\n", + "2023-12-10 15:14:51,278 [fastlane:DEBUG] - [events.interface] sushiswap_v2: 0\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] uniswap_v3: 72\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] sushiswap_v2: 6\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] uniswap_v2: 121\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] bancor_v2: 0\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] bancor_v3: 13\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] bancor_pol: 72\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] carbon_v1: 187\n", + "2023-12-10 15:14:51,279 [fastlane:DEBUG] - [events.interface] pancakeswap_v2: 0\n", + "2023-12-10 15:14:51,280 [fastlane:DEBUG] - [events.interface] pancakeswap_v3: 1\n", + "2023-12-10 15:14:51,280 [fastlane:DEBUG] - [events.interface] balancer: 62\n", + "2023-12-10 15:14:51,286 [fastlane:DEBUG] - [events.interface] uniswap_v3_zero_liquidity_pools: 184\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] sushiswap_v2_zero_liquidity_pools: 73\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] uniswap_v2_zero_liquidity_pools: 101\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] bancor_v2_zero_liquidity_pools: 95\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] bancor_v3_zero_liquidity_pools: 1\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] bancor_pol_zero_liquidity_pools: 10\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] carbon_v1_zero_liquidity_pools: 231\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] pancakeswap_v2_zero_liquidity_pools: 430\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] pancakeswap_v3_zero_liquidity_pools: 125\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] balancer_zero_liquidity_pools: 0\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - Removed 0 unsupported exchanges. 534 pools remaining\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - Pools remaining per exchange:\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] carbon_v1: 187\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] bancor_v3: 13\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] bancor_v2: 0\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] bancor_pol: 72\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] uniswap_v3: 72\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] uniswap_v2: 121\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] sushiswap_v2: 6\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] balancer: 62\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] pancakeswap_v2: 0\n", + "2023-12-10 15:14:51,287 [fastlane:DEBUG] - [events.interface] pancakeswap_v3: 1\n", + "2023-12-10 15:14:51,312 [fastlane:DEBUG] - [bot.run] Transactions will be required to pass data validation for b3_two_hop\n", + "2023-12-10 15:14:51,312 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", + "2023-12-10 15:14:51,312 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", + "2023-12-10 15:14:51,325 [fastlane:DEBUG] - [modes.base._set_best_ops] *************\n", + "2023-12-10 15:14:51,325 [fastlane:DEBUG] - [modes.base._set_best_ops] New best profit: 9.094947017729282e-13\n", + "2023-12-10 15:14:51,328 [fastlane:DEBUG] - [modes.base._set_best_ops] best_trade_instructions_df: ENJ-3B9c ... WETH-6Cc2\n", + "0xb05d72ef454cca7774af818b39b03092727554a3e2c2a... 9.313226e-10 ... NaN\n", + "0x748ab2bef0d97e5a044268626e6c9c104bab818605d44... NaN ... -9.094947e-13\n", + "PRICE 1.596123e-04 ... 1.000000e+00\n", + "AMMIn 9.313226e-10 ... 0.000000e+00\n", + "AMMOut 0.000000e+00 ... -9.094947e-13\n", + "TOTAL NET 9.313226e-10 ... -9.094947e-13\n", + "\n", + "[6 rows x 3 columns]\n", + "2023-12-10 15:14:51,328 [fastlane:DEBUG] - [modes.base.calculate_profit] *************\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-12-10 15:14:51,333 [fastlane:DEBUG] - [modes.base._set_best_ops] *************\n", + "2023-12-10 15:14:51,333 [fastlane:DEBUG] - [modes.base._set_best_ops] New best profit: 1.023337244987489e-12\n", + "2023-12-10 15:14:51,335 [fastlane:DEBUG] - [modes.base._set_best_ops] best_trade_instructions_df: BNT-FF1C ... ENJ-3B9c\n", + "0x748ab2bef0d97e5a044268626e6c9c104bab818605d44... 1.862645e-09 ... NaN\n", + "0xb05d72ef454cca7774af818b39b03092727554a3e2c2a... 1.862645e-09 ... -3.725290e-09\n", + "PRICE 2.134869e+00 ... 1.000000e+00\n", + "AMMIn 3.725290e-09 ... 0.000000e+00\n", + "AMMOut 0.000000e+00 ... -3.725290e-09\n", + "TOTAL NET 3.725290e-09 ... -3.725290e-09\n", + "\n", + "[6 rows x 3 columns]\n", + "2023-12-10 15:14:51,335 [fastlane:DEBUG] - [modes.base.calculate_profit] *************\n", + "2023-12-10 15:14:51,338 [fastlane:DEBUG] - [modes.base._set_best_ops] *************\n", + "2023-12-10 15:14:51,338 [fastlane:DEBUG] - [modes.base._set_best_ops] New best profit: 0.02221563790627853\n", + "2023-12-10 15:14:51,340 [fastlane:DEBUG] - [modes.base._set_best_ops] best_trade_instructions_df: WETH-6Cc2 ... RPL-A51f\n", + "0x748ab2bef0d97e5a044268626e6c9c104bab818605d44... 5.672489e-01 ... NaN\n", + "0xf369ec02502a48fe5b8f0af8a0e712e9b3db0119abd2c... NaN ... -43.467388\n", + "0x71cf25cc991284d537ebd71f83555551fa0ab1471f4d9... -5.672489e-01 ... 42.226290\n", + "PRICE 7.515968e+01 ... 1.000000\n", + "AMMIn 5.672489e-01 ... 42.226290\n", + "AMMOut -5.672489e-01 ... -43.467388\n", + "TOTAL NET -2.773533e-10 ... -1.241097\n", + "\n", + "[7 rows x 3 columns]\n", + "2023-12-10 15:14:51,340 [fastlane:DEBUG] - [modes.base.calculate_profit] *************\n", + "2023-12-10 15:14:51,404 [fastlane:INFO] - [bot._run] No eligible arb opportunities.\n", + "2023-12-10 15:14:51,405 [fastlane:INFO] - \n", + "\n", + "********************************************\n", + "Average Total iteration time for loop 2: 46.84355103969574\n", + "********************************************\n", + "\n", + "\n", + "2023-12-10 15:15:03,696 [fastlane:INFO] - [main] Checking latest version of Arbitrage Contract. Found version: 9\n", + "2023-12-10 15:15:04,023 [fastlane:INFO] - [main] Fetching events from 18759013 to 18759019... 18759015\n", + "2023-12-10 15:15:05,771 [fastlane:INFO] - [events.utils.get_latest_events] Found 187 new events, 82 carbon_pol_events\n", + "2023-12-10 15:15:05,772 [fastlane:DEBUG] - [events.utils.save_events_to_json] Saved events to fastlane_bot/data/logs/20231210-151300/latest_event_data.json\n", + "2023-12-10 15:15:06,890 [fastlane:DEBUG] - [events.managers.contracts.get_token_info_from_contract] [events.managers.contracts.get_token_info_from_contract] Failed to get token symbol and decimals for token address: 0x9469D013805bFfB7D3DEBe5E7839237e535ec483\n", + "2023-12-10 15:15:07,137 [fastlane:DEBUG] - [events.managers.contracts._get_and_save_token_info_from_contract] Adding new token AI-3A77 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-10 15:15:39,519 [fastlane:DEBUG] - [events.utils.verify_state_changed] State has changed...\n", + "2023-12-10 15:15:39,520 [fastlane:DEBUG] - [events.utils.verify_min_bnt_is_respected] Bot successfully updated min profit\n", + "2023-12-10 15:15:39,629 [fastlane:INFO] - [events.utils.handle_tokens_csv] Updated token data with 2 new tokens\n", + "2023-12-10 15:15:39,631 [fastlane:DEBUG] - Removed 0 unmapped uniswap_v2/sushi pools. 1816 uniswap_v2/sushi pools remaining\n", + "2023-12-10 15:15:39,631 [fastlane:DEBUG] - Unmapped uniswap_v2/sushi pools:\n", + "2023-12-10 15:15:39,652 [fastlane:DEBUG] - [events.interface] uniswap_v2: 0\n", + "2023-12-10 15:15:39,652 [fastlane:DEBUG] - [events.interface] sushiswap_v2: 0\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] uniswap_v3: 85\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] sushiswap_v2: 9\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] uniswap_v2: 141\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] bancor_v2: 0\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] bancor_v3: 13\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] bancor_pol: 72\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] carbon_v1: 187\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] pancakeswap_v2: 0\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] pancakeswap_v3: 1\n", + "2023-12-10 15:15:39,653 [fastlane:DEBUG] - [events.interface] balancer: 62\n", + "2023-12-10 15:15:39,660 [fastlane:DEBUG] - [events.interface] uniswap_v3_zero_liquidity_pools: 184\n", + "2023-12-10 15:15:39,660 [fastlane:DEBUG] - [events.interface] sushiswap_v2_zero_liquidity_pools: 71\n", + "2023-12-10 15:15:39,660 [fastlane:DEBUG] - [events.interface] uniswap_v2_zero_liquidity_pools: 99\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] bancor_v2_zero_liquidity_pools: 95\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] bancor_v3_zero_liquidity_pools: 1\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] bancor_pol_zero_liquidity_pools: 10\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] carbon_v1_zero_liquidity_pools: 231\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] pancakeswap_v2_zero_liquidity_pools: 430\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] pancakeswap_v3_zero_liquidity_pools: 125\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] balancer_zero_liquidity_pools: 0\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - Removed 0 unsupported exchanges. 570 pools remaining\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - Pools remaining per exchange:\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] carbon_v1: 187\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] bancor_v3: 13\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] bancor_v2: 0\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] bancor_pol: 72\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] uniswap_v3: 85\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] uniswap_v2: 141\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] sushiswap_v2: 9\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] balancer: 62\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] pancakeswap_v2: 0\n", + "2023-12-10 15:15:39,661 [fastlane:DEBUG] - [events.interface] pancakeswap_v3: 1\n", + "2023-12-10 15:15:39,687 [fastlane:DEBUG] - [bot.run] Transactions will be required to pass data validation for b3_two_hop\n", + "2023-12-10 15:15:39,687 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", + "2023-12-10 15:15:39,687 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", + "2023-12-10 15:15:39,701 [fastlane:DEBUG] - [modes.base._set_best_ops] *************\n", + "2023-12-10 15:15:39,701 [fastlane:DEBUG] - [modes.base._set_best_ops] New best profit: 9.094947017729282e-13\n", + "2023-12-10 15:15:39,703 [fastlane:DEBUG] - [modes.base._set_best_ops] best_trade_instructions_df: ENJ-3B9c ... WETH-6Cc2\n", + "0xb05d72ef454cca7774af818b39b03092727554a3e2c2a... 9.313226e-10 ... NaN\n", + "0x748ab2bef0d97e5a044268626e6c9c104bab818605d44... NaN ... -9.094947e-13\n", + "PRICE 1.596123e-04 ... 1.000000e+00\n", + "AMMIn 9.313226e-10 ... 0.000000e+00\n", + "AMMOut 0.000000e+00 ... -9.094947e-13\n", + "TOTAL NET 9.313226e-10 ... -9.094947e-13\n", + "\n", + "[6 rows x 3 columns]\n", + "2023-12-10 15:15:39,703 [fastlane:DEBUG] - [modes.base.calculate_profit] *************\n", + "2023-12-10 15:15:39,708 [fastlane:DEBUG] - [modes.base._set_best_ops] *************\n", + "2023-12-10 15:15:39,708 [fastlane:DEBUG] - [modes.base._set_best_ops] New best profit: 1.023337244987489e-12\n", + "2023-12-10 15:15:39,709 [fastlane:DEBUG] - [modes.base._set_best_ops] best_trade_instructions_df: BNT-FF1C ... ENJ-3B9c\n", + "0x748ab2bef0d97e5a044268626e6c9c104bab818605d44... 1.862645e-09 ... NaN\n", + "0xb05d72ef454cca7774af818b39b03092727554a3e2c2a... 1.862645e-09 ... -3.725290e-09\n", + "PRICE 2.134869e+00 ... 1.000000e+00\n", + "AMMIn 3.725290e-09 ... 0.000000e+00\n", + "AMMOut 0.000000e+00 ... -3.725290e-09\n", + "TOTAL NET 3.725290e-09 ... -3.725290e-09\n", + "\n", + "[6 rows x 3 columns]\n", + "2023-12-10 15:15:39,709 [fastlane:DEBUG] - [modes.base.calculate_profit] *************\n", + "2023-12-10 15:15:39,712 [fastlane:DEBUG] - [modes.base._set_best_ops] *************\n", + "2023-12-10 15:15:39,712 [fastlane:DEBUG] - [modes.base._set_best_ops] New best profit: 0.02221563790627853\n", + "2023-12-10 15:15:39,714 [fastlane:DEBUG] - [modes.base._set_best_ops] best_trade_instructions_df: WETH-6Cc2 ... RPL-A51f\n", + "0x748ab2bef0d97e5a044268626e6c9c104bab818605d44... 5.672489e-01 ... NaN\n", + "0xf369ec02502a48fe5b8f0af8a0e712e9b3db0119abd2c... NaN ... -43.467388\n", + "0x71cf25cc991284d537ebd71f83555551fa0ab1471f4d9... -5.672489e-01 ... 42.226290\n", + "PRICE 7.515968e+01 ... 1.000000\n", + "AMMIn 5.672489e-01 ... 42.226290\n", + "AMMOut -5.672489e-01 ... -43.467388\n", + "TOTAL NET -2.773533e-10 ... -1.241097\n", + "\n", + "[7 rows x 3 columns]\n", + "2023-12-10 15:15:39,714 [fastlane:DEBUG] - [modes.base.calculate_profit] *************\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-12-10 15:15:39,788 [fastlane:INFO] - [bot._run] No eligible arb opportunities.\n", + "2023-12-10 15:15:39,788 [fastlane:INFO] - \n", + "\n", + "********************************************\n", + "Average Total iteration time for loop 3: 43.259783347447716\n", + "********************************************\n", + "\n", + "\n", + "2023-12-10 15:15:51,789 [fastlane:INFO] - [main] Timeout hit... stopping bot\n" ] } ], diff --git a/resources/NBTest/NBTest_904_Bancor3DataValidation.py b/resources/NBTest/NBTest_904_Bancor3DataValidation.py index ab880895e..a44409182 100644 --- a/resources/NBTest/NBTest_904_Bancor3DataValidation.py +++ b/resources/NBTest/NBTest_904_Bancor3DataValidation.py @@ -72,7 +72,7 @@ def run_command(arb_mode, expected_log_line): f"--arb_mode={arb_mode}", "--default_min_profit_gas_token=60", "--limit_bancor3_flashloan_tokens=False", - # "--use_cached_events=True", + "--loglevel=DEBUG", "--alchemy_max_block_fetch=5", "--logging_path=fastlane_bot/data/", "--timeout=120", @@ -96,7 +96,6 @@ def run_command(arb_mode, expected_log_line): # ## Test Data Validation For b3_two_hop -# + is_executing=true expected_log_line = "Transactions will be required to pass data validation for" arb_mode = "b3_two_hop" run_command(arb_mode=arb_mode, expected_log_line=expected_log_line)