What Is MEV Protection?
Learn what MEV protection is, why it exists, and how private RPCs, order flow auctions, and refunds reduce frontrunning and sandwich attacks.

Introduction
MEV protection is the set of tools and market designs meant to stop other actors from exploiting your transaction after they see it but before it is finalized. That sounds narrow, but it reaches into a central tension of DeFi: blockchains are transparent by design, yet many financial actions become worse precisely because they are transparent too early.
If you submit a large swap to a public mempool, you are not just asking the network to execute it. You are also publishing information: what asset pair you want, how urgent you are, how much slippage you tolerate, and often which pool you will hit. That information can be turned into profit by anyone who can react faster or control ordering. The result is that a transaction can be valid in the ordinary sense and still execute on much worse terms than the user expected.
Here is the basic idea that makes MEV protection click: the harm often comes less from the transaction itself than from when and to whom it becomes visible. Most protection mechanisms therefore change one of two things. They either reduce visibility before inclusion, or they change the rules by which visible order flow is turned into ordered blocks.
Everything else is a variation on those two levers.
- private RPCs
- bundles
- encrypted mempools
- order flow auctions
- refund systems
- proposer-builder separation integrations
Why does MEV protection matter for DeFi users?
MEV, or maximal extractable value, is the profit a privileged actor such as a validator, block builder, sequencer, or another party in the transaction supply chain can make by including, excluding, or reordering transactions in a block. That definition matters because it shifts the focus away from “bots are bad” and toward the structural source of the problem: someone controls ordering, and ordering changes outcomes.
In DeFi, many actions are path-dependent. A swap on an automated market maker changes the pool price. A liquidation depends on whether collateral prices and debt positions are read before or after another state change. An arbitrage only exists until another transaction removes it. Because of that, transaction order is not administrative detail. It is part of the economics.
The classic example is the sandwich attack. Imagine a user sends a large marketable swap through a public mempool. A searcher sees it before inclusion, infers that the trade will move the AMM price, and inserts one transaction before the user and one after. The first trade buys the asset ahead of the user, worsening the user’s execution. The second trade sells back after the user has pushed the price further, locking in profit for the searcher. Nothing about the user’s transaction was invalid. The problem is that transparency arrived too early, and ordering was available for sale to whoever could exploit that information fastest.
This is not a theoretical corner case. Foundational research on Ethereum DEX activity documented widespread frontrunning and the emergence of priority gas auctions, in which bots bid up fees to win ordering priority. The deeper lesson from that research is not only that users can lose money on execution. It is that open transaction visibility plus auctioned priority creates an adversarial race, and that race can spill upward into broader block production incentives.
So MEV protection exists to answer a practical question: how can users interact with transparent, programmable markets without giving away the information that lets others trade against them?
Where in the transaction pipeline can MEV protection intervene?
A blockchain transaction usually passes through several stages before finalization. A wallet signs it. Some RPC endpoint accepts it. It is propagated or relayed somewhere. A builder, validator, or sequencer decides whether and where to place it. Then the chain executes it.
MEV protection works by intervening at this pipeline before the transaction becomes exploitable. In the public-mempool model, a transaction is broadcast widely before block inclusion. That makes it easy for searchers to inspect pending order flow and construct reactions. In a protected flow, the transaction may instead be sent privately to a relay, builder network, sequencer, or auction system that limits who can inspect it and under what conditions.
That distinction is why many user-facing MEV protection products are just alternate RPC endpoints. The RPC is not magic by itself. It simply controls the first place your transaction goes. If that first destination is a public gossip network, many actors can observe and react. If that destination is a private relay path, the public mempool may never see the transaction before inclusion.
Flashbots Protect is a clear example. Its documentation describes a private-relay RPC for Ethereum that sends transactions to a private Flashbots mempool, where they are hidden from frontrunning and sandwich bots. It also states that transactions are only included if they do not revert, so users do not pay fees for failed transactions. Mechanically, the protection comes from withholding visibility from the public mempool and handing inclusion to a private builder-relay path instead.
That explains both the power and the limit of private submission. If a harmful strategy depends on seeing your pending trade in public, private routing can prevent that strategy. But if the party receiving your private transaction is itself trusted with visibility and ordering power, the problem is not eliminated so much as relocated. MEV protection is therefore always partly about who gets to see what, when, and with what incentives.
How does the same swap behave in public vs private submission flows?
| Path | Visibility | Frontrunning risk | Execution outcome | Fees / refunds |
|---|---|---|---|---|
| Public mempool | Broadcast widely | High | Worse execution possible | No refunds; priority bidding |
| Private RPC | Private relay | Low | Better execution likely | Possible refunds; trust required |
Suppose Alice wants to swap a large amount of ETH for a smaller token on a DEX. In the public path, her wallet sends the signed transaction to a standard RPC, which broadcasts it into the mempool. Searchers monitoring pending swaps notice that Alice’s trade will move the pool price. A searcher constructs a bundle: buy the token first, let Alice execute at a worse price, then sell afterward. To get that bundle placed correctly, the searcher bids aggressively for priority. Alice’s trade still lands, but she receives fewer tokens than she would have in a world without that pre-inclusion visibility.
Now consider the same swap through a private protection RPC. Alice’s signed transaction goes to a private relay instead of the public mempool. Because the trade is not broadly visible, the usual public-mempool sandwich bots do not get a chance to react before block inclusion. A builder or relay may still evaluate whether the transaction creates some extractable value, but the key change is that the broad race to insert around Alice is cut off. In the best case, her trade lands without being sandwiched.
Notice what changed and what did not. The AMM curve did not change. Alice’s slippage settings did not change. The blockchain did not become private. What changed was the information path before ordering. That is why MEV protection often feels like infrastructure rather than protocol logic: the main defense is about controlling pre-trade visibility.
How do private RPCs and private mempools reduce mempool frontrunning?
The most common user-facing form of MEV protection today is the private RPC. Instead of exposing a transaction to the public mempool, the RPC sends it directly into a private transaction supply chain, often connected to builders and relays. Recent benchmark research describes private RPCs on Ethereum as now handling a large share of DeFi transaction flow, with these systems submitting transactions directly to builders while skipping the public mempool.
This model is popular because it asks little of the user. You keep using your wallet, your app, and your chain; you just change where the transaction is first sent. For many retail users, that is the difference between “MEV protection” as an abstract market design and a setting they can actually enable.
But the simple story (“private is safer than public”) needs precision. Private routing reduces attacks that rely on public observability, especially sandwiching and mempool frontrunning. It does not automatically guarantee fair ordering, best execution, or censorship resistance. A private RPC operator may route to some builders and not others. A relay may have its own policies. A builder may choose the transactions that maximize its own revenue. Benchmark work on private MEV protection RPCs finds that not all order flow auction designs produce the same outcomes; design choices affect both execution quality and efficiency.
So the right mental model is not “private equals solved.” It is “private changes the attack surface.” Usually that is a meaningful improvement. Sometimes it also creates new dependencies.
How do MEV refunds work to return value to users?
Not every MEV protection system tries to eliminate extractable value completely. Sometimes that is impossible or undesirable. A large DEX swap may naturally create a backrun opportunity because it changes the price in a way an arbitrageur can use to realign markets. The question then becomes whether that value should go entirely to searchers and builders, or whether some of it can be returned to the user whose transaction created it.
This is where refund-based MEV protection comes in. Flashbots Protect states that users are automatically eligible for MEV refunds through MEV-Share, and that if a transaction creates MEV, the user can reclaim a significant portion while the remainder is split with searchers and validators to facilitate inclusion. The mechanism is important. Instead of exposing the full transaction publicly and letting a blind race determine who captures value, the system can selectively share some transaction information and run a controlled process in which searchers compete to backrun or otherwise interact with the order flow, with part of the resulting value kicked back to the user.
That is a different philosophy from pure concealment. Pure concealment says: hide the transaction so harmful extraction cannot happen. Refund systems say: some extraction may still happen, but structure it so the user shares in the value rather than being purely prey.
This distinction matters because not all MEV is the same. A sandwich attack generally makes the user worse off. A benign backrun that arbitrages prices after the user’s swap may not worsen the user’s execution if the user’s own trade is preserved, yet it still generates value. MEV protection in practice often tries to suppress the first kind and internalize part of the second.
How do privacy 'hints' change the tradeoff between privacy and refunds?
| Hint set | Shared data | Privacy level | Refund chance | Best for |
|---|---|---|---|---|
| Max privacy | hash only | Very high | Very low | Privacy-sensitive users |
| Default | hash + partial logs | Moderate | Moderate | Balanced protection |
| Max refund | calldata + contract + selector + logs | Low | High | Refund-seeking users |
Refund systems reveal a central tradeoff: privacy and monetization often pull in opposite directions. If searchers know more about your transaction, they can often identify more backrun opportunities and therefore offer larger refunds. But that same information sharing reduces privacy.
Flashbots documents this explicitly through configurable hints. A hint is a piece of transaction information shared with MEV-Share. Sharing more hints can increase refunds; sharing fewer hints can increase privacy. Their documentation describes a default mode that shares the transaction hash and partial logs for some swap types, a maximum-privacy mode that shares only the hash, and a maximum-refund mode that shares calldata, contract address, function selector, and logs.
This is one of the most useful places to be exact, because many readers implicitly assume privacy is binary. It is not. In these systems, privacy is often granular. You can reveal just enough for searchers to know that “a swap happened in this pool” without revealing every detail up front. That is not perfect secrecy, and it is not equivalent to public broadcast. It is selective disclosure.
The analogy is a sealed-bid process where participants are told something about the item being sold, but not everything. That analogy helps explain why more information can improve bids. Where it fails is that transactions are not static objects. They interact with changing on-chain state, and the act of sharing information can itself alter strategic behavior.
What are order flow auctions and how do they protect order flow?
Once you see MEV as a competition for transaction ordering rights, order flow auctions become easier to understand. The system does not merely hide transactions. It sells or allocates the right to interact with them under constrained rules.
Research on private RPCs describes these systems as conducting order flow auctions to capture MEV backrun rebates and gas rebates. The economic intuition is straightforward. A user’s order flow can be valuable. If that value will exist anyway, an auction can force searchers to compete for it and return part of the proceeds to users, wallets, or applications.
More advanced research pushes this idea further. The PROF architecture, for example, proposes protected order flow that privately sequences bundles and preserves user-specified ordering through to block production while making inclusion profitable for proposers in PBS-based systems. The important contribution is not a specific implementation detail. It is the recognition that protection must respect incentives all the way through the block-building pipeline. If validators or proposers lose revenue by including protected flow, protection will be fragile. If protected flow increases their per-slot revenue, it has a chance to persist.
That is a recurring theme in MEV protection: good intentions are not enough. The mechanism has to fit the incentives of builders, relays, validators, and searchers, or it will be bypassed by the market that actually produces blocks.
Why does proposer-builder separation (PBS) change MEV incentives?
| Model | Who builds | Trust assumptions | Censorship risk | Deployability |
|---|---|---|---|---|
| Local building | Validator builds locally | Low external trust | Low to medium | Widely supported now |
| MEV-Boost (PBS) | Competitive builders via relays | Relays and builders trusted | Medium to high | Out-of-protocol; already deployed |
| In-protocol PBS | Protocol-enforced builders | Lower trust assumptions | Lower if well-designed | Needs protocol change |
To understand modern MEV protection on Ethereum, you need a basic picture of proposer-builder separation, or PBS. In the PBS model used by MEV-Boost, validators do not always build blocks locally. Instead, builders construct candidate blocks, relays verify and forward blinded headers, and middleware selects the most valuable payload for the proposer. Flashbots’ documentation describes this as an out-of-protocol form of PBS in which a competitive builder marketplace supplies blocks.
This matters because MEV protection no longer operates in a world where “the validator” is the only relevant actor. There is now a market structure between the user and final inclusion. Users and searchers send transactions through public or private pools; builders assemble execution payloads; relays verify them; MEV-Boost selects among bids; proposers sign blinded payloads and then receive the full block body.
That architecture can reduce some forms of validator-side centralization, but it also creates new choke points. Relay trust matters. Builder concentration matters. Exclusive order flow deals matter. Research on Ethereum block-building auctions finds substantial concentration among a small number of builders and shows that access to differentiated or exclusive order flow correlates with market share and profitability. In plain language: if a few actors get the best private transaction flow, they get better blocks; because they get better blocks, more order flow comes to them.
That feedback loop is one reason MEV protection is not just a user-safety feature. It is also part of a larger struggle over who controls transaction supply.
What trust, censorship, and outcome risks come with MEV protection?
MEV protection always depends on assumptions, and the most important failures happen when readers forget which assumptions they are making.
If you use a private RPC, you are assuming the operator and its downstream partners behave as claimed. Flashbots states, for example, that Protect RPC does not track or log user information. That may be sufficient for many users, but for high-assurance settings it remains a service-provider claim, not a protocol theorem. More broadly, private routing asks you to trust that your transaction will be handled according to the stated rules and not leaked, delayed, or used against you.
You are also assuming inclusion paths remain open. In PBS markets, relays and builders can become concentrated. Some of that concentration has already been measured empirically. Concentration raises ordinary market-power concerns, but in this setting it also raises censorship concerns. Reporting on Ethereum’s MEV-Boost era documented periods in which major relays or builders excluded certain sanctioned transaction types, showing that a system designed partly to manage MEV can also become a policy enforcement layer.
There is another subtle failure mode: execution quality can vary a lot across providers. Research benchmarking private MEV-protection RPCs finds heterogeneous outcomes across order flow auction implementations. That means choosing an MEV protection RPC is not like choosing between identical pipes. The auction design, relay access, builder relationships, and disclosure policy can materially affect whether a transaction lands quickly, gets a refund, or executes well.
So the right question is not “does this provider offer MEV protection?” but “protection against which attacks, under which trust assumptions, and with what execution tradeoffs?”
How does MEV protection appear on other chains like Solana and Cosmos?
Ethereum is where the vocabulary is most developed, but the underlying problem is broader. Any chain with visible pending order flow or concentrated transaction sequencing can face analogous issues.
On Solana, the details differ because the network architecture and transaction pipeline differ, but the same underlying pressure appears: low-latency access and transaction ordering create value. Jito’s infrastructure illustrates this in product form, offering bundles with MEV protection, fast transaction landing, multi-transaction support, and revert protection. The mechanism is not documented there with the same depth as some Ethereum systems, so one should not overclaim the guarantees. Still, the pattern is recognizable: protected submission paths and bundle-oriented inclusion attempt to reduce harmful extraction and improve landing quality.
In Cosmos-style environments, Zenith offers yet another variation: a market for block space where participating validators delegate block production to an external system, searchers submit bids, winning bids are prioritized, and blocks are built by combining bids with mempool transactions under explicit payment and ordering rules. That is not “private RPC protection” in the narrow wallet-setting sense, but it addresses the same root problem by formalizing how valuable ordering is sold and constrained.
These examples matter because they show MEV protection is not one product category. It is a family of responses to the same structural fact: when transaction ordering has economic value, systems will either let that value be extracted chaotically or try to channel it through rules.
When should users enable MEV protection for DeFi actions?
In practice, users reach for MEV protection when they care about execution quality more than raw transparency. The most obvious case is a DEX swap large enough to be sandwiched. But the same logic applies to liquidation-related transactions, arbitrage strategies that depend on atomicity, multi-step DeFi interactions that should revert if incomplete, and wallet flows where users would rather avoid paying for failed execution.
That is why many protection services advertise not only frontrunning resistance but also revert protection, gas-fee refunds, and configurable privacy. These are not random add-ons. They all respond to the same reality that DeFi transactions are conditional financial actions, not just state updates. If the action fails, if it leaks too early, or if it creates value that others capture first, the user’s economic result changes.
The users also vary. A retail trader may simply toggle a protected RPC to avoid sandwich attacks. A wallet may integrate multiple private endpoints to route user transactions more safely while preserving observability. A sophisticated trading system may submit bundles or use protected order flow because it needs stronger guarantees about sequencing and atomic inclusion. The shared need is control over how execution information is exposed.
Conclusion
MEV protection is not a single defense but a redesign of the transaction path before ordering turns into execution. Its core purpose is to stop early visibility and order-control from being used against the user; or, when some value cannot be eliminated, to return part of it to the user instead of leaving it entirely to intermediaries.
The durable way to remember it is simple: in DeFi, the problem is often not that markets are transparent, but that they are transparent too soon. MEV protection works by delaying, limiting, or restructuring that transparency so the transaction can be executed under better rules.
How do you trade through a DEX or DeFi market more effectively?
To trade through a DEX or DeFi market more effectively, focus on execution quality: check liquidity, choose the right order type, and limit price impact before you submit. On Cube Exchange, you fund your account and then place orders or transfers that match your execution needs while controlling slippage and fees.
- Fund your Cube account with fiat or a supported crypto transfer.
- Verify on-chain liquidity for the pair you plan to trade (pool depth or recent trade size) and pick an order type: use a limit order for price control or a market order for immediate execution.
- Set slippage tolerance and a deadline suited to the pool’s volatility; for large sizes, split the trade into smaller limit orders to reduce price impact.
- Review estimated fees, expected fill, and network confirmations, then submit the order and monitor on-chain confirmations until the trade finalizes.
Frequently Asked Questions
- How do private RPCs actually stop sandwich attacks and other mempool frontrunning? +
- Private RPCs prevent common sandwich and mempool frontrunning attacks by sending signed transactions into a non-public relay or builder path instead of gossiping them in the public mempool, so searchers monitoring pending public transactions do not get a pre-inclusion view to react to.
- If I use a private RPC, am I guaranteed censorship-resistance and fair ordering? +
- No — private routing reduces attacks dependent on public observability but does not guarantee fair ordering, censorship-resistance, or identical execution quality; the operator, relays, and builders still control visibility and selection and can prioritize, exclude, or favor transactions according to their policies.
- What are MEV refunds and when will I actually receive one? +
- Refund systems (e.g., Flashbots’ MEV refunds) let a user reclaim part of value generated when their transaction creates MEV by having searchers/validators compete under controlled rules and return a portion to the user, but refunds are conditional — they apply only if the transaction actually creates MEV and according to provider eligibility rules rather than being universal.
- What is proposer-builder separation (PBS) and why does it matter for MEV protection? +
- Proposer-builder separation (PBS) splits block construction (builders) from block signing (proposers/validators) so builders assemble payloads and relays forward them for proposers to select, which matters because it inserts new market actors and incentives into the inclusion path that MEV protection mechanisms must align with to be effective.
- Can MEV protection infrastructure make censorship or centralization worse? +
- Yes — concentrating private order flow in a few relays or builders can increase market power and has been empirically observed, and centralized relays have in practice excluded sanctioned transaction types, showing that protection infrastructure can introduce censorship and centralization risks.
- How does sharing privacy 'hints' change the tradeoff between privacy and refund size? +
- Sharing more hints (calldata, contract address, function selector, logs) increases the information searchers can use to identify lucrative interactions and therefore tends to produce larger refunds, while sharing fewer hints improves privacy but usually lowers refund potential; privacy here is granular, not binary.
- When would a refund-based MEV protection approach be better than simply hiding transactions? +
- Refund-based protection is preferable when some extractable value is unavoidable or benign (for example, a backrun arbitrage that doesn’t worsen the user’s execution), because it structures competition so the user recovers part of the value instead of being fully preyed upon — pure concealment instead aims to stop harmful strategies that rely on early visibility.
- Are MEV protection promises (like 'no logs' or 'no leaks') protocol guarantees or service-provider claims? +
- MEV protection guarantees are generally provider or design-dependent rather than protocol-level theorems; private RPCs and relays make service-provider claims about logging, inclusion, and privacy, so users rely on trust assumptions and operational behavior rather than immutable protocol guarantees.
Related reading