diff --git a/fastlane_bot/bot.py b/fastlane_bot/bot.py index 9af35578b..2f4a7ebd1 100644 --- a/fastlane_bot/bot.py +++ b/fastlane_bot/bot.py @@ -766,8 +766,10 @@ def calculate_profit( raise str(e) else: best_profit_eth = best_profit_fl_token - - usd_eth_conversion_rate = Decimal(str(CCm.bypair(pair=f"{self.ConfigObj.WRAPPED_GAS_TOKEN_KEY}/{self.ConfigObj.STABLECOIN_KEY}")[0].p)) + try: + usd_eth_conversion_rate = Decimal(str(CCm.bypair(pair=f"{self.ConfigObj.WRAPPED_GAS_TOKEN_KEY}/{self.ConfigObj.STABLECOIN_KEY}")[0].p)) + except Exception: + usd_eth_conversion_rate = Decimal("NaN") best_profit_usd = best_profit_eth * usd_eth_conversion_rate return best_profit_fl_token, best_profit_eth, best_profit_usd