Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Good script, but hard to make it work #46

Open
yoongyy opened this issue Sep 10, 2021 · 7 comments
Open

Good script, but hard to make it work #46

yoongyy opened this issue Sep 10, 2021 · 7 comments

Comments

@yoongyy
Copy link

yoongyy commented Sep 10, 2021

Hi,
I have tried many front-running and arbitrage scripts from Github. I also modified it (use to MySQL to store the spotted potential pairs so that next round I can check in DB if match it can start the arbitrage directly instead of check all again & again).
I also deployed a full node on AWS i3.xlarge instance, I run the script in that VPS. I managed to run the attack just less than 50 mini seconds after the bot spotted an opportunity and fire a transaction to a smart contract written by me. The smart contract will execute the Tx if it check it is profit and revert the transaction if it is not.

Here is the summary I can tell:

  1. When the bot spot an opportunity, let say you can buy BNB cheaper in ApeSwap and sell higher price on Pancakeswap. Current block is 19000, so when you send a transaction now, it will be ALWAYS at least in block 19002 (2 blocks behind because BSC have Min of 2 blocks or 6 seconds confirmation). So the opportunity you spotted on block 19000, you are impossible to send a transaction there (because it already passed at least 6 seconds when your Tx is confirm)

  2. Even you listen to the pending transactions events using Web Socket with web3 (which I done), and repeat the same process, my Tx is ALWAYS at least 10 position behind a spotted Tx. And there is always one Tx that just sit ONE position behind the spotted Tx. Which it is nearly impossible to done by people like us, the most possibility is those running as validator which are able to place and re-arrange the Tx orders when their validate the transactions. You can go and search MEV issues on Ethereum, BSC or Polygon. Because i believe even I upgraded the AWS instance, I still can't win whose guys because all the transactions at the end are being validated on their full node. And surely they already modified their GETH so that they can re-order the TX and place their Tx just any position they like in the block their validating... So no matter how good is your bot, you will never win in the race. The only way you can win is become one of the validator and changing the Tx order on it lolx...

You must think out of the box, or other way to run it. This is what I have experienced and doing research to find out. If anyone interested can contact me at TG @PancakeSwapUniSwapBot and we can discuss more.

@ccoop1
Copy link

ccoop1 commented Sep 21, 2021

You raise a great point. I messaged you on TG

@changzhi1990
Copy link
Contributor

You raise a great point. I messaged you on TG

Maybe we can create a TG group to discuss it together.

@changzhi1990
Copy link
Contributor

You raise a great point. I messaged you on TG

Maybe we can create a TG group to discuss it together.

I have created group https://t.me/amm_arbitrage

@yg0x01
Copy link

yg0x01 commented Sep 23, 2021

@changzhi1990 It's a channel not group. Cannot discuss.

@changzhi1990
Copy link
Contributor

@binggao
Copy link

binggao commented Apr 25, 2022

If I make a complex arbitrage bot, can frontrun bots recognize it and still front run?

@ccoop1
Copy link

ccoop1 commented Apr 25, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants