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.
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 theexec_arb
and route profit functions innaive.py
to scale according to the liquidity of a pool. This will require adding methods for pool liquidity to thePoolProvider
abstract class and implementations.