Skip to content

Commit

Permalink
Log atomization of routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dowlandaiello committed Jul 25, 2024
1 parent a3c79c7 commit c2c9858
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/strategies/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,21 @@ async def exec_arb(
[len(route), fmt_route(route)],
)

to_execute = collapse_route(zip(route, quantities))
to_execute: list[list[tuple[Leg, int]]] = collapse_route(zip(route, quantities))

ctx.log_route(
route_ent,
"info",
"Queueing candidpate arbitrage opportunity with atomized execution plan: %s",
[
len(route),
[fmt_route([leg for leg, _ in sublegs]) for sublegs in to_execute],
],
)

for sublegs in to_execute:
leg, to_swap = sublegs[0]
leg_to_swap: tuple[Leg, int] = sublegs[0]
(leg, to_swap) = leg_to_swap

# Log legs on the same chain
if len(sublegs) > 1:
Expand Down

0 comments on commit c2c9858

Please sign in to comment.