From a10944b0757f8889a497367cdb56d9c5ebd9b0c4 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 10:33:24 +0200 Subject: [PATCH 01/12] Update network.py --- fastlane_bot/config/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane_bot/config/network.py b/fastlane_bot/config/network.py index b73c66773..fb1dd79dd 100644 --- a/fastlane_bot/config/network.py +++ b/fastlane_bot/config/network.py @@ -488,7 +488,7 @@ class _ConfigNetworkBase(ConfigNetwork): WEB3_ALCHEMY_PROJECT_ID = os.environ.get("WEB3_ALCHEMY_BASE") network_df = get_multichain_addresses(network="coinbase_base") - FASTLANE_CONTRACT_ADDRESS = "0x2f33499368C4239290B045e3A34DFFA2AeD2CA05" + FASTLANE_CONTRACT_ADDRESS = "0x2AE2404cD44c830d278f51f053a08F54b3756e1c" MULTICALL_CONTRACT_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11" CARBON_CONTROLLER_ADDRESS = GRAPHENE_CONTROLLER_ADDRESS = "0xfbF069Dbbf453C1ab23042083CFa980B3a672BbA" From 836659b82a277b6e0b3b70ddb3c55e1226a6fecd Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 10:49:04 +0200 Subject: [PATCH 02/12] Update provider.py --- fastlane_bot/config/provider.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fastlane_bot/config/provider.py b/fastlane_bot/config/provider.py index 316868944..653abbbfb 100644 --- a/fastlane_bot/config/provider.py +++ b/fastlane_bot/config/provider.py @@ -124,7 +124,6 @@ def __init__(self, network: ConfigNetwork, **kwargs): else: self.CARBON_CONTROLLER_CONTRACT = None - self.BANCOR_ARBITRAGE_CONTRACT = None self.ARB_CONTRACT_VERSION = 10 if self.BANCOR_ARBITRAGE_CONTRACT is not None: From 359298fd8e1f504607e0e2dc77a0d6475f6fb025 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 10:50:21 +0200 Subject: [PATCH 03/12] Update txhelpers.py --- fastlane_bot/helpers/txhelpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fastlane_bot/helpers/txhelpers.py b/fastlane_bot/helpers/txhelpers.py index 8a240c7dc..d88982dd8 100644 --- a/fastlane_bot/helpers/txhelpers.py +++ b/fastlane_bot/helpers/txhelpers.py @@ -333,7 +333,11 @@ def validate_and_submit_transaction( self.ConfigObj.logger.info("Failed to construct trade, discarding.") return None gas_estimate = arb_tx["gas"] - current_gas_price = arb_tx["maxFeePerGas"] + + if "maxFeePerGas" in arb_tx: + current_gas_price = arb_tx["maxFeePerGas"] + else: + current_gas_price = arb_tx["gasPrice"] # Multiply expected gas by 0.8 to account for actual gas usage vs expected. gas_cost_eth = Decimal(str(current_gas_price)) * Decimal(str(gas_estimate)) * Decimal(self.ConfigObj.EXPECTED_GAS_MODIFIER) / Decimal('10') ** Decimal('18') From 2ced6da086236ab568a05ddd95b685a1258defb8 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 10:54:17 +0200 Subject: [PATCH 04/12] Update txhelpers.py --- fastlane_bot/helpers/txhelpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fastlane_bot/helpers/txhelpers.py b/fastlane_bot/helpers/txhelpers.py index d88982dd8..c7d1b03de 100644 --- a/fastlane_bot/helpers/txhelpers.py +++ b/fastlane_bot/helpers/txhelpers.py @@ -348,10 +348,12 @@ def validate_and_submit_transaction( adjusted_reward_usd = adjusted_reward * expected_profit_usd/expected_profit_eth transaction_log = {"block_number": block_number, "gas": gas_estimate, - "base_fee_wei": (current_gas_price - arb_tx["maxPriorityFeePerGas"]), - "priority_fee_wei": arb_tx["maxPriorityFeePerGas"], "max_gas_fee_wei": current_gas_price, + "max_gas_fee_wei": current_gas_price, "gas_cost_eth": num_format_float(gas_cost_eth), "gas_cost_usd": + num_format_float(gas_cost_usd)} + if "maxPriorityFeePerGas" in arb_tx: + transaction_log["base_fee_wei"] = (current_gas_price - arb_tx["maxPriorityFeePerGas"]) + transaction_log["priority_fee_wei"] = arb_tx["maxPriorityFeePerGas"] log_json = {**log_object, **transaction_log} From 91a90763be121664406e80101f1313746f135757 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 11:17:04 +0200 Subject: [PATCH 05/12] Reinclude priority fee in base --- fastlane_bot/helpers/txhelpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastlane_bot/helpers/txhelpers.py b/fastlane_bot/helpers/txhelpers.py index c7d1b03de..482a1ddb0 100644 --- a/fastlane_bot/helpers/txhelpers.py +++ b/fastlane_bot/helpers/txhelpers.py @@ -306,7 +306,7 @@ def validate_and_submit_transaction( # Get the current recommended priority fee from Alchemy, and increase it by our offset current_max_priority_gas = int( - self.get_max_priority_fee_per_gas_alchemy() * self.ConfigObj.DEFAULT_GAS_PRICE_OFFSET) if self.ConfigObj.NETWORK in "ethereum" else 0 + self.get_max_priority_fee_per_gas_alchemy() * self.ConfigObj.DEFAULT_GAS_PRICE_OFFSET) if self.ConfigObj.NETWORK in ["ethereum", "coinbase_base"] else 0 # Get current block number block_number = self.web3.eth.get_block("latest")["number"] @@ -571,7 +571,7 @@ def build_transaction_with_gas( ) return None try: - if access_list: + if access_list and self.ConfigObj.NETWORK_NAME in "ethereum": access_list = self.get_access_list(transaction_data=transaction["data"], expected_gas=estimated_gas) if access_list is not None: @@ -624,7 +624,7 @@ def build_tx( base_gas_price = int(base_gas_price) max_gas_price = base_gas_price + max_priority_fee - if self.ConfigObj.NETWORK in "ethereum": + if self.ConfigObj.NETWORK in ["ethereum", "coinbase_base"]: return { "type": "0x2", "maxFeePerGas": max_gas_price, From 65909fef300f32bb0469706f94aa358e2a318f6d Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 11:50:49 +0200 Subject: [PATCH 06/12] fix tests --- fastlane_bot/helpers/tradeinstruction.py | 13 +- fastlane_bot/tools/cpc.py | 2 +- .../NBTest/NBTest_050_TestBancorV2.ipynb | 143 ++++++------------ resources/NBTest/NBTest_050_TestBancorV2.py | 2 +- 4 files changed, 57 insertions(+), 103 deletions(-) diff --git a/fastlane_bot/helpers/tradeinstruction.py b/fastlane_bot/helpers/tradeinstruction.py index 8ea60e6f3..b4829e653 100644 --- a/fastlane_bot/helpers/tradeinstruction.py +++ b/fastlane_bot/helpers/tradeinstruction.py @@ -133,12 +133,13 @@ def __post_init__(self): self._tknout_address = self.tknout_addr_override self._tknout_decimals = self.tknout_dec_override pool = self.db.get_pool(cid=self.cid.split('-')[0]) - tokens = pool.get_token_addresses - self.tknin_is_wrapped = self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS in tokens and self._tknin_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] - self.tknin_is_native = self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS in tokens and self._tknin_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] - self.tknout_is_wrapped = self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS in tokens and self._tknout_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] - self.tknout_is_native = self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS in tokens and self._tknout_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] - assert not [self.tknin_is_wrapped, self.tknin_is_native, self.tknout_is_wrapped, self.tknout_is_native].count(True) > 1, f"[TradeInstruction __post_init__] only 1 token can be native or wrapped, [self.tknin_is_wrapped, self.tknin_is_native, self.tknout_is_wrapped, self.tknout_is_native] = {self.tknin_is_wrapped, self.tknin_is_native, self.tknout_is_wrapped, self.tknout_is_native}" + if self.tknout_dec_override is None: + tokens = pool.get_token_addresses + self.tknin_is_wrapped = self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS in tokens and self._tknin_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] + self.tknin_is_native = self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS in tokens and self._tknin_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] + self.tknout_is_wrapped = self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS in tokens and self._tknout_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] + self.tknout_is_native = self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS in tokens and self._tknout_address in [self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS] + assert not [self.tknin_is_wrapped, self.tknin_is_native, self.tknout_is_wrapped, self.tknout_is_native].count(True) > 1, f"[TradeInstruction __post_init__] only 1 token can be native or wrapped, [self.tknin_is_wrapped, self.tknin_is_native, self.tknout_is_wrapped, self.tknout_is_native] = {self.tknin_is_wrapped, self.tknin_is_native, self.tknout_is_wrapped, self.tknout_is_native}" if self._amtout_wei is None: self._amtout_wei = self._convert_to_wei(self.amtout, self._tknout_decimals) diff --git a/fastlane_bot/tools/cpc.py b/fastlane_bot/tools/cpc.py index d2994daf2..b6516042f 100644 --- a/fastlane_bot/tools/cpc.py +++ b/fastlane_bot/tools/cpc.py @@ -505,7 +505,7 @@ def setcid(self, cid): super().__setattr__("cid", cid) return self - class CPCValidationError(BaseException): pass + class CPCValidationError(ValueError): pass @classmethod def from_kx( diff --git a/resources/NBTest/NBTest_050_TestBancorV2.ipynb b/resources/NBTest/NBTest_050_TestBancorV2.ipynb index 0956f0b57..3eb0b1d94 100644 --- a/resources/NBTest/NBTest_050_TestBancorV2.ipynb +++ b/resources/NBTest/NBTest_050_TestBancorV2.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "id": "84fa264b", "metadata": { "ExecuteTime": { @@ -22,6 +22,7 @@ "SushiswapV2 v0.0.2 (2023-08-27)\n", "CarbonV1 v0.0.2 (2023-08-27)\n", "BancorV3 v0.0.2 (2023-08-27)\n", + "imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n", "Version = 3-b2.2 [requirements >= 3.0 is met]\n" ] } @@ -72,7 +73,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "id": "a51e5ec2", "metadata": { "ExecuteTime": { @@ -85,86 +86,46 @@ "name": "stderr", "output_type": "stream", "text": [ - "2023-10-30 18:30:57,594 [fastlane:INFO] - \n", - "2023-10-30 18:30:57,594 [fastlane:INFO] - \n", - "2023-10-30 18:30:57,595 [fastlane:INFO] - **********************************************\n", - "2023-10-30 18:30:57,595 [fastlane:INFO] - **********************************************\n", - "2023-10-30 18:30:57,596 [fastlane:INFO] - The logging path is set to: logs/20231030-183057\\bot.log\n", - "2023-10-30 18:30:57,596 [fastlane:INFO] - The logging path is set to: logs/20231030-183057\\bot.log\n", - "2023-10-30 18:30:57,597 [fastlane:INFO] - **********************************************\n", - "2023-10-30 18:30:57,597 [fastlane:INFO] - **********************************************\n", - "2023-10-30 18:30:57,597 [fastlane:INFO] - \n", - "2023-10-30 18:30:57,597 [fastlane:INFO] - \n", - "2023-10-30 18:30:58,943 [fastlane:INFO] - Retrieved 200 carbon pairs from contract\n", - "2023-10-30 18:30:58,943 [fastlane:INFO] - Retrieved 200 carbon pairs from contract\n", - "2023-10-30 18:31:00,360 [fastlane:INFO] - Time taken to add initial pools: 0.09143304824829102\n", - "2023-10-30 18:31:00,360 [fastlane:INFO] - Time taken to add initial pools: 0.09143304824829102\n", - "2023-10-30 18:31:00,364 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-30 18:31:00,364 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-30 18:31:00,586 [fastlane:INFO] - Removed 3248 unmapped uniswap_v2/sushi pools. 2086 uniswap_v2/sushi pools remaining\n", - "2023-10-30 18:31:00,586 [fastlane:INFO] - Removed 3248 unmapped uniswap_v2/sushi pools. 2086 uniswap_v2/sushi pools remaining\n", - "2023-10-30 18:31:00,600 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-30 18:31:00,600 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-30 18:31:00,834 [fastlane:INFO] - uniswap_v2: 3248\n", - "2023-10-30 18:31:00,834 [fastlane:INFO] - uniswap_v2: 3248\n", - "2023-10-30 18:31:00,835 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-30 18:31:00,835 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-30 18:31:00,838 [fastlane:INFO] - uniswap_v3: 1232\n", - "2023-10-30 18:31:00,838 [fastlane:INFO] - uniswap_v3: 1232\n", - "2023-10-30 18:31:00,839 [fastlane:INFO] - sushiswap_v2: 106\n", - "2023-10-30 18:31:00,839 [fastlane:INFO] - sushiswap_v2: 106\n", - "2023-10-30 18:31:00,840 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-30 18:31:00,840 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-30 18:31:00,841 [fastlane:INFO] - bancor_v2: 100\n", - "2023-10-30 18:31:00,841 [fastlane:INFO] - bancor_v2: 100\n", - "2023-10-30 18:31:00,842 [fastlane:INFO] - bancor_v3: 28\n", - "2023-10-30 18:31:00,842 [fastlane:INFO] - bancor_v3: 28\n", - "2023-10-30 18:31:00,843 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-30 18:31:00,843 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-30 18:31:00,844 [fastlane:INFO] - carbon_v1: 175\n", - "2023-10-30 18:31:00,844 [fastlane:INFO] - carbon_v1: 175\n", - "2023-10-30 18:31:00,846 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-30 18:31:00,846 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-30 18:31:00,847 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-30 18:31:00,847 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-30 18:31:00,849 [fastlane:INFO] - balancer: 0\n", - "2023-10-30 18:31:00,849 [fastlane:INFO] - balancer: 0\n", - "2023-10-30 18:31:00,886 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 262\n", - "2023-10-30 18:31:00,886 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 262\n", - "2023-10-30 18:31:00,887 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,887 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,888 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,888 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,889 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,889 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,890 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 43\n", - "2023-10-30 18:31:00,890 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 43\n", - "2023-10-30 18:31:00,891 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,891 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,892 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 140\n", - "2023-10-30 18:31:00,892 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 140\n", - "2023-10-30 18:31:00,893 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,893 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,893 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,893 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,894 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,894 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-30 18:31:00,896 [fastlane:INFO] - Removed 0 unsupported exchanges. 1641 pools remaining\n", - "2023-10-30 18:31:00,896 [fastlane:INFO] - Removed 0 unsupported exchanges. 1641 pools remaining\n", - "2023-10-30 18:31:00,897 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-30 18:31:00,897 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-30 18:31:00,897 [fastlane:INFO] - uniswap_v3: 1232\n", - "2023-10-30 18:31:00,897 [fastlane:INFO] - uniswap_v3: 1232\n", - "2023-10-30 18:31:00,898 [fastlane:INFO] - carbon_v1: 175\n", - "2023-10-30 18:31:00,898 [fastlane:INFO] - carbon_v1: 175\n", - "2023-10-30 18:31:00,899 [fastlane:INFO] - sushiswap_v2: 106\n", - "2023-10-30 18:31:00,899 [fastlane:INFO] - sushiswap_v2: 106\n", - "2023-10-30 18:31:00,901 [fastlane:INFO] - bancor_v2: 100\n", - "2023-10-30 18:31:00,901 [fastlane:INFO] - bancor_v2: 100\n", - "2023-10-30 18:31:00,901 [fastlane:INFO] - bancor_v3: 28\n", - "2023-10-30 18:31:00,901 [fastlane:INFO] - bancor_v3: 28\n", - "2023-10-30 18:31:00,902 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-30 18:31:00,902 [fastlane:INFO] - uniswap_v2: 0\n" + "2023-12-06 11:49:17,795 [fastlane:INFO] - \n", + "2023-12-06 11:49:17,796 [fastlane:INFO] - **********************************************\n", + "2023-12-06 11:49:17,797 [fastlane:INFO] - The logging path is set to: logs/20231206-114917\\bot.log\n", + "2023-12-06 11:49:17,797 [fastlane:INFO] - **********************************************\n", + "2023-12-06 11:49:17,798 [fastlane:INFO] - \n", + "2023-12-06 11:49:20,167 [fastlane:INFO] - Retrieved 214 carbon pairs from contract\n", + "2023-12-06 11:49:23,419 [fastlane:INFO] - Time taken to add initial pools: 0.09389495849609375\n", + "2023-12-06 11:49:23,423 [fastlane:INFO] - Initializing the bot...\n", + "2023-12-06 11:49:24,187 [fastlane:INFO] - Removed 3248 unmapped uniswap_v2/sushi pools. 2086 uniswap_v2/sushi pools remaining\n", + "2023-12-06 11:49:24,188 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", + "2023-12-06 11:49:24,361 [fastlane:INFO] - uniswap_v2: 3248\n", + "2023-12-06 11:49:24,362 [fastlane:INFO] - sushiswap_v2: 0\n", + "2023-12-06 11:49:24,365 [fastlane:INFO] - uniswap_v3: 1232\n", + "2023-12-06 11:49:24,365 [fastlane:INFO] - sushiswap_v2: 106\n", + "2023-12-06 11:49:24,365 [fastlane:INFO] - uniswap_v2: 0\n", + "2023-12-06 11:49:24,366 [fastlane:INFO] - bancor_v2: 100\n", + "2023-12-06 11:49:24,366 [fastlane:INFO] - bancor_v3: 28\n", + "2023-12-06 11:49:24,367 [fastlane:INFO] - bancor_pol: 0\n", + "2023-12-06 11:49:24,367 [fastlane:INFO] - carbon_v1: 175\n", + "2023-12-06 11:49:24,368 [fastlane:INFO] - pancakeswap_v2: 0\n", + "2023-12-06 11:49:24,369 [fastlane:INFO] - pancakeswap_v3: 0\n", + "2023-12-06 11:49:24,369 [fastlane:INFO] - balancer: 0\n", + "2023-12-06 11:49:24,405 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 262\n", + "2023-12-06 11:49:24,406 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,406 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,407 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,408 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 43\n", + "2023-12-06 11:49:24,409 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,410 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 140\n", + "2023-12-06 11:49:24,411 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,411 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,411 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", + "2023-12-06 11:49:24,412 [fastlane:INFO] - Removed 0 unsupported exchanges. 1641 pools remaining\n", + "2023-12-06 11:49:24,413 [fastlane:INFO] - Pools remaining per exchange:\n", + "2023-12-06 11:49:24,414 [fastlane:INFO] - uniswap_v2: 0\n", + "2023-12-06 11:49:24,415 [fastlane:INFO] - uniswap_v3: 1232\n", + "2023-12-06 11:49:24,415 [fastlane:INFO] - bancor_v2: 100\n", + "2023-12-06 11:49:24,415 [fastlane:INFO] - carbon_v1: 175\n", + "2023-12-06 11:49:24,415 [fastlane:INFO] - sushiswap_v2: 106\n", + "2023-12-06 11:49:24,416 [fastlane:INFO] - bancor_v3: 28\n" ] } ], @@ -281,7 +242,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, "id": "c8f41237", "metadata": { "ExecuteTime": { @@ -304,7 +265,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 4, "id": "b1f40498", "metadata": { "ExecuteTime": { @@ -340,7 +301,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "id": "86cd764b", "metadata": { "ExecuteTime": { @@ -349,15 +310,7 @@ }, "lines_to_next_cell": 0 }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "arbs found = 48\n" - ] - } - ], + "outputs": [], "source": [ "arb_finder = bot._get_arb_finder(\"multi\")\n", "finder = arb_finder(\n", @@ -451,7 +404,7 @@ "\n", "# Use helper function to calculate profit\n", "best_profit, flt_per_bnt, profit_usd = bot.calculate_profit(\n", - " CCm, best_profit, fl_token, fl_token_with_weth\n", + " CCm, best_profit, fl_token,\n", ")\n", "\n", "# Get the flashloan amount and token address\n", diff --git a/resources/NBTest/NBTest_050_TestBancorV2.py b/resources/NBTest/NBTest_050_TestBancorV2.py index b6e58eb43..6c79f1b24 100644 --- a/resources/NBTest/NBTest_050_TestBancorV2.py +++ b/resources/NBTest/NBTest_050_TestBancorV2.py @@ -269,7 +269,7 @@ def init_bot(mgr: Manager) -> CarbonBot: # Use helper function to calculate profit best_profit, flt_per_bnt, profit_usd = bot.calculate_profit( - CCm, best_profit, fl_token, fl_token_with_weth + CCm, best_profit, fl_token, ) # Get the flashloan amount and token address From 5f2900b4648d71449ae4b73056603a3a2eb0a849 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 14:38:30 +0200 Subject: [PATCH 07/12] Update pairwise_multi.py --- fastlane_bot/modes/pairwise_multi.py | 39 ++++++++++------------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/fastlane_bot/modes/pairwise_multi.py b/fastlane_bot/modes/pairwise_multi.py index 5b5d49a8b..0ec8b702f 100644 --- a/fastlane_bot/modes/pairwise_multi.py +++ b/fastlane_bot/modes/pairwise_multi.py @@ -54,7 +54,19 @@ def find_arbitrage( not_carbon_curves = [ x for x in CC.curves if x.params.exchange != "carbon_v1" ] - curve_combos = [[curve] + carbon_curves for curve in not_carbon_curves] + curve_combos = [] + + if len(carbon_curves) > 0: + base_direction_pair = carbon_curves[0].pair + base_direction_one = [curve for curve in carbon_curves if curve.pair == base_direction_pair] + base_direction_two = [curve for curve in carbon_curves if curve.pair != base_direction_pair] + + if len(base_direction_one) > 0: + curve_combos += [[curve] + base_direction_one for curve in not_carbon_curves] + + if len(base_direction_two) > 0: + curve_combos += [[curve] + base_direction_two for curve in not_carbon_curves] + for curve_combo in curve_combos: src_token = tkn1 @@ -66,31 +78,6 @@ def find_arbitrage( (O, profit_src, r, trade_instructions_df,) = self.run_main_flow( curves=curve_combo, src_token=src_token, tkn0=tkn0, tkn1=tkn1 ) - - non_carbon_cids = [ - curve.cid - for curve in curve_combo - if curve.params.get("exchange") != "carbon_v1" - ] - non_carbon_row = trade_instructions_df.loc[non_carbon_cids[0]] - tkn0_into_carbon = non_carbon_row[0] < 0 - wrong_direction_cids = self.get_wrong_direction_cids( - tkn0_into_carbon, trade_instructions_df - ) - - if non_carbon_cids and len(wrong_direction_cids) > 0: - filtered_curves = self.process_wrong_direction_pools( - curve_combo=curve_combo, - wrong_direction_cids=wrong_direction_cids, - ) - if len(filtered_curves) < 2: - continue - (O, profit_src, r, trade_instructions_df,) = self.run_main_flow( - curves=filtered_curves, - src_token=src_token, - tkn0=tkn0, - tkn1=tkn1, - ) trade_instructions_dic = r.trade_instructions(O.TIF_DICTS) trade_instructions = r.trade_instructions() From 8f9760fe0a3232ed3d6c3d0223a350577df269b5 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Wed, 6 Dec 2023 15:42:49 +0200 Subject: [PATCH 08/12] Fix test 048 --- ...048_RespectFlashloanTokensClickParam.ipynb | 72 ++++--------------- ...st_048_RespectFlashloanTokensClickParam.py | 8 ++- 2 files changed, 17 insertions(+), 63 deletions(-) diff --git a/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.ipynb b/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.ipynb index d90d2e3e6..d7a9581bc 100644 --- a/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.ipynb +++ b/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.ipynb @@ -108,7 +108,7 @@ " \"--logging_path=fastlane_bot/data/\",\n", " \"--timeout=1\",\n", " \"--loglevel=DEBUG\",\n", - " \"--flashloan_tokens=BNT-FF1C,ETH-EEeE,ETH2X_FLI-65BD\",\n", + " \"--flashloan_tokens=BNT-FF1C,ETH-EEeE,ETH2x_FLI-65BD\",\n", " \"--blockchain=ethereum\"\n", " ]\n", " subprocess.Popen(cmd)\n", @@ -148,71 +148,23 @@ "name": "stdout", "output_type": "stream", "text": [ - "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/resources/NBTest\n", - "Found main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 11:13:22,146 [fastlane:INFO] - \n", - "2023-10-31 11:13:22,146 [fastlane:INFO] - **********************************************\n", - "2023-10-31 11:13:22,146 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231031-111322/bot.log\n", - "2023-10-31 11:13:22,146 [fastlane:INFO] - **********************************************\n", - "2023-10-31 11:13:22,146 [fastlane:INFO] - \n", - "2023-10-31 11:13:22,593 [fastlane:INFO] - Using mainnet config\n", - "2023-10-31 11:13:22,645 [fastlane:INFO] - tokens: 20798, $CHAD-c918\n", - "2023-10-31 11:13:22,647 [fastlane:INFO] - unique_tokens: 20798\n", - "2023-10-31 11:13:22,653 [fastlane:INFO] - Flashloan tokens are set as: ['BNT-FF1C', 'ETH-EEeE', 'ETH2X_FLI-65BD'], \n", - "2023-10-31 11:13:22,653 [fastlane:INFO] - 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-10-31 11:13:22,653 [fastlane:INFO] - \n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " \n", - " Starting fastlane bot with the following configuration:\n", - " \n", - " cache_latest_only: True\n", - " backdate_pools: False\n", - " arb_mode: multi\n", - " flashloan_tokens: ['BNT-FF1C', 'ETH-EEeE', 'ETH2X_FLI-65BD']\n", - " n_jobs: -1\n", - " exchanges: ['carbon_v1', 'bancor_v3', 'bancor_v2', 'bancor_pol', 'uniswap_v3', 'uniswap_v2', 'sushiswap_v2', 'balancer', 'pancakeswap_v2', 'pancakeswap_v3']\n", - " polling_interval: 12\n", - " alchemy_max_block_fetch: 2000\n", - " static_pool_data_filename: static_pool_data\n", - " reorg_delay: 2\n", - " logging_path: fastlane_bot/data/logs/20231031-111322\n", - " loglevel: debug\n", - " static_pool_data_sample_sz: max\n", - " use_cached_events: True\n", - " run_data_validator: False\n", - " randomizer: 3\n", - " limit_bancor3_flashloan_tokens: False\n", - " default_min_profit_gas_token: 60\n", - " timeout: 1\n", - " target_tokens: None\n", - " replay_from_block: None\n", - " tenderly_fork_id: None\n", - " tenderly_event_exchanges: []\n", - " increment_time: 1\n", - " increment_blocks: 1\n", - " blockchain: ethereum\n", - " pool_data_update_frequency: -1\n", - " use_specific_exchange_for_target_tokens: None\n", - " \n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " \n", - "2023-10-31 11:13:23,216 [fastlane:INFO] - Timeout to test the bot flags\n" + "Searching for main.py in c:\\Users\\Kveen\\PycharmProjects\\fastlane-bot\\resources\\NBTest\n", + "Found main.py in c:\\Users\\Kveen\\PycharmProjects\\fastlane-bot\n" ] } ], "source": [ - "expected_log_line = \"Flashloan tokens are set as: ['BNT-FF1C', 'ETH-EEeE', 'ETH2X_FLI-65BD']\"\n", + "expected_log_line = \"Flashloan tokens are set as: ['BNT-FF1C', 'ETH-EEeE', 'ETH2x_FLI-65BD']\"\n", "arb_mode = \"multi\"\n", "run_command(arb_mode=arb_mode, expected_log_line=expected_log_line)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -231,7 +183,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.10.1" } }, "nbformat": 4, diff --git a/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py b/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py index 6bcb33e2b..adcb103df 100644 --- a/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py +++ b/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py @@ -69,13 +69,13 @@ def run_command(arb_mode, expected_log_line): "python", main_script_path, f"--arb_mode={arb_mode}", - "--default_min_profit_bnt=60", + "--default_min_profit_gas_token=60", "--limit_bancor3_flashloan_tokens=False", "--use_cached_events=True", "--logging_path=fastlane_bot/data/", "--timeout=1", "--loglevel=DEBUG", - "--flashloan_tokens=BNT-FF1C,ETH-EEeE,ETH2X-FLI-USD", + "--flashloan_tokens=BNT-FF1C,ETH-EEeE,ETH2x_FLI-65BD", "--blockchain=ethereum" ] subprocess.Popen(cmd) @@ -96,6 +96,8 @@ def run_command(arb_mode, expected_log_line): # ## Test flashloan_tokens is Respected -expected_log_line = "Flashloan tokens are set as: ['BNT-FF1C', 'ETH-EEeE', 'ETH2X_FLI-USD']" +expected_log_line = "Flashloan tokens are set as: ['BNT-FF1C', 'ETH-EEeE', 'ETH2x_FLI-65BD']" arb_mode = "multi" run_command(arb_mode=arb_mode, expected_log_line=expected_log_line) + + From b74c453993ba309fd4fb403f97918902a9a397a4 Mon Sep 17 00:00:00 2001 From: Mike Casale <46603283+mikewcasale@users.noreply.github.com> Date: Wed, 6 Dec 2023 06:26:58 -0800 Subject: [PATCH 09/12] Fixes broken test --- .../NBTest/NBTest_903_FlashloanTokens.ipynb | 665 ++++-------------- .../NBTest/NBTest_903_FlashloanTokens.py | 5 +- 2 files changed, 153 insertions(+), 517 deletions(-) diff --git a/resources/NBTest/NBTest_903_FlashloanTokens.ipynb b/resources/NBTest/NBTest_903_FlashloanTokens.ipynb index fde531bc8..4838c1f5c 100644 --- a/resources/NBTest/NBTest_903_FlashloanTokens.ipynb +++ b/resources/NBTest/NBTest_903_FlashloanTokens.ipynb @@ -2,12 +2,12 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 7, "id": "initial_id", "metadata": { "ExecuteTime": { - "end_time": "2023-09-20T22:28:47.059427Z", - "start_time": "2023-09-20T22:28:44.089717Z" + "end_time": "2023-12-06T14:24:22.696066Z", + "start_time": "2023-12-06T14:24:22.674355Z" } }, "outputs": [ @@ -22,7 +22,6 @@ "SushiswapV2 v0.0.2 (2023-08-27)\n", "CarbonV1 v0.0.2 (2023-08-27)\n", "BancorV3 v0.0.2 (2023-08-27)\n", - "imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n", "Version = 3-b2.2 [requirements >= 3.0 is met]\n" ] } @@ -60,12 +59,12 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 8, "id": "1640a40ee6ae871c", "metadata": { "ExecuteTime": { - "end_time": "2023-09-20T22:28:47.062749Z", - "start_time": "2023-09-20T22:28:47.061009Z" + "end_time": "2023-12-06T14:24:22.704926Z", + "start_time": "2023-12-06T14:24:22.680216Z" } }, "outputs": [], @@ -107,9 +106,10 @@ " f\"--arb_mode={mode}\",\n", " \"--default_min_profit_gas_token=60\",\n", " \"--limit_bancor3_flashloan_tokens=True\",\n", - " \"--use_cached_events=True\",\n", + " # \"--use_cached_events=True\",\n", + " \"--alchemy_max_block_fetch=5\",\n", " \"--logging_path=fastlane_bot/data/\",\n", - " \"--timeout=70\",\n", + " \"--timeout=80\",\n", " \"--blockchain=ethereum\"\n", " ]\n", " subprocess.Popen(cmd)\n", @@ -137,12 +137,12 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 9, "id": "c6e198d0eeba3183", "metadata": { "ExecuteTime": { - "end_time": "2023-09-20T22:30:27.096660Z", - "start_time": "2023-09-20T22:28:47.063255Z" + "end_time": "2023-12-06T14:26:18.038890Z", + "start_time": "2023-12-06T14:24:22.682802Z" } }, "outputs": [ @@ -150,97 +150,121 @@ "name": "stdout", "output_type": "stream", "text": [ - "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/resources/NBTest\n", - "Found main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot\n" + "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot/resources/NBTest\n", + "Found main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "2023-10-31 09:55:02,782 [fastlane:INFO] - \n", - "2023-10-31 09:55:02,782 [fastlane:INFO] - **********************************************\n", - "2023-10-31 09:55:02,782 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231031-095502/bot.log\n", - "2023-10-31 09:55:02,782 [fastlane:INFO] - **********************************************\n", - "2023-10-31 09:55:02,782 [fastlane:INFO] - \n", - "2023-10-31 09:55:03,256 [fastlane:INFO] - Using mainnet config\n", - "2023-10-31 09:55:03,256 [fastlane:INFO] - Flashloan tokens are set as: ['WBTC-C599', 'BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", - "2023-10-31 09:55:03,257 [fastlane:INFO] - 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-10-31 09:55:03,258 [fastlane:INFO] - \n", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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-06 06:24:24,365 [fastlane:INFO] - \n", + "2023-12-06 06:24:24,365 [fastlane:INFO] - **********************************************\n", + "2023-12-06 06:24:24,365 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231206-062424/bot.log\n", + "2023-12-06 06:24:24,365 [fastlane:INFO] - **********************************************\n", + "2023-12-06 06:24:24,365 [fastlane:INFO] - \n", + "2023-12-06 06:24:24,994 [fastlane:INFO] - Using mainnet config\n", + "2023-12-06 06:24:25,016 [fastlane:INFO] - tokens: 22219, USDC-eB48\n", + "2023-12-06 06:24:25,017 [fastlane:INFO] - unique_tokens: 22219\n", + "2023-12-06 06:24:25,024 [fastlane:INFO] - Flashloan tokens are set as: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", + "2023-12-06 06:24:25,024 [fastlane:INFO] - 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-06 06:24:25,024 [fastlane:INFO] - \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", " Starting fastlane bot with the following configuration:\n", " \n", - " cache_latest_only: True\n", - " backdate_pools: False\n", + " logging_path: fastlane_bot/data/logs/20231206-062424\n", " arb_mode: b3_two_hop\n", - " flashloan_tokens: ['WBTC-C599', 'BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", - " n_jobs: -1\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", - " polling_interval: 12\n", - " alchemy_max_block_fetch: 2000\n", + " flashloan_tokens: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", + " target_tokens: None\n", + " use_specific_exchange_for_target_tokens: None\n", + " loglevel: info\n", + " backdate_pools: False\n", + " alchemy_max_block_fetch: 5\n", " static_pool_data_filename: static_pool_data\n", + " cache_latest_only: True\n", + " n_jobs: -1\n", + " polling_interval: 12\n", " reorg_delay: 2\n", - " logging_path: fastlane_bot/data/logs/20231031-095502\n", - " loglevel: info\n", " static_pool_data_sample_sz: max\n", - " use_cached_events: True\n", + " use_cached_events: False\n", " run_data_validator: False\n", " randomizer: 3\n", " limit_bancor3_flashloan_tokens: True\n", - " default_min_profit_gas_token: 60\n", - " timeout: 70\n", - " target_tokens: None\n", + " timeout: 80\n", " replay_from_block: None\n", " tenderly_fork_id: None\n", " tenderly_event_exchanges: []\n", " increment_time: 1\n", " increment_blocks: 1\n", - " blockchain: ethereum\n", " pool_data_update_frequency: -1\n", - " use_specific_exchange_for_target_tokens: None\n", + " prefix_path: \n", + " version_check_frequency: 1\n", " \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", - "2023-10-31 09:55:04,288 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n", - "2023-10-31 09:55:05,624 [fastlane:INFO] - Time taken to add initial pools: 0.12576007843017578\n", - "2023-10-31 09:55:06,042 [fastlane:INFO] - Adding 272092 uniswap_v2 pools to static pools\n", - "2023-10-31 09:55:06,048 [fastlane:INFO] - Adding 3823 sushiswap_v2 pools to static pools\n", - "2023-10-31 09:55:06,055 [fastlane:INFO] - Adding 452 pancakeswap_v2 pools to static pools\n", - "2023-10-31 09:55:06,067 [fastlane:INFO] - Adding 272092 uniswap_v2 pools to static pools\n", - "2023-10-31 09:55:06,076 [fastlane:INFO] - Adding 16974 uniswap_v3 pools to static pools\n", - "2023-10-31 09:55:06,082 [fastlane:INFO] - Adding 145 pancakeswap_v3 pools to static pools\n", - "2023-10-31 09:55:06,366 [fastlane:INFO] - Fetching events from 18469431 to 18471431... 0\n", - "2023-10-31 09:55:06,366 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:55:06,369 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:55:07,504 [fastlane:INFO] - Updating carbon pools w/ multicall...\n", - "2023-10-31 09:55:07,854 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n", - "2023-10-31 09:55:07,854 [fastlane:INFO] - Retrieving carbon strategies from contract\n", - "2023-10-31 09:55:09,117 [fastlane:INFO] - Carbon is initialized True\n", - "2023-10-31 09:55:09,118 [fastlane:INFO] - Retrieved 201 carbon strategies\n", - "2023-10-31 09:55:09,118 [fastlane:INFO] - Setting carbon fee pairs...\n", - "2023-10-31 09:55:10,279 [fastlane:INFO] - Fetched 405 carbon strategies in 2.7750511169433594 seconds\n", - "2023-10-31 09:55:11,010 [fastlane:INFO] - Adding new token CSCS-cFB7 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:12,375 [fastlane:INFO] - Adding new token FROGDOG-e16C to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:13,123 [fastlane:INFO] - Adding new token BAZED-8F4a to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:13,846 [fastlane:INFO] - Adding new token SHIBIE-a98F to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:14,585 [fastlane:INFO] - Adding new token CBot-a71C to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:15,782 [fastlane:INFO] - Adding new token GUISE-AFb8 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:16,927 [fastlane:INFO] - Adding new token LBR-1ebd to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:17,701 [fastlane:INFO] - Adding new token FGATE-2E92 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:18,919 [fastlane:INFO] - Adding new token CAL-36E1 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:20,169 [fastlane:INFO] - Adding new token DORKL-aCf3 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:21,397 [fastlane:INFO] - Adding new token WAGMI-3a67 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:22,195 [fastlane:INFO] - Adding new token PB-03Dc to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:23,059 [fastlane:INFO] - Adding new token MBOT-6957 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:24,289 [fastlane:INFO] - Adding new token FBT-B983 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", - "2023-10-31 09:55:24,808 [fastlane:INFO] - Updated 405 carbon strategies info in 14.52859902381897 seconds\n", - "2023-10-31 09:55:26,872 [fastlane:ERROR] - Error writing pool data to disk: Object of type int64 is not JSON serializable\n", - "2023-10-31 09:55:26,880 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:55:27,054 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:55:39,056 [fastlane:INFO] - \n", + "2023-12-06 06:24:25,757 [fastlane:INFO] - Retrieved 214 carbon pairs from contract\n", + "2023-12-06 06:24:27,868 [fastlane:INFO] - Time taken to add initial pools: 0.028343915939331055\n", + "2023-12-06 06:24:28,194 [fastlane:INFO] - Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-06 06:24:28,199 [fastlane:INFO] - Adding 3861 sushiswap_v2 pools to static pools\n", + "2023-12-06 06:24:28,205 [fastlane:INFO] - Adding 472 pancakeswap_v2 pools to static pools\n", + "2023-12-06 06:24:28,214 [fastlane:INFO] - Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-06 06:24:28,221 [fastlane:INFO] - Adding 17983 uniswap_v3 pools to static pools\n", + "2023-12-06 06:24:28,228 [fastlane:INFO] - Adding 158 pancakeswap_v3 pools to static pools\n", + "2023-12-06 06:24:28,519 [fastlane:INFO] - Fetching events from 18727856 to 18727861... 0\n", + "2023-12-06 06:24:31,827 [fastlane:INFO] - Found 184 new events, 82 carbon_pol_events\n", + "2023-12-06 06:24:31,829 [fastlane:INFO] - Saved events to fastlane_bot/data/logs/20231206-062424/latest_event_data.json\n", + "2023-12-06 06:24:39,415 [fastlane:INFO] - Adding new token Lisa-cb88 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:24:40,342 [fastlane:INFO] - Adding new token MIND-f8aB to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:24:40,580 [fastlane:INFO] - Adding new token BBOX-3631 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:24:44,901 [fastlane:INFO] - Updating carbon pools w/ multicall...\n", + "2023-12-06 06:24:45,160 [fastlane:INFO] - Retrieved 214 carbon pairs from contract\n", + "2023-12-06 06:24:45,160 [fastlane:INFO] - Retrieving carbon strategies from contract\n", + "2023-12-06 06:24:47,684 [fastlane:INFO] - Carbon is initialized True\n", + "2023-12-06 06:24:47,684 [fastlane:INFO] - Retrieved 214 carbon strategies\n", + "2023-12-06 06:24:47,685 [fastlane:INFO] - Setting carbon fee pairs...\n", + "2023-12-06 06:24:49,759 [fastlane:INFO] - Fetched 413 carbon strategies in 4.858100891113281 seconds\n", + "2023-12-06 06:24:49,818 [fastlane:INFO] - Updated 413 carbon strategies info in 0.05879092216491699 seconds\n", + "2023-12-06 06:25:15,493 [fastlane:INFO] - Initializing the bot...\n", + "2023-12-06 06:25:15,621 [fastlane:INFO] - State has changed...\n", + "2023-12-06 06:25:27,649 [fastlane:INFO] - \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", @@ -249,446 +273,57 @@ " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", - "2023-10-31 09:55:39,363 [fastlane:INFO] - Updated token data with 28 new tokens\n", - "2023-10-31 09:55:39,796 [fastlane:INFO] - Fetching events from 18471429 to 18471434... 18471431\n", - "2023-10-31 09:55:39,796 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:55:39,796 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:55:43,287 [fastlane:ERROR] - Error writing pool data to disk: Object of type int64 is not JSON serializable\n", - "2023-10-31 09:55:43,291 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:55:43,447 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:55:43,457 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 09:55:43,457 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 09:55:43,820 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 09:55:43,820 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:55:43,824 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:55:43,839 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 09:55:43,839 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 09:55:43,839 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 09:55:43,839 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 09:55:43,840 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 09:55:43,840 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 09:55:43,840 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 09:55:43,840 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 09:55:43,840 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:55:43,841 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:55:43,850 [fastlane:ERROR] - [get_curves] error converting pool to curve PoolAndTokens(ConfigObj=Config(network=_ConfigNetworkMainnet(), db=_ConfigDBPostgres(), logger=_ConfigLoggerDefault(), provider=_ConfigProviderAlchemy()), id=213, cid=38451907462066046371361330639789807894963, last_updated=None, last_updated_block=18469431, descr='carbon_v1 CSCS-cFB7/USDT-1ec7 2000', pair_name='CSCS-cFB7/USDT-1ec7', exchange_name='carbon_v1', fee=2000.0, fee_float=0.002, tkn0_balance=None, tkn1_balance=None, z_0=716000000000000000000, y_0=716000000000000000000, A_0=0, B_0=5897934990213120, z_1=0, y_1=0, A_1=0, B_1=0, sqrt_price_q96=None, tick=None, tick_spacing=None, liquidity=None, address='0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', anchor=None, tkn0='CSCS', tkn1='USDT', tkn0_address='0xa6Ec49E06C25F63292bac1Abc1896451A0f4cFB7', tkn0_decimals=18, tkn1_address='0xdAC17F958D2ee523a2206206994597C13D831ec7', tkn1_decimals=6, router=None, tkn0_weight=None, tkn1_weight=None, tkn2=None, tkn2_balance=None, tkn2_address=None, tkn2_decimals=None, tkn2_weight=None, tkn3=None, tkn3_balance=None, tkn3_address=None, tkn3_decimals=None, tkn3_weight=None, tkn4=None, tkn4_balance=None, tkn4_address=None, tkn4_decimals=None, tkn4_weight=None, tkn5=None, tkn5_balance=None, tkn5_address=None, tkn5_decimals=None, tkn5_weight=None, tkn6=None, tkn6_balance=None, tkn6_address=None, tkn6_decimals=None, tkn6_weight=None, tkn7=None, tkn7_balance=None, tkn7_address=None, tkn7_decimals=None, tkn7_weight=None, tkn0_key='CSCS-cFB7', tkn1_key='USDT-1ec7', tkn2_key=None, tkn3_key=None, tkn4_key=None, tkn5_key=None, tkn6_key=None, tkn7_key=None)\n", - "[ERR=Integers to negative integer powers are not allowed.]\n", - "\n", - "\n", - "2023-10-31 09:55:43,850 [fastlane:ERROR] - [get_curves] error converting pool to curve PoolAndTokens(ConfigObj=Config(network=_ConfigNetworkMainnet(), db=_ConfigDBPostgres(), logger=_ConfigLoggerDefault(), provider=_ConfigProviderAlchemy()), id=232, cid=55125743441192031081066686403946450256345, last_updated=None, last_updated_block=18469431, descr='carbon_v1 GUISE-AFb8/USDC-eB48 2000', pair_name='GUISE-AFb8/USDC-eB48', exchange_name='carbon_v1', fee=2000.0, fee_float=0.002, tkn0_balance=None, tkn1_balance=None, z_0=70779239735011, y_0=70779239735011, A_0=0, B_0=6123191372350253, z_1=0, y_1=0, A_1=0, B_1=154170194, sqrt_price_q96=None, tick=None, tick_spacing=None, liquidity=None, address='0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', anchor=None, tkn0='GUISE', tkn1='USDC', tkn0_address='0x7721A4cb6190EDB11d47f51C20968436ECcDAFb8', tkn0_decimals=18, tkn1_address='0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', tkn1_decimals=6, router=None, tkn0_weight=None, tkn1_weight=None, tkn2=None, tkn2_balance=None, tkn2_address=None, tkn2_decimals=None, tkn2_weight=None, tkn3=None, tkn3_balance=None, tkn3_address=None, tkn3_decimals=None, tkn3_weight=None, tkn4=None, tkn4_balance=None, tkn4_address=None, tkn4_decimals=None, tkn4_weight=None, tkn5=None, tkn5_balance=None, tkn5_address=None, tkn5_decimals=None, tkn5_weight=None, tkn6=None, tkn6_balance=None, tkn6_address=None, tkn6_decimals=None, tkn6_weight=None, tkn7=None, tkn7_balance=None, tkn7_address=None, tkn7_decimals=None, tkn7_weight=None, tkn0_key='GUISE-AFb8', tkn1_key='USDC-eB48', tkn2_key=None, tkn3_key=None, tkn4_key=None, tkn5_key=None, tkn6_key=None, tkn7_key=None)\n", - "[ERR=Integers to negative integer powers are not allowed.]\n", - "\n", - "\n", - "2023-10-31 09:55:43,856 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 09:55:43,856 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 09:55:43,856 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "2023-10-31 09:55:43,856 [fastlane:INFO] - limiting flashloan_tokens to ['WETH-6Cc2', 'USDT-1ec7', 'LINK-86CA', 'WBTC-C599', 'USDC-eB48']\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 09:55:44,019 [fastlane:INFO] - No eligible arb opportunities.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 09:55:56,339 [fastlane:INFO] - Fetching events from 18471432 to 18471435... 18471434\n", - "2023-10-31 09:55:56,339 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:55:56,339 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:55:59,641 [fastlane:ERROR] - Error writing pool data to disk: Object of type int64 is not JSON serializable\n", - "2023-10-31 09:55:59,644 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:55:59,802 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:55:59,811 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 09:55:59,811 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 09:56:00,168 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 09:56:00,168 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:56:00,171 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:56:00,171 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:56:00,171 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:56:00,172 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:56:00,185 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 09:56:00,186 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 09:56:00,186 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 09:56:00,186 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 09:56:00,186 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:56:00,187 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:56:00,188 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:56:00,196 [fastlane:ERROR] - [get_curves] error converting pool to curve PoolAndTokens(ConfigObj=Config(network=_ConfigNetworkMainnet(), db=_ConfigDBPostgres(), logger=_ConfigLoggerDefault(), provider=_ConfigProviderAlchemy()), id=213, cid=38451907462066046371361330639789807894963, last_updated=None, last_updated_block=18469431, descr='carbon_v1 CSCS-cFB7/USDT-1ec7 2000', pair_name='CSCS-cFB7/USDT-1ec7', exchange_name='carbon_v1', fee=2000.0, fee_float=0.002, tkn0_balance=None, tkn1_balance=None, z_0=716000000000000000000, y_0=716000000000000000000, A_0=0, B_0=5897934990213120, z_1=0, y_1=0, A_1=0, B_1=0, sqrt_price_q96=None, tick=None, tick_spacing=None, liquidity=None, address='0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', anchor=None, tkn0='CSCS', tkn1='USDT', tkn0_address='0xa6Ec49E06C25F63292bac1Abc1896451A0f4cFB7', tkn0_decimals=18, tkn1_address='0xdAC17F958D2ee523a2206206994597C13D831ec7', tkn1_decimals=6, router=None, tkn0_weight=None, tkn1_weight=None, tkn2=None, tkn2_balance=None, tkn2_address=None, tkn2_decimals=None, tkn2_weight=None, tkn3=None, tkn3_balance=None, tkn3_address=None, tkn3_decimals=None, tkn3_weight=None, tkn4=None, tkn4_balance=None, tkn4_address=None, tkn4_decimals=None, tkn4_weight=None, tkn5=None, tkn5_balance=None, tkn5_address=None, tkn5_decimals=None, tkn5_weight=None, tkn6=None, tkn6_balance=None, tkn6_address=None, tkn6_decimals=None, tkn6_weight=None, tkn7=None, tkn7_balance=None, tkn7_address=None, tkn7_decimals=None, tkn7_weight=None, tkn0_key='CSCS-cFB7', tkn1_key='USDT-1ec7', tkn2_key=None, tkn3_key=None, tkn4_key=None, tkn5_key=None, tkn6_key=None, tkn7_key=None)\n", - "[ERR=Integers to negative integer powers are not allowed.]\n", - "\n", - "\n", - "2023-10-31 09:56:00,197 [fastlane:ERROR] - [get_curves] error converting pool to curve PoolAndTokens(ConfigObj=Config(network=_ConfigNetworkMainnet(), db=_ConfigDBPostgres(), logger=_ConfigLoggerDefault(), provider=_ConfigProviderAlchemy()), id=232, cid=55125743441192031081066686403946450256345, last_updated=None, last_updated_block=18469431, descr='carbon_v1 GUISE-AFb8/USDC-eB48 2000', pair_name='GUISE-AFb8/USDC-eB48', exchange_name='carbon_v1', fee=2000.0, fee_float=0.002, tkn0_balance=None, tkn1_balance=None, z_0=70779239735011, y_0=70779239735011, A_0=0, B_0=6123191372350253, z_1=0, y_1=0, A_1=0, B_1=154170194, sqrt_price_q96=None, tick=None, tick_spacing=None, liquidity=None, address='0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', anchor=None, tkn0='GUISE', tkn1='USDC', tkn0_address='0x7721A4cb6190EDB11d47f51C20968436ECcDAFb8', tkn0_decimals=18, tkn1_address='0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', tkn1_decimals=6, router=None, tkn0_weight=None, tkn1_weight=None, tkn2=None, tkn2_balance=None, tkn2_address=None, tkn2_decimals=None, tkn2_weight=None, tkn3=None, tkn3_balance=None, tkn3_address=None, tkn3_decimals=None, tkn3_weight=None, tkn4=None, tkn4_balance=None, tkn4_address=None, tkn4_decimals=None, tkn4_weight=None, tkn5=None, tkn5_balance=None, tkn5_address=None, tkn5_decimals=None, tkn5_weight=None, tkn6=None, tkn6_balance=None, tkn6_address=None, tkn6_decimals=None, tkn6_weight=None, tkn7=None, tkn7_balance=None, tkn7_address=None, tkn7_decimals=None, tkn7_weight=None, tkn0_key='GUISE-AFb8', tkn1_key='USDC-eB48', tkn2_key=None, tkn3_key=None, tkn4_key=None, tkn5_key=None, tkn6_key=None, tkn7_key=None)\n", - "[ERR=Integers to negative integer powers are not allowed.]\n", - "\n", - "\n", - "2023-10-31 09:56:00,202 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 09:56:00,202 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 09:56:00,202 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "2023-10-31 09:56:00,202 [fastlane:INFO] - limiting flashloan_tokens to ['WETH-6Cc2', 'USDT-1ec7', 'LINK-86CA', 'WBTC-C599', 'USDC-eB48']\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 09:56:00,353 [fastlane:INFO] - No eligible arb opportunities.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 09:56:12,849 [fastlane:INFO] - Fetching events from 18471433 to 18471436... 18471435\n", - "2023-10-31 09:56:12,849 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:56:12,850 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:56:15,773 [fastlane:ERROR] - Error writing pool data to disk: Object of type int64 is not JSON serializable\n", - "2023-10-31 09:56:15,775 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:56:15,932 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:56:15,941 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 09:56:15,941 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 09:56:16,301 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 09:56:16,301 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:56:16,304 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:56:16,304 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:56:16,305 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:56:16,318 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 09:56:16,319 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 09:56:16,319 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 09:56:16,319 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 09:56:16,319 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:56:16,320 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:56:16,321 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:56:16,329 [fastlane:ERROR] - [get_curves] error converting pool to curve PoolAndTokens(ConfigObj=Config(network=_ConfigNetworkMainnet(), db=_ConfigDBPostgres(), logger=_ConfigLoggerDefault(), provider=_ConfigProviderAlchemy()), id=213, cid=38451907462066046371361330639789807894963, last_updated=None, last_updated_block=18469431, descr='carbon_v1 CSCS-cFB7/USDT-1ec7 2000', pair_name='CSCS-cFB7/USDT-1ec7', exchange_name='carbon_v1', fee=2000.0, fee_float=0.002, tkn0_balance=None, tkn1_balance=None, z_0=716000000000000000000, y_0=716000000000000000000, A_0=0, B_0=5897934990213120, z_1=0, y_1=0, A_1=0, B_1=0, sqrt_price_q96=None, tick=None, tick_spacing=None, liquidity=None, address='0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', anchor=None, tkn0='CSCS', tkn1='USDT', tkn0_address='0xa6Ec49E06C25F63292bac1Abc1896451A0f4cFB7', tkn0_decimals=18, tkn1_address='0xdAC17F958D2ee523a2206206994597C13D831ec7', tkn1_decimals=6, router=None, tkn0_weight=None, tkn1_weight=None, tkn2=None, tkn2_balance=None, tkn2_address=None, tkn2_decimals=None, tkn2_weight=None, tkn3=None, tkn3_balance=None, tkn3_address=None, tkn3_decimals=None, tkn3_weight=None, tkn4=None, tkn4_balance=None, tkn4_address=None, tkn4_decimals=None, tkn4_weight=None, tkn5=None, tkn5_balance=None, tkn5_address=None, tkn5_decimals=None, tkn5_weight=None, tkn6=None, tkn6_balance=None, tkn6_address=None, tkn6_decimals=None, tkn6_weight=None, tkn7=None, tkn7_balance=None, tkn7_address=None, tkn7_decimals=None, tkn7_weight=None, tkn0_key='CSCS-cFB7', tkn1_key='USDT-1ec7', tkn2_key=None, tkn3_key=None, tkn4_key=None, tkn5_key=None, tkn6_key=None, tkn7_key=None)\n", - "[ERR=Integers to negative integer powers are not allowed.]\n", - "\n", - "\n", - "2023-10-31 09:56:16,329 [fastlane:ERROR] - [get_curves] error converting pool to curve PoolAndTokens(ConfigObj=Config(network=_ConfigNetworkMainnet(), db=_ConfigDBPostgres(), logger=_ConfigLoggerDefault(), provider=_ConfigProviderAlchemy()), id=232, cid=55125743441192031081066686403946450256345, last_updated=None, last_updated_block=18469431, descr='carbon_v1 GUISE-AFb8/USDC-eB48 2000', pair_name='GUISE-AFb8/USDC-eB48', exchange_name='carbon_v1', fee=2000.0, fee_float=0.002, tkn0_balance=None, tkn1_balance=None, z_0=70779239735011, y_0=70779239735011, A_0=0, B_0=6123191372350253, z_1=0, y_1=0, A_1=0, B_1=154170194, sqrt_price_q96=None, tick=None, tick_spacing=None, liquidity=None, address='0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', anchor=None, tkn0='GUISE', tkn1='USDC', tkn0_address='0x7721A4cb6190EDB11d47f51C20968436ECcDAFb8', tkn0_decimals=18, tkn1_address='0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', tkn1_decimals=6, router=None, tkn0_weight=None, tkn1_weight=None, tkn2=None, tkn2_balance=None, tkn2_address=None, tkn2_decimals=None, tkn2_weight=None, tkn3=None, tkn3_balance=None, tkn3_address=None, tkn3_decimals=None, tkn3_weight=None, tkn4=None, tkn4_balance=None, tkn4_address=None, tkn4_decimals=None, tkn4_weight=None, tkn5=None, tkn5_balance=None, tkn5_address=None, tkn5_decimals=None, tkn5_weight=None, tkn6=None, tkn6_balance=None, tkn6_address=None, tkn6_decimals=None, tkn6_weight=None, tkn7=None, tkn7_balance=None, tkn7_address=None, tkn7_decimals=None, tkn7_weight=None, tkn0_key='GUISE-AFb8', tkn1_key='USDC-eB48', tkn2_key=None, tkn3_key=None, tkn4_key=None, tkn5_key=None, tkn6_key=None, tkn7_key=None)\n", - "[ERR=Integers to negative integer powers are not allowed.]\n", - "\n", - "\n", - "2023-10-31 09:56:16,334 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 09:56:16,334 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 09:56:16,334 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "2023-10-31 09:56:16,334 [fastlane:INFO] - limiting flashloan_tokens to ['WETH-6Cc2', 'USDT-1ec7', 'LINK-86CA', 'WBTC-C599', 'USDC-eB48']\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 09:56:16,485 [fastlane:INFO] - No eligible arb opportunities.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 09:56:28,487 [fastlane:INFO] - Timeout hit... stopping bot\n" + "2023-12-06 06:25:27,881 [fastlane:INFO] - Checking latest version of Arbitrage Contract. Found version: 9\n", + "2023-12-06 06:25:28,360 [fastlane:INFO] - Fetching events from 18727859 to 18727866... 18727861\n", + "2023-12-06 06:25:30,650 [fastlane:INFO] - Found 191 new events, 82 carbon_pol_events\n", + "2023-12-06 06:25:30,651 [fastlane:INFO] - Saved events to fastlane_bot/data/logs/20231206-062424/latest_event_data.json\n", + "2023-12-06 06:25:31,961 [fastlane:INFO] - Adding new token POJAK-66EF to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:25:34,311 [fastlane:INFO] - Adding new token POLY-D1eC to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:26:01,494 [fastlane:INFO] - Initializing the bot...\n", + "2023-12-06 06:26:01,620 [fastlane:INFO] - State has changed...\n", + "2023-12-06 06:26:01,717 [fastlane:INFO] - Updated token data with 2 new tokens\n", + "2023-12-06 06:26:01,719 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 1733 uniswap_v2/sushi pools remaining\n", + "2023-12-06 06:26:01,719 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", + "2023-12-06 06:26:01,741 [fastlane:INFO] - uniswap_v2: 0\n", + "2023-12-06 06:26:01,741 [fastlane:INFO] - sushiswap_v2: 0\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - uniswap_v3: 51\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - sushiswap_v2: 7\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - uniswap_v2: 90\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - bancor_v2: 0\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - bancor_v3: 13\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - bancor_pol: 72\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - carbon_v1: 184\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - pancakeswap_v2: 0\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - pancakeswap_v3: 2\n", + "2023-12-06 06:26:01,742 [fastlane:INFO] - balancer: 62\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 188\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 74\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 101\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 95\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 1\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 10\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 229\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 124\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - Removed 0 unsupported exchanges. 481 pools remaining\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - Pools remaining per exchange:\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - carbon_v1: 184\n", + "2023-12-06 06:26:01,749 [fastlane:INFO] - bancor_v3: 13\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - bancor_v2: 0\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - bancor_pol: 72\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - uniswap_v3: 51\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - uniswap_v2: 90\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - sushiswap_v2: 7\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - balancer: 62\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - pancakeswap_v2: 0\n", + "2023-12-06 06:26:01,750 [fastlane:INFO] - pancakeswap_v3: 2\n", + "2023-12-06 06:26:01,774 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", + "2023-12-06 06:26:01,775 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", + "2023-12-06 06:26:01,775 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", + "2023-12-06 06:26:01,775 [fastlane:INFO] - limiting flashloan_tokens to ['WETH-6Cc2', 'LINK-86CA']\n", + "2023-12-06 06:26:01,794 [fastlane:INFO] - No eligible arb opportunities.\n", + "2023-12-06 06:26:13,799 [fastlane:INFO] - Timeout hit... stopping bot\n" ] } ], @@ -716,7 +351,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/resources/NBTest/NBTest_903_FlashloanTokens.py b/resources/NBTest/NBTest_903_FlashloanTokens.py index f96afa088..a8a27b26a 100644 --- a/resources/NBTest/NBTest_903_FlashloanTokens.py +++ b/resources/NBTest/NBTest_903_FlashloanTokens.py @@ -75,9 +75,10 @@ def run_command(mode): f"--arb_mode={mode}", "--default_min_profit_gas_token=60", "--limit_bancor3_flashloan_tokens=True", - "--use_cached_events=True", + # "--use_cached_events=True", + "--alchemy_max_block_fetch=5", "--logging_path=fastlane_bot/data/", - "--timeout=70", + "--timeout=80", "--blockchain=ethereum" ] subprocess.Popen(cmd) From 2ac721fe111cc56f0662f76406c01d264d3ca3d6 Mon Sep 17 00:00:00 2001 From: Mike Casale <46603283+mikewcasale@users.noreply.github.com> Date: Wed, 6 Dec 2023 06:30:48 -0800 Subject: [PATCH 10/12] fixes broken test --- .../NBTest_904_Bancor3DataValidation.ipynb | 677 ++++-------------- .../NBTest_904_Bancor3DataValidation.py | 4 +- 2 files changed, 150 insertions(+), 531 deletions(-) diff --git a/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb b/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb index 280e5e359..b41156ebd 100644 --- a/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb +++ b/resources/NBTest/NBTest_904_Bancor3DataValidation.ipynb @@ -2,12 +2,12 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, "id": "initial_id", "metadata": { "ExecuteTime": { - "end_time": "2023-10-31T16:52:25.466625Z", - "start_time": "2023-10-31T16:52:24.472065Z" + "end_time": "2023-12-06T14:28:31.593717Z", + "start_time": "2023-12-06T14:28:31.585005Z" } }, "outputs": [ @@ -22,7 +22,6 @@ "SushiswapV2 v0.0.2 (2023-08-27)\n", "CarbonV1 v0.0.2 (2023-08-27)\n", "BancorV3 v0.0.2 (2023-08-27)\n", - "imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n", "Version = 3-b2.2 [requirements >= 3.0 is met]\n" ] } @@ -60,12 +59,12 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "id": "1640a40ee6ae871c", "metadata": { "ExecuteTime": { - "end_time": "2023-10-31T16:52:25.469579Z", - "start_time": "2023-10-31T16:52:25.465182Z" + "end_time": "2023-12-06T14:28:31.604654Z", + "start_time": "2023-12-06T14:28:31.590185Z" } }, "outputs": [], @@ -104,7 +103,8 @@ " f\"--arb_mode={arb_mode}\",\n", " \"--default_min_profit_gas_token=60\",\n", " \"--limit_bancor3_flashloan_tokens=False\",\n", - " \"--use_cached_events=True\",\n", + " # \"--use_cached_events=True\",\n", + " \"--alchemy_max_block_fetch=5\",\n", " \"--logging_path=fastlane_bot/data/\",\n", " \"--timeout=80\",\n", " \"--blockchain=ethereum\"\n", @@ -133,96 +133,134 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 6, "id": "c6e198d0eeba3183", "metadata": { "ExecuteTime": { - "start_time": "2023-10-31T16:52:25.470284Z" - }, - "is_executing": true + "end_time": "2023-12-06T14:30:19.667032Z", + "start_time": "2023-12-06T14:28:31.591851Z" + } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/resources/NBTest\n", - "Found main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot\n" + "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot/resources/NBTest\n", + "Found main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "2023-10-31 10:17:20,570 [fastlane:INFO] - \n", - "2023-10-31 10:17:20,570 [fastlane:INFO] - **********************************************\n", - "2023-10-31 10:17:20,570 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231031-101720/bot.log\n", - "2023-10-31 10:17:20,570 [fastlane:INFO] - **********************************************\n", - "2023-10-31 10:17:20,570 [fastlane:INFO] - \n", - "2023-10-31 10:17:21,041 [fastlane:INFO] - Using mainnet config\n", - "2023-10-31 10:17:21,082 [fastlane:INFO] - unique_tokens: 29\n", - "2023-10-31 10:17:21,086 [fastlane:INFO] - Flashloan tokens are set as: [], \n", - "2023-10-31 10:17:21,086 [fastlane:INFO] - 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-10-31 10:17:21,086 [fastlane:INFO] - \n", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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-06 06:28:32,942 [fastlane:INFO] - \n", + "2023-12-06 06:28:32,942 [fastlane:INFO] - **********************************************\n", + "2023-12-06 06:28:32,942 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231206-062832/bot.log\n", + "2023-12-06 06:28:32,942 [fastlane:INFO] - **********************************************\n", + "2023-12-06 06:28:32,943 [fastlane:INFO] - \n", + "2023-12-06 06:28:33,622 [fastlane:INFO] - Using mainnet config\n", + "2023-12-06 06:28:33,643 [fastlane:INFO] - tokens: 22224, USDC-eB48\n", + "2023-12-06 06:28:33,645 [fastlane:INFO] - unique_tokens: 22224\n", + "2023-12-06 06:28:33,652 [fastlane:INFO] - Flashloan tokens are set as: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", + "2023-12-06 06:28:33,654 [fastlane:INFO] - 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-06 06:28:33,654 [fastlane:INFO] - \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", " Starting fastlane bot with the following configuration:\n", " \n", - " cache_latest_only: True\n", - " backdate_pools: False\n", + " logging_path: fastlane_bot/data/logs/20231206-062832\n", " arb_mode: b3_two_hop\n", - " flashloan_tokens: []\n", - " n_jobs: -1\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", - " polling_interval: 12\n", - " alchemy_max_block_fetch: 2000\n", + " flashloan_tokens: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", + " target_tokens: None\n", + " use_specific_exchange_for_target_tokens: None\n", + " loglevel: info\n", + " backdate_pools: False\n", + " alchemy_max_block_fetch: 5\n", " static_pool_data_filename: static_pool_data\n", + " cache_latest_only: True\n", + " n_jobs: -1\n", + " polling_interval: 12\n", " reorg_delay: 2\n", - " logging_path: fastlane_bot/data/logs/20231031-101720\n", - " loglevel: info\n", " static_pool_data_sample_sz: max\n", - " use_cached_events: True\n", + " use_cached_events: False\n", " run_data_validator: False\n", " randomizer: 3\n", " limit_bancor3_flashloan_tokens: False\n", - " default_min_profit_gas_token: 60\n", " timeout: 80\n", - " target_tokens: None\n", " replay_from_block: None\n", " tenderly_fork_id: None\n", " tenderly_event_exchanges: []\n", " increment_time: 1\n", " increment_blocks: 1\n", - " blockchain: ethereum\n", " pool_data_update_frequency: -1\n", - " use_specific_exchange_for_target_tokens: None\n", + " prefix_path: \n", + " version_check_frequency: 1\n", " \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", - "2023-10-31 10:17:22,151 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n", - "2023-10-31 10:17:23,552 [fastlane:INFO] - Time taken to add initial pools: 0.11626696586608887\n", - "2023-10-31 10:17:23,940 [fastlane:INFO] - Adding 272092 uniswap_v2 pools to static pools\n", - "2023-10-31 10:17:23,947 [fastlane:INFO] - Adding 3823 sushiswap_v2 pools to static pools\n", - "2023-10-31 10:17:23,954 [fastlane:INFO] - Adding 452 pancakeswap_v2 pools to static pools\n", - "2023-10-31 10:17:23,966 [fastlane:INFO] - Adding 272092 uniswap_v2 pools to static pools\n", - "2023-10-31 10:17:23,975 [fastlane:INFO] - Adding 16974 uniswap_v3 pools to static pools\n", - "2023-10-31 10:17:23,982 [fastlane:INFO] - Adding 145 pancakeswap_v3 pools to static pools\n", - "2023-10-31 10:17:24,276 [fastlane:INFO] - Fetching events from 18469541 to 18471541... 0\n", - "2023-10-31 10:17:24,276 [fastlane:INFO] - Using cached events\n", - "2023-10-31 10:17:24,277 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 10:17:25,395 [fastlane:INFO] - Updating carbon pools w/ multicall...\n", - "2023-10-31 10:17:25,718 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n", - "2023-10-31 10:17:25,719 [fastlane:INFO] - Retrieving carbon strategies from contract\n", - "2023-10-31 10:17:27,215 [fastlane:INFO] - Carbon is initialized True\n", - "2023-10-31 10:17:27,215 [fastlane:INFO] - Retrieved 201 carbon strategies\n", - "2023-10-31 10:17:27,216 [fastlane:INFO] - Setting carbon fee pairs...\n", - "2023-10-31 10:17:28,226 [fastlane:INFO] - Fetched 405 carbon strategies in 2.8309192657470703 seconds\n", - "2023-10-31 10:17:28,381 [fastlane:INFO] - Updated 405 carbon strategies info in 0.15569400787353516 seconds\n", - "2023-10-31 10:17:30,358 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 10:17:30,534 [fastlane:INFO] - State has changed...\n", - "2023-10-31 10:17:42,575 [fastlane:INFO] - \n", + "2023-12-06 06:28:34,417 [fastlane:INFO] - Retrieved 214 carbon pairs from contract\n", + "2023-12-06 06:28:36,827 [fastlane:INFO] - Time taken to add initial pools: 0.027478933334350586\n", + "2023-12-06 06:28:37,177 [fastlane:INFO] - Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-06 06:28:37,183 [fastlane:INFO] - Adding 3861 sushiswap_v2 pools to static pools\n", + "2023-12-06 06:28:37,188 [fastlane:INFO] - Adding 472 pancakeswap_v2 pools to static pools\n", + "2023-12-06 06:28:37,198 [fastlane:INFO] - Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-06 06:28:37,205 [fastlane:INFO] - Adding 17983 uniswap_v3 pools to static pools\n", + "2023-12-06 06:28:37,210 [fastlane:INFO] - Adding 158 pancakeswap_v3 pools to static pools\n", + "2023-12-06 06:28:37,460 [fastlane:INFO] - Fetching events from 18727876 to 18727881... 0\n", + "2023-12-06 06:28:40,838 [fastlane:INFO] - Found 171 new events, 82 carbon_pol_events\n", + "2023-12-06 06:28:40,840 [fastlane:INFO] - Saved events to fastlane_bot/data/logs/20231206-062832/latest_event_data.json\n", + "2023-12-06 06:28:52,231 [fastlane:INFO] - Adding new token EXD-6560 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:28:53,277 [fastlane:INFO] - Updating carbon pools w/ multicall...\n", + "2023-12-06 06:28:53,534 [fastlane:INFO] - Retrieved 214 carbon pairs from contract\n", + "2023-12-06 06:28:53,534 [fastlane:INFO] - Retrieving carbon strategies from contract\n", + "2023-12-06 06:28:55,986 [fastlane:INFO] - Carbon is initialized True\n", + "2023-12-06 06:28:55,986 [fastlane:INFO] - Retrieved 214 carbon strategies\n", + "2023-12-06 06:28:55,986 [fastlane:INFO] - Setting carbon fee pairs...\n", + "2023-12-06 06:28:57,696 [fastlane:INFO] - Fetched 413 carbon strategies in 4.418950080871582 seconds\n", + "2023-12-06 06:28:57,755 [fastlane:INFO] - Updated 413 carbon strategies info in 0.059699058532714844 seconds\n", + "2023-12-06 06:29:22,970 [fastlane:ERROR] - Error writing pool data to disk: Object of type int64 is not JSON serializable\n", + "2023-12-06 06:29:22,971 [fastlane:INFO] - Initializing the bot...\n", + "2023-12-06 06:29:23,162 [fastlane:INFO] - State has changed...\n", + "2023-12-06 06:29:23,264 [fastlane:INFO] - Updated token data with 8 new tokens\n", + "2023-12-06 06:29:35,267 [fastlane:INFO] - \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", @@ -231,475 +269,56 @@ " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", - "2023-10-31 10:17:42,933 [fastlane:INFO] - Fetching events from 18471539 to 18471543... 18471541\n", - "2023-10-31 10:17:42,933 [fastlane:INFO] - Using cached events\n", - "2023-10-31 10:17:42,934 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 10:17:46,728 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 10:17:46,967 [fastlane:INFO] - State has changed...\n", - "2023-10-31 10:17:47,004 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 10:17:47,004 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 10:17:47,385 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 10:17:47,385 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:17:47,388 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:17:47,389 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:17:47,389 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:17:47,389 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:17:47,403 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 10:17:47,404 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 10:17:47,404 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 10:17:47,404 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 10:17:47,404 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 10:17:47,405 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:17:47,406 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:17:47,420 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 10:17:47,420 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 10:17:47,420 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 10:17:47,534 [fastlane:ERROR] - [bot:run:single] list index out of range\n", - "2023-10-31 10:17:47,534 [fastlane:ERROR] - Error in main loop: list index out of range\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 10:17:59,930 [fastlane:INFO] - Fetching events from 18471541 to 18471544... 18471543\n", - "2023-10-31 10:17:59,930 [fastlane:INFO] - Using cached events\n", - "2023-10-31 10:17:59,931 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 10:18:03,128 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 10:18:03,300 [fastlane:INFO] - State has changed...\n", - "2023-10-31 10:18:03,339 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 10:18:03,339 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 10:18:03,710 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 10:18:03,710 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:18:03,713 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:18:03,728 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 10:18:03,728 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 10:18:03,728 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 10:18:03,728 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 10:18:03,728 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:18:03,729 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:18:03,730 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:18:03,730 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:18:03,730 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:18:03,730 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:18:03,743 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 10:18:03,743 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 10:18:03,743 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 10:18:03,855 [fastlane:ERROR] - [bot:run:single] list index out of range\n", - "2023-10-31 10:18:03,855 [fastlane:ERROR] - Error in main loop: list index out of range\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 10:18:16,162 [fastlane:INFO] - Fetching events from 18471542 to 18471546... 18471544\n", - "2023-10-31 10:18:16,162 [fastlane:INFO] - Using cached events\n", - "2023-10-31 10:18:16,163 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 10:18:19,407 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 10:18:19,569 [fastlane:INFO] - State has changed...\n", - "2023-10-31 10:18:19,603 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 10:18:19,603 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 10:18:19,968 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 10:18:19,968 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:18:19,971 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:18:19,972 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:18:19,972 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:18:19,972 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:18:19,986 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 10:18:19,986 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 10:18:19,986 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 10:18:19,986 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 10:18:19,986 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 10:18:19,987 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:18:19,988 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:18:20,001 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 10:18:20,001 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 10:18:20,001 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 10:18:20,111 [fastlane:ERROR] - [bot:run:single] list index out of range\n", - "2023-10-31 10:18:20,111 [fastlane:ERROR] - Error in main loop: list index out of range\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 10:18:32,490 [fastlane:INFO] - Fetching events from 18471544 to 18471547... 18471546\n", - "2023-10-31 10:18:32,490 [fastlane:INFO] - Using cached events\n", - "2023-10-31 10:18:32,491 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 10:18:35,873 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 10:18:36,047 [fastlane:INFO] - State has changed...\n", - "2023-10-31 10:18:36,078 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5933 uniswap_v2/sushi pools remaining\n", - "2023-10-31 10:18:36,078 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 10:18:36,449 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 10:18:36,449 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:18:36,452 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:18:36,467 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 10:18:36,467 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 10:18:36,467 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 10:18:36,467 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 10:18:36,467 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 205\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - Removed 0 unsupported exchanges. 249 pools remaining\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - carbon_v1: 200\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 10:18:36,468 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 10:18:36,469 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 10:18:36,469 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 10:18:36,469 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 10:18:36,469 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 10:18:36,469 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 10:18:36,482 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", - "2023-10-31 10:18:36,482 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", - "2023-10-31 10:18:36,482 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "/Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/fastlane_bot/tools/optimizer/cpcarboptimizer.py:388: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " df.loc[\"PRICE\"].fillna(1, inplace=True)\n", - "2023-10-31 10:18:36,594 [fastlane:ERROR] - [bot:run:single] list index out of range\n", - "2023-10-31 10:18:36,594 [fastlane:ERROR] - Error in main loop: list index out of range\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2023-10-31 10:18:48,599 [fastlane:INFO] - Timeout hit... stopping bot\n" + "2023-12-06 06:29:35,514 [fastlane:INFO] - Checking latest version of Arbitrage Contract. Found version: 9\n", + "2023-12-06 06:29:35,749 [fastlane:INFO] - Fetching events from 18727879 to 18727886... 18727881\n", + "2023-12-06 06:29:37,860 [fastlane:INFO] - Found 172 new events, 82 carbon_pol_events\n", + "2023-12-06 06:29:37,863 [fastlane:INFO] - Saved events to fastlane_bot/data/logs/20231206-062832/latest_event_data.json\n", + "2023-12-06 06:29:39,174 [fastlane:INFO] - Adding new token UniBridge-dEd3 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:29:39,191 [fastlane:INFO] - Adding new token Grōk-7cD6 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:30:07,363 [fastlane:ERROR] - Error writing pool data to disk: Object of type int64 is not JSON serializable\n", + "2023-12-06 06:30:07,364 [fastlane:INFO] - Initializing the bot...\n", + "2023-12-06 06:30:07,490 [fastlane:INFO] - State has changed...\n", + "2023-12-06 06:30:07,514 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 1705 uniswap_v2/sushi pools remaining\n", + "2023-12-06 06:30:07,514 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", + "2023-12-06 06:30:07,535 [fastlane:INFO] - uniswap_v2: 0\n", + "2023-12-06 06:30:07,535 [fastlane:INFO] - sushiswap_v2: 0\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - uniswap_v3: 51\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - sushiswap_v2: 2\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - uniswap_v2: 66\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - bancor_v2: 0\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - bancor_v3: 13\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - bancor_pol: 72\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - carbon_v1: 184\n", + "2023-12-06 06:30:07,536 [fastlane:INFO] - pancakeswap_v2: 0\n", + "2023-12-06 06:30:07,537 [fastlane:INFO] - pancakeswap_v3: 0\n", + "2023-12-06 06:30:07,537 [fastlane:INFO] - balancer: 62\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 185\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 76\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 103\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 95\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 1\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 10\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 229\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", + "2023-12-06 06:30:07,543 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - Removed 0 unsupported exchanges. 450 pools remaining\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - Pools remaining per exchange:\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - carbon_v1: 184\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - bancor_v3: 13\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - bancor_v2: 0\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - bancor_pol: 72\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - uniswap_v3: 51\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - uniswap_v2: 66\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - sushiswap_v2: 2\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - balancer: 62\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - pancakeswap_v2: 0\n", + "2023-12-06 06:30:07,544 [fastlane:INFO] - pancakeswap_v3: 0\n", + "2023-12-06 06:30:07,566 [fastlane:INFO] - Transactions will be required to pass data validation for b3_two_hop\n", + "2023-12-06 06:30:07,566 [fastlane:WARNING] - base_exchange must be bancor_v3 for b3_two_hop, setting it to bancor_v3\n", + "2023-12-06 06:30:07,566 [fastlane:INFO] - flashloan_tokens for arb_mode=b3_two_hop will be overwritten. \n", + "2023-12-06 06:30:07,655 [fastlane:INFO] - No eligible arb opportunities.\n", + "2023-12-06 06:30:19,661 [fastlane:INFO] - Timeout hit... stopping bot\n" ] } ], @@ -729,7 +348,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/resources/NBTest/NBTest_904_Bancor3DataValidation.py b/resources/NBTest/NBTest_904_Bancor3DataValidation.py index aabbfd318..789e6fd9d 100644 --- a/resources/NBTest/NBTest_904_Bancor3DataValidation.py +++ b/resources/NBTest/NBTest_904_Bancor3DataValidation.py @@ -72,7 +72,8 @@ 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", + # "--use_cached_events=True", + "--alchemy_max_block_fetch=5", "--logging_path=fastlane_bot/data/", "--timeout=80", "--blockchain=ethereum" @@ -95,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) From 8598ec2a0d9ac087ada123ec08d838c33c125cd7 Mon Sep 17 00:00:00 2001 From: Mike Casale <46603283+mikewcasale@users.noreply.github.com> Date: Wed, 6 Dec 2023 06:36:39 -0800 Subject: [PATCH 11/12] fixes broken test --- .../NBTest/NBTest_906_TargetTokens.ipynb | 304 +++++++----------- resources/NBTest/NBTest_906_TargetTokens.py | 6 +- 2 files changed, 124 insertions(+), 186 deletions(-) diff --git a/resources/NBTest/NBTest_906_TargetTokens.ipynb b/resources/NBTest/NBTest_906_TargetTokens.ipynb index 6a3150937..c13971439 100644 --- a/resources/NBTest/NBTest_906_TargetTokens.ipynb +++ b/resources/NBTest/NBTest_906_TargetTokens.ipynb @@ -6,11 +6,41 @@ "id": "initial_id", "metadata": { "ExecuteTime": { - "end_time": "2023-10-31T16:48:47.363605Z", - "start_time": "2023-10-31T16:48:46.265619Z" + "end_time": "2023-12-06T14:35:56.839432Z", + "start_time": "2023-12-06T14:35:55.592653Z" } }, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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" + ] + }, { "name": "stdout", "output_type": "stream", @@ -64,8 +94,8 @@ "id": "1640a40ee6ae871c", "metadata": { "ExecuteTime": { - "end_time": "2023-10-31T16:48:47.369380Z", - "start_time": "2023-10-31T16:48:47.367500Z" + "end_time": "2023-12-06T14:35:56.843644Z", + "start_time": "2023-12-06T14:35:56.842645Z" } }, "outputs": [], @@ -108,9 +138,10 @@ " \"python\",\n", " main_script_path,\n", " f\"--arb_mode={mode}\",\n", - " \"--use_cached_events=True\",\n", + " # \"--use_cached_events=True\",\n", + " \"--alchemy_max_block_fetch=5\",\n", " \"--logging_path=fastlane_bot/data/\",\n", - " \"--timeout=45\",\n", + " \"--timeout=80\",\n", " f\"--target_tokens={T.WETH},{T.DAI}\",\n", " \"--blockchain=ethereum\"\n", " ]\n", @@ -139,222 +170,127 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "c6e198d0eeba3183", "metadata": { "ExecuteTime": { - "end_time": "2023-10-31T16:49:42.730814Z", - "start_time": "2023-10-31T16:48:47.369477Z" - } + "start_time": "2023-12-06T14:35:56.844246Z" + }, + "is_executing": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot/resources/NBTest\n", - "Found main.py in /Users/mikewcasale/Documents/GitHub/bancorprotocol/fastlane-bot\n" + "Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot/resources/NBTest\n", + "Found main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "2023-10-31 09:48:48,444 [fastlane:INFO] - \n", - "2023-10-31 09:48:48,444 [fastlane:INFO] - **********************************************\n", - "2023-10-31 09:48:48,444 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231031-094848/bot.log\n", - "2023-10-31 09:48:48,444 [fastlane:INFO] - **********************************************\n", - "2023-10-31 09:48:48,444 [fastlane:INFO] - \n", - "2023-10-31 09:48:49,154 [fastlane:INFO] - Using mainnet config\n", - "2023-10-31 09:48:49,155 [fastlane:INFO] - Flashloan tokens are set as: ['WBTC-C599', 'BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", - "2023-10-31 09:48:49,156 [fastlane:WARNING] - Falshloan token WBTC-C599 not in target tokens. Adding it to target tokens.\n", - "2023-10-31 09:48:49,159 [fastlane:WARNING] - Falshloan token BNT-FF1C not in target tokens. Adding it to target tokens.\n", - "2023-10-31 09:48:49,159 [fastlane:WARNING] - Falshloan token USDC-eB48 not in target tokens. Adding it to target tokens.\n", - "2023-10-31 09:48:49,159 [fastlane:WARNING] - Falshloan token USDT-1ec7 not in target tokens. Adding it to target tokens.\n", - "2023-10-31 09:48:49,160 [fastlane:WARNING] - Falshloan token LINK-86CA not in target tokens. Adding it to target tokens.\n", - "2023-10-31 09:48:49,160 [fastlane:INFO] - Target tokens are set as: ['WETH-6Cc2', 'DAI-1d0F', 'WBTC-C599', 'BNT-FF1C', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", - "2023-10-31 09:48:49,160 [fastlane:INFO] - 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-10-31 09:48:49,160 [fastlane:INFO] - \n", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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", + "Python-dotenv could not parse statement starting at line 3\n", + "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-06 06:35:58,090 [fastlane:INFO] - \n", + "2023-12-06 06:35:58,090 [fastlane:INFO] - **********************************************\n", + "2023-12-06 06:35:58,090 [fastlane:INFO] - The logging path is set to: fastlane_bot/data//logs/20231206-063558/bot.log\n", + "2023-12-06 06:35:58,090 [fastlane:INFO] - **********************************************\n", + "2023-12-06 06:35:58,090 [fastlane:INFO] - \n", + "2023-12-06 06:35:59,120 [fastlane:INFO] - Using mainnet config\n", + "2023-12-06 06:35:59,142 [fastlane:INFO] - tokens: 22233, USDC-eB48\n", + "2023-12-06 06:35:59,143 [fastlane:INFO] - unique_tokens: 22233\n", + "2023-12-06 06:35:59,150 [fastlane:INFO] - Flashloan tokens are set as: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", + "2023-12-06 06:35:59,150 [fastlane:WARNING] - Flashloan token BNT-FF1C not in target tokens. Adding it to target tokens.\n", + "2023-12-06 06:35:59,150 [fastlane:WARNING] - Flashloan token USDC-eB48 not in target tokens. Adding it to target tokens.\n", + "2023-12-06 06:35:59,150 [fastlane:WARNING] - Flashloan token USDT-1ec7 not in target tokens. Adding it to target tokens.\n", + "2023-12-06 06:35:59,150 [fastlane:WARNING] - Flashloan token LINK-86CA not in target tokens. Adding it to target tokens.\n", + "2023-12-06 06:35:59,150 [fastlane:INFO] - Target tokens are set as: ['WETH-6Cc2', 'DAI-1d0F', 'BNT-FF1C', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA'], \n", + "2023-12-06 06:35:59,150 [fastlane:INFO] - 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-06 06:35:59,150 [fastlane:INFO] - \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", " Starting fastlane bot with the following configuration:\n", " \n", - " cache_latest_only: True\n", - " backdate_pools: False\n", + " logging_path: fastlane_bot/data/logs/20231206-063558\n", " arb_mode: single\n", - " flashloan_tokens: ['WBTC-C599', 'BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", - " n_jobs: -1\n", + " blockchain: ethereum\n", + " default_min_profit_gas_token: 0.01\n", " exchanges: ['carbon_v1', 'bancor_v3', 'bancor_v2', 'bancor_pol', 'uniswap_v3', 'uniswap_v2', 'sushiswap_v2', 'balancer', 'pancakeswap_v2', 'pancakeswap_v3']\n", - " polling_interval: 12\n", - " alchemy_max_block_fetch: 2000\n", + " flashloan_tokens: ['BNT-FF1C', 'WETH-6Cc2', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", + " target_tokens: ['WETH-6Cc2', 'DAI-1d0F', 'BNT-FF1C', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", + " use_specific_exchange_for_target_tokens: None\n", + " loglevel: info\n", + " backdate_pools: False\n", + " alchemy_max_block_fetch: 5\n", " static_pool_data_filename: static_pool_data\n", + " cache_latest_only: True\n", + " n_jobs: -1\n", + " polling_interval: 12\n", " reorg_delay: 2\n", - " logging_path: fastlane_bot/data/logs/20231031-094848\n", - " loglevel: info\n", " static_pool_data_sample_sz: max\n", - " use_cached_events: True\n", + " use_cached_events: False\n", " run_data_validator: False\n", " randomizer: 3\n", " limit_bancor3_flashloan_tokens: True\n", - " default_min_profit_gas_token: 0.0001\n", - " timeout: 45\n", - " target_tokens: ['WETH-6Cc2', 'DAI-1d0F', 'WBTC-C599', 'BNT-FF1C', 'USDC-eB48', 'USDT-1ec7', 'LINK-86CA']\n", + " timeout: 80\n", " replay_from_block: None\n", " tenderly_fork_id: None\n", " tenderly_event_exchanges: []\n", " increment_time: 1\n", " increment_blocks: 1\n", - " blockchain: ethereum\n", " pool_data_update_frequency: -1\n", - " use_specific_exchange_for_target_tokens: None\n", + " prefix_path: \n", + " version_check_frequency: 1\n", " \n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", " \n", - "2023-10-31 09:48:50,252 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n", - "2023-10-31 09:48:51,702 [fastlane:INFO] - Time taken to add initial pools: 0.12459707260131836\n", - "2023-10-31 09:48:52,107 [fastlane:INFO] - Adding 272092 uniswap_v2 pools to static pools\n", - "2023-10-31 09:48:52,115 [fastlane:INFO] - Adding 3823 sushiswap_v2 pools to static pools\n", - "2023-10-31 09:48:52,122 [fastlane:INFO] - Adding 452 pancakeswap_v2 pools to static pools\n", - "2023-10-31 09:48:52,134 [fastlane:INFO] - Adding 272092 uniswap_v2 pools to static pools\n", - "2023-10-31 09:48:52,144 [fastlane:INFO] - Adding 16974 uniswap_v3 pools to static pools\n", - "2023-10-31 09:48:52,152 [fastlane:INFO] - Adding 145 pancakeswap_v3 pools to static pools\n", - "2023-10-31 09:48:52,445 [fastlane:INFO] - Fetching events from 18469400 to 18471400... 0\n", - "2023-10-31 09:48:52,445 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:48:52,447 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:48:53,825 [fastlane:INFO] - Updating carbon pools w/ multicall...\n", - "2023-10-31 09:48:54,155 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n", - "2023-10-31 09:48:54,155 [fastlane:INFO] - Retrieving carbon strategies from contract\n", - "2023-10-31 09:48:54,814 [fastlane:INFO] - Carbon is initialized True\n", - "2023-10-31 09:48:54,815 [fastlane:INFO] - Retrieved 14 carbon strategies\n", - "2023-10-31 09:48:54,815 [fastlane:INFO] - Setting carbon fee pairs...\n", - "2023-10-31 09:48:55,479 [fastlane:INFO] - Fetched 47 carbon strategies in 1.6539130210876465 seconds\n", - "2023-10-31 09:48:55,500 [fastlane:INFO] - Updated 47 carbon strategies info in 0.020992040634155273 seconds\n", - "2023-10-31 09:48:57,435 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:48:57,589 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:49:09,594 [fastlane:INFO] - \n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " \n", - " Finished first iteration of data sync. Now starting main loop arbitrage search.\n", - " \n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", - " \n", - "2023-10-31 09:49:09,925 [fastlane:INFO] - Fetching events from 18471398 to 18471401... 18471400\n", - "2023-10-31 09:49:09,926 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:49:09,926 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:49:13,170 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:49:13,516 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:49:13,532 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5575 uniswap_v2/sushi pools remaining\n", - "2023-10-31 09:49:13,532 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 09:49:13,883 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 09:49:13,883 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - carbon_v1: 30\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:49:13,886 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:49:13,893 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 09:49:13,893 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 09:49:13,893 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 09:49:13,893 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 09:49:13,893 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 09:49:13,894 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 09:49:13,894 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 17\n", - "2023-10-31 09:49:13,894 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 09:49:13,894 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 09:49:13,894 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - Removed 0 unsupported exchanges. 79 pools remaining\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - carbon_v1: 30\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - Limiting pools by target_tokens. Removed 42 non target-pools. 37 pools remaining\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - carbon_v1: 30\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - bancor_v3: 4\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - uniswap_v3: 1\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - uniswap_v2: 2\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:49:13,895 [fastlane:INFO] - pancakeswap_v3: 0\n", - "100%|██████████| 1/1 [00:00<00:00, 47662.55it/s]\n", - "2023-10-31 09:49:13,908 [fastlane:ERROR] - [bot:run:single] list index out of range\n", - "2023-10-31 09:49:13,908 [fastlane:ERROR] - Error in main loop: list index out of range\n", - "2023-10-31 09:49:26,219 [fastlane:INFO] - Fetching events from 18471399 to 18471403... 18471401\n", - "2023-10-31 09:49:26,220 [fastlane:INFO] - Using cached events\n", - "2023-10-31 09:49:26,221 [fastlane:INFO] - Found 25 new events\n", - "2023-10-31 09:49:29,865 [fastlane:INFO] - Initializing the bot...\n", - "2023-10-31 09:49:30,038 [fastlane:INFO] - State has changed...\n", - "2023-10-31 09:49:30,047 [fastlane:INFO] - Removed 0 unmapped uniswap_v2/sushi pools. 5575 uniswap_v2/sushi pools remaining\n", - "2023-10-31 09:49:30,047 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n", - "2023-10-31 09:49:30,401 [fastlane:INFO] - uniswap_v2: 0\n", - "2023-10-31 09:49:30,401 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:49:30,404 [fastlane:INFO] - carbon_v1: 30\n", - "2023-10-31 09:49:30,405 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:49:30,405 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:49:30,405 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:49:30,411 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 1482\n", - "2023-10-31 09:49:30,411 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 87\n", - "2023-10-31 09:49:30,411 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 3252\n", - "2023-10-31 09:49:30,412 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 99\n", - "2023-10-31 09:49:30,412 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 3\n", - "2023-10-31 09:49:30,412 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n", - "2023-10-31 09:49:30,412 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 17\n", - "2023-10-31 09:49:30,412 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 430\n", - "2023-10-31 09:49:30,412 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 126\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - Removed 0 unsupported exchanges. 79 pools remaining\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - carbon_v1: 30\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - bancor_v3: 24\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - uniswap_v3: 10\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - uniswap_v2: 13\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - sushiswap_v2: 2\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - pancakeswap_v3: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - Limiting pools by target_tokens. Removed 42 non target-pools. 37 pools remaining\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - Pools remaining per exchange:\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - carbon_v1: 30\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - bancor_v3: 4\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - bancor_v2: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - bancor_pol: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - uniswap_v3: 1\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - uniswap_v2: 2\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - sushiswap_v2: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - balancer: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - pancakeswap_v2: 0\n", - "2023-10-31 09:49:30,413 [fastlane:INFO] - pancakeswap_v3: 0\n", - "100%|██████████| 1/1 [00:00<00:00, 55188.21it/s]\n", - "2023-10-31 09:49:30,422 [fastlane:ERROR] - [bot:run:single] list index out of range\n", - "2023-10-31 09:49:30,422 [fastlane:ERROR] - Error in main loop: list index out of range\n", - "2023-10-31 09:49:42,427 [fastlane:INFO] - Timeout hit... stopping bot\n" + "2023-12-06 06:35:59,857 [fastlane:INFO] - Retrieved 214 carbon pairs from contract\n", + "2023-12-06 06:36:02,063 [fastlane:INFO] - Time taken to add initial pools: 0.026159048080444336\n", + "2023-12-06 06:36:02,394 [fastlane:INFO] - Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-06 06:36:02,400 [fastlane:INFO] - Adding 3861 sushiswap_v2 pools to static pools\n", + "2023-12-06 06:36:02,409 [fastlane:INFO] - Adding 472 pancakeswap_v2 pools to static pools\n", + "2023-12-06 06:36:02,419 [fastlane:INFO] - Adding 286307 uniswap_v2 pools to static pools\n", + "2023-12-06 06:36:02,426 [fastlane:INFO] - Adding 17983 uniswap_v3 pools to static pools\n", + "2023-12-06 06:36:02,432 [fastlane:INFO] - Adding 158 pancakeswap_v3 pools to static pools\n", + "2023-12-06 06:36:02,684 [fastlane:INFO] - Fetching events from 18727913 to 18727918... 0\n", + "2023-12-06 06:36:05,669 [fastlane:INFO] - Found 154 new events, 82 carbon_pol_events\n", + "2023-12-06 06:36:05,670 [fastlane:INFO] - Saved events to fastlane_bot/data/logs/20231206-063558/latest_event_data.json\n", + "2023-12-06 06:36:11,840 [fastlane:INFO] - Adding new token ANONBOT-102b to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n", + "2023-12-06 06:36:13,531 [fastlane:INFO] - Adding new token FARM-A1E5 to fastlane_bot/data/blockchain_data/ethereum/tokens.csv\n" ] } ], diff --git a/resources/NBTest/NBTest_906_TargetTokens.py b/resources/NBTest/NBTest_906_TargetTokens.py index ef6acdd47..608842272 100644 --- a/resources/NBTest/NBTest_906_TargetTokens.py +++ b/resources/NBTest/NBTest_906_TargetTokens.py @@ -75,9 +75,10 @@ def run_command(mode): "python", main_script_path, f"--arb_mode={mode}", - "--use_cached_events=True", + # "--use_cached_events=True", + "--alchemy_max_block_fetch=5", "--logging_path=fastlane_bot/data/", - "--timeout=45", + "--timeout=80", f"--target_tokens={T.WETH},{T.DAI}", "--blockchain=ethereum" ] @@ -100,4 +101,5 @@ def run_command(mode): # ## Test Flashloan Tokens b3_two_hop +# + is_executing=true run_command("single") From 935c03b35388440cc651ad25758a52f21ac4e9e5 Mon Sep 17 00:00:00 2001 From: Lesigh-3100 Date: Thu, 7 Dec 2023 17:26:32 +0200 Subject: [PATCH 12/12] Fix test 900 --- .../NBTest_900_OptimizerDetailedSlow.ipynb | 461 +++++++++--------- .../NBTest_900_OptimizerDetailedSlow.py | 2 +- 2 files changed, 222 insertions(+), 241 deletions(-) diff --git a/resources/NBTest/NBTest_900_OptimizerDetailedSlow.ipynb b/resources/NBTest/NBTest_900_OptimizerDetailedSlow.ipynb index 84f2c5d29..bdf15a18a 100644 --- a/resources/NBTest/NBTest_900_OptimizerDetailedSlow.ipynb +++ b/resources/NBTest/NBTest_900_OptimizerDetailedSlow.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 67, "id": "8f04c50a-67fe-4f09-822d-6ed6e3ac43e4", "metadata": { "ExecuteTime": { @@ -15,7 +15,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "ConstantProductCurve v3.3 (21/Sep/2023)\n", + "ConstantProductCurve v3.3.1 (05/Oct/2023)\n", "CPCAnalyzer v1.5 (18/May/2023)\n", "OptimizerBase v5.1 (20/Sep/2023)\n", "CPCArbOptimizer v5.1 (15/Sep/2023)\n", @@ -23,7 +23,6 @@ "MargPOptimizer v5.2 (15/Sep/2023)\n", "ConvexOptimizer v5.1 (15/Sep/2023)\n", "ArbGraph v2.2 (09/May/2023)\n", - "imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n", "Version = 3-b2.2 [requirements >= 3.0 is met]\n" ] } @@ -63,7 +62,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 68, "id": "736e4c79-fbd4-4898-ba89-82d779b57f20", "metadata": { "ExecuteTime": { @@ -94,7 +93,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 69, "id": "978daf46-aef2-4918-9204-59239240d5f2", "metadata": { "ExecuteTime": { @@ -121,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 70, "id": "4f28ff25-8a6f-4466-b8a9-6bf926b0fac3", "metadata": { "ExecuteTime": { @@ -152,7 +151,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 71, "id": "8e902de8-cd75-477b-8577-2cc4b10346e1", "metadata": { "ExecuteTime": { @@ -257,7 +256,7 @@ "[2834 rows x 1 columns]" ] }, - "execution_count": 5, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -268,7 +267,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 72, "id": "f77c58ad-454b-4a3d-9bbe-1c92cc04c731", "metadata": { "ExecuteTime": { @@ -373,7 +372,7 @@ "[935 rows x 1 columns]" ] }, - "execution_count": 6, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } @@ -392,7 +391,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 73, "id": "e6099e82-4bd0-4748-ad2e-1a1c06d43896", "metadata": { "ExecuteTime": { @@ -417,7 +416,7 @@ " ('ICSA-69ed', 6)])" ] }, - "execution_count": 7, + "execution_count": 73, "metadata": {}, "output_type": "execute_result" } @@ -431,7 +430,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 74, "id": "7c727bf9-3d6e-42b4-89e0-e6f398acb265", "metadata": { "ExecuteTime": { @@ -466,7 +465,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 75, "id": "aba143f8-1b00-49fd-b5eb-88914d16a823", "metadata": { "ExecuteTime": { @@ -491,7 +490,7 @@ "45" ] }, - "execution_count": 9, + "execution_count": 75, "metadata": {}, "output_type": "execute_result" } @@ -514,7 +513,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 76, "id": "6db0700b-9542-4ec4-8242-e9dad39958a2", "metadata": { "ExecuteTime": { @@ -540,7 +539,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 77, "id": "3a6a4aea-cf79-4e59-8f83-11f51e7c82de", "metadata": { "ExecuteTime": { @@ -555,7 +554,7 @@ "(70, 21)" ] }, - "execution_count": 11, + "execution_count": 77, "metadata": {}, "output_type": "execute_result" } @@ -566,7 +565,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 78, "id": "97d9d897-8038-4e66-8ac7-56b2a04f3ea1", "metadata": { "ExecuteTime": { @@ -602,7 +601,7 @@ " ('SMT-7173', 1)]" ] }, - "execution_count": 12, + "execution_count": 78, "metadata": {}, "output_type": "execute_result" } @@ -613,7 +612,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 79, "id": "c721f8aa-6d74-4c11-a6d4-adacf1c9043d", "metadata": { "ExecuteTime": { @@ -654,7 +653,7 @@ " 'vBNT-7f94/USDC-eB48'})" ] }, - "execution_count": 13, + "execution_count": 79, "metadata": {}, "output_type": "execute_result" } @@ -673,7 +672,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 80, "id": "eeaedcf0-b3a8-48fc-9802-5d99640eee26", "metadata": { "ExecuteTime": { @@ -786,17 +785,17 @@ " \n", " \n", " AMMIn\n", - " 2905472.583407\n", + " 2905472.583405\n", " 9856630.397495\n", - " 6845674.127441\n", + " 6845674.127426\n", " 331.431642\n", " 7.424195\n", " 192904.817736\n", " \n", " \n", " AMMOut\n", - " -2905472.583409\n", - " -9861236.407654\n", + " -2905472.583439\n", + " -9861236.407637\n", " -6845674.127441\n", " -331.431642\n", " -7.424195\n", @@ -804,9 +803,9 @@ " \n", " \n", " TOTAL NET\n", - " -0.000002\n", - " -4606.010159\n", - " 0.000001\n", + " -0.000035\n", + " -4606.010142\n", + " -0.000015\n", " -0.0\n", " -0.0\n", " -0.000004\n", @@ -826,9 +825,9 @@ "... ... ... \n", "21f3ea686abd44c6b7829e488a01aa74 6780944.55249 \n", "PRICE 1.00058 1.0 \n", - "AMMIn 2905472.583407 9856630.397495 \n", - "AMMOut -2905472.583409 -9861236.407654 \n", - "TOTAL NET -0.000002 -4606.010159 \n", + "AMMIn 2905472.583405 9856630.397495 \n", + "AMMOut -2905472.583439 -9861236.407637 \n", + "TOTAL NET -0.000035 -4606.010142 \n", "\n", " DAI-1d0F WETH-6Cc2 WBTC-C599 \\\n", "357 \n", @@ -839,9 +838,9 @@ "... ... ... ... \n", "21f3ea686abd44c6b7829e488a01aa74 -6780334.136658 \n", "PRICE 1.000179 1842.67228 27604.143472 \n", - "AMMIn 6845674.127441 331.431642 7.424195 \n", + "AMMIn 6845674.127426 331.431642 7.424195 \n", "AMMOut -6845674.127441 -331.431642 -7.424195 \n", - "TOTAL NET 0.000001 -0.0 -0.0 \n", + "TOTAL NET -0.000015 -0.0 -0.0 \n", "\n", " BNT-FF1C \n", "357 \n", @@ -859,7 +858,7 @@ "[90 rows x 6 columns]" ] }, - "execution_count": 14, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -874,7 +873,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 81, "id": "6b464dce-72bb-4e3e-8727-184f089cd026", "metadata": { "ExecuteTime": { @@ -889,7 +888,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 82, "id": "e2607921-01b9-48ad-8af5-296b26c7e643", "metadata": { "ExecuteTime": { @@ -915,7 +914,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 83, "id": "696cb5a1-882f-43f2-807a-63f25b1e7075", "metadata": { "ExecuteTime": { @@ -938,7 +937,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 84, "id": "84927e7a-3062-472a-b2c8-8fa2e0bfa345", "metadata": { "ExecuteTime": { @@ -954,7 +953,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 85, "id": "53f36478-2060-4357-a624-db573502fd12", "metadata": { "ExecuteTime": { @@ -970,7 +969,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 86, "id": "053c284c-22cb-4440-9818-f529f344cdb3", "metadata": { "ExecuteTime": { @@ -987,7 +986,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 87, "id": "ab2853bb-da5c-4d2f-a54c-8092af810937", "metadata": { "ExecuteTime": { @@ -1004,7 +1003,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 88, "id": "77bc5aa7-2e50-444d-9c21-ecb3a703d9fa", "metadata": { "ExecuteTime": { @@ -1019,7 +1018,7 @@ "CPCArbOptimizer.MargpOptimizerResult(result=None, time=0, method='margp', targettkn=None, p_optimal_t=None, dtokens_t=None, tokens_t=None, errormsg='err')" ] }, - "execution_count": 22, + "execution_count": 88, "metadata": {}, "output_type": "execute_result" } @@ -1038,7 +1037,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 89, "id": "4ec895b2-4ed6-404f-af16-b6c48603461b", "metadata": { "ExecuteTime": { @@ -1069,7 +1068,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 90, "id": "5a565cec-f8c7-4d2a-9097-c60b62c88d06", "metadata": { "ExecuteTime": { @@ -1094,7 +1093,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 91, "id": "676999fb-9bab-4add-85cf-1de62201e059", "metadata": { "ExecuteTime": { @@ -1120,7 +1119,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 92, "id": "a6d7e44b-38fc-419f-bd55-c81e4dd71b42", "metadata": { "ExecuteTime": { @@ -1142,7 +1141,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 93, "id": "316f952e-ee28-47c8-80d5-2e12e7663c97", "metadata": { "ExecuteTime": { @@ -1167,7 +1166,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 94, "id": "38634d40-f1dd-4ef7-9a1d-7cee6cb752ea", "metadata": { "ExecuteTime": { @@ -1193,7 +1192,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 95, "id": "a8fb4a51-e8fe-4c16-aa15-1eb7bcbcf319", "metadata": { "ExecuteTime": { @@ -1213,7 +1212,7 @@ " 'USDC-eB48/WETH-6Cc2'))" ] }, - "execution_count": 29, + "execution_count": 95, "metadata": {}, "output_type": "execute_result" } @@ -1224,7 +1223,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 96, "id": "cea1c980-fa6b-4a99-824b-c8790581b57a", "metadata": { "ExecuteTime": { @@ -1239,7 +1238,7 @@ "(1700.000169864341, 0.0005000000499999988)" ] }, - "execution_count": 30, + "execution_count": 96, "metadata": {}, "output_type": "execute_result" } @@ -1250,7 +1249,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 97, "id": "2b66ba57-f327-4f0f-8b0f-9498e64068b7", "metadata": { "ExecuteTime": { @@ -1280,7 +1279,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 98, "id": "e5f29ad8-cc82-4c8d-98ba-85aa673713fe", "metadata": { "ExecuteTime": { @@ -1398,7 +1397,7 @@ "[70 rows x 2 columns]" ] }, - "execution_count": 32, + "execution_count": 98, "metadata": {}, "output_type": "execute_result" } @@ -1421,7 +1420,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 99, "id": "06b3e72f-5632-414d-8e79-657e23dade0b", "metadata": { "ExecuteTime": { @@ -1436,7 +1435,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 100, "id": "310f3313-3993-4c97-ab59-8378f3326c1c", "metadata": { "ExecuteTime": { @@ -1470,7 +1469,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 101, "id": "aa404e85-085d-4915-8c6c-e49ceae13c01", "metadata": { "ExecuteTime": { @@ -1486,7 +1485,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 102, "id": "ec5069f3-74a5-4563-94ca-3bdf2f87ad88", "metadata": { "ExecuteTime": { @@ -1768,7 +1767,7 @@ " 41057315-1 s 2300.000000 2400.000000 2300.000000" ] }, - "execution_count": 36, + "execution_count": 102, "metadata": {}, "output_type": "execute_result" } @@ -1839,7 +1838,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 103, "id": "fe2fd598-26e0-4a33-a1b5-49d3e693005f", "metadata": { "ExecuteTime": { @@ -1870,7 +1869,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 104, "id": "544b1056-92c5-4669-be07-9d82f5e10017", "metadata": { "ExecuteTime": { @@ -2027,7 +2026,7 @@ "[2233 rows x 5 columns]" ] }, - "execution_count": 38, + "execution_count": 104, "metadata": {}, "output_type": "execute_result" } @@ -2052,7 +2051,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 105, "id": "d53f665d-79d3-4da0-90e1-8aa37ef27673", "metadata": { "ExecuteTime": { @@ -2251,7 +2250,7 @@ "[165 rows x 6 columns]" ] }, - "execution_count": 39, + "execution_count": 105, "metadata": {}, "output_type": "execute_result" } @@ -2269,7 +2268,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 106, "id": "c6382990-7537-4e2a-bd06-4032e742cf9a", "metadata": { "ExecuteTime": { @@ -2294,7 +2293,7 @@ " 'buy-sell-WETH @ 1840.12 DAI per WETH')" ] }, - "execution_count": 40, + "execution_count": 106, "metadata": {}, "output_type": "execute_result" } @@ -2315,7 +2314,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 107, "id": "57df8ed4-b663-4a01-a63b-3ae257b277fc", "metadata": { "ExecuteTime": { @@ -2340,7 +2339,7 @@ " 'buy-sell-WETH @ 1840.12 DAI per WETH')" ] }, - "execution_count": 41, + "execution_count": 107, "metadata": {}, "output_type": "execute_result" } @@ -2377,7 +2376,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 108, "id": "ccf80984-1745-4d0f-94a2-f7ca89aa53cb", "metadata": { "ExecuteTime": { @@ -2490,17 +2489,17 @@ " \n", " \n", " AMMIn\n", - " 2905472.583407\n", + " 2905472.583405\n", " 9856630.397495\n", - " 6845674.127441\n", + " 6845674.127426\n", " 331.431642\n", " 7.424195\n", " 192904.817736\n", " \n", " \n", " AMMOut\n", - " -2905472.583409\n", - " -9861236.407654\n", + " -2905472.583439\n", + " -9861236.407637\n", " -6845674.127441\n", " -331.431642\n", " -7.424195\n", @@ -2508,9 +2507,9 @@ " \n", " \n", " TOTAL NET\n", - " -0.000002\n", - " -4606.010159\n", - " 0.000001\n", + " -0.000035\n", + " -4606.010142\n", + " -0.000015\n", " -0.0\n", " -0.0\n", " -0.000004\n", @@ -2530,9 +2529,9 @@ "... ... ... \n", "21f3ea686abd44c6b7829e488a01aa74 6780944.55249 \n", "PRICE 1.00058 1.0 \n", - "AMMIn 2905472.583407 9856630.397495 \n", - "AMMOut -2905472.583409 -9861236.407654 \n", - "TOTAL NET -0.000002 -4606.010159 \n", + "AMMIn 2905472.583405 9856630.397495 \n", + "AMMOut -2905472.583439 -9861236.407637 \n", + "TOTAL NET -0.000035 -4606.010142 \n", "\n", " DAI-1d0F WETH-6Cc2 WBTC-C599 \\\n", "357 \n", @@ -2543,9 +2542,9 @@ "... ... ... ... \n", "21f3ea686abd44c6b7829e488a01aa74 -6780334.136658 \n", "PRICE 1.000179 1842.67228 27604.143472 \n", - "AMMIn 6845674.127441 331.431642 7.424195 \n", + "AMMIn 6845674.127426 331.431642 7.424195 \n", "AMMOut -6845674.127441 -331.431642 -7.424195 \n", - "TOTAL NET 0.000001 -0.0 -0.0 \n", + "TOTAL NET -0.000015 -0.0 -0.0 \n", "\n", " BNT-FF1C \n", "357 \n", @@ -2563,7 +2562,7 @@ "[90 rows x 6 columns]" ] }, - "execution_count": 42, + "execution_count": 108, "metadata": {}, "output_type": "execute_result" } @@ -2586,7 +2585,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 109, "id": "4c660d37-da45-4834-af30-3c3f3c289aa6", "metadata": { "ExecuteTime": { @@ -2599,7 +2598,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "optimal p {'USDT-1ec7': 1.00058, 'WETH-6Cc2': 1842.67228, 'BNT-FF1C': 0.429078, 'WBTC-C599': 27604.143472, 'DAI-1d0F': 1.000179}\n" + "optimal p {'USDT-1ec7': 1.00058, 'WETH-6Cc2': 1842.67228, 'WBTC-C599': 27604.143472, 'DAI-1d0F': 1.000179, 'BNT-FF1C': 0.429078}\n" ] } ], @@ -2633,7 +2632,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 110, "id": "e941c8c3-63db-4d41-9f99-e972ed8d4a68", "metadata": { "ExecuteTime": { @@ -2646,10 +2645,10 @@ "data": { "text/plain": [ "(CPCArbOptimizer.TradeInstruction(cid='357', tknin='USDT-1ec7', amtin=1214.455968487775, tknout='USDC-eB48', amtout=-1216.4193395881448, error=None),\n", - " CPCArbOptimizer.TradeInstruction(cid='594', tknin='DAI-1d0F', amtin=943.8267624520231, tknout='WETH-6Cc2', amtout=-0.5126061548005509, error=None))" + " CPCArbOptimizer.TradeInstruction(cid='594', tknin='DAI-1d0F', amtin=943.8267624517903, tknout='WETH-6Cc2', amtout=-0.5126061548004373, error=None))" ] }, - "execution_count": 44, + "execution_count": 110, "metadata": {}, "output_type": "execute_result" } @@ -2676,7 +2675,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 111, "id": "f1bc8f31-d88c-488f-a9ff-f8449c97ed66", "metadata": { "ExecuteTime": { @@ -2696,13 +2695,13 @@ " 'error': None},\n", " {'cid': '594',\n", " 'tknin': 'DAI-1d0F',\n", - " 'amtin': 943.8267624520231,\n", + " 'amtin': 943.8267624517903,\n", " 'tknout': 'WETH-6Cc2',\n", - " 'amtout': -0.5126061548005509,\n", + " 'amtout': -0.5126061548004373,\n", " 'error': None})" ] }, - "execution_count": 45, + "execution_count": 111, "metadata": {}, "output_type": "execute_result" } @@ -2725,7 +2724,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 112, "id": "d1a2263d-a789-435c-b157-e7c33048e0b3", "metadata": { "ExecuteTime": { @@ -2823,7 +2822,7 @@ "594 943.826762 -0.512606 " ] }, - "execution_count": 46, + "execution_count": 112, "metadata": {}, "output_type": "execute_result" } @@ -2846,7 +2845,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 113, "id": "20929d6d-b28c-47fe-8bad-3292928e8407", "metadata": { "ExecuteTime": { @@ -2993,7 +2992,7 @@ "290 -0.321776 1364.584132" ] }, - "execution_count": 47, + "execution_count": 113, "metadata": {}, "output_type": "execute_result" } @@ -3010,7 +3009,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 114, "id": "30219a5c-e561-4638-abb6-a209bb74700d", "metadata": { "ExecuteTime": { @@ -3190,8 +3189,8 @@ " 0.999438\n", " 0.999420\n", " 0.000018\n", - " 49.809708\n", - " 49.838605\n", + " 49.809738\n", + " 49.838636\n", " \n", " \n", " a6595d66f70c432a9b68557428a6fe54\n", @@ -3273,11 +3272,11 @@ " 67f9d1e2b3fc407eb44dcb637d051d19 75.213875 75.257511 \n", " edb7550782154a5b8eb1e4feedc87668 0.034554 63.672609 \n", " 486 60.650016 60.685203 \n", - " 4c50c9e4fdde4aefbf495b30d42fa3d0 49.809708 49.838605 \n", + " 4c50c9e4fdde4aefbf495b30d42fa3d0 49.809738 49.838636 \n", " a6595d66f70c432a9b68557428a6fe54 0.016913 31.164972 " ] }, - "execution_count": 48, + "execution_count": 114, "metadata": {}, "output_type": "execute_result" } @@ -3307,7 +3306,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 115, "id": "f680dfd7-b5cc-4ee2-b69b-ff8ca0a0b0f9", "metadata": { "ExecuteTime": { @@ -3327,7 +3326,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 116, "id": "56476abd-2a0f-4e74-b45b-62836b49f9cb", "metadata": { "ExecuteTime": { @@ -3427,7 +3426,7 @@ "HEX-eb39 5 0 0 5 0" ] }, - "execution_count": 50, + "execution_count": 116, "metadata": {}, "output_type": "execute_result" } @@ -3438,7 +3437,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 117, "id": "5570f890-5367-47de-93ef-328025f9c968", "metadata": { "ExecuteTime": { @@ -3461,7 +3460,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 118, "id": "f14670a2-e1a5-4f11-af3e-397aef23cee3", "metadata": { "ExecuteTime": { @@ -3478,7 +3477,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 119, "id": "79bec194-1df2-40f2-b44d-90e8996e454f", "metadata": { "ExecuteTime": { @@ -3494,13 +3493,21 @@ "Solver params: {}\n" ] }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "c:\\Users\\Kveen\\PycharmProjects\\fastlane-bot\\venv\\lib\\site-packages\\cvxpy\\problems\\problem.py:1385: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.\n", + " warnings.warn(\n" + ] + }, { "data": { "text/plain": [ - "ConvexOptimizer.NofeesOptimizerResult(result=-1781781.3837840739, time=0.23414063453674316, method='convex', token_table={'LINK-86CA': TTE(x=[0, 4, 6, 7, 8, 9, 13, 15, 16, 18, 19, 20], y=[]), 'HEX-eb39': TTE(x=[1, 2, 10, 11, 12], y=[]), 'USDT-1ec7': TTE(x=[], y=[2, 3, 5, 6, 7, 12, 14, 16, 17, 19]), 'WETH-6Cc2': TTE(x=[3, 5, 14, 17], y=[4, 8, 11, 13, 20]), 'DAI-1d0F': TTE(x=[], y=[0, 1, 9, 10, 15, 18])})" + "ConvexOptimizer.NofeesOptimizerResult(result=-1785072.6155770423, time=0.263500452041626, method='convex', token_table={'LINK-86CA': TTE(x=[0, 4, 6, 7, 8, 9, 13, 15, 16, 18, 19, 20], y=[]), 'HEX-eb39': TTE(x=[1, 2, 10, 11, 12], y=[]), 'USDT-1ec7': TTE(x=[], y=[2, 3, 5, 6, 7, 12, 14, 16, 17, 19]), 'DAI-1d0F': TTE(x=[], y=[0, 1, 9, 10, 15, 18]), 'WETH-6Cc2': TTE(x=[3, 5, 14, 17], y=[4, 8, 11, 13, 20])})" ] }, - "execution_count": 53, + "execution_count": 119, "metadata": {}, "output_type": "execute_result" } @@ -3521,7 +3528,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 120, "id": "cd3e6d9a-a6a5-4407-931b-eea60ab6a80f", "metadata": { "ExecuteTime": { @@ -3536,7 +3543,7 @@ "-1800000.0" ] }, - "execution_count": 54, + "execution_count": 120, "metadata": {}, "output_type": "execute_result" } @@ -3547,7 +3554,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 121, "id": "377341bf-e7d1-4c1d-b539-0aca307b92a3", "metadata": { "ExecuteTime": { @@ -3583,7 +3590,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 122, "id": "57b45a2f-f3c4-4901-be9a-f2bbacd609e8", "metadata": { "ExecuteTime": { @@ -3599,7 +3606,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 123, "id": "448eab5b-4c06-4d88-b6b8-b3dc6232f760", "metadata": { "ExecuteTime": { @@ -3611,11 +3618,11 @@ { "data": { "text/plain": [ - "(CPCArbOptimizer.TradeInstruction(cid='175', tknin='LINK-86CA', amtin=8.32108810849466, tknout='DAI-1d0F', amtout=-45.82736896718895, error=None),\n", - " CPCArbOptimizer.TradeInstruction(cid='115', tknin='DAI-1d0F', amtin=55.89354862686732, tknout='HEX-eb39', amtout=-924.7675585802209, error=None))" + "(CPCArbOptimizer.TradeInstruction(cid='175', tknin='LINK-86CA', amtin=9.409168863592686, tknout='DAI-1d0F', amtout=-43.27113403114167, error=None),\n", + " CPCArbOptimizer.TradeInstruction(cid='115', tknin='DAI-1d0F', amtin=51.90260448281394, tknout='HEX-eb39', amtout=-859.129377529952, error=None))" ] }, - "execution_count": 57, + "execution_count": 123, "metadata": {}, "output_type": "execute_result" } @@ -3642,7 +3649,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 124, "id": "5bf4535c-891b-4002-8a45-c2cefa4f8aae", "metadata": { "ExecuteTime": { @@ -3656,19 +3663,19 @@ "text/plain": [ "({'cid': '175',\n", " 'tknin': 'LINK-86CA',\n", - " 'amtin': 8.32108810849466,\n", + " 'amtin': 9.409168863592686,\n", " 'tknout': 'DAI-1d0F',\n", - " 'amtout': -45.82736896718895,\n", + " 'amtout': -43.27113403114167,\n", " 'error': None},\n", " {'cid': '115',\n", " 'tknin': 'DAI-1d0F',\n", - " 'amtin': 55.89354862686732,\n", + " 'amtin': 51.90260448281394,\n", " 'tknout': 'HEX-eb39',\n", - " 'amtout': -924.7675585802209,\n", + " 'amtout': -859.129377529952,\n", " 'error': None})" ] }, - "execution_count": 58, + "execution_count": 124, "metadata": {}, "output_type": "execute_result" } @@ -3691,7 +3698,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": 125, "id": "0efeef32-8c03-46af-91f2-138547efcd7a", "metadata": { "ExecuteTime": { @@ -3751,8 +3758,8 @@ " LINK/DAI\n", " LINK-86CA\n", " DAI-1d0F\n", - " 8.321088\n", - " -45.827369\n", + " 9.409169\n", + " -43.271134\n", " \n", " \n", " \n", @@ -3764,8 +3771,8 @@ " DAI-1d0F\n", " HEX-eb39\n", " \n", - " 55.893549\n", - " -924.767559\n", + " 51.902604\n", + " -859.129378\n", " \n", " \n", " \n", @@ -3776,16 +3783,16 @@ "text/plain": [ " pair pairp tknin tknout LINK-86CA DAI-1d0F \\\n", "cid \n", - "175 LINK-86CA/DAI-1d0F LINK/DAI LINK-86CA DAI-1d0F 8.321088 -45.827369 \n", - "115 HEX-eb39/DAI-1d0F HEX/DAI DAI-1d0F HEX-eb39 55.893549 \n", + "175 LINK-86CA/DAI-1d0F LINK/DAI LINK-86CA DAI-1d0F 9.409169 -43.271134 \n", + "115 HEX-eb39/DAI-1d0F HEX/DAI DAI-1d0F HEX-eb39 51.902604 \n", "\n", " HEX-eb39 USDT-1ec7 WETH-6Cc2 \n", "cid \n", "175 \n", - "115 -924.767559 " + "115 -859.129378 " ] }, - "execution_count": 59, + "execution_count": 125, "metadata": {}, "output_type": "execute_result" } @@ -3808,7 +3815,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 126, "id": "63a554ca-7c04-4cdc-b08f-6a4981e1a89f", "metadata": { "ExecuteTime": { @@ -3832,7 +3839,7 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": 127, "id": "0a682d61-f680-4be8-b6ae-ce6ca0d3acf7", "metadata": { "ExecuteTime": { @@ -3851,7 +3858,7 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": 128, "id": "ef5cd37e-1307-4460-8c63-d5a654cd028c", "metadata": { "ExecuteTime": { @@ -3924,7 +3931,7 @@ "WETH-6Cc2 24 16 4 2 2" ] }, - "execution_count": 62, + "execution_count": 128, "metadata": {}, "output_type": "execute_result" } @@ -3935,7 +3942,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 129, "id": "4949e298-df9a-46d9-bebb-4286f2456038", "metadata": { "ExecuteTime": { @@ -3958,7 +3965,7 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 130, "id": "cf47528a-42d0-42c0-a693-b43b52bc99f8", "metadata": { "ExecuteTime": { @@ -3970,10 +3977,10 @@ { "data": { "text/plain": [ - "CPCArbOptimizer.MargpOptimizerResult(result=-1217.2441643160846, time=0.018993377685546875, method='margp-pair', targettkn='USDC-eB48', p_optimal_t=(1844.3645206457377,), dtokens_t=(-1.9450479005200805e-08,), tokens_t=('WETH-6Cc2',), errormsg=None)" + "CPCArbOptimizer.MargpOptimizerResult(result=-1217.2442002636553, time=0.02953624725341797, method='margp-pair', targettkn='USDC-eB48', p_optimal_t=(1844.364520645447,), dtokens_t=(5.21231946493117e-11,), tokens_t=('WETH-6Cc2',), errormsg=None)" ] }, - "execution_count": 64, + "execution_count": 130, "metadata": {}, "output_type": "execute_result" } @@ -3993,7 +4000,7 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 131, "id": "93949531-5c8e-488b-ab7c-308c6ce14b67", "metadata": { "ExecuteTime": { @@ -4004,38 +4011,12 @@ "outputs": [], "source": [ "assert type(r) == PairOptimizer.MargpOptimizerResult\n", - "assert round(r.result, 5) == -1217.24416, f\"{round(r.result, 5)}\"\n", + "assert round(r.result, 5) == -1217.2442, f\"{round(r.result, 5)}\"\n", "assert r.time < 0.1\n", "assert r.method == \"margp-pair\"\n", "assert r.errormsg is None" ] }, - { - "cell_type": "code", - "execution_count": 66, - "id": "cae22713-8902-4677-99a3-9f86b4c8d335", - "metadata": { - "ExecuteTime": { - "end_time": "2023-07-31T12:44:08.133019Z", - "start_time": "2023-07-31T12:44:08.108653Z" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "-1217.24416" - ] - }, - "execution_count": 66, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "round(r.result,5)" - ] - }, { "cell_type": "markdown", "id": "becb0027-3146-4e7f-bde7-d3226b0fbacf", @@ -4046,7 +4027,7 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 132, "id": "487ccaa8-2199-4537-b751-cf179bf39043", "metadata": { "ExecuteTime": { @@ -4062,7 +4043,7 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": 133, "id": "34b2da13-71b9-490f-a060-30c5adaeb6d7", "metadata": { "ExecuteTime": { @@ -4074,11 +4055,11 @@ { "data": { "text/plain": [ - "(CPCArbOptimizer.TradeInstruction(cid='6c988ffdc9e74acd97ccfb16dd65c110', tknin='USDC-eB48', amtin=48153.808650277555, tknout='WETH-6Cc2', amtout=-26.18299693122026, error=None),\n", - " CPCArbOptimizer.TradeInstruction(cid='7ed16708962e459abe5431a176b13aa0', tknin='USDC-eB48', amtin=219435.4523242116, tknout='WETH-6Cc2', amtout=-119.06126888573635, error=None))" + "(CPCArbOptimizer.TradeInstruction(cid='6c988ffdc9e74acd97ccfb16dd65c110', tknin='USDC-eB48', amtin=48153.8086489439, tknout='WETH-6Cc2', amtout=-26.182996930494483, error=None),\n", + " CPCArbOptimizer.TradeInstruction(cid='7ed16708962e459abe5431a176b13aa0', tknin='USDC-eB48', amtin=219435.4523000121, tknout='WETH-6Cc2', amtout=-119.06126887261053, error=None))" ] }, - "execution_count": 68, + "execution_count": 133, "metadata": {}, "output_type": "execute_result" } @@ -4105,7 +4086,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 134, "id": "63839fa7-e313-46d4-933e-b2b2b6f7069e", "metadata": { "ExecuteTime": { @@ -4119,19 +4100,19 @@ "text/plain": [ "({'cid': '6c988ffdc9e74acd97ccfb16dd65c110',\n", " 'tknin': 'USDC-eB48',\n", - " 'amtin': 48153.808650277555,\n", + " 'amtin': 48153.8086489439,\n", " 'tknout': 'WETH-6Cc2',\n", - " 'amtout': -26.18299693122026,\n", + " 'amtout': -26.182996930494483,\n", " 'error': None},\n", " {'cid': '7ed16708962e459abe5431a176b13aa0',\n", " 'tknin': 'USDC-eB48',\n", - " 'amtin': 219435.4523242116,\n", + " 'amtin': 219435.4523000121,\n", " 'tknout': 'WETH-6Cc2',\n", - " 'amtout': -119.06126888573635,\n", + " 'amtout': -119.06126887261053,\n", " 'error': None})" ] }, - "execution_count": 69, + "execution_count": 134, "metadata": {}, "output_type": "execute_result" } @@ -4162,7 +4143,7 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 135, "id": "24fd38a2-db05-4cc7-8adb-e26713a1046c", "metadata": { "ExecuteTime": { @@ -4216,7 +4197,7 @@ " WETH/USDC\n", " USDC-eB48\n", " WETH-6Cc2\n", - " 48153.808650\n", + " 48153.808649\n", " -26.182997\n", " \n", " \n", @@ -4225,7 +4206,7 @@ " WETH/USDC\n", " USDC-eB48\n", " WETH-6Cc2\n", - " 219435.452324\n", + " 219435.452300\n", " -119.061269\n", " \n", " \n", @@ -4240,11 +4221,11 @@ "\n", " tknout USDC-eB48 WETH-6Cc2 \n", "cid \n", - "6c988ffdc9e74acd97ccfb16dd65c110 WETH-6Cc2 48153.808650 -26.182997 \n", - "7ed16708962e459abe5431a176b13aa0 WETH-6Cc2 219435.452324 -119.061269 " + "6c988ffdc9e74acd97ccfb16dd65c110 WETH-6Cc2 48153.808649 -26.182997 \n", + "7ed16708962e459abe5431a176b13aa0 WETH-6Cc2 219435.452300 -119.061269 " ] }, - "execution_count": 70, + "execution_count": 135, "metadata": {}, "output_type": "execute_result" } @@ -4275,7 +4256,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 136, "id": "22a3e35a-1402-48e5-a95a-39977aa67153", "metadata": {}, "outputs": [ @@ -4307,32 +4288,32 @@ " \n", " \n", " 6c988ffdc9e74acd97ccfb16dd65c110\n", - " 48153.808650\n", + " 48153.808649\n", " -2.618300e+01\n", " \n", " \n", " 7ed16708962e459abe5431a176b13aa0\n", - " 219435.452324\n", + " 219435.452300\n", " -1.190613e+02\n", " \n", " \n", " 593\n", - " 35283.335545\n", + " 35283.335544\n", " -1.919352e+01\n", " \n", " \n", " 255\n", - " 35207.230352\n", + " 35207.230349\n", " -1.910769e+01\n", " \n", " \n", " 803\n", - " 24654.883464\n", + " 24654.883463\n", " -1.338809e+01\n", " \n", " \n", " 50ac5ace09c1483987af46c60c551073\n", - " 34398.319087\n", + " 34398.319085\n", " -1.867180e+01\n", " \n", " \n", @@ -4352,7 +4333,7 @@ " \n", " \n", " 00125d264f9d49369a467e7708cee9b5\n", - " 14371.217740\n", + " 14371.217737\n", " -7.794840e+00\n", " \n", " \n", @@ -4372,7 +4353,7 @@ " \n", " \n", " AMMIn\n", - " 411504.247163\n", + " 411504.247127\n", " 2.234002e+02\n", " \n", " \n", @@ -4382,8 +4363,8 @@ " \n", " \n", " TOTAL NET\n", - " -1217.244164\n", - " -1.945048e-08\n", + " -1217.244200\n", + " 5.212319e-11\n", " \n", " \n", "\n", @@ -4391,25 +4372,25 @@ ], "text/plain": [ " USDC-eB48 WETH-6Cc2\n", - "6c988ffdc9e74acd97ccfb16dd65c110 48153.808650 -2.618300e+01\n", - "7ed16708962e459abe5431a176b13aa0 219435.452324 -1.190613e+02\n", - "593 35283.335545 -1.919352e+01\n", - "255 35207.230352 -1.910769e+01\n", - "803 24654.883464 -1.338809e+01\n", - "50ac5ace09c1483987af46c60c551073 34398.319087 -1.867180e+01\n", + "6c988ffdc9e74acd97ccfb16dd65c110 48153.808649 -2.618300e+01\n", + "7ed16708962e459abe5431a176b13aa0 219435.452300 -1.190613e+02\n", + "593 35283.335544 -1.919352e+01\n", + "255 35207.230349 -1.910769e+01\n", + "803 24654.883463 -1.338809e+01\n", + "50ac5ace09c1483987af46c60c551073 34398.319085 -1.867180e+01\n", "346 -404818.683174 2.191376e+02\n", "1701411834604692317316873037158841057353-0 -7851.133636 4.234700e+00\n", "1701411834604692317316873037158841057296-0 -1.994537 1.033440e-03\n", - "00125d264f9d49369a467e7708cee9b5 14371.217740 -7.794840e+00\n", + "00125d264f9d49369a467e7708cee9b5 14371.217737 -7.794840e+00\n", "1701411834604692317316873037158841057292-0 -6.141325 3.316581e-03\n", "1701411834604692317316873037158841057337-0 -43.538655 2.357034e-02\n", "PRICE 1.000000 1.844365e+03\n", - "AMMIn 411504.247163 2.234002e+02\n", + "AMMIn 411504.247127 2.234002e+02\n", "AMMOut -412721.491327 -2.234002e+02\n", - "TOTAL NET -1217.244164 -1.945048e-08" + "TOTAL NET -1217.244200 5.212319e-11" ] }, - "execution_count": 71, + "execution_count": 136, "metadata": {}, "output_type": "execute_result" } @@ -4440,7 +4421,7 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 137, "id": "8b6c7014-d89b-4479-a6a1-efd78b4a6c0f", "metadata": {}, "outputs": [ @@ -4511,7 +4492,7 @@ " 7ed16708962e459abe5431a176b13aa0\n", " 0.0030\n", " WETH-6Cc2/USDC-eB48\n", - " 219435.452324\n", + " 219435.452300\n", " USDC-eB48\n", " 1841.729378\n", " 1843.046478\n", @@ -4524,7 +4505,7 @@ " 593\n", " 0.0100\n", " WETH-6Cc2/USDC-eB48\n", - " 35283.335545\n", + " 35283.335544\n", " USDC-eB48\n", " 1832.243200\n", " 1838.293870\n", @@ -4537,7 +4518,7 @@ " 00125d264f9d49369a467e7708cee9b5\n", " 0.0100\n", " WETH-6Cc2/USDC-eB48\n", - " 14371.217740\n", + " 14371.217737\n", " USDC-eB48\n", " 1843.002859\n", " 1843.683564\n", @@ -4551,7 +4532,7 @@ " 50ac5ace09c1483987af46c60c551073\n", " 0.0030\n", " WETH-6Cc2/USDC-eB48\n", - " 34398.319087\n", + " 34398.319085\n", " USDC-eB48\n", " 1840.159506\n", " 1842.260814\n", @@ -4564,7 +4545,7 @@ " 255\n", " 0.0030\n", " WETH-6Cc2/USDC-eB48\n", - " 35207.230352\n", + " 35207.230349\n", " USDC-eB48\n", " 1840.773969\n", " 1842.568370\n", @@ -4578,7 +4559,7 @@ " 6c988ffdc9e74acd97ccfb16dd65c110\n", " 0.0030\n", " WETH-6Cc2/USDC-eB48\n", - " 48153.808650\n", + " 48153.808649\n", " USDC-eB48\n", " 1833.900701\n", " 1839.125169\n", @@ -4591,7 +4572,7 @@ " 803\n", " 0.0030\n", " WETH-6Cc2/USDC-eB48\n", - " 24654.883464\n", + " 24654.883463\n", " USDC-eB48\n", " 1838.745520\n", " 1841.552877\n", @@ -4691,13 +4672,13 @@ " amt_tknq \\\n", "exch cid \n", "uniswap_v3 346 -404818.683174 \n", - " 7ed16708962e459abe5431a176b13aa0 219435.452324 \n", - " 593 35283.335545 \n", - " 00125d264f9d49369a467e7708cee9b5 14371.217740 \n", - "uniswap_v2 50ac5ace09c1483987af46c60c551073 34398.319087 \n", - " 255 35207.230352 \n", - "sushiswap_v2 6c988ffdc9e74acd97ccfb16dd65c110 48153.808650 \n", - " 803 24654.883464 \n", + " 7ed16708962e459abe5431a176b13aa0 219435.452300 \n", + " 593 35283.335544 \n", + " 00125d264f9d49369a467e7708cee9b5 14371.217737 \n", + "uniswap_v2 50ac5ace09c1483987af46c60c551073 34398.319085 \n", + " 255 35207.230349 \n", + "sushiswap_v2 6c988ffdc9e74acd97ccfb16dd65c110 48153.808649 \n", + " 803 24654.883463 \n", "carbon_v1 1701411834604692317316873037158841057353-0 -7851.133636 \n", " 1701411834604692317316873037158841057296-0 -1.994537 \n", " 1701411834604692317316873037158841057337-0 -43.538655 \n", @@ -4794,7 +4775,7 @@ " 1701411834604692317316873037158841057292-0 0.024438 " ] }, - "execution_count": 72, + "execution_count": 137, "metadata": {}, "output_type": "execute_result" } @@ -4830,7 +4811,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 138, "id": "fd84fa4f-36b1-410a-ba75-192808ed6c3f", "metadata": { "ExecuteTime": { @@ -4858,7 +4839,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 139, "id": "84750fca-1d91-4f77-bc1a-a361a1c8ae02", "metadata": { "ExecuteTime": { @@ -5057,7 +5038,7 @@ "[165 rows x 6 columns]" ] }, - "execution_count": 74, + "execution_count": 139, "metadata": {}, "output_type": "execute_result" } @@ -5078,7 +5059,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 140, "id": "67122692-198a-4706-9526-cba8b35c2fb4", "metadata": { "ExecuteTime": { @@ -5102,7 +5083,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 141, "id": "fd022c7e-1c6a-4947-a156-a2ada671c8ef", "metadata": { "ExecuteTime": { @@ -5434,7 +5415,7 @@ " 057315-1 sell-WETH @ 2300.00 USDC per WETH " ] }, - "execution_count": 76, + "execution_count": 141, "metadata": {}, "output_type": "execute_result" } @@ -5447,7 +5428,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 142, "id": "ec801111-63d8-4c04-87ee-8d7c43ade0eb", "metadata": { "ExecuteTime": { @@ -5471,7 +5452,7 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 143, "id": "364d7536-a0f1-49d1-9189-5fb994febacf", "metadata": { "ExecuteTime": { @@ -5617,7 +5598,7 @@ "TOTAL NET -0.000100 -0.659978" ] }, - "execution_count": 78, + "execution_count": 143, "metadata": {}, "output_type": "execute_result" } @@ -5631,7 +5612,7 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 144, "id": "e6ec3cb6-214d-4924-ab74-3ba204f20f42", "metadata": { "ExecuteTime": { @@ -5907,7 +5888,7 @@ " 41057292-0 0.024405 0.000013 " ] }, - "execution_count": 79, + "execution_count": 144, "metadata": {}, "output_type": "execute_result" } @@ -5928,7 +5909,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 145, "id": "5aba1b68-20ec-41ee-b373-12d37d586013", "metadata": { "ExecuteTime": { @@ -6074,7 +6055,7 @@ "TOTAL NET -1217.244138 -3.372589e-08" ] }, - "execution_count": 80, + "execution_count": 145, "metadata": {}, "output_type": "execute_result" } @@ -6088,7 +6069,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 146, "id": "bc936f2b", "metadata": { "ExecuteTime": { @@ -6364,7 +6345,7 @@ " 41057292-0 0.024438 0.024438 " ] }, - "execution_count": 81, + "execution_count": 146, "metadata": {}, "output_type": "execute_result" } diff --git a/resources/NBTest/NBTest_900_OptimizerDetailedSlow.py b/resources/NBTest/NBTest_900_OptimizerDetailedSlow.py index dad4c18d0..b4e64b809 100644 --- a/resources/NBTest/NBTest_900_OptimizerDetailedSlow.py +++ b/resources/NBTest/NBTest_900_OptimizerDetailedSlow.py @@ -576,7 +576,7 @@ # #### result assert type(r) == PairOptimizer.MargpOptimizerResult -assert round(r.result, 5) == -1217.24416, f"{round(r.result, 5)}" +assert round(r.result, 5) == -1217.2442, f"{round(r.result, 5)}" assert r.time < 0.1 assert r.method == "margp-pair" assert r.errormsg is None