Chainsight Profile picture

Nov 10, 2021, 16 tweets

We previously shared that @Uniswap v3 enables a new type of MEV attack — Just-in-Time (JIT) Liquidity Sandwiching, which has siphoned >$1M USD in profits away from non-mempool-aware Uniswap v3 LPs. Reactions to this discovery have been mixed... 👇
dune.xyz/ChainsightAnal…

From @Uniswap — "it's a powerful feature", "LPs should plan accordingly", to...

From @CurveFinance

From anon —

Despite these mixed reactions to JIT attacks—and there's likely no singular 'right' answer to this type of MEV—here's how we envision JIT developing:👇🧵

1/ First, why is JIT an attack? Simple - the trade that ends up being sandwiched by JIT bots would never have been executed in the first place without the passive Uni v3 LPs being there first, providing a valid trade route. Without initial LPs, the trade is never even routed.

2/ The very definition of an attack is to take an aggressive action against another. JIT bots view the mempool to take profit from pre-existing LPs. As such, LPing on Uniswap v3 is now an adversarial environment; to describe JIT as anything other than an attack would be incorrect

3/ Not only that, JIT bots are getting more efficient, improving their profit ratio over time. They are learning how to do this better and better: dune.xyz/embeds/233623/…

4/ How can non-mempool-aware LPs fight back? Does @VisorFinance help? Visor is hardly an active LP, updating its WETH-USDC tick once in the last 2 weeks. @VisorFinance also has no strategies that are mempool-aware. As such, LPs on Visor will still be vulnerable to JIT attacks.

5/ L2s will only make JIT attacks more prevalent. The only barrier to JIT attacks is gas cost. If L2's reduce gas cost even 90%, L2's will allow the present JIT MEV bot profit ratio to explode to over 100x as more JIT opportunities become available dune.xyz/embeds/233623/…

6/ Another interesting solution are private mempools (@EdenNetwork, @bertcmiller). If a trade that is JIT'able is never publicly transmitted, it cannot be attacked. But this goes against a core tenet of Ethereum, decentralization, as private mempools introduce centralized actors

7/ Perhaps @chainlink's Fair Sequencer can help prevent JIT Liquidity Sandwiching? However, this solution still seems far off. Maybe in a few years.
blog.chain.link/chainlink-fair…
@ChainLinkGod

8/ What happens when non-mempool-aware LPs begin to withdraw their liquidity on L2 Uniswap v3 due to rampant JIT attacks and resultant impermanent losses? One envisions a scenario where @Uniswap Team/VCs must subsidize the base level liquidity themselves to provide valid routing

@Uniswap 9/ That scenario would be quite disappointing, considering that @Uniswap v2 and DeFi has so far freed the masses from the sophisticated actors of TradeFi. However, JIT attacks clearly only benefit those with institutional advantage, like HFT firms and exclusive trading outfits

@Uniswap 10/ Despite their age, @Bancor, @Curve and Uniswap v2 style AMMs do not suffer from JIT Liquidity attacks. Does this mean L2 @Uniswap v3 is doomed for failure? Probably not. But JIT presents a problem that can be solved in the future, and we are excited to see solutions presented

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling