JIT Liquidity
Just-in-time (JIT) liquidity is a Uniswap V3-specific MEV strategy where a bot adds concentrated liquidity to a pool immediately before a large incoming swap, collects the swap fees, and removes the liquidity in the same block. Unlike sandwich attacks, JIT doesn't harm the victim — the user's trade still executes at their expected rate. The bot earns the LP fees that would otherwise have gone to passive liquidity providers. JIT only works on Uniswap V3's concentrated-liquidity model (introduced May 2021), because legacy AMMs like Uniswap V2 spread liquidity uniformly across all prices, making single-block liquidity provision unprofitable. Top JIT operators on Ethereum extract $5–10 million per year in fee capture, with the largest single bot (contract 0x0000…dead) accumulating roughly 1,800 ETH since 2022.
JIT is strictly more profitable than sandwiching for very large swaps because the LP fee captured is larger than the price-manipulation profit a sandwich would extract, while consuming roughly the same gas. JaredFromSubway pioneered combining JIT with sandwich attacks (the "swap-JIT" technique) for three simultaneous revenue streams. This guide explains how JIT works on Uniswap V3.
- What is JIT liquidity?
- How JIT works on Uniswap V3
- JIT vs sandwich — when each wins
- The infrastructure required for JIT
What is JIT liquidity?
JIT liquidity exploits Uniswap V3's concentrated liquidity model. In V3, LPs can provide liquidity to a specific price range; LP fees are earned only when trades pass through that range. A JIT bot watches the mempool for large pending swaps, computes where the swap will move price, adds a very tight concentrated-liquidity position around that price range, lets the swap execute (collecting the fees on that swap), and removes the liquidity all in the same block. Because the liquidity was only in the pool for one block, passive LPs earned nothing from that swap — the JIT bot captured it all.
How JIT works on Uniswap V3
The atomic bundle:
- Detect: the bot sees a large pending swap on a Uniswap V3 pool (e.g., 100 WETH for USDC on the WETH/USDC 0.05% pool). Mempool decoder confirms it's a swap, computes the input/output, and estimates the post-swap price.
- Add: bot mints a concentrated liquidity position spanning the pre-swap to post-swap price range — calling UniswapV3Pool.mint() directly with a custom callback (bypassing NonfungiblePositionManager for gas savings).
- Victim: the user's swap executes, paying fees to whoever holds liquidity in the active range. Because the bot just added a large position there, the bot earns most of the fees.
- Burn: bot removes the liquidity via UniswapV3Pool.burn() + collect(), recovering the original capital plus the LP fees earned on the swap.
The three transactions (mint, victim swap, burn) land atomically as a bundle. If any leg fails, all of them revert. The bot risks nothing — at worst, gas + zero profit.
JIT vs sandwich — when each wins
For small swaps (under ~$100k), sandwich attacks win on profit per bundle. The price impact of small swaps is small in absolute terms, so the LP fee a JIT could capture is also small.
For large swaps (over ~$500k), JIT wins. Large swaps generate large LP fees in absolute terms, often exceeding what a sandwich could extract through price manipulation. JIT also doesn't require the victim to have generous slippage — it works regardless of the victim's slippage tolerance.
For the middle range (~$100k–$500k), the choice depends on pool depth, gas conditions, and competition. Production bots like JaredFromSubway dynamically choose per opportunity — sometimes both at once via the swap-JIT combo described on the sandwich attack page.
The infrastructure required for JIT
JIT requires the same low-latency mempool monitoring as other MEV strategies, plus a substantial capital reserve. Unlike sandwich attacks where the bot capital is briefly committed across three transactions, JIT requires the bot to hold the full liquidity position for one block — which can be hundreds of thousands of dollars depending on the target swap. JIT also requires Uniswap V3 expertise: tick math, fee tier selection, custom mint/burn callbacks, and integration with the bot's pool state cache. See the build a MEV bot guide for the full stack, or the buy MEV bot page for licensing the existing JIT-capable infrastructure.
Further reading and references
- Uniswap V3 whitepaper — Concentrated liquidity model that makes JIT viable as a strategy.
- Paradigm: JIT liquidity analysis — Analysis of Uniswap V3 mechanics that enable just-in-time liquidity provision.
- Flashbots MEV-Inspect (JIT classification) — Open-source pipeline that attributes JIT liquidity events on Ethereum mainnet to specific operators.