yuyasugano / pancake-bakery-arbitrage

A sample application invokes a flashswap in PancakeSwap and a monitoring tool in Node.js.
305 stars 194 forks source link

Multiple Pairs for Arbitrage #10

Closed officialasit closed 2 years ago

officialasit commented 2 years ago

Hi there,

I was able to setup the smart contracts as well as run the index.js script.

Most of the times the script returns Arbitrage opportunity not found!. I would like to get some insights on which type of tokens (small cap, mid cap, large cap) are best for this type of arbitrage?

Also how do we add checking of multiple pairs ? I have changed the following in index.js but getting an error

const toTokens = ['SXP', 'BUSD'];
const toToken = [
    '0x47BEAd2563dCBf3bF2c9407fEa4dC236fAbA485A', //SXP
    '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56' // BUSD
];

the error I get is

-------------------------------------------------------------
New block received. Block # 12584607
GasLimit: 85269722 and Timestamp: 1636716019
Trading SXP/WBNB ...
pairAddress SXP/WBNB is 0xD8E2F8b6Db204c405543953Ef6359912FE3A88d6
Input amount of WBNB: 10

                    Buying token at PancakeSwap DEX
                    =================
                    tokenIn: 10 WBNB
                    tokenOut: 2579.732315199861167345 SXP

                    Buying back token at ApeSwap DEX
                    =================
                    tokenOut: 2579.732315199861167345 SXP
                    tokenIn: 9.820575459476819607 WBNB

Block # 12584607: Arbitrage opportunity not found! Expected profit: -179424540523180393
Trading BUSD/WBNB ...
pairAddress BUSD/WBNB is 0x58F876857a02D6762E0101bb5C46A8c1ED44Dc16
Input amount of WBNB: 10
/Users/user/Desktop/pancake-bakery-arbitrage/node_modules/bignumber.js/bignumber.js:2832
      throw Error
            ^

Error: [BigNumber Error] Argument not an integer: NaN
htkcodes commented 2 years ago

This isn't profitable, you have to improve the code in terms of speed, this code is too slow to compete with other bots. Dont think you can make any money with this.

mindfulme commented 2 years ago

dm avowe, there is whole pairs generator and script for it all

Emerie111 commented 2 years ago

dm avowe, there is whole pairs generator and script for it all

Who is avowe?

htkcodes commented 2 years ago

dm avowe, there is whole pairs generator and script for it all

Who is avowe?

Go to my repo, youll see a repo called pairgen. you can use that. no need to dm anyone and possibly get scammed.

yuyasugano commented 2 years ago

@htkcodes The codes are written for informational and educational purpose only. This repo is not either an investment advice or a recommendation or solicitation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision. You can create your own profitable arbitrage bots by yourself. Thanks.

htkcodes commented 2 years ago

I was telling the other user that, so they could improve the bot. Wasnt directed at you.