Skip to content
Finance Lessons

On-chain Arbitrage & Cross-DEX MEV

The On-chain Arb Mindset

Relative value ported to a venue with no shorting and atomic settlement: why on-chain arbitrage is both safer than TradFi stat-arb (no inventory risk) and harsher (you compete in an auction you usually lose).

9 min Updated Jun 18, 2026

You already know how prices should line up: the same asset shouldn’t trade at two different prices at the same instant. On-chain, that old TradFi instinct survives — but the venue it lands in is so different that the trade changes shape, sheds some risks, and grows a brand-new one. This lesson rewires the pairs-trading instinct for a world of automated market makers, all-or-nothing transactions, and an auction you mostly lose.

Relative value, ported to a hostile venue

Before you read — take a guess

An arbitrageur sees ETH at 2000 USDC on DEX A and 2010 USDC on DEX B. In classic pairs trading, you'd profit when the two prices reconcile. On-chain, what actually causes them to reconcile?

In a classic pairs trade, you spot two prices that must belong together — two share classes of the same company, gold in London versus gold in New York — and you bet they’ll reconcile. In TradFi, you then wait, because convergence is a market force: other people’s flow eventually drags the prices back together.

On-chain, the twist is brutal and beautiful: convergence isn’t a force you wait for — it’s a thing your own trade does. A decentralized exchange (DEX) using an automated market maker (AMM) prices an asset purely from the ratio of tokens in its pool, following the constant-product rule xy=kx \cdot y = k. When you buy ETH from the cheap pool, you remove ETH and add USDC, walking the price up the curve. When you sell into the dear pool, you push its price down. The gap closes because you traded, not because the market felt like it.

Your trade walks the price along the curvex · y = 20,000,000
ETH reserve (x)USDC reserve (y)
X sold in
0
Y received out
0
Old spot price
2,000
New spot price
2,000
Constant product k100 × 200,000 = 20,000,000100 × 200,000 = 20,000,000

An AMM prices from reserves alone. Sell more ETH into the pool and you slide down the curve — each unit you sell gets a worse price. That self-impact is exactly what closes an arbitrage gap: the act of arbitraging moves the price toward fair value.

So define it precisely. On-chain arbitrage is a relative-value trade (you bet two prices that should match will match), it is market-neutral (you don’t care if ETH goes up or down, only that the two venues disagree), and it is self-closing (the very trade that captures the gap also erases it).

Match each property of on-chain arbitrage to what it means.

Pick a term, then click its definition.

Warning:

Convergence isn't free — you paid for it

The romantic image is “prices snap back to fair value.” The unromantic reality: you moved them, and each unit you traded got a slightly worse price than the last (that’s the curve bending away from you). The gap you actually capture is smaller than the gap you saw on screen. More on that “slippage” tax later.

When it matters

Every other lesson in this topic is a special case of this one idea. Cross-DEX, triangular, and sandwich plays are all just which prices you bet must reconcile and how you route the trade to force it. Get the mindset — relative value, market-neutral, self-closing — and the rest is plumbing.

No shorting, so the trade changes shape

Before you read — take a guess

A TradFi stat-arb desk goes long the cheap leg and short the dear leg. On most DEX venues you cannot borrow-and-sell. How does on-chain arbitrage capture a price gap instead?

In TradFi statistical arbitrage, the two-legged shape is the whole point: long the underpriced leg, short the overpriced leg, and you’re hedged against the broad market. To short, you borrow the asset and sell it, promising to return it later.

On most DEX venues there’s no native borrow-and-sell mechanism. So arbitrage goes long-only and changes shape: instead of holding a long leg and a short leg, you buy where it’s cheap and sell where it’s dear in the same breath, routing the same units straight through. You never hold a naked short; you round-trip.

TradFi stat-arbOn-chain arbitrage
LegsLong cheap and short dearLong-only round-trip
Holding periodHours to weeksOne transaction
CapitalMargin / borrowed sharesOften a flash loan
Market exposureHedged via the short legNeutral by closing instantly

Where does the capital come from if you can’t short and don’t want to tie up your own millions? Flash loans (previewed here, taught in depth later): you borrow a large amount with no collateral, on the condition that you repay it within the same transaction. It substitutes for leverage — you wield big size for a few milliseconds, then give it all back, keeping only the spread.

Fill in how the trade shape differs.

Pick the right option for each blank, then check.

Because most DEX venues offer no native shorting, on-chain arbitrage is , capturing the gap by buying cheap and selling dear in , often funded by a .

Info:

Long-only isn't the same as bullish

You’re long the asset for an instant, but you immediately sell it on the other venue — your net exposure rounds to zero. Long-only describes the mechanics of capture, not a bet on the asset going up.

When it matters

The no-shorting constraint is why on-chain arb is so often paired with flash loans, and why “do you have the inventory?” stops being the binding question. The binding question becomes “can you route the buy and the sell so the whole thing nets a profit?” — which is the next section.

Atomic settlement: the gift and the catch

Before you read — take a guess

An on-chain arbitrage bundles a buy and a sell into one atomic transaction. The buy fills, but by the time the sell would execute, the gap is gone and the trade would lose money. What happens?

Here’s the part that should make a TradFi trader jealous. On-chain, you can bundle every leg into one atomic transaction. Atomic means all-or-nothing: either every step succeeds and settles together, or the whole thing reverts and it’s as if nothing happened (you forfeit only the gas — the small fee to attempt it).

That’s the gift. If any leg would be unprofitable — the gap closed, someone front-ran you, the route turned sour — the transaction reverts and you walk away clean. There is no inventory risk (you never get stuck holding the asset), no leg risk (you can’t get one leg filled and the other rejected), and no overnight risk (nothing carries to the next block). You either grab the spread or you grab nothing.

Contrast TradFi execution. To arbitrage gold between London and New York, you sprint: buy in one venue, then race to sell in the other while holding inventory in between. Prices move during the sprint. The other leg might slip, or fail, or fill at a worse price. You wear that risk on your own balance sheet.

Sort each risk by whether atomic on-chain settlement removes it or a TradFi sprint still carries it.

Place each item in the right group.

  • The price moves against you during the round-trip
  • One leg fills, the other is rejected
  • Overnight exposure carried to the next session
  • Inventory risk while holding the asset between legs
Warning:

The catch hides in plain sight

Atomicity removes execution risk, but it adds a constraint: the entire trade must clear inside one transaction that you don’t get to order. You can compose the perfect bundle and still never land it — because when and whether your transaction enters the block isn’t yours to decide. That’s the whole next section.

When it matters

Atomicity is why beginners over-estimate on-chain arb (“free money, no risk!”) and pros don’t. The risk didn’t disappear — it moved, from “will my legs fill?” to “will I win the right to be included, and at what cost?”

You don’t set the order — someone auctions it

Before you read — take a guess

You've built a flawless atomic arbitrage. Who decides whether your transaction actually lands in the block, and in what position relative to competitors?

You spotted the gap. You built the perfect atomic bundle. And now the cruelest fact in the business: you don’t set the order. In this game you’re a searcher — you find and assemble the opportunity — but the right to order transactions inside a block belongs to builders and validators (exactly the MEV-and-ordering machinery you met earlier). They run an auction for that ordering, and you have to bid to win your spot.

This is why so many beautiful arbitrages revert into thin air: someone bid more to be placed ahead of you, took the gap first, and your transaction — arriving a position too late — finds nothing left and reverts. The opportunity was real; the right to act on it first was the scarce thing, and it was auctioned away.

Worse, the auction is competitive enough that it bids most of your profit away. If a gap is worth 100 USDC, rival searchers will keep raising their bids to the ordering layer until almost all of that 100 is paid out as priority fees / bribes — whoever is willing to keep the least sliver wins. That whole cost stack (gas, priority fees, builder payments, and the slippage from earlier) is a later lesson; for now, just internalize the shape: gross edge minus the auction equals your take, and the auction is hungry.

Fill in who controls ordering and what it costs you.

Pick the right option for each blank, then check.

In on-chain arbitrage you're a who assembles the trade, but the right to order it belongs to . Because that ordering is , competition bids away your gross profit.

Tip:

The mindset, in one line

On-chain arb is safer than TradFi stat-arb on the dimension everyone fears (no inventory, leg, or overnight risk — thanks, atomicity) and harsher on a dimension TradFi barely has: you compete in an auction for ordering that you usually lose. Master both halves and you understand why this is a margin business, not a magic one.

When it matters

This reframes the entire topic. “Find the gap” is the easy 10%. “Win the right to act on it before everyone else, and still keep a profit after the auction” is the hard 90% — and it’s what the cost-stack and bidding lessons drill into next.

Recap

Big picture

The on-chain arb mindset

  • On-chain arb mindset
    • Relative value
      • Bet two prices reconcile
      • Market-neutral
      • Self-closing trade
    • No shorting
      • Long-only round-trip
      • Buy cheap sell dear
      • Flash loans for size
    • Atomic settlement
      • All-or-nothing
      • Reverts if unprofitable
      • No inventory risk
    • You dont order it
      • You are a searcher
      • Builders order blocks
      • Auction eats the edge
Relative value ported to a venue with no shorting and atomic settlement, where ordering is auctioned away.

Check the mindset

Question 1 of 50 correct

On-chain, what forces two disagreeing DEX prices to converge?

Check your answer to continue.

Mark lesson as complete