# AI Runner

If you trade cryptocurrencies on decentralized platforms (Uniswap, Sushiswap, PancakeSwap, 1inch, Raydium, etc), it is important that you know how AI Runner bot work.\
\
AI Runner is a market manipulation in which a bot can conclude a transaction before a pending (or incoming) order impacting the price of the order itself. AI Runner BOT can scan pending orders and can place their trades first, thus profiting from the resulting price movements when previous orders are finally filled.\
\
In other words, AI Runner bots intercept orders (before they are confirmed) and adjust accordingly based on what is about to happen. If these orders are of a large amount, they will obviously significantly change the price of the asset.\
\
How do they operate? They buy large quantities of that token (if there are large buy orders) or sell it (if not). In this way, they either profit from the price increase or avoid incurring losses due to the decrease in the same (in the case of a sale). Front-running is obviously connected to slippage. When increasing the same, the message appears in a dex.\
\
\
**What are we exposed to?**\
&#x20;A AI Runner bot might see your pending transaction in the pool with a high slippage tolerance and then get ahead of you by setting a higher gas price (forcing you to accept the worst price that satisfies slippage). This way they can effectively keep a large part of your trade with the original price to themselves. However, as mentioned, for the wildly illiquid shitcoin pump & dumps, this is not a big problem, because the price of the tokens could also drop or rise by 40/50% in a few minutes.\
\
**Simple working principle**\
\
Research by Dan Robinson and Georgios Konstantopoulos drew attention to a variety of attacks by bots roaming the Ethereum blockchain in search of prey. As noted above, a trade on a dex could lead to front-running. If someone is going to buy a large amount of Ethereum on Uniswap, to the point of driving up the price, one way to make a quick buck would be to buy ETH, before the large buy goes through (and sell right after). .&#x20;

<figure><img src="https://1585687845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWevMvIbjpCapSkVIL0N9%2Fuploads%2FDFVfXAZ2DOEnIe5a7L11%2FIMAGE%202022-12-06%2000%3A12%3A50.jpg?alt=media&#x26;token=840cf55b-7675-448f-9ce5-6b88fa3fff00" alt=""><figcaption></figcaption></figure>

AI Runner on Ethereum happens easily because the bots are able to offer “a slightly higher gas price” on a transaction, incentivizing miners to place their order earlier during validation on the block. The most profitable trades are executed first.\
\\

<figure><img src="https://1585687845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWevMvIbjpCapSkVIL0N9%2Fuploads%2FEcmQcrbF6XKkMQB19NGM%2FIMAGE%202022-12-06%2000%3A21%3A43.jpg?alt=media&#x26;token=7b020feb-525f-45c2-a6f7-266de9c46b76" alt=""><figcaption></figcaption></figure>
