📢 Gate Square Exclusive: #WXTM Creative Contest# Is Now Live!
Celebrate CandyDrop Round 59 featuring MinoTari (WXTM) — compete for a 70,000 WXTM prize pool!
🎯 About MinoTari (WXTM)
Tari is a Rust-based blockchain protocol centered around digital assets.
It empowers creators to build new types of digital experiences and narratives.
With Tari, digitally scarce assets—like collectibles or in-game items—unlock new business opportunities for creators.
🎨 Event Period:
Aug 7, 2025, 09:00 – Aug 12, 2025, 16:00 (UTC)
📌 How to Participate:
Post original content on Gate Square related to WXTM or its
How does Sei use the order book engine to resist MEV?
By @Macr0Mark, 3V Labs
The Sei network is designed to handle institutional-grade order flow at scale, and it employs three major technological innovations:
What is a native order matching engine? Why does this feature take MEV protection to a whole new level?
What is **MEV and why is it the biggest problem threatening all Layer 1? **
In the sight of the Sei team, there are two types of MEV, one is the robot/validator of the front-end transaction, and the other is the liquidator/arbitrageur. The former has negative consequences, while the latter is acceptable for a robust transactional economic model.
Sei attempts to minimize bad MEV through frequent batch auctions (FBA), while maximizing benign MEV through off-chain lightning bot-style auctions.
Capturing token value from gas fees is not profitable enough for a high-throughput chain like Sei. Therefore, Sei plans to capture value accretion by distributing auction profits generated by benign MEV robots to validators and stakeholders. Sei’s auctions will be private and off-chain, similar to the Lightning Bot model (an MEV-boost-based implementation that allows for front-run protection on Ethereum). The system is private, meaning it is a blind auction (also known as a first-price closed-bid auction), where bidders can submit their exact transaction order preferences without revealing their bids and without paying for unsuccessful bids. pay.
The auction will allow bots to compete for typical MEV transactions, such as liquidations and arbitrage. Instead of congesting the P2P network and raising gas prices. Robots will bid on the economic value of the deal, and the winning bid will be close to the actual value of the deal. With enough market participants, the winning bid may be slightly lower than the deal value, with some going to the winner and the rest being distributed.
**For example, in a liquidation worth $100, bots will compete and mark up the price in order to participate in the liquidated transaction, but instead of spamming the Sei chain, they do it off-chain, overriding the gas fee. In an efficient market, the winning bid might be worth roughly $99, of which $1 would be awarded to the robot and the remaining $99 would be split between validators and delegators. **
Let's take a step back and look at what MEV is.
"Maximum Extractable Value, the process of maximizing economic value from block production by including, excluding, and reordering transactions in blocks".
**Under MEV, validators benefit from increased gas fees paid by "seekers," or arbitrage bots, which must submit arbitrage transactions with the highest gas fees. Arbitrage bots run algorithms to detect profitable MEV opportunities and execute orders posted by ignorant retail traders, seconds (or even milliseconds) before they can fill them at a fair price, thus pre-empting them. **
In his book, The Lightning Boy, Michael Lewis investigates the original Wall Street "first striker," in which high frequency trading (HFT) and unethical arbitrage practices led to the formation of a rigged market.
** Ongoing information asymmetries (front run) and lack of deep liquidity are preventing next-gen DEXs from toppling their centralized counterparts and market makers from achieving on-chain capital efficiency at multi-billion dollar scale. **
When choosing where to place their liquidity, market makers (MMs) value speed, finality, and latency. In order to provide market depth, MM tracks and updates their bilateral prices every block. Therefore, sub-second block times mean smaller price differences, so there is less risk of being exploited by high-frequency traders. Take profit in the time frame between price update and MM reaction.
**How does Sei's native hOMiE implement pre-transaction protection? **
The Order Matching Engine (OME) matches buy and sell orders on all kinds of trading markets including crypto markets.
Like your car engine, OME is responsible for speed (TPS and finality) and torque (throughput).
Let's break down why Sei has a "Ferrari" engine in detail.
Suppose there are two orders on the order book, one to sell $Sei at $10 and the other to sell $Sei at $11, and then two buyers come in. Normally the first buyer gets filled for $10 and the second for $11, but using frequent lot auctions, both orders get filled for $10.50, which is a uniform liquidation The price, obtained by dividing the sum of the two prices by two, (P1+P2)/2.
Frequent Batch Auctions: This model was created as a solution to the huge arbitrage opportunity of the Continuous Double Auction Model (CDA). CEXs typically use CDA, where orders are processed as soon as they hit the order book (or are filled by other bids or asks), which requires high throughput during times of high volatility. For DEXs, this often results in significant delays due to network congestion.
Is Sei's engine really unique? Compare with Injective, dYdX and Serum
DEXes like Uniswap on Ethereum or Serum on Solana execute each order one by one, which results in slower performance and higher costs associated with MEV.
New AMM models have the benefit of "possibly" unlimited liquidity, but they limit users to only accept prices. On the other hand, users of the Central Order Book Exchange (CLOB) can take or place orders.
OME Comparison @3vLabs
Injective
Injective has over $9.2M in total lockup and a market cap of $293M (as of February 22, 2023), based on the Cosmos SDK and targeting the most liquid market makers, DEXes and traders group.
In order to reduce front-end transactions, Injective also adopts the Frequent Batch Auction (FBA) model and introduces three main features.
Serum
For Serum, with a total lock-up of $566K and a market cap of $124M (as of February 22, 2023), its order matching engine is fairly simple. The model aggregates the highest bid and lowest take price to set the current market price at which traders can execute orders immediately, thereby tightening bid-ask spreads.
This model can work well with highly liquid order books and Solana's fast transaction speeds, but is still not optimal.
In Sei, all centralized order book transactions are executed atomically within the scope of a block, unlike Serum, which requires two separate transactions to handle order placement and execution.
transaction lifecycle
DYDX
Speaking of dYdX, there are two problems with the current version: the performance of both the Ethereum and StarkEX applications is insufficient for dYdX's needs, and also, v3 is operated through a centralized sequencer, which has authority to review transactions.
In the words of the dYdX team:
"The fundamental problem with every L1 or L2 we can develop is that none can handle anywhere close to the throughput required to run a state-of-the-art order book and matching engine."
In terms of performance, the current version 3 handles 10 trades per second and about 1,000 order entries/cancellations per second.
The dYdX team is rebuilding on Cosmos Lisk, including a fully decentralized, off-chain, order book and matching engine. dYdX v4 is planned to be released in the second half of 2023 (end of September), and the public testnet will be launched at the end of July.
Sound familiar?
Sei's Competitive Advantage
Sei's optimization settings will further improve the performance of these order matching engines by:
block parallel processing
**Sei does not process transactions sequentially, but in parallel. **Multiple transactions related to different markets can be processed simultaneously, thus improving performance. From recent load tests, we can see block time reductions of 75-90% compared to sequential processing, and latencies of 40-120ms for parallel processing, compared to 200-1370ms for sequential processing , a significant improvement.
Market-Based Parallel Processing: By default, Sei treats all order book trades touching different markets as independent (if they do not affect the same market in the same block).
Native Price Oracle
**Sei's price oracles are responsible for bringing off-chain price data into the blockchain, they are built into the chain. **This means that all validators need to propose their price (exchange rate) when submitting a block. Blocks are only created when all validators agree on a common price. If validators miss some voting windows or offer prices that deviate too far from the median, they will be slashed (punished).
Package of transaction order
Market makers can cancel and create orders in multiple markets in one transaction (ie, all orders for BTC perpetual contracts for a specific market will be combined into one smart contract call).
Deep Dive into Order Matching Priorities
**Sei's Order Matching Engine (OME) will prioritize all order cancellations, removing limit orders from the order book associated with them. Then, all limit orders will be added to the order book. This ensures that orders are filled with maximum liquidity. The matching engine will then process the market order. **
The Injective protocol operates on a first-in-first-out (FIFO) principle, where market orders are executed first, followed by unfilled limit orders, and finally the latest limit orders.
Serum Dex also adopts the FIFO strategy of "price-time-priority" matching, orders are ranked according to their prices, and orders with the same price are ranked according to the time they were released in the order book.
To sum up, **Sei is a custom-built L1 blockchain for transactional applications, with multiple innovative technologies including native order matching, twin-turbo consensus, and market-based parallelization. **Its native Order Matching Engine (OME) is designed to prevent front-running by using Frequent Bulk Auctions (FBA) and single-block order execution. This allows for faster trade execution and eliminates the risk of market manipulation and exploitation by high frequency traders.
Overall, Sei aims to provide a secure and efficient platform for institutional order flow and market makers for trading applications.