Chainsight Profile picture
Nov 10, 2021 16 tweets 10 min read Read on X
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...
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:👇🧵
Image
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. Image
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 Image
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. Image
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 Image
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 Image
@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 Image
@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

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Chainsight

Chainsight Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ChainsightLabs

Oct 12, 2022
1/ @GMX_IO's price oracle updates can be abused by toxic MEV bots, able to extract ~10% of total protocol profits (>$260,000 over last 40 days).

Bots viewing the @avalancheavax mempool can buy assets from GMX immediately before price increases, and sell them back for profit
👇 Image
2/ GMX differs from traditional AMMs by offering zero slippage on trades via an oracle price update system. Differing from AMMs like @Uniswap, which relies on arb bots to properly balance prices in their pools, GMX updates the prices of assets themselves via these oracle updates
3/ GMX team-run bots make calls to SetPriceWithBits() to update asset prices. An unfortunate side effect of this architecture is that MEV bot operators can observe these price updates in the mempool before they land on chain, exposing this toxic MEV opportunity.
Read 5 tweets
Jan 31, 2022
1/

KP3R @thekeep3r project (via @AndreCronjeTech's FixedForex) is solving such a unique pain point in crypto, but no one is talking about it.

Why? Only big brains seem to understand the problem!

Below is some alpha we would like to share that we haven't seen discussed.

🧵👇
2/

Problem 1: With EVM, nothing can happen without *someone* sending a tx (and paying for gas).

But protocols want things to happen automatically—liquidations, auto-compounding yield farms, lending upkeep, rewards distributions, earmarking checkpoints, twa*, metawallets, etc.
3/

Bad Solution: Each protocol rolls their own thing—precious developer time spent building automated bots, protocols overpaying incentives for external users to make required periodic transactions, bug risk if paying in your native token, frontrunning/node sync issues, etc.
Read 4 tweets
Jan 18, 2022
1/ Long-Tail Miner Extractable Value (LTMEV) is one of the most secretive phenomena of DeFi.

Unlike liquidations and arbitrage, the strategies required for LTMEV are very specialized/require deep knowledge of protocols.

@ConvexFinance released $157K in LTMEV over 8 months🧵👇
2/ A quick primer—@ConvexFinance exposes a form of LTMEV when compounding must occur on their CRV rewards.

@ConvexFinance incentivizes callers to compound the CRV by giving them 1% of the CRV.

Only when $CRV received > $ETH spent does it make sense to call earmarkRewards()!
3/ At first, the methods to capture this LTMEV were very simple—one could even use etherscan to capture the MEV at a decent margin.

Over time, the methods required to capture this MEV got more and more complicated. In total, 89 addresses have attempted this LTMEV.
Read 8 tweets
Jan 11, 2022
1/

Recently, @chainlink whales removed over $55M $LINK from @Uniswap v2 and @Sushiswap LPs. As a result, @Bancor now owns over 80% of $LINK on ETH L1 DEXs.

However, did this "liquidity monopoly" result in more trade volume, and thus more fees?

The answer may shock you🧵👇
2/

In prior analysis, we were only tracking @Bancor, @SushiSwap and @Uniswap v2. Now we also track @Uniswap v3 and @BalancerLabs.

Still, @Bancor owns over 80% of $LINK on ETH L1 DEXs.

@Bancor's liquidity growth on $LINK was massive vs. competitors over the last year.
3/

So, @Bancor captures their fair share of volume over @Sushiswap, @Uniswap, and @Balancer right?

Wrong.

@Bancor only captures about 40% of the LINK trade volume.

dune.xyz/embeds/345282/…

Despite gaining over 25% of the liquidity share, trade volume share only increased ~5%
Read 6 tweets
Jan 9, 2022
1/ @thekeep3r KP3R will soon be transitioning to a new ve(3,3) model. It's kind of a big deal, but no one is talking about it. But what does it mean? Let's break it down 👇🧵👇 Image
2/ KP3R token is the fee-bearing asset for 4 (for now) @AndreCronjeTech projects. In order to claim fees, the KP3R must be locked, and the locker receives vKP3R in return. dune.xyz/embeds/271075/…
3/ KP3R token has a slight inflationary aspect, but this only affects KP3R holders who do not lock for vKP3R. In the past, vKP3R holders would receive rKP3R which is redeemable at the rate of inflation. However, vKP3R decreased over time, like CRV. Complicated, but it worked. Image
Read 4 tweets
Nov 9, 2021
1/ @Uniswap v3 introduces a new form of MEV attack — Just-in-Time Liquidity (JIT), that allows LPs to add and remove concentrated liquidity positions atomically in one block. Sophisticated actors are running JIT bots to sandwich trades, to the detriment of pre-existing LPs 👇🧵
2/ Using @DuneAnalytics, we find the @Uniswap positions that are added and removed in the same block for the same LP. From this, we calculate the revenue from the fees of the sandwiched trade, and subtract the gas costs required to perform the JIT attack:dune.xyz/embeds/233623/…
3/ Only 2 MEV #flashbots are presently capable of JIT attacks. Over >$1M USD in profits have been gathered by JIT bots, to the detriment of frontrun non-sophisticated @uniswap v3 LPs. @bertcmiller @phildaian dune.xyz/embeds/233623/…
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(