← NeuPortal blog

AI and MEV: What Machine Learning Can and Cannot See in the Mempool

By ·

AI and MEV: What Machine Learning Can and Cannot See in the Mempool

There is a layer of crypto markets where the usual complaint about machine learning does not apply. The standard objection is that a liquid market has already absorbed whatever your model noticed, so by the time a pattern is visible it is priced. In the mempool that objection weakens, because the thing being predicted is not a price at all. It is what a specific transaction will do to state when it executes, and there is a window - measured in hundreds of milliseconds - where that is genuinely unknown to almost everyone.

That window is where maximal extractable value lives. It is also where most published analysis of MEV goes wrong, because it describes the profitable outcome and skips the measurement problem that makes the outcome hard to study.

What MEV actually is, without the mythology

When you submit a transaction to a public blockchain, it does not execute immediately. It sits in a queue visible to anyone running a node. Whoever assembles the next block decides which transactions go in and in what order, and that ordering has economic consequences: a large swap moves a pool's price, so a transaction placed immediately before it captures value that the original sender expected to keep.

Some of this is straightforwardly useful. Arbitrage between venues keeps prices consistent, and liquidations keep lending protocols solvent - both are ordering-sensitive and both are functions someone has to perform. Some of it is pure extraction from the person who submitted the transaction. The industry lumps all of it under one acronym, which is convenient for whoever is doing the extracting.

The genuinely predictable part

Machine learning contributes in the narrow places where the answer is mechanical rather than strategic.

Simulation before inclusion. Given a pending transaction and the current state, what will the state look like after it executes? This is deterministic computation, not prediction, and speed is the whole product. A system that can simulate more candidate orderings per unit time simply sees more of the opportunity surface.

Classification of pending flow. Is this transaction a retail swap, a bot's arbitrage attempt, a liquidation, an exploit in progress? Transaction shape, calldata patterns, gas behaviour and the sender's history all carry signal, and this is an ordinary supervised problem with observable features. Unglamorous, and it is most of the actual edge.

Auction bidding. On networks where block space is auctioned, the question becomes how much to bid for an ordering that is worth a known amount. That is a bidding problem under competition, closer to advertising auctions than to price forecasting, and it responds to the same techniques.

Notice what is absent from that list. None of it is predicting where a price is going. The predictable part of MEV is predicting mechanism, not direction, and systems that blur the two tend to lose money in the direction part while congratulating themselves on the mechanism part.

The part nobody can see, and why studies overstate what they know

Here is the measurement problem that makes honest MEV research difficult.

A large and growing share of transaction flow never appears in the public mempool. Private order flow goes directly to block builders through relays, arriving already ordered and invisible to any observer running a node. If you build a dataset from the public mempool, you are studying the portion of the market that chose to be visible - and that choice is not random. The most valuable flow is the most likely to be hidden.

This is survivorship bias with a different costume. Your sample consists of transactions that had no reason to hide, and conclusions drawn from it will systematically understate both the volume and the sophistication of what is happening. Any paper reporting total extracted value from public data is reporting a lower bound whose distance from the truth is unknown - and unknown in a way that cannot be estimated from inside the sample.

The second issue is competitive decay. A published MEV strategy stops working, not because markets are efficient in the textbook sense but because a small number of well-capitalised participants read the same papers you did. Backtests in this domain are measuring a competitive landscape that no longer exists by the time you deploy. The half-life is short and it is not disclosed.

Why this matters to people who will never run a searcher

Most readers will never bid for block space. The reason to understand MEV anyway is that it is a tax with a variable rate, and it changes what your execution actually costs.

If you submit a large swap through a public mempool on a congested chain, some of the value you expected to receive will be captured by someone else, and the amount depends on conditions you can partially control: transaction size relative to pool depth, slippage tolerance, whether you route through a private channel, timing relative to congestion.

That is an operational lesson, not a trading strategy, and it is worth more to most people than any model output. The realistic goal is not to capture MEV. It is to stop donating it accidentally.

Where our discipline lands on this

We do not run MEV strategies. What the domain reinforces is a principle that governs everything we publish: be explicit about what your data cannot see.

Our forecasts are hashed, timestamped to the Bitcoin blockchain before publication, and scored openly on coverage afterwards. We recently audited our own record and found our published ranges too wide - outcomes fell inside a stated 50% range 86% of the time. We published that number, diagnosed the cause, and fixed it. Over-coverage is a failure in the same way under-coverage is: a range that cannot be caught being wrong tells you nothing.

MEV research fails the same test in a different way. A study of public mempool data that does not state loudly that private flow is missing is not wrong in its arithmetic - it is wrong about what its arithmetic describes. The invisible portion is the part you most needed.

The honest summary

MEV is one of the few places in crypto where machine learning has a defensible, non-adversarial job, because the task is simulation and classification rather than forecasting a price against people who have already priced it.

It is also a domain where the published numbers are lower bounds of unknown tightness, where strategies decay under competition faster than they can be validated, and where the most important flow is deliberately unobservable.

No method reliably beats a liquid market, and anyone promising that is selling something. In the mempool the honest version is smaller still: you can compute faster than the next participant for a while, and you can avoid handing value away by accident. Both are real. Neither is prophecy.

Educational content - not financial advice, and not a betting tip.