yuichiroaoki / poly-flashloan-bot

Flashloan Bot on Polygon
https://yuichiroaoki.medium.com/flashloan-bot-on-polygon-part-2-3eae0ac33986?sk=80821da4ca1d0462c7c9ae617df56bdd
MIT License
302 stars 192 forks source link

Edited but I haven't found a profitable arbitrage! #69

Open M3sca opened 2 years ago

M3sca commented 2 years ago

Edited but I haven't found a profitable arbitrage!

I really appreciate what you have done but I'm not agree with what you have write.

I've edited your bot, I have removed 1inch API and add call directly with dex smartcontract quote. I have done 1 to 1 swap.

I have run bot for several time but I never have found a profitable arbitrage! I share an example:

1 USD Coin -> 0.99924 Tether USD [UNISWAP_V3] 1 USD Coin -> 0.99549 Tether USD [SUSHISWAP] 1 USD Coin -> 0.99407 Tether USD [QUICKSWAP] 1 USD Coin -> 0.99723 Tether USD [APESWAP] 1 USD Coin -> 0.99868 Tether USD [JETSWAP] 1 USD Coin -> 0.99818 Tether USD [POLYCAT] 1 USD Coin -> 0.99812 Tether USD [WAULTSWAP]

0.99924 Tether USD -> 0.99899 USD Coin [UNISWAP_V3] 0.99924 Tether USD -> 0.99774 USD Coin [SUSHISWAP] 0.99924 Tether USD -> 0.99918 USD Coin [QUICKSWAP] 0.99924 Tether USD -> 0.998 USD Coin [APESWAP] 0.99924 Tether USD -> 0.99855 USD Coin [JETSWAP] 0.99924 Tether USD -> 0.99623 USD Coin [POLYCAT] 0.99924 Tether USD -> 0.9971 USD Coin [WAULTSWAP]

iouae commented 2 years ago

What a shame.

Sshimaninja commented 2 years ago

I'm trying convert this now to do direct quotes but I'm having a lot of trouble just getting prices from even one protocol. Any tips? I don't care if it's profitable anymore - I just want to achieve the goal of getting prices from DEXs for multiple tokens.

M3sca commented 2 years ago

I'm trying convert this now to do direct quotes but I'm having a lot of trouble just getting prices from even one protocol. Any tips? I don't care if it's profitable anymore - I just want to achieve the goal of getting prices from DEXs for multiple tokens.

If you want to do this you can call the function 'getPriceOnUniV2' with this arguments:

Sshimaninja commented 2 years ago

Yeah, that's the easy part. I'm trying to make it more complicated by adding UniV3 and passing in addresses from the objects in addresses.ts through config.ts.