Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
Panoramic interpretation of the MEV track project and cutting-edge development
DeFi之道
特邀专栏作者
2022-11-28 12:00
This article is about 14220 words, reading the full article takes about 21 minutes
Is MEV an existential threat to blockchain or a solvable challenge?

Compilation of the original text: The Way of DeFi

Compilation of the original text: The Way of DeFi

The introduction to the dark side of the blockchain first appeared on Reddit in an article titled "Miners FrontrunningIn this historic article, based on the openness of the Ethereum memory pool, the author outlines how miners can use it to conduct front-running transactions and arbitrage them. Of course, this is not a new thing in the financial field. In the book "Flash Boys" published in 2014, Michael Lewis described the trading rush in high-frequency trading, and then published "Flash Boys" in 2019.Flash Boys 2.0 In his paper, he applies these observations to the blockchain and shows how, in this so-called fair financial system, people use bots to engage in widespread trade arbitrage. According to statistics, until the merger of Ethereum in September this year, the cumulative value of arbitrage transactions in the blockchain system has exceeded 675 million US dollars!

Probably the worst buzzword acronym in the blockchain industry, MEV (Maximum Extractable Value) is earned by validators, miner nodes, block producers, etc. working together to reorder transactions within a block income. Of course, MEV is not fully extracted by block producers, known as"searcher"image description

Unbounded territory AIUnbounded territory AIfirst level title

MEV Attack Types

secondary title

front running

secondary title

DEX arbitrage

secondary title

trailing trade

Trailing transactions are transactions that senders want their transactions to be in"Target transaction order"to liquidate

to liquidate

secondary title

sandwich attack

The searcher scans the memory for potentially large transactions. Before the transaction occurs, the searcher buys an asset that will eventually appreciate in value, and immediately after the whale's transaction is executed, the searcher sells the same asset, thereby"caught"image description

image descriptionLiyi Zhou )  

secondary titleLiyi Zhou )  

time bandit attack

secondary title

NFT MEV

secondary title

JIT liquidity

Just-In-Time is another form of MEV transaction ordering. LP providers immediately mint and burn positions before and after swap. Although it is very competitive, it improves the execution of transactions, otherwise will be affected by high prices, and in additionimage description

JIT Liquidity Visualization (Source: Jon Charbonneau, Delphi Digital)

first level title

The Good and the Bad of MEVs

At first glance, MEV appears to be an existential threat to the blockchain. Hidden transaction costs hidden under wallet signatures are certainly not economically beneficial for a new technology paradigm, and MEV is indeed one of the few reasons that degrades the experience for both novice and advanced users. For example: users suffer from greater slippage and poorer execution of large transactions (due to sandwich trading and DEX arbitrage), increased GAS and slower on-chain transactions (due to frontrunning transactions), and possible consensus stability threats (validator reorganizes the block), etc.

However, although there are negative effects, the existence of MEV also has some positive factors, such as: arbitrage traders ensure that the token pricing of each AMM is the same, satisfy the mechanism of stablecoin parity, ensure the smooth liquidation of DeFi loans, maintain the balance Incentives for block proposers to increase the security of the blockchain (by providing higher rewards), etc.

Regardless of the positive and negative effects of MEV, MEV will always exist, especially in the merged blockchain world. Now, given the different ways of living with MEV and others in the blockchain, there are also different ways to face the impact of MEV. There are several different ways of classifying and handling MEVs. We can divide according to our cognition and views on MEV issues:

1. Offensiveness - MEV is inevitable, we should find an alternative method for more democratized value extraction.

2. Defensiveness - MEV is an existential threat and we should prevent it.

Where these solutions may occur:

1, P 2 P layer

2. Application layer

In theory, all MEV protection schemes are built on-chain, but some are only used at the application level through designated frontends. Calling these user-facing platforms the application layer, and looking at the space for MEV solutions through this lens, I created four quadrants of MEV protection.

These four categories are.

1) Offensive on-chain protection

2) Offensive application layer

3) Defensive on-chain protection

4) Defensive application layer

image description

first level title

secondary title

Flashbots

secondary title

Flashbots Auction

The Flashbots auction is a private communication channel between Ethereum users and validators to efficiently communicate the preferred order of transactions within a block. Flashbots auction was originally launched as a patch on the go-ethereum client combined with mev-relay (transaction packet relay) on POW Ethereum. Now on PoS Ethereum, Flashbots auction is built on on MEV-Boost (more on that later).

secondary title

MEV-Boost

Flashbots Auction Turns in Concern for Ethereum-Proof-of-Stake Mergermev-boost , which is the implementation of the separation of proposer and block builder (PBS) in PoS Ethereum. MEV-Boost minimizes the downside of MEV by letting validators outsource block building to a competitive market of block builders and accept the most profitable block building through services called relays Influence. MEV-Boost enhances the security and decentralization of Ethereum, enabling validators to receive PBS-supporting MEV rewards regardless of the size of the validator, making MEV not just a game for the few.

image description

secondary title

Four main players in MEV-Boost

1) Seekers are bots, veteran ethereum users, traders, or anyone actively searching mempools for arbitrage opportunities that can find profitable transactions and try to include their transactions in a block, search The block builder collects transactions, adds them to a bundle, and sends them to the block builder.

2) Block Builders are specialized entities that connect to Seekers and take bundles (composed of transactions), creating final blocks that are sent to Validators via relayers.

3) Relayers collect blocks from multiple block builders and choose the most profitable block (determined by builder bids) to send to validators for proposal. Relayers play a vital role in censorship as they are able to pick and choose which blocks to include (more on that later).

image description

MEV-Boost running process

image description

MEV-Boost Repeater Market Share

secondary title

source:Jon Charbonneau

Protection against Flashbots

In addition to Flashbot's MEV protection at the validator level, Flashbots offers several products for any blockchain user to protect themselves from MEV. Flashbots Protect is Flashbot's leading protection tool for users and developers.Flashbots Protect RPCsecondary title

Review of issues, shortcomings and subsequent developments

Despite the incredible progress Flashbots have made, their solution still has some problems that the current technology model faces, for example, if the entire network is connected to the same relay and the relay is The highest bidder will naturally be chosen by the validator, but what if the relayer withholds the block? That would end up creating an endless stream of empty slots to post to chain, a concern known as liveness issues. Fortunately, Flashbots outlined two possible solutions, and once PBS is incorporated into Ethereum itself, this problem will go away on its own. Not only that, but if MEV-boost has no repeaters running or all repeaters are offline, the beacon node will fall back to the common mempool building blocks.

image description

screenshot fromMEV Watch November 8, 2022

secondary title

 3.2 Manifold Finance

Like Flashbots, Manifold Finance built its technical infrastructure to minimize the negative impact of MEV. The foundation of Manifold Finance is their Secure RPC system which allows users to submit secure and private transactions. By sending orders to RPC endpoints like Manifold's SecureRPC or Flashbots, users' trades are routed through an intermediary, which protects users from searcher arbitrageurs in public pools.

On top of their SecureRPC, Manifold provides several products.OpenMEVimage description

Source: Manifold Finance Docs

secondary title

 3.3 BloxRoute

image description

Source: BloxRoute Official Documentation

Regarding the current discussion on whether relayers need to be responsible for sanctioned transactions, BloXroute Labs CEO Uri Klarman told CoinDesk that BloXroute believes that deciding whether validators should or should not include sanctioned transactions is not a matter for us to consider. To launch a repeater, Tornado will be vetted based on user judgment and specific laws.

image description

image description

text

BloxRoute also offers a protective product calledFast Protect secondary title

 3.4 Eden Network

image description

MEV-Boosted slot proportion source:MEVBoost.Pics

image description

Controversy over MEV-Boost

secondary title

 3.5 Skip Protocol

Skip Protocol is building MEV products on Cosmos that match its ecosystem, amplifying the effectiveness of MEV, minimizing the impact of bad MEV, and redistributing the rewards generated by these MEV to validators and stakers. Skip found the following issues on the Cosmos chain, as this is a first-come, first-served mempool:

1) Execution risk:During periods of high chain congestion, there is no way to say that certain transactions are "more important" or more economically valuable to traders or the ecosystem, which happened widely during the May-September Terra crash.

2) Wasted block space and GAS:You'll find blocks with multiple failed transactions behind a lot of arbitrage opportunities (for example, Terra Classic block 5635240).

3) Profit Concentration:Almost all arbitrage opportunities are captured by a very small number of addresses, which may be controlled by a few high-frequency trading organizations, which amounts to an implicit tax on Cosmos users and validators.

4) Participant integration:MEV Seekers and Validators are incentivized to vertically integrate their bots and nodes on the same server for faster mempool access and transaction broadcasting. (For example, we have seen progress in partnerships between MEV searchers and validators on priority access), which undermines long-term decentralization.

5) Chain stop risk:Large amounts of spam can break full nodes or validators (when they expose ports).

image description

Transaction Ordering in Skip Protocol

By doing this, validators can earn more rewards per transaction, and as MEV rewards are distributed to stakers, staking profits will increase, which is a win-win.

Recently, Skip announced their Skip-Select product, allowing validators to have full control over how they structure their blocks. Validators can choose how MEV rewards are distributed, choose whether or not Skip builds their blocks, choose compliance, choose governance, and various other MEV preferences. this is themSovereign MEVPart of the vision to allow Lisk stakeholders, validators, and core developers to decide how their MEV marketplace works. To that end, they are developing the MEV-SDK, which brings these preferences and block builder rights on-chain. As of this writing, Skip is active on Juno’s testnet and mainnet, and will launch on Evmos, Terra 2, and other Cosmos chains soon. Additionally, they have been negotiating various collaborations with Osmosis.you can heresecondary title

 3.6 Jito Labs

Unlike the previously mentioned projects in the Ethereum and Cosmos ecosystems, Jito Labs' mission is to scale Solana with high-performance MEV infrastructure. Given that they fall into the offensive MEV category, they try to minimize the negative impact of MEV while maximizing the impact of good MEV and redistribute the benefits to users. With three different products working together, Jito leads the way in minimizing MEV on Solana.

First, validators run Jito-Solana, a modified Solana Labs validator client that allows validators to create "bundled" transactions, giving seekers and high-frequency traders flexible ordering of transactions. The open-source Jito-Solana validator is the heart of the network, managing communication with Jito-Relay, which performs filtering and signature verification of transactions being processed. The highest bid and most profitable bundles are sent from relayers to validators for eventual addition to the chain. Additionally, Jito provides a block engine that connects relayers, searchers, and validators through an off-chain sealed-bid auction to add transactions to the chain. The block engine simulates each combination of transactions and forwards the highest paying batch of transaction packets to the leading validators for fast execution. When the auction expires, the most profitable bundle is sent to the leader, cleverly, this block engine is globally distributed to ensure validators and searchers have low-latency access no matter where they are .

Validators' MEV profits are redistributed at the end of each epoch, a cool trick Jito madeSpreadsheets, used to calculate the validator profit before and after MEV.

first level title

Offensive Application Layer

secondary title

 4.1 Rook Protocol

Rook Protocol is one of the first MEV extraction solutions designed to capture MEV at the application layer, protect users and protocols from negative external influences, and reduce the total MEV available at the consensus layer. Ultimately, Rook redistributes MEV profits among participants in a way that increases overall network and market efficiency.

The Rook Protocol relies on ROOK to function, an ERC-20 governance and utility token used to discover the value of MEV in transactions as they are processed. Everyone who uses the Rook protocol — users, smart contracts, market makers, keepers, etc. — is connected to the ecosystem through the ROOK token. Keepers are automated bots that complete users' transactions, stake ROOK into smart contracts and receive xROOK in return. Keepers constantly observe the transaction mempool to look for arbitrage opportunities. Once a profitable transaction is found, Keepers will use their xROOK to bid for a chance to execute the transaction. The coordinating auctioneer module will give the green light to the Keeper that won the auction. Transaction, allocating the cost that the Keeper paid for the opportunity. At the same time, ROOK token holders can put their ROOK into the Rook staking pool in exchange for xROOK, and a portion of the value captured in each bid goes directly to xROOK holders, giving them a utility that directly corresponds to the Rook protocol and MEV earnings.

The off-chain order book is implemented using Rook's "hide order booksecondary title

 4.2 B.Protocol

B.Protocol is another aggressive application-level MEV solution. However, it is mainly focused on the lending and liquidation space (contrary to other solutions mentioned, this one is biased towards DEX, front-running and sandwich attacks). B.Protocol democratizes liquidation, ensures greater capital efficiency, and counters MEV.

On the B.Protocol integrated platform, it pools users' funds into a Backstop pool for liquidation. When funds sit idle, they stay in the yield platform and generate passive income (interest rate or liquidity mining rewards) for users. Once liquidation occurs, the smart contract draws the required funds from the backing to facilitate the liquidation and automatically sells the seized collateral. Once sold, the proceeds are deposited into the pool, generating a profit. thisvideoGives a good overview of its specific workflow.

By creating a democratic pool in which anyone can participate, B.Protocol shares MEV profits with users who deposit collateral and gives them liquidation priority. B.Protocol is currently live on several leading projects, including Liquidity's Chicken Bonds. What sets B.Protocol apart is that it is the only player in the MEV protection space that focuses on the clearing space, a niche category of offensive application layers.

first level title

Defensive On-Chain Protection

secondary title

5.1 Chainlink Fair Ordering Service

image description

Fair ordering service process model

In addition, FSS can be used not only for smart contracts in the preprocessing phase, but also for block construction and rollup phases. Currently, FSS has another fully functionalprototype, and there is an Arbitrum ofpilot project.secondary title

 5.2 Secret Network

secondary title

 5.3 Comos 2.0 

Recently, Cosmos announced their version 2.0 protocol, in which they proposed a solution against MEV - Interchain Scheduler. Unexpectedly, the ATOM 2.0 proposal was rejected by the ATOM community. Even so, it is still necessary to explain the Interchain Scheduler in detail.

image description

Cross-chain scheduling process

Technically complex, details can be found insecondary title

5.4 Other defensive on-chain tools and solutions

In addition to the above products, there are various other defensive on-chain solutions for MEV protection.

Submarine Sends:

image description

Submarine Sends Transaction Model

All of Submarine Sends' code is publicly available on Github, but it hasn't been updated in a few years.

ZeroMEV

ZeroMEV is a fully decentralized solution for Ethereum validators to protect their users from front-running and censorship. When using MEV-Boost, users sometimes get a few milliseconds ahead. To prevent this, ZeroMEV protects their users by ordering MEV transactions by time instead of gas price. In fact, ZeroMEV protects users from a difference of up to 500 milliseconds, and to use ZeroMEV only needs to change three lines of code in the original Geth. However, currently using ZeroMEV is purely altruistic, as validators may earn less since they only get tips after EIP-1559. However, validators can roll back transactions, creating more profit, and ZeroMEV is still an incredible validator MEV protection tool regardless.

Salmonella Attack

In order to fool the sandwich trading bots, Defi-Cartel introduced a very clever technique to return the power to the traders. Salmonella's idea was as follows: Create a typical ERC-20 token that returns only 10% of the specified amount whenever someone other than the specified owner transacts with it -- although the posted event log shows the full transaction.seen hereIt had several major feats during its heyday.

Kattana

Similar to the previous one, this is another application for fooling robots, Kattana is a terminal for cross-chain transactions between DEX and CEX. During their token launch, they set a trap for the front-running bots, preventing them from selling their tokens, and sometimes, the predator becomes the prey.

first level title

defensive application

secondary title

6.1 Automated Market Maker (AMM)

When discussing the defensive application camp, we have to start with automated market makers. For an overview of AMM, please read my previous

MEV capture AMM (McAMM)

Recently there has been a lot aboutMEV Captures AMM Discussion. In a nutshell, the idea is as follows: AMMs have the right to auction off the first transaction of each block, thereby selling a potential MEV slot, and redistribute those profits to traders, stakers, and potentially even searchers Or, this proposal is very interesting.

Liquidity Concentration

In March 2021, Uniswap announced their V3 version. Among other things, they introduced a whole new paradigm for DeFi and AMMs: centralized liquidity. In short, concentrated liquidity gives LPs granular control over the price range over which their capital is allocated, resulting in greater capital efficiency while reducing slippage while also preventing any asset free fall. Since it has less impact on the price per transaction, it certainly has less impact on MEV. Additionally, there is a fascinating JIT liquidity MEV technology on centralized liquidity pools that actually benefits traders. While centralized liquidity does not completely eliminate MEV, it certainly minimizes it.

secondary title

6.2 DEX Aggregator

For those who are not familiar with DEX aggregators, the simple understanding is: they connect hundreds of DApps together and provide the best exchange ratio through these different liquidity pools.

 1 inch

This is the most famous and widely used DEX aggregator. Recently, they partnered with Flashbots to protect their users from front-running and sandwich attacks. Now through 1 inch users can choose to have their transactions routed through Flashbots, which enables a direct connection between validators and 1 inch. However, I'm not sure if it was updated or if it still works after the merge. Another leading protection tool from 1 inch is the "automatic slippage, which minimizes the chances of a bot targeting a transaction, as it has a low tolerance for slippage, so there is less room to manipulate the amount returned by a user.

CowSwap

You can think of it as an aggregator that aggregates DEX aggregators. Transactions on CowSwap can be settled through on-chain automatic market makers, other DEX aggregators, etc. CoW is point-to-point matching, so everyone can get better prices, and no one pays unnecessary AMM fees because It searches for the potentially best trade price for all other liquidity. In the transaction center, CoW submits these transactions to the chain in batches, hides them in the public memory pool, and effectively prevents miners from reordering transactions and sandwich robots. CoW Protocol is certainly unique in this regard.

first level title

The present and future of MEVs

Now that we understand the big picture of the entire MEV solution, and more importantly the issues that remain, we also need to understand where the next innovation will take place.

First, like most other problems in blockchain, this one is too complex for ordinary users to understand. The vast majority of blockchain users tend to trade with poorer execution rates, and while losing pennies per trade may not be such an issue in the short term, without understanding these issues blockchain will never It will develop into a larger application field. Furthermore, the solutions described above are also very complex and require an understanding of various actors, and the perception of MEV does not drive its adoption, which is a matter of philosophical category.

Second, these solutions that are being offered offer neither ownership nor equity in their network (ROOK and COW are the exceptions), they are purely add-ons to other protocols or just a feature with very little profit being distributed. Those solutions that have profit distribution, are distributed in their own tokens, not in the tokens of the implemented DApps themselves.

Finally, in the current situation where many solutions have some private order flow or events that shield transactions, there is an argument that private order flow has its drawbacks, it removes the public nature of the blockchain and can lead to centralization . I think the reality is that there is always a trade-off between the two.

Despite these concerns, the innovations that have occurred in the field of MEV protection are surprising enough. The length of this article highlights how important this issue is. It can be seen that the development of memory pools will be one of the important themes in 2023, especially during the trough of the bear market, where infrastructure is the main innovation position.

Additionally, there are some predictions that major DEXs will become block builders in the future and create an interesting dynamic in this space. The rising interest in privacy-preserving chains and applications following the failure of Tornado Cash has also attracted some attention, especially as MEV can alleviate privacy concerns through such platforms as Silent Protocol, Nucleo, and Aztec Network.

Original link

Original link

DeFi
Welcome to Join Odaily Official Community