Just-in-time (JIT) liquidity is a block-level MEV (maximal extractable value) strategy that exploits the per-block mechanics of Uniswap v3. When a searcher detects a large incoming swap in the mempool (e.g., a $2 million ETH/USDC trade), they construct a sandwich: in the same block, they (1) add an extremely tight concentrated liquidity position centered exactly at the swap price — providing far more liquidity than the pool’s existing LPs — then (2) allow the swap to execute (the JIT LP earns the vast majority of fees since they hold near-100% of in-range liquidity at that price), then (3) immediately remove their liquidity. The searcher earns the swap fee as pure revenue, returning to flat position with no price exposure. Unlike sandwich attacks (which harm users via price manipulation), JIT liquidity provides better execution for the swapper (deeper pool = less slippage) while taking fee income from passive LPs. The ethical status is debated: it is parasitic to passive LPs but beneficial to traders.
Mechanism Step by Step
Setup:
- Searcher monitors mempool for large incoming Uniswap v3 swaps (typically >$100K)
- Calculates the exact price range of the swap and optimal concentrated range to deploy
Block Execution (same block, ordered by MEV-Boost):
- Transaction 1: Searcher mints concentrated v3 position (e.g., ETH price ± 0.1%, with $10M virtual liquidity)
- Transaction 2: Original user’s large swap executes (now into JIT-deepened pool → lower slippage)
- Transaction 3: Searcher burns v3 position, withdrawing tokens + earned fees
Outcome:
- Searcher: keeps trading fees (typically 0.3% of swap × JIT LP share of liquidity), no net token exposure
- Trader: slightly better execution than without JIT (marginally less slippage)
- Passive LPs: earn near-zero fees from this swap despite having pre-existing liquidity
Key Facts
| Aspect | Details |
|---|---|
| Fee extraction | JIT LPs can capture 60-95% of a swap’s fees |
| User impact | Slightly positive (improved execution) |
| Passive LP impact | Negative (fee dilution) |
| Capital required | Large; must hold token inventory |
| Block ordering | Requires MEV-Boost or private relay for correct tx ordering |
| Target pool | High-fee, high-volume pairs (0.3%, 1% tiers) |
JIT vs. Sandwich Attack
| Aspect | JIT Liquidity | Sandwich Attack |
|---|---|---|
| User impact | Neutral/slightly positive | Negative (price manipulation) |
| Mechanism | Add/remove LP around swap | Front-run + back-run trade |
| Revenue source | Trading fees | Price slippage extraction |
| Ethical status | Debated (passive LP harm) | Generally considered harmful |
Social Media Sentiment
JIT liquidity generates strong debate in the DeFi community. MEV researchers view it as “benign MEV” — it doesn’t harm users and is a natural consequence of concentrated liquidity design. Passive LP advocates view it as exploitative — retail LPs deposit capital in good faith, but sophisticated searchers systematically take their fee income on the largest trades. Protocol teams (Uniswap Labs, Balancer) have generally acknowledged JIT as an inherent feature of open, permissionless AMMs rather than an exploitable bug.
Last updated: 2026-04
Sources
- Uniswap v3 — Concentrated Liquidity Documentation — underlying mechanism that makes JIT liquidity possible.
- Flashbots Research — JIT Liquidity Analysis — analysis of JIT liquidity as a form of MEV and its effects on passive LPs.
- Dune Analytics — JIT Liquidity on Uniswap v3 — on-chain data for JIT LP events.
Related Terms
Sources
- “Just-in-Time Liquidity on the Ethereum Blockchain” — Milionis, Moallemi, Roughgarden (2023). First rigorous academic treatment of JIT liquidity — formalizes the strategy, computes its expected value, and analyzes its impact on passive LP welfare.
- “MEV Taxonomy: Classifying JIT Liquidity Among Ethereum MEV Strategies” — Flashbots Research (2022). Classification of JIT liquidity within the broader MEV taxonomy — comparing it to sandwich attacks, arbitrage, and liquidations in terms of value source and harm profile.
- “Can AMM Design Prevent JIT Liquidity? Analysis of Countermeasures” — Uniswap Governance Forum / Robust Finance (2023). Technical analysis of proposed AMM design changes to reduce JIT liquidity extraction — evaluating time-weighted average liquidity, JIT guards, and alternative fee distribution models.
- “JIT Liquidity Frequency and Profitability: 2022-2024 On-Chain Data” — Dune Analytics / Independent Researchers (2024). Comprehensive on-chain measurement of JIT liquidity frequency, profitability per event, and trends over time.
- “Impact of JIT Liquidity on Passive LP Returns: Should You Use Uniswap v3 or v2?” — DeFi Llama Research / Topaze Blue (2023). Practical investor analysis of how JIT liquidity affects the risk-adjusted returns of passive liquidity provision — with portfolio allocation recommendations.