I am working on a trading bot with
ethers.js and I would love if someone could elaborate on the following topic.
Many sniping bots try to buy as fast as liquidity is added to the pool. This can be done by listening to pending transactions that include for example the method that adds the liquidity to the pair, if you successfully listen to this method you could purchase the tokens in the same block.
However if the user who adds liquidity uses a custom (proxy?) contract to add liquidity (a contract that calls the
addLiquidity function for the DEX), only the call for this custom contract would be registered, and it would be impossible to know what it did, not until its block was mined and you could process the events (which should include an event that attests liquidity was added).
My question is: This looks like a very straightforward way of avoiding sniping bots. Is there any catch, besides the additional difficulty of adding liquidity this way? Or is there a way to purchase in the same block, even when the liquidity was added though an obscure call?