Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified main.py display #15

Closed
wants to merge 7 commits into from

Conversation

ruidazeng
Copy link
Contributor

Modified detector.py such that the detection algorithm works for any cycle, not just triangular. This might be more practical for arbitrage opportunities.

@Herklos Herklos self-requested a review October 7, 2024 19:46
@Herklos Herklos self-assigned this Oct 7, 2024
Copy link
Contributor Author

@ruidazeng ruidazeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change to README.md and main.py is purely cosmetic and provide more useful information to users.

@Herklos
Copy link
Member

Herklos commented Oct 7, 2024

Can you please fix the tests? They are not passing anymore
image

@ruidazeng
Copy link
Contributor Author

I see. I just reverted cycle_detector for now, the only changes at the moment are in main.py and README.md

The cycle_detector code returned a cycle of 4 for the example test given, which is the best arbitrage opportunity with the best rates overall, an insanely profitable opportunity from USDT >> ETH >> BTC >> USDC >> USDT at 477.5%, which is a cycle that cannot be found by the triangular detector, so it failed the check that restricts the best opportunity cycle to 3:

-------------------------------------------
New 477.5% binance opportunity:
1. BUY USDT to ETH at 0.00050
2. SELL ETH to BTC at 0.30000
3. SELL BTC to USDC at 35000.00000
4. SELL USDC to USDT at 1.10000
-------------------------------------------

I have reverted my code for cycle_detector (at the moment) since this will never pass the test as the test only accepts triangular (3) arbitrage opportunities.

@Herklos
Copy link
Member

Herklos commented Oct 8, 2024

I see. I just reverted cycle_detector for now, the only changes at the moment are in main.py and README.md

The cycle_detector code returned a cycle of 4 for the example test given, which is the best arbitrage opportunity with the best rates overall, an insanely profitable opportunity from USDT >> ETH >> BTC >> USDC >> USDT at 477.5%, which is a cycle that cannot be found by the triangular detector, so it failed the check that restricts the best opportunity cycle to 3:

-------------------------------------------
New 477.5% binance opportunity:
1. BUY USDT to ETH at 0.00050
2. SELL ETH to BTC at 0.30000
3. SELL BTC to USDC at 35000.00000
4. SELL USDC to USDT at 1.10000
-------------------------------------------

I have reverted my code for cycle_detector (at the moment) since this will never pass the test as the test only accepts triangular (3) arbitrage opportunities.

I see, thank for these details. It would be an interesting feature to add. The tests are really simple, you may succeed in fixing them in just a few minutes I think.

@ruidazeng ruidazeng changed the title Any cycle instead of triangular Modified main.py print Oct 8, 2024
@ruidazeng ruidazeng changed the title Modified main.py print Modified main.py display Oct 8, 2024
@ruidazeng
Copy link
Contributor Author

@Herklos The tests are passing now, will this be approved for merge?

@Herklos
Copy link
Member

Herklos commented Oct 9, 2024

I would have liked you to add the management of high order cycles & adapt the tests for it.

Concerning the current changes, I don't really see the added value of your modifications.

@ruidazeng ruidazeng closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants