If you ever traded in defi, you probably have seen coins getting sniped at the very second of their launch and drastically inflating the prices.
I assume these bots are written in js, ad using web3 and other blockchain API to interact with smart contracts. In theory, I can assume that the algorithm basically buys those coins that are recently launched with high gas, and since it is an algorithm it performs this faster than any other human.
However, my question is how are these sniper bots really work? How do they time the launch so well? Sometimes a launch can get delayed, in that case when they send queries to blockchain aren't they losing money?
But, what if the launch was delayed how was it going to execute trades? If it started sending 'buy' queries before the launch would it not lose money?
Any opinions on this subject?
I would really appreciate if you enlighten me about this, I've been wondering about this for some time now