Ah I see what happened. I added a global variable called `newest_block_timestamp` that is maintained by the watch_new_blocks() function.
I've updated the post at https://degencode.substack.com/p/project-snowsight-arbitrage-bot to include this variable. You'll find it in three places (a global statement at the start of watch_new_blocks(), inside watch_new_blocks() after the websocket recv, and at the end of the main setup block before asyncio.run(main())
Hi, I have another question. I have run the bot for the whole night, but it hasn't traded once. It seems that it hasn't found any arbitrage opportunity. Is it normal? It always shows something like that:
Two possibilities: either it has not found any CRA-WAVAX opportunities, or you have DRY_RUN=True (which disables trades)
I haven't been running the CRA-WAVAX bot, since I don't want to compete with my readers, so I don't know if it's quiet out there or your bot is having issues.
Hi, it's me again. I found I can't renew my subscription automatically through the code, so I have to subscribe snowsight manually. Do you know where the problem is? Is it because the program doesn't have the permission?
I used trial, and address is 0x727Dc3C412cCb942c6b5f220190ebAB3eFE0Eb93. It just got stuck in the renewal subscription. So I went to the website and paid manually.
Got it, and I think I see the issue. The 'trial' subscription method has a fixed min/max amount (standard and premium can be over-paid), so the 'trial' subscription needs different calculation logic. I'm editing the post now to include that updated code.
Hi, i run code and received this error
best_profit = -int(opt.fun)
ValueError: cannot convert float NaN to integer
NameError: name 'newest_block_timestamp' is not defined
Hi, I updated the code, but met this bug.
Ah I see what happened. I added a global variable called `newest_block_timestamp` that is maintained by the watch_new_blocks() function.
I've updated the post at https://degencode.substack.com/p/project-snowsight-arbitrage-bot to include this variable. You'll find it in three places (a global statement at the start of watch_new_blocks(), inside watch_new_blocks() after the websocket recv, and at the end of the main setup block before asyncio.run(main())
Hi, I have another question. I have run the bot for the whole night, but it hasn't traded once. It seems that it hasn't found any arbitrage opportunity. Is it normal? It always shows something like that:
[16117649] base: 25 / t0 5000 / t2 1411 / pending 344
[16117650] base: 25 / t0 1411 / t2 1411 / pending 347
[16117651] base: 25 / t0 1411 / t2 1411 / pending 347
[16117652] base: 25 / t0 1411 / t2 1411 / pending 346
Two possibilities: either it has not found any CRA-WAVAX opportunities, or you have DRY_RUN=True (which disables trades)
I haven't been running the CRA-WAVAX bot, since I don't want to compete with my readers, so I don't know if it's quiet out there or your bot is having issues.
Thanks! I found I had DRY_RUN = True; I will change it to False and check.
Hi, it's me again. I found I can't renew my subscription automatically through the code, so I have to subscribe snowsight manually. Do you know where the problem is? Is it because the program doesn't have the permission?
Which subscription tier are you trying to pay for? Which address are you using for the snowsight contract? What errors do you get?
I used trial, and address is 0x727Dc3C412cCb942c6b5f220190ebAB3eFE0Eb93. It just got stuck in the renewal subscription. So I went to the website and paid manually.
Refresh the post and check out the updated code. It should work correctly for 'trial' subscriptions now.
Got it, and I think I see the issue. The 'trial' subscription method has a fixed min/max amount (standard and premium can be over-paid), so the 'trial' subscription needs different calculation logic. I'm editing the post now to include that updated code.