diff --git a/fastlane_bot/bot.py b/fastlane_bot/bot.py index 03bd3294b..26c6352cb 100644 --- a/fastlane_bot/bot.py +++ b/fastlane_bot/bot.py @@ -511,22 +511,22 @@ def validate_optimizer_trades(self, arb_opp, arb_mode, arb_finder): ------- tuple or None """ - ( - best_profit, - best_trade_instructions_df, - best_trade_instructions_dic, - best_src_token, - best_trade_instructions, - ) = arb_opp - ( - ordered_trade_instructions_dct, - tx_in_count, - ) = self._simple_ordering_by_src_token( - best_trade_instructions_dic, best_src_token - ) if arb_mode == "bancor_v3" or arb_mode == "b3_two_hop": - + ( + best_profit, + best_trade_instructions_df, + best_trade_instructions_dic, + best_src_token, + best_trade_instructions, + ) = arb_opp + + ( + ordered_trade_instructions_dct, + tx_in_count, + ) = self._simple_ordering_by_src_token( + best_trade_instructions_dic, best_src_token + ) cids = [] for pool in ordered_trade_instructions_dct: pool_cid = pool["cid"] diff --git a/resources/NBTest/NBTest_045_Validator.ipynb b/resources/NBTest/NBTest_045_Validator.ipynb new file mode 100644 index 000000000..4766c25e0 --- /dev/null +++ b/resources/NBTest/NBTest_045_Validator.ipynb @@ -0,0 +1,471 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "84fa264b", + "metadata": { + "ExecuteTime": { + "end_time": "2023-07-09T13:54:12.577531Z", + "start_time": "2023-07-09T13:54:12.514167Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ConstantProductCurve v3.0 (22/Aug/2023)\n", + "CarbonBot v3-b2.2 (20/June/2023)\n", + "UniswapV2 v0.0.1 (2023-07-03)\n", + "UniswapV3 v0.0.1 (2023-07-03)\n", + "SushiswapV2 v0.0.1 (2023-07-03)\n", + "CarbonV1 v0.0.1 (2023-07-03)\n", + "BancorV3 v0.0.1 (2023-07-03)\n", + "imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\Kveen\\AppData\\Local\\Temp\\ipykernel_17988\\1475092902.py:28: MatplotlibDeprecationWarning: The seaborn styles shipped by Matplotlib are deprecated since 3.6, as they no longer correspond to the styles shipped by seaborn. However, they will remain available as 'seaborn-v0_8-