Closed ruidazeng closed 1 week ago
Can you please fix the tests? They are not passing anymore
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. I just reverted
cycle_detector
for now, the only changes at the moment are inmain.py
andREADME.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.
@Herklos The tests are passing now, will this be approved for merge?
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.
Modified
detector.py
such that the detection algorithm works for any cycle, not just triangular. This might be more practical for arbitrage opportunities.