0xcacti Profile picture
Apr 20 24 tweets 5 min read
I want to write a quick thread about what JIT is and cover who the absolute king of JIT. Context: I have been doing JIT for a little while now. I am not making any money, I am using it as a way to get good at integrating with Uniswap v3.
So what is JIT. JIT stands for Just in Time liquidity, and it is a type of MEV. In this type of MEV, a searcher provides liquidity for one block and removes it, collecting transaction fees along the way.
How does this work? Well here is one way. The searcher looks at the mempool for monster swaps on Uniswap v3. Usually, they are looking for swaps on high fee tier pools (30 basis points say), but it can work on low fee tiers as well.
Once the searcher sees this swap, they will quickly create a bundle that mints a liquidity position, provide a ton of liquidity at the price of the swap, contains the Uniswap user's swap, collects the liquidity along with the fees obtained by market making, and burns the position
There is a lot that goes into this. First of all, you need to know how to work with Uniswap V3 at all ... which is tricky. Second, you need to be searching the mempool in all the right ways. Next, you need to know how to provide liquidity at spot price (tick).
Oh, and I forgot to mention. You need a massive amount of capital with which to market make.
The searcher also needs to be fairly risk tolerant on the tokens they hold. Let's say the searcher is market making for RBN/WETH. Let's further suppose an og ribbonatti elitist wants to dump their RBN. When this searcher provides WETH for the trade, they end up holding RBN.
Okay, so that is what JIT is. To over-simplify for anyone out there with a tradfi mind, JIT is when a rich MEV femboy turns Uniswap into an RFQ orderbook.
Before we continue on, I think this is a good point to say that I am fairly new to this, and I am trying to make this a thread that is simple-ish to understand. @0xalpharush pls correct me where I am wrong, you are post based takes on orderbooks and JIT.
Anyway, so with my bets heged. Now I want to talk about some of the ethics / practical considerations around JIT.
To be clear, there is definitely some good to JIT. When a user's swap is bundled into a JIT bundle, it not only gives traders better price execution but also protects them from more harmful sandwich attacks.
These benefits, however, come at the expense of the passive LPs. Anyone providing liquidity over a broad range will see most of their LP rewards vanish. Instead, these rewards are collected by searchers taking advantage of these sophisticated market making strategies.
Moreover, only a few people will be able to compete in JIT. In the long run this will be people who have a ton of capital and are skilled in market making. This is a centralizing force on defi. If there are only a few market makers they can control who gets to trade what.
Numerous people active in flashbots like @thegostep have pointed out that in a future where there is only JIT, you need off chain oracles to get prices. This is centralized, manipulatable, and bad.
Honestly, not sure what to make of it. Writing this thread out makes me feel significantly less in favor of it. Still, some form of market making centralization feels inevitable. Hopefully, flashbots and searchers can work together to make this future as equitable as possible.
Anyway, time to talk about the king of JIT. This guy is an absolute giga chad. I call him Mr. AST because his contract starts with 0xA57 which kinda looks like ast. etherscan.io/address/0xa57b…
As you can see, he has just shy of 3 million transactions. Now, most of these are not JIT. Frankly, I have looked at them a bit, and it looks more like algo trading to me than anything else.
But every now and again, he JITs. You can spot these in his transaction list by when he calls the method 0x78e111f6. This is when you know you are in for a treat.
As a matter of fact, as I am writing this thread, Mr. AST does a JIT sandwhich. You can see it here - flashbots-explorer.marto.lol/?block=14619752
In Mr. AST's JIT transactions, he usually spends funds from the following address with a casual $101mm in it. etherscan.io/address/0x5617…

Interestingly, these funds have been variously deposited and taken out of compound several times. Not sure what is going on there.
Let's analyze his most recent JIT bundle that I linked above. First, Mr. AST adds 0 $APE and appx 9550 $ETH to a liquidity position on Uniswap V3. etherscan.io/tx/0xe5beaf8a2…

For this transaction, he pays around $60. Just a casual $30mm liquidity position.
Next he sandwiches the user swap - seen here etherscan.io/tx/0xe5beaf8a2…

Frankly, I would love an etherscan magician to help me understand what is happening here.
Finally, Mr. AST collects around 9,031 $APE and 9,504 $ETH from his position. See here, etherscan.io/tx/0x278b63966….

Summing, his coinbase transfer and tx fee, he pays around 0.17 $ETH to the miners for this transaction.
What does this mean? For a roughly $600 fee, Mr. AST is walking away with $29,450,886.48 after putting in $29,417,186.55. After fees, he is walking away with a clean $33,000 in profit.

• • •

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

Keep Current with 0xcacti

0xcacti 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 @0xcacti

Feb 14
I have seen a bit of @TornadoCash hate recently. This is ridiculous. There are many reasons other than crime that a person would want privacy. Here is a short list.
Individuals with large amounts of crypto are subject to social engineering schemes. @thomasg_eth just put out a great thread about this. You can use tornado to separate de-link your online identity from your wallet. This makes it much harder to be targeted.
It is really uncomfortable when your friends ask you for money. You can use tornado cash to move funds from a large wallet that you want to keep secret to a more public wallet to make sure that your friends don't know how much you hold in the original wallet.
Read 5 tweets
Jan 23
I have seen a lot of threads about how to learn solidity for total beginners, but I want to write a thread on how to learn solidity for people with a non-trivial amount of programming experience.
This was certainly my journey. I took a few programming classes in school, so I learned on the standard trajectory these days. You know the deal, java, data structures, algos, computer systems architecture.
Then I went out into the world and started building some things. That said, I really didn't start getting good at programming until I got into MEV. I started by writing arb and liquidations bots is python, and then I re-wrote them in golang.
Read 13 tweets
Jan 22
A short thread on ERC-998s. I believe that 998s radically improve the power of NFTs. Let's suppose that you wanted to make Clash of Clans on the blockchain. You should definitely implement the village as a 998.
The village should be a 998 because everything within the village can be standard 721s or 20s. If you have accumulated a lot of gold while playing the game, this accumulation is easily represented in code with an 998 because the 998 village is allowed to hold ERC20 'gold' tokens
If you expand your village with new buildings, your village once again can own these new buildings represented as ERC721s.
Read 4 tweets
Jan 21
I want to give my thesis on Solana. Before I do, I want to make clear that I am not a huge $SOL fan. I find the solana shills to be highly annoying and the community to be mostly toxic.
That said, there will come a time soon enough when Solana will become the best buy in crypto. Why do I say this? Well, when a VC firm acquires tokens they are put on a vesting schedule. The length usually ranges from 1 to 5 years.
Over the coming year, many of these vests will end. Given the Solana omega pump, this will lead to a massive sell off. The first part of my argument, is that the VC sell off, combined with the downward market pressure that we all expect, will create an incredible entry point.
Read 9 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 on Twitter!

:(