Learn · Execution
What is MEV and how does sandwiching work?
MEV — maximal extractable value — is the profit that can be captured by controlling the order of transactions in a block. On public blockchains your pending swap is visible before it confirms, and specialized actors compete to reorder, insert, or front-run transactions for gain. The most common form ordinary traders meet is the sandwich attack. This article explains where MEV comes from, how a sandwich works step by step, and the concrete habits that reduce your exposure.
Where MEV comes from
How a sandwich attack works
Why slippage settings matter here
How to reduce your exposure
MEV is not unique to one chain
Legal
Risk disclosure
XAUConnect is a non-custodial swap aggregator. Digital assets are volatile and may lose value rapidly. Content on this page is educational and not investment advice. Verify every contract address on the official block explorer before approving a transaction.
Frequently asked questions
What is MEV in simple terms?
The profit available from controlling the order of transactions in a block. It ranges from harmless arbitrage to predatory tactics like sandwich attacks aimed at your trade.
How does a sandwich attack work?
An attacker buys just before your trade to push the price up, lets your trade fill at the worse price, then sells right after — capturing the difference your slippage allowed.
How do I protect myself from sandwiching?
Keep slippage tight, split large trades, use MEV-protected or private submission where available, and re-quote before signing.
Does MEV exist on every chain?
It is most associated with public-mempool EVM chains. Different networks and submission methods change how exposed your trade is, but ordering value exists broadly.
Trade on XAUConnect
Open the swap page to compare live routes, set slippage, and sign from your own wallet — fully non-custodial.
Continue exploring
Related markets, guides & networks
Curated next steps based on this topic — deepen your research before you trade.
How do cross-chain bridges work?
Bridges move value between networks using lock-and-mint, burn-and-release, or liquidity networks. The trade-offs, the ri
Why locked liquidity matters
Liquidity locks and how they reduce (but don't eliminate) rug risk. How to verify a lock, read the unlock date, and weig
What is an automated market maker (AMM)?
AMMs replace order books with liquidity pools and a pricing formula. Constant-product math, why prices move per trade, a
Build programmatically
Swap via API for bots and AI agents — quotes, builds, and cross-chain routes.