What Is Front Running In Cryptocurrency?
In cryptocurrency, front running is the act of creating a transaction with the knowledge of future transactions. On decentralized exchanges, this is usually done by bots. Front running typically looks like this:
A programmer creates a bot that looks for buy orders in the mempool with high slippages. The bot inserts a series of large buy transactions to increase the price upon identifying such a transaction. Once the token price has reached the target price set by the high slippage, the bot sells the cheaper coins it purchased earlier back to you at the inflated price.
While front running may seem unethical, it is not considered a scam and is currently allowed on exchanges.
A Deeper Look at Front Running
Front running essentially forces you to buy a cryptocurrency at the worst possible price. See the scenario below for a clearer picture of this trading tactic.
You place an order on PancakeSwap and set the slippage to 20%. You submit a buy order, and the transaction becomes public but not put into a block yet.
A bot then sees your trade with the high slippage and executes a large trade (or series of trades) to drive the price up to the slippage price you set. Since the bot pays more gas fees, its transaction goes into a block before yours. The bot then sells the tokens it purchased back to you at your maximum slippage price. The maximum slippage you set determines how much you can be front-run.
Front running requires transactions to be done quickly so the token price can be increased before the high-slippage transaction. It is, therefore, important to note that this is not something that can be done manually. Bots typically operate on time frames in the order of milliseconds. They read the mempool, determine the optimum transaction size, and execute transactions all within fractions of a second.
← Back to Dictionary