timewave-computer / auction-arbitrage-bot

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

No trades being executed #25

Open options2015 opened 2 months ago

options2015 commented 2 months ago

I have been testing the bot for over 30hrs, but no single transaction has been executed.

I only see these logs

2024-08-27 05:16:02 INFO     r160386- Evaluating route for profitability: astroport (neutron-1): untrn - ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9 -> astroport (neutron-1): ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9 - factory/neutron13lkh47msw28yynspc5rnmty3yktk43wc3dsv0l/ATOM1KLFG -> astroport (neutron-1): factory/neutron13lkh47msw28yynspc5rnmty3yktk43wc3dsv0l/ATOM1KLFG - untrn
2024-08-27 05:16:03 INFO     r160265- Route has theoretical profit of 0
2024-08-27 05:16:03 INFO     r160265- Route will cost 38000 to execute
2024-08-27 05:16:03 INFO     r160265- Route has starting amount of -29300
2024-08-27 05:16:03 INFO     r160265- Route has possible execution plan: [-29300]
2024-08-27 05:16:03 INFO     r160265- Route is not profitable with profit of 0
2024-08-27 05:16:03 INFO     r160266- Route has theoretical profit of 0
2024-08-27 05:16:03 INFO     r160266- Route will cost 38000 to execute
2024-08-27 05:16:03 INFO     r160266- Route has starting amount of -29300
2024-08-27 05:16:03 INFO     r160266- Route has possible execution plan: [-29300]
2024-08-27 05:16:03 INFO     r160266- Route is not profitable with profit of 0
2024-08-27 05:16:03 INFO     r159913- Route has theoretical profit of 173
2024-08-27 05:16:03 INFO     r159913- Route will cost 27000 to execute
2024-08-27 05:16:03 INFO     r159913- Route has starting amount of -18300
dowlandaiello commented 2 months ago

Can you post the full python command you used to invoke the main.py script? Thanks.

options2015 commented 2 months ago

Here is the command

WALLET_MNEMONIC="REDACTED" python main.py -l logs

I followed the nix command to install nix develop --extra-experimental-features nix-command --extra-experimental-features flakes Running on ubuntu 22.04 vps

dowlandaiello commented 2 months ago

Awesome! I appreciate it. I'll take a look. Could you also verify that your wallet's NTRN balance is nonzero on Neutron?

dowlandaiello commented 2 months ago

If you would also be comfortable giving your wallet's Neutron address, that could also help with debugging this (though not necessary). Thanks!

options2015 commented 2 months ago

Yes, the wallet balance is nonzero, more on USDC than NTRN - neutron1mt2lyld9zx57u9ehflejujtmjgjl87wg2lfg87. Could you also advise on recommended balance to start with, per network and/or symbol?

Thanks for looking into this!

dowlandaiello commented 2 months ago

Of course! Happy to look into it. Could you run this command and post the output when you get a chance? Thanks!

grep "starting amount of \d" logs

Also:

grep "execution plan" logs

And, finally:

grep "is profitable with realizable profit" logs

I'd like to determine if any of the discovered routes have a value here greater than zero or if any execution plans have nonzero members. Thanks again!

dowlandaiello commented 2 months ago

Taking a look at this on my machine, too, in the meantime, with the same main.py invocation. Will let you know if I find anything.

options2015 commented 2 months ago

No output for command grep "starting amount of \d" logs

I see a lot of these lines, for the command grep "execution plan" logs

2024-08-27 20:12:12 INFO     r172574- Route has possible execution plan: [-40300]
2024-08-27 20:12:12 INFO     r172580- Route has possible execution plan: [-29300]
2024-08-27 20:12:12 INFO     r172595- Route has possible execution plan: [-29300]
2024-08-27 20:12:12 INFO     r172281- Route has possible execution plan: [-9300]
2024-08-27 20:12:12 INFO     r172284- Route has possible execution plan: [-9300]
2024-08-27 20:12:12 INFO     r172288- Route has possible execution plan: [-18300]
2024-08-27 20:12:12 INFO     r172310- Route has possible execution plan: [-9300]
2024-08-27 20:12:12 INFO     r172308- Route has possible execution plan: [-9300]
2024-08-27 20:12:12 INFO     r172304- Route has possible execution plan: [-18300]
2024-08-27 20:12:12 INFO     r172300- Route has possible execution plan: [-9300]
2024-08-27 20:12:12 INFO     r172313- Route has possible execution plan: [-18300]
2024-08-27 20:12:12 INFO     r172286- Route has possible execution plan: [-9300]
2024-08-27 20:12:12 INFO     r172303- Route has possible execution plan: [-18300

No output for command grep "is profitable with realizable profit" logs

Additionally, I see a number of logs related to insufficient funds

168573- Arb failed - failed to rebalance funds: cosmpy.aerial.exceptions.BroadcastError: error escrowing funds: spendable balance 8700untrn is smaller than 9540untrn: insufficient funds
169426- Arb failed - failed to rebalance funds: cosmpy.aerial.exceptions.BroadcastError: error escrowing funds: spendable balance 8700untrn is smaller than 9540untrn: insufficient funds
170249- Arb failed - failed to rebalance funds: cosmpy.aerial.exceptions.BroadcastError: error escrowing funds: spendable balance 8700untrn is smaller than 9540untrn: insufficient funds