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

Scale Back Trade Sizes Based on Pool Liquidity #8

Closed dowlandaiello closed 3 weeks ago

dowlandaiello commented 1 month ago

Ideally, the arb bot will maximize the number of arbitrage opportunities that are profitable by scaling the simulated swap quantity based on the liquidity of the pool. Currently, the arbitrage bot simulates the swap with the maximum amount that it can, which results in low-liquidity arbs being missed.

Suggested implementation This improvement could be implemented by altering the to_swap calculation in the exec_arb and route profit functions in naive.py to scale according to the liquidity of a pool. This will require adding methods for pool liquidity to the PoolProvider abstract class and implementations.