timewave-computer / auction-arbitrage-bot

An extensible arbitrage bot for trading against valence auctions, Astroport and Osmosis.
Apache License 2.0
6 stars 1 forks source link

Atomic Swap Batching #18

Open dowlandaiello opened 1 month ago

dowlandaiello commented 1 month ago

Swaps that occur on the same chain should be executed in a single transaction with multiple messages. Doing so results in:

Suggested implementation

"Batching" calls for creative thinking within the existing Provider context, as Providers are treated as single per-pool units. One suggested approach is to provide a preview_swap method for each provider that produces the message but not the transaction that it would produce to execute the swap. This way, the messages can be built by the strategy function, or by exec_arb in util.py.