How Money Moves
Liquidity, routing, and value extraction in DeFi
AMMs, bridges, intent-based routing, and MEV — the full stack of how value flows across chains.
What liquidity is
Liquidity is not volume. A market can trade enormous volume while remaining deeply illiquid — think a single whale rotating through their own positions. Practically, liquidity is the ability to convert an asset into another at a predictable price. The more liquid a market, the smaller the gap between what you expect to pay and what you actually pay.
The bid-ask spread is the price of liquidity. On Coinbase, the BTC/USD spread is a fraction of a cent. On a small-cap DeFi token with a thin Uniswap pool, that same spread might be 1–2%. Every trade crosses that spread. In liquid markets, it's invisible. In illiquid ones, it's a meaningful tax on every entry and exit.
Slippage and market depth
Slippage is the difference between the expected price of a trade and the executed price. Trading $100K of a small DeFi token moves the price significantly — the pool has to rebalance to absorb the trade, and you're paying for that rebalancing. Trading $100K of BTC on Binance barely registers. The difference is depth: how much capital is sitting near the current price, ready to absorb flow.
This is why TVL as a protocol health metric is often misleading. $100M TVL in a Uniswap v3 position concentrated in the $1,900–$2,100 range for ETH/USDC is far more liquid for practical trades than $100M spread across a custom pool with no range bounds. The concentrated position provides depth exactly where trading happens. The unbounded position provides almost none at any specific price.
Why liquidity is load-bearing for DeFi
Every layer of the DeFi stack depends on liquidity underneath it. Lending protocols require that collateral be liquidatable — which requires that collateral be sellable at a predictable price. If ETH liquidity evaporates, an undercollateralized Aave position can't be closed without bad debt. AMMs require liquidity to set prices. Yield strategies require liquid exits when users redeem. The stack fails if the foundation thins.
This dependency is why liquidity fragmentation is a genuine systemic problem. ETH on Ethereum, ETH on Arbitrum, ETH on Base, WETH on Solana — the same underlying asset, four separate liquidity pools that cannot share depth. A large trade on Base can't absorb liquidity sitting idle on Arbitrum. As more chains launch, liquidity splinters further, and each fragment is thinner than what came before.
The mercenary capital problem
Liquidity is incentive-driven, and incentive-driven liquidity leaves when incentives end. The Sushiswap vampire attack on Uniswap in 2020 made this concrete: Sushi offered SUSHI token rewards to LPs who migrated from Uniswap. Within a week, approximately $1B in liquidity had moved. The pools followed the yield. Sustainable liquidity requires real fee revenue generated by real trading activity — not emissions that dilute token holders to pay for depth that evaporates the moment the program ends.
AMMs vs order books
For most of financial history, markets worked via order books: buyers post bids, sellers post asks, and market makers fill the spread. Nasdaq, NYSE, Binance, Coinbase — all order books. This model works beautifully on liquid assets where professional market makers compete to narrow spreads. It fails on long-tail assets where no market maker wants to commit capital.
DeFi needed a mechanism that could provide liquidity for arbitrary assets without requiring active market maker participation. The automated market maker solved this.
The constant product formula
Uniswap v2's core innovation was replacing the order book with a bonding curve: x * y = k. If a pool holds 1 ETH and 2,000 USDC, k = 2,000. A trade adding 0.1 ETH means USDC must shrink so the product still equals 2,000: the pool releases 2,000 − (2,000 / 1.1) ≈ 181.8 USDC. The execution price falls out of the math automatically. No counterparty, no order book, no market maker.
Any asset pair can be listed permissionlessly. Liquidity providers deposit equal value on both sides and earn a share of trading fees. The protocol runs continuously without human intervention. This is why AMMs unlocked the long tail of DeFi tokens — you don't need institutional market makers to list an asset.
Impermanent loss
LPs pay a price for providing liquidity. If ETH doubles in price, the constant product formula rebalances the pool to hold less ETH and more USDC — the mechanism is essentially automatic selling into the rally. An LP who deposited 1 ETH and 2,000 USDC would have been better off simply holding both. The difference in value between holding versus providing is impermanent loss. It's "impermanent" only if price returns to the entry ratio — which it often doesn't. For volatile pairs, IL frequently exceeds fee revenue, making LP positions net-negative.
Uniswap v3 concentrated liquidity
Uniswap v3 lets LPs specify a price range — say $1,800–$2,200 for ETH/USDC. Liquidity only earns fees when price is within range. The capital efficiency gain is substantial: a position covering a narrow stablecoin range might earn 50x more fees per dollar than a full-range v2 position. The trade-off is active management — when price moves out of range, the position stops earning entirely and accumulates IL. LPs must monitor and rebalance, which creates a market for automated LP management protocols (Arrakis, Gamma, Sommelier).
Curve and specialized invariants
Uniswap's constant product curve is not optimal for pegged assets. Curve uses a modified invariant that flattens near parity, dramatically reducing slippage for stablecoin swaps. A USDC/USDT trade on Curve has negligible slippage at large sizes because the math is designed for assets that should be equal. Curve carries roughly $2B in TVL and processes billions in stablecoin volume weekly. Its gauge system — where CRV rewards are directed by veCRV holders — also makes it the primary venue for protocols that need to bootstrap stablecoin liquidity, spawning the "Curve Wars."
Hybrid and order book models
Hyperliquid and dYdX bring order books on-chain for perpetuals — professional market makers compete in a familiar structure, achieving tighter spreads than any AMM could offer on high-volume instruments.
GMX takes a different approach: no AMM at all. Users trade against a shared liquidity pool using oracle prices directly. No slippage for the trader (they get the oracle price), but LPs are the counterparty to all trades — they profit when traders lose and bear losses when traders win.
Cross-chain bridges
Chains don't natively communicate. ETH on Ethereum is not the same asset as ETH on Arbitrum or Solana, even though they represent the same underlying. To use ETH on another chain, you need a bridge — a system that locks the original asset and mints a representative version elsewhere. Understanding how bridges work explains both their utility and why they are consistently the highest-value attack target in crypto.
Lock-and-mint
The canonical pattern: a bridge contract on Ethereum locks your ETH. A minting contract on Arbitrum issues the same amount of WETH. When you bridge back, the WETH burns and the original ETH unlocks. The bridge contract on the source chain holds custody of all locked assets — making it a single point of failure holding potentially hundreds of millions in value. This is why the Ronin ($625M), Wormhole ($320M), and Nomad ($190M) exploits were so damaging. The security of every bridged asset depends entirely on the security of the lock contract.
Canonical vs. third-party bridges
Canonical bridges (Arbitrum Bridge, Optimism Bridge, Polygon Bridge) are operated by the L2 itself and inherit its security model. They are the safest option for large amounts. The cost is speed: withdrawals from optimistic rollups take 7 days — the fraud proof window during which anyone can challenge an invalid state transition.
Third-party bridges (Across, Stargate, Synapse) maintain their own liquidity networks and validator sets. They offer fast transfers by accepting additional trust assumptions — you're trusting their validators, multisig, or relayer network instead of the L2 itself. The speed/security trade-off is explicit: faster means more trust required.
Across Protocol: intent-based bridging
Across represents the current state of the art in bridge design. The user signs a request to bridge rather than building a transaction that explicitly moves funds. A relayer fills the request immediately from their own capital — the user receives funds on the destination chain within seconds. The relayer is later reimbursed via the canonical bridge, settling with Ethereum-level security. The user gets speed; the relayer earns a fee; canonical security is preserved for actual settlement. This decouples UX from the underlying security model.
IBC: the principled design
The Inter-Blockchain Communication protocol in the Cosmos ecosystem is the most rigorous bridge design in production. Each chain runs a light client that verifies the other chain's consensus state directly — no external validators, no multisig, no trusted relayer. A cross-chain transfer is only accepted if cryptographic proof of the source chain's state is verified by the destination chain's light client. The trust assumptions reduce to the security of each chain's own consensus. The limitation is compatibility: IBC requires per-chain integration. It works natively within Cosmos SDK chains and is being extended to Ethereum via projects like Polymer.
Intent-based routing
Traditional DEX aggregators like 1inch and Paraswap compute an optimal swap route at request time, build a transaction, and have the user sign it. By the time the transaction executes, the route may be stale. MEV bots monitor the public mempool and can front-run or sandwich the trade before it lands. The problem is inherent to the model: you're committing to an explicit execution path in advance.
Intent-based routing flips this. Instead of specifying how to execute, you specify what you want: "I want 100 DAI for my 0.05 ETH, within 2% slippage, settled within 30 seconds." A network of solvers competes to fill that intent at the best price. You never see the routing; you just get the outcome.
CoW Protocol
CoW Protocol (Coincidence of Wants) takes its name directly from the economic concept. A CoW swap occurs when two users' intents match — Alice wants to swap ETH for USDC while Bob wants USDC for ETH in the same batch. CoW's solver network can settle them against each other directly, bypassing AMM fees entirely. Neither user pays the spread; both get better prices than they would on any on-chain AMM. When no matching intent exists, solvers route through on-chain DEXes. Because transactions are never exposed in the public mempool, MEV sandwiching is structurally impossible. CoW consistently achieves better execution than direct AMM swaps.
UniswapX and 1inch Fusion
UniswapX runs an off-chain Dutch auction: the price offered to fillers degrades over time until a filler accepts. The winning filler submits the transaction and pays gas. The user signs an off-chain EIP-712 permit — no gas, no mempool exposure until execution. If no filler accepts, the order falls back to an on-chain AMM.
1inch Fusion Mode uses the same model. Orders are signed off-chain; resolvers compete in a Dutch auction; the resolver offering the best price by the deadline fills the order. MEV protection is structural — the transaction doesn't exist in the public mempool until the solver submits a committed fill.
Trust surface and cross-chain intents
Intent systems require trusting the solver network not to censor orders or systematically fill at the bottom of acceptable ranges. Competition and on-chain verification minimize this risk — a solver that fills worse than competitors loses future order flow. But it's a different trust surface than direct DEX interaction, where execution is entirely on-chain.
The frontier is cross-chain intents. UniswapX extended its model to support fills across chains — a user specifies "ETH on Ethereum to USDC on Base" and a solver handles the entire path: bridging, DEX routing, and settlement. The user receives USDC on Base without ever touching a bridge UI or understanding how the transfer was executed.
MEV and flow capture
Maximal Extractable Value (MEV) is the profit available to anyone who controls transaction ordering within a block. Originally called "Miner Extractable Value," the term updated post-merge to reflect that validators and specialized block builders now hold this power on Ethereum. The underlying dynamic is unchanged: if you can see pending transactions and decide their order, you can profit from that position.
The attack taxonomy
Sandwich attacks are the canonical retail MEV. A bot monitors the public mempool, sees a large swap pending, and inserts a buy before and a sell after — sandwiching the victim's trade between two of its own. The bot profits from the price impact the victim's trade creates; the victim executes at a worse price. This is fully automated and runs continuously at scale.
Frontrunning is simpler: a bot sees a profitable transaction in the mempool — an arbitrage, a liquidation, a large market order — and submits an identical one with higher gas to get included first. The original transaction is displaced or executed at a worse price.
Backrunning arbitrage is net-neutral or positive for the ecosystem. When a large trade moves a pool's price, the pool is temporarily mispriced relative to other venues. Arbitrage bots insert transactions immediately after to capture this and restore the price. Users aren't harmed; price discovery improves. Most "good MEV" is backrunning.
Scale
Flashbots MEV-Explore estimated roughly $800M in MEV extracted on Ethereum alone in 2023. Cumulative extraction since 2020 is several billion dollars, the majority at the expense of retail traders who submitted transactions to the public mempool without protection. Sandwich attacks alone account for a significant portion — each represents a tax on the user's trade that flows to the sandwicher rather than the protocol or the user.
Flashbots and Proposer-Builder Separation
Flashbots addressed chaotic public mempool competition by creating a private channel: searchers bid for block inclusion directly with block builders rather than spamming the public mempool with high-gas transactions. MEV-Boost implements Proposer-Builder Separation (PBS) — the block builder role is separated from the validator role. Validators sign whichever block offers the highest bid; they don't build blocks themselves.
This professionalized MEV extraction and reduced network congestion, but centralized block production. Roughly five builders control over 80% of Ethereum blocks. The infrastructure is efficient but structurally concentrated.
Order Flow Auctions and SUAVE
Order Flow Auctions (OFAs) move the MEV supply chain upstream. Wallets like MetaMask sell users' order flow to solvers who fill it with MEV protection. Users receive better execution; the wallet earns revenue; the solver captures any remaining MEV before it reaches the public mempool. Controversial because it is essentially monetizing user transaction data — but the user outcome is measurably better than unprotected mempool submission.
SUAVE (Single Unified Auction for Value Expression) is Flashbots' proposed decentralized block building infrastructure. Still in active development. The goal is to decentralize the builder role that PBS centralized, creating a competitive market for block construction rather than a small oligopoly.