Cointime

Download App
iOS & Android

The Most Common Types of MEV and Protection From Toxic Strategies

Validated Project

MEV can be an effective mechanism for making profits in DeFi, but often, profits come at the expense of other users.

MEV refers to the maximal extractable value generated from reordering transactions within a block. While MEV originally stood for “miner extractable value,” after last year’s Ethereum Merge, which replaced miners with validators, the term was changed to “maximal extractable value.”

MEV opportunities

Block builders benefit from “priority” fees users are willing to pay to speed up their transactions. Meanwhile, so-called searchers can detect potentially lucrative transactions that could impact a crypto asset’s value, bringing them a profit. Then, they pay extra in order to slip in their transactions early in a block. Potentially vulnerable transactions could be detected in the mempool, the node’s holding area for submitted and unconfirmed transactions before they are added to a block. Those pending transactions, especially large ones that can potentially move market prices and create arbitrage opportunities, can become a target for malicious searchers.

On the one hand, MEV is an integral part of DeFi’s market environment and could be used for healthy profit strategies, as long as other users are not harmed. At the same time, when searchers take advantage of MEV opportunities in a toxic way, it can lead to other users’ losses, as well as increased transaction costs and other negative consequences.

Overall, MEV scenarios could be divided into those based on the source of extraction (DEX arbitrage, liquidation) and on the type of implementation (generalized front-running, front-running, back-running and sandwich attacks).

MEV sources

DEX arbitrage

The price of the same crypto asset can vary across different DEXes, and an arbitrageur, while simultaneously buying and selling on various markets, profits from the price difference. Basically, arbitrageurs are simply relying on natural price fluctuations. Meanwhile, front-running also happens in arbitrage. For instance, a searcher bot can find a pending transaction and insert its own transaction in front of it to extract the value offered by that arbitrage opportunity. A searcher can also create an artificial arbitrage opportunity by reordering transactions on a liquidity pair before a back-run (described below).

Liquidation

When a user takes out a collateralized loan, and, due to crypto volatility, the collateral’s value later falls below a specified figure, the liquidation of the loan takes place: the smart contract sells the collateral to cover the debt and allows any user to buy it. A MEV opportunity occurs when such a transaction is identified. A searcher’s liquidation transaction is inserted in the block before all other transactions, enabling the searcher to buy the liquidated collateral at the most advantageous price.

Also, when a trader tries to re-collateralize their loan, the transaction can be censored in the process of adding funds. At the same time, the liquidation might still continue allowing searchers to buy the original collateral at a discount.

MEV types

Generalized front-running

Searchers use mempool-tracking bots to identify profitable transactions. An attacker then replaces the address of a potentially profitable transaction with their address and checks whether it is lucrative by running the transaction locally. If the result is favorable, the transaction with the replaced address will front-run the original transaction by setting a higher gas price.

Front-running

Front-running occurs when a transaction similar to that made by a user is placed directly before it in a queue to be filled. By doing that, the front-runner impacts the prices of the swapped assets, making a profit at the expense of the victim, who ends up receiving a lower amount of the target token than expected.

Back-running

Conversely, back-running occurs when a transaction is inserted immediately after the target transaction to make a profit from the market fluctuations generated by a large transaction. Although, technically, back-running does not affect other traders, an active use of this tactic can substantially increase transaction fees.

Sandwich attacks

One common form of front-running/back-running is a sandwich attack in which orders are placed before and after a target price-changing transaction, thus taking advantage of price pressure on both sides. The front-run transaction causes the movement of value. The victim’s transaction is executed at a new, less favorable price, and the final transaction captures the price difference, leaving the victim’s transaction front-run and back-run as if in a sandwich.

MEV protection with 1inch

While arbitrage and liquidations are generally neutral MEVs, traders can lose the entire amount of slippage tolerance as a result of front-running and sandwich attacks since users’ trades settle at a higher price than expected. 1inch makes sure that traders avoid the risk of being front-run or sandwiched.

In Fusion mode: Fusion swaps are performed by resolvers, with whom transactions are directly matched and then placed in a bundle with other orders to be included in the block. Bots cannot attack Fusion swaps since they are combined with other transactions.

In Legacy mode: Legacy mode does not involve resolvers and the transaction execution process follows a regular scenario. But the 1inch Wallet has long been featuring an opportunity for users to create and sign a transaction without broadcasting it to the mempool, where it could be visible to bots. In late 2022, 1inch’s frontrunning protection was stepped up by the introduction of the RabbitHole feature. With the 1inch RabbitHole, all swap transactions are sent directly to validators, bypassing mempools where sandwich bots could attack them.

Read more: https://medium.com/1inch-network/the-most-common-types-of-mev-and-protection-from-toxic-strategies-53ec43202e12

Comments

All Comments

Recommended for you

  • AI-driven crypto analytics platform Mind AI completes $1.2 million in funding, with participation from Lunar Labs Capital and others

    the AI-driven encryption analysis platform, Mind AI, has completed a $1.2 million financing round with participation from Castrum Istanbul, Dewhales, SMO Capital, Metazero Capital, X21 Digital, Zephyrus Capital, AlfaCatalyst, Maven Capital, Unicorn Ventures, and Lunar Labs Capital. The platform aims to solve problems such as information overload and unreliable KOL advice in the encryption industry. The new funds are intended to support the construction of AI and machine learning-based aggregation and analysis tools for on-chain and off-chain data, providing investors with feasible digital asset market analysis and decision-making.

  • Open source economic infrastructure Merit Systems completes $10 million seed round of financing, led by a16z crypto and others

    Merit Systems, an open-source economic infrastructure, has completed a seed round of financing of $10 million, led by a16z crypto and Blockchain Capital, with participation from Solana co-founder Toly, Not Boring Capital founder Packy McCormick, Farcaster co-founder Dan Romero, and Framework Ventures co-founder Vance Spencer. The funds raised will be used to accelerate the development of open-source economy.

  • AI code editor Cursor completes $105 million Series B financing

    On January 17th, AI code editor Cursor announced the completion of a $105 million Series B financing round, with investors including Thrive Capital, Andreessen Horowitz, and Benchmark. This round of funding will be used to expand the team and conduct cutting-edge research, promoting the development of "human-machine collaborative programming" mode and significantly improving programming efficiency.

  • MegaETH Ecosystem DEX Platform GTE Completes $10 Million Financing

    Global Token Exchange (GTE), a decentralized trading platform on the MegaETH blockchain, has raised $10 million in three rounds of financing. This includes $1.5 million in pre-seed financing, $6.942 million in seed financing, and $2.5 million in community financing, the latter of which was conducted on the Echo platform founded by cryptocurrency trader Jordan Fish (also known as Cobie).

  • Nomura-backed cryptocurrency firm Komainu raises $75 million

    Komainu Holdings Ltd., a cryptocurrency custody company supported by Nomura Holdings Inc., has raised $75 million in financing from Blockstream Capital Partners. This funding will be used to support Komainu's global expansion and integrate collateral management and tokenization technology developed by Blockstream.

  • Today's Fear and Greed Index rose to 75, and the level is still Greedy

    Today, the Fear and Greed Index rose to 75, and the level is still greedy. Note: The threshold of the Fear Index is 0-100, including indicators: volatility (25%) + market trading volume (25%) + social media heat (15%) + market research (15%) + Bitcoin's proportion in the entire market (10%) + Google hot word analysis (10%).

  • US PPI data will be released at 21:30 tonight

    investors are currently waiting for the Producer Price Index (PPI) report to be released at 21:30 tonight, as well as the US Consumer Price Index (CPI) data on Wednesday, to further understand the economic situation and the policy direction of the Federal Reserve in 2025. Walter, Chief Market Analyst at KCM Trade, said that if this week's inflation data is weak, the dollar may come under pressure and this could push up gold. Traders are currently betting that the Fed will not significantly ease monetary policy in 2025. In the context of a robust economy and labor market, policymakers need to see new progress in slowing inflation before they can continue to cut interest rates. However, at present, such progress is uncertain. (Jinshi)

  • Crypto Bank Sygnum Bank Completes $58 Million Funding

    Sygnum, a cryptocurrency bank headquartered in Switzerland and Singapore, has completed a $58 million financing round, with a post-financing valuation of $1 billion.

  • Ministry of Public Security: Telecom fraud groups are using blockchain, virtual currency and AI technology to upgrade their criminal methods

     Beijing Business Daily reported that at a press conference held by the Ministry of Public Security on January 10, it was announced that as of the end of 2024, more than 53,000 Chinese criminal suspects involved in telecommunications fraud in Myanmar's northern region have been arrested, and the "Four Major Families" criminal groups in Myanmar's northern region have been successfully destroyed. The Ministry of Public Security pointed out that although the crackdown has achieved significant results, the crime situation is still severe. Fraudulent groups are constantly upgrading their criminal tools using new technologies such as blockchain, virtual currency, and AI intelligence. These groups are well-organized and engage in illegal activities such as cross-border cooperation in app development, traffic diversion and promotion, and money laundering. Fraudsters tailor their scripts to target victims of different ages, professions, and educational backgrounds, and the victims are widespread. Although the telecommunications fraud park near the Chinese border in Myanmar's northern region has been cleared, there are still many fraudulent dens operating overseas under the guise of "technology parks" and "development zones".

  • Turkish AI studio Grand Games receives $30 million in Series A funding led by Balderton Capital

    Turkish AI studio Grand Games has raised $30 million in Series A funding, led by London investment firm Balderton Capital, with other investors including Bek Ventures, Laton Ventures, and angel investor Mert Gür. The company plans to use the funds to expand its workforce and continue developing games while maintaining its existing structure. Grand Games is a mobile game publisher based in Turkey, known for casual games such as "Magic Sort" and "Car Match," and has been in operation for less than a year.