Hello, I have a problem, whenever I make a swap on Uniswap, someone's bot pays 0.000000001 more gwei than me and my transaction fails. How does he do it? How could I protect myself?
Nov 16, 2020, 11:47 PM
It’s called frontrunning; a known problem for a long, long time
Nov 17, 2020, 12:04 AM
Do they benefit from it somehow? Otherwise they won't be doing it for long. For normal trading that shouldn't happen as there's nothing to gain for someone else to frontrun.
Nov 17, 2020, 5:25 AM
I don't really know how this bot is working, why he thinks that my trades are good and that he needs to frontrun me, my slippage is low, my transactions always fail in this situations, he can't frontrun me. I don't know how he knows my address, I'm tempted to do some transactions at loss, just to see what he will do. I just see that this is a large network of smart contracts and that it does a lot of transactions, he's not just frontrunning me. Someone told me to transfer tokens to other address and trade from it, I don't know would this help. If bot scans mempool and pick transaction by some criteria, this won't help. I tried to decompile those smart contracts, but I don't know Solidity, I just managed to see that he hides a lot of info by changing bytes. I don't know is there a table with my address on IPFS or did he chose me by some other criteria.
Nov 17, 2020, 9:01 AM
well, you can try switching to a different address - not much to lose. if your transaction fails it probably means that his one succeeded and he possibly gained some benefit
Nov 17, 2020, 9:04 AM
1. Frontrunning is pretty lucraive if one has a complete geth node and can monitor new events from the mempool reading at <50ms
There's per-token targets (usually a new token for non-savvy folks, the front-runners eat them alive.
So, a bot admin has a very robust chain monitoring too, not just the mempool. The bot can look for new uniswap pairs, and usually take a solid 20%
There's a smart contract needed, but in reality, its more like a script.
You have a couple of choices.
Option 1, try to formulate just the right web3 calls, so you have a 'script' strategy you would need to run the script, and you might have gas issues....not to mention if you don't something like this already, it's an arduous job.
i have some real confidential new ideas I want to share with you in DM
Nov 17, 2020, 10:13 AM