Overview of the Ethereum MEV tool Sorella led by Paradigm

ChainCatcher Selection
2024-08-29 11:13:38
Collection
A brief overview of the current state of MEV and the blockchain analysis pipeline Brontes launched by Sorella Labs.

Author: Lyric, ChainCatcher

Editor: Nianqing, ChainCatcher

MEV (Maximum Extractable Value) refers to the additional value that miners or validators can obtain by manipulating the order and selection of transactions. In simple terms, MEV reflects the extra profits that miners can gain by adjusting the order of transactions. With the increasing popularity of smart contract platforms like Ethereum, MEV has gradually become an important area of research, driving the development of various new solutions and protocols aimed at reducing its negative impact on users.

Recently, the crypto startup Sorella Labs, which aims to address the MEV issue on Ethereum, announced a $7.5 million seed funding round led by Paradigm, with participation from Uniswap Ventures, Bankless Ventures, Robot Ventures, and Nascent, among others. This funding round was completed last September. Along with the funding announcement, Sorella Labs also launched its product Brontes, and another tool, Angstrom, is expected to be released later this year after the mainnet launch of Uniswap V4.

Team Background

Karthik Srinivasan, co-founder and CTO of Sorella Labs, previously interned at Citadel. The other co-founder and CEO, Ludwig Thouvenin, interned at Ubisoft and other companies. The two met at the University of Chicago, and their strong interest in blockchain technology prompted them to leave campus and co-found Sorella Labs to explore the limitless potential of crypto.

It is reported that Sorella Labs is developing two tools, Brontes and Angstrom, with Brontes already launched and Angstrom expected to be released later this year after the mainnet launch of Uniswap V4.

Brontes Architecture

Brontes is a blockchain analysis pipeline built on Reth. It can be used to preprocess transaction data. The architecture is mainly divided into three parts: block tree, database (including table schema, price table, block table, metadata table, classification table, MEV block table, miscellaneous table), and checker. The checker framework includes CEX-DEX arbitrage checker, sandwich attack checker, quantum arbitrage attack checker, JIT liquidity checker, and liquidation inspector. (The following is a brief analysis of how the experimental CEX-DEX arbitrage checker works.)

CEX-DEX Arbitrage Checker Working Principle
This checker is used to identify arbitrage opportunities between centralized exchanges (CEX) and decentralized exchanges (DEX). It evaluates transaction costs and information content by analyzing effective price differences and realized price differences. Its working principle is as follows:

  1. Identify potential arbitrage trades:

The checker collects all block trades involving swap, transfer, ethtransfer, and aggregatorswap operations and processes the transaction information: discarding transaction information from settlement or DeFi automation bots, extracting swaps and transfers from DEX: if no swap is found, it attempts to reconstruct the swap from the transfer, discarding trades that represent atomic arbitrage (where the transaction forms a closed loop).

  1. Merge sequential swaps:

That is: swapping 50 A Tokens for 10 B Tokens, and then swapping 10 B Tokens for 2 C Tokens will be merged into: swapping 50 A Tokens for 2 C Tokens. This is similar to the merging in Flashswap on Uniswap.

  1. CEX Price Estimation (Two Methods)

  2. Set dynamic time window VWAP: Calculate the volume-weighted average price (VWAP) within a dynamic time window around each block. In simple terms, this means calculating the volume-weighted average price over a certain period, with the time window expanding in three phases:

  • Default window around block time -20/+80 milliseconds
  • Initial expansion: If the trading volume is insufficient, extend the subsequent blocking time in 10-millisecond increments up to 350 milliseconds
  • Full expansion will extend the blocking time before and after to -10/+20 seconds
  1. Optimistic execution calculation: Make an optimistic estimate of potential arbitrage profitability. The process is as follows:
  • Dynamic time window: The initial window (±200ms around block time) can be expanded: extend the subsequent blocking time in 10-millisecond increments up to 450 milliseconds. If necessary, extend the blocking time before and after to -5/+8 seconds.

  • Capacity allocation: Calculate the total amount (x) needed for arbitrage and the total trading volume for all time periods; for any time period i, the formula for capacity allocation is

    Vi=(z/y)*x (where z is the capacity for time period i)

  • Trade classification and selection: Within each time basket: trades will be sorted by price (from best to worst), and then the best trades will be selected based on quality parameters (e.g., top 20%).

  • Progressive filling: Start from the time basket closest to the blocking time. If a basket cannot complete its allocation, the remaining portion will be allocated to subsequent baskets.

  • Use volume-weighted calculations to determine the final price.

  1. Calculate potential arbitrage profit: Calculate the price difference between DEX and CEX. Estimate potential profits by comparing the amount of tokens a trader receives when buying on CEX and the output amount of tokens exchanged. Use the mid-price and ask price to calculate profits.

  2. Summarize and analyze results: Calculate profits for each CEX individually and the global VWAP profits for all exchanges. Identify the route with the highest profits across all exchanges. Calculate optimistic profits based on VWAP.

  3. Calculate gas costs: Subtract the gas costs of transactions from the profits calculated for each scenario.

  4. Validate and filter potential arbitrage: If a trade meets any of the following conditions, it is considered valid arbitrage:

  • Profitable based on global VWAP or optimistic estimates.
  • Profitable across multiple exchanges.
  • Executed by an address with a history of significant CEX-DEX arbitrage (>40 previous trades).
  • Marked as a known CEX-DEX arbitrageur.
  1. Handle edge cases and outliers: High-profit outliers (profits > $10,000) that are only profitable on exchanges with low liquidity will be filtered out.

Current MEV Status

According to data from eigenphi, the profits obtained from arbitrage in MEV account for a very high proportion, while the actual number of sandwich attacks is much higher. This situation has sparked widespread discussions about market fairness and transparency. A sandwich attack is an algorithmic trading strategy where the attacker first buys in ahead of the user’s order and then quickly sells after the user’s trade is completed, profiting from the difference. This behavior not only harms the interests of users, causing them to pay higher slippage, but also exacerbates market imbalances.

With the frequent occurrence of sandwich attacks, traders are beginning to realize the increasing importance of protecting their own interests. Many users, after suffering from such attacks, choose to seek safer trading methods, even turning to platforms that offer protective mechanisms. This has also prompted developers to start designing new protocols and tools aimed at reducing the risks of sandwich attacks and improving the safety and transparency of trading.

Currently, MEV has become increasingly important in the blockchain ecosystem, especially against the backdrop of the rapid development of DeFi. As DeFi applications become more widespread and complex trading strategies increase, the influence of MEV has significantly expanded. This has also sparked widespread attention and controversy, particularly when ordinary users face potential unfair treatment.

In this context, emerging technologies and protocols like Flashbots, including the Brontes mentioned in this article, are continuously emerging, all attempting to address the MEV issue. These tools help traders understand the existence of MEV and its impact, thereby reducing unfair competition among traders to some extent. This transparency measure not only helps enhance user trust but also helps mitigate market distortions caused by MEV.

However, the existence of MEV is not without cost. It alters the fundamental dynamics of the market, forcing traders to constantly adjust their strategies to adapt to the new market environment. Participants may more frequently use high-frequency trading and algorithmic trading in competition, making the market as a whole more complex. In this situation, psychological factors and market behavior become particularly important, requiring traders to conduct deeper analyses of market dynamics and sometimes unpredictable behaviors.

At the same time, regulators are beginning to pay attention to the compliance and ethical issues brought about by MEV. As blockchain technology continues to evolve, ensuring market fairness and order while enjoying the conveniences brought by technology will become an important challenge. There is hope that in future technological explorations, more efficient and fair trading mechanisms will be designed to reduce the negative impacts caused by MEV. Through innovation, the industry has the opportunity to move towards a more sustainable and healthy direction, allowing blockchain technology to truly serve every user.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators