duoxehyon / univ2-tri-arb

Uniswap v2 triangular arbitrage in rust
MIT License
85 stars 19 forks source link

What next #2

Open RedWilly opened 1 month ago

RedWilly commented 1 month ago

cargo run -r Finished release profile [optimized] target(s) in 0.79s warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.84 note: to see what the problems were, use the option --future-incompat-report, or run cargo report future-incompatibilities --id 1 Running target\release\arb_bot.exe [16:14:28][INFO] Starting Arbitrage Bot [16:14:28][INFO] Starting... [16:21:50][INFO] Spawning complete [16:21:50][INFO] time took for query: 439.8987745s [16:21:54][INFO] Length of pairs: 0 thread 'main' panicked at src\state.rs:94:72: called Option::unwrap() on a None value note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

i got this- not familair with rust but not sure what next ??

RedWilly commented 1 month ago

i am testing it on bsc,

made changes to src/constants ( with the router, factory and have also updated the paircodehash )

also config the .env file ( with the key and the rpc and wss)

i will like to ask is there is anything i will need to also update ?? to help me run this code

RedWilly commented 1 month ago

i dont get it > cargo run -r Running target\release\arb_bot.exe [11:15:01][INFO] Starting Arbitrage Bot [11:15:01][INFO] Starting... Getting tax ##########################-------------- 1760/1760 Spawning ##########################-------------- 1760/1760

11:22:39][INFO] Spawning complete [11:22:39][INFO] time took for query: 456.3026323s Getting all pools from: 0x71f6…a03d #####################------------------- [11:22:39][INFO] time took for query: 456.3026323s [11:22:43][INFO] Length of pairs: 0 thread 'main' panicked at src\state.rs:94:72: called Option::unwrap() on a None value note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

what am i missing ???

RedWilly commented 1 month ago

after running through the code i made this chnage and it worked>

 None => {
                        progress_bar_clone.inc(1);
                         return None;                    }

to this>

 None => {
                        progress_bar_clone.inc(1);
                        (U256::zero(), U256::zero()) 
                    }
knkrth commented 3 weeks ago

@RedWilly Does it find any profitable trades? https://github.com/RedWilly/V2-Arbitrage Is not returning any profitable trade and it takes more than 20 sec to fetch all the pool reserves and process it on 3 paths but on 4+ paths it takes minutes to process all the reserves and paths.