What is front-running in the NFT markets?
Front-running is a stock market phrase that refers to using insider information about impending deals to enter the market ahead of the competition. As a result, it’s a type of insider trading.
Front-running is not limited to the stock market and the decentralized finance (DeFi) space — it can happen in the nonfungible token (NFT) marketplaces, too. It occurs because an insider at an NFT platform knows which NFTs are going to be featured heavily on the trading site.
Furthermore, with that knowledge, they can buy an NFT before it gets featured, ultimately raising its price. The price rises because the NFTs are publicized to sell and the insider makes a tidy profit.
Therefore, front-running of this kind is called insider trading, as the assets are traded based on non-public information. For instance, In September 2021, Nate Chastain, the head of product at the NFT marketplace OpenSea, was discovered to have purchased NFTs just before they were highlighted on the OpenSea site. He then sold them for a profit.
He took advantage of insider information, such as which NFTs OpenSea would push, to obtain an unfair advantage. However, an enterprising individual discovered this illegal activity by matching the NFT transaction timestamps to the top page promotions of the NFTs in question on OpenSea.
What is a front-running bot?
A front-running bot scans pending transactions and pays a more significant gas fee so that miners process its transaction first to front-run a major trade that will affect market pricing.
Bots are pre-programmed programs that allow you to automate your trading. Rather than keeping track of every move in the market and waiting for a good time to buy and sell, the bot will automatically synthesize and assess market data and make asset transactions on behalf of customers. But, how do crypto front-running bots work?
Ethereum’s or the blockchain’s design permits all submitted transactions to halt in a mempool, where transactions are waiting to be processed. The mempool can be scanned by miners or bots for appropriate transactions to be utilized for front-running in cryptocurrency trading.
Front-runner bots typically work on a millisecond timescale. For example, they may read a transaction from the mempool, compute the optimal transaction size, configure the transactions and then execute them in a fraction of a second. It’s impossible to compete when manually operating.
By putting a buy order on the same block and simultaneously setting a higher gas price, the bot front-runs particular slippage, trade volumes and gas price transactions. When additional liquidity is added to an AMM (automated market maker) pool on the exchange, the front-run bot recognizes it and manipulates the order of transactions within a block to profit from another trader.
Is front-running illegal in crypto?
Front running is considered illegal in the traditional stock market because outsiders are not provided with insider information. However, in the crypto market, all information is stored in a publicly auditable digital ledger. Therefore, front-running NFTs is not considered to be illegal.
The internet’s power to disseminate information increases front-running in the cryptocurrency market. While front running is banned in traditional trading because the trader is utilizing non-public data, the trader on a decentralized exchange (DEX) is using data publicly available on the blockchain and is not technically shorting the system.
If you know the list of buy or sell orders ahead of time and can insert your order before other trades are inserted, front-running as a DEX trading strategy is beneficial. The trader will be able to see incoming orders locked into smart contracts on the decentralized exchange if it is built on top of a public blockchain (e.g., Ethereum). The trader can then establish a higher cost for placing the order than the incoming orders if it is commercially feasible. The trader will be able to claim more lucrative orders as a result.
How is wash trading crypto different from front-running tactics?
Wash trading is when an investor sells and buys the same asset to inflate the value of security artificially. On the other hand, a front-running attack on a blockchain occurs when a malicious user discovers a swap transaction after it has been broadcasted but before it has been finalized and reorders transactions to their benefit.
The NFT market is particularly susceptible to a practice known as wash trading. Several NFT trading platforms allow users to trade without identifying themselves by connecting their wallets to the site. This means that a single user can establish many wallets and link them to a platform.
After that, a person can control both sides of an NFT trade, selling it from one wallet and buying it from another. The trade volume increases as numerous similar transactions are completed. As a result, the underlying asset appears to be in high demand.
Similarly, front-running tactics like sandwich attacks focus on exploiting DeFi protocols and services. Sandwiching occurs when two orders are placed, one before and the other after the trade. In this case, the attacker will front-run and back-run simultaneously, sandwiching the original pending transaction in the middle.
A victim trades a cryptocurrency asset X, for example, Cardano (ADA), for another crypto-asset Y, for example, Ether (ETH), which is used to make a significant purchase.
Before the hefty trade is approved, a bot detects the transaction and front-runs the victim by purchasing asset Y, i.e., ETH.
This purchase action increases the slippage (based on the volume to be traded and the available liquidity, projected price increase or fall) and boosts the price of asset-Y for the victim trader. Because of the high purchase of asset Y, its price rises, and the victim purchases asset Y at a higher price, which the attacker then sells at a higher price.
Another way of front-running includes a displacement attack in which the miner’s transaction replaces the original transaction; the replaced transaction can still be completed, but the result will not be as intended.
How to detect NFT front-running?
Front running can be identified by monitoring users’ trade data, such as their wallet addresses, purchases followed by sales of NFTs, and a series of fund transfers.
The acquisition or selling of a financial instrument by the front runner, the legitimate transaction, and the front runner’s potential unwinding of the financial instrument to bring the cycle to a close are the three significant data points to consider while detecting front-running in NFTs.
Additionally, analysts should search for buy/sell orders close to an NFT artist’s buy/sell order in the same instrument that impacted the NFT’s price to notice any potential front-running tactics.
Furthermore, the compliance team should be able to use the trade reconstruction capabilities (pulling together different streams of data) to connect unstructured data, such as voice and electronic communications, to the trades to offer context, such as genuine dialogues with buyers (if selling NFTs), to rule out the wrongdoing.
How to prevent front-running in crypto?
Users can limit front-running by splitting the transaction into many smaller transactions and adjusting the low slippage. Similarly, developers can use anti-front-running measures like making transactions private and using a hidden mempool.
Users can break large transactions into smaller ones instead of executing them all at once, which reduces the appeal of transactions with front-running bots due to the value that can be mined. As a result, bots will pass the transaction instead of front-running it.
When the bot places trades, it will also alter the price; therefore, keeping the adjustment slippage minimal will prevent customers from losing money. On the other hand, adjusting the low slippage can make the transaction more challenging to execute.
SparkPool’s TaiChi network is a private transaction service that helps developers limit front-running in the crypto space. The miner-extractable value (MEV) bot is unable to find transactions on mempool because user transactions are only visible to Sparkpool and not to other Ethereum nodes. MEV is a metric that tells how much money blockchain miners can gain by arbitrarily including, excluding or reordering transactions.
KeeperDAO uses the Hiding Book mempool, which is a secret Mempool. Therefore, the Keeper bot will profit from MEV through arbitrage trading or asset liquidation by passing through transactions and loan requests. MEV revenues are deposited in the ROOK treasury, and users receive a portion of the profits in ROOK tokens. To avoid front-run slippage, these transactions are offered free of charge.