What Is a “Just-in-Time” (JIT) Liquidity Attack and How Does It Exploit the AMM Structure?
A JIT liquidity attack is a form of MEV where a bot detects a large trade in the mempool and quickly adds a large amount of liquidity just before the trade executes. This temporarily lowers the slippage and allows the large trade to execute at a better price.
Immediately after the trade, the bot removes the liquidity, capturing the trading fees generated by the large trade and the slight profit from the price change, all while exposing the liquidity for only a single block.