Include sandwiches that close in arbs

This commit is contained in:
Luke Van Seters 2022-01-08 13:44:58 -05:00
parent 4a4992a0f9
commit 4930065045

View File

@ -46,7 +46,10 @@ def _get_sandwich_starting_with_swap(
elif ( elif (
other_swap.token_out_address == front_swap.token_in_address other_swap.token_out_address == front_swap.token_in_address
and other_swap.token_in_address == front_swap.token_out_address and other_swap.token_in_address == front_swap.token_out_address
and other_swap.to_address == sandwicher_address and (
other_swap.to_address == sandwicher_address
or other_swap.from_address == sandwicher_address
)
): ):
if len(sandwiched_swaps) > 0: if len(sandwiched_swaps) > 0:
return Sandwich( return Sandwich(