EigenPhi MEV🤖 Alert Profile picture
Jun 19 25 tweets 8 min read Twitter logo Read on Twitter
According to @jphackworth42, the revenue of #JIT #MEV on #UniV3 has reached $7.3M as of Jun 8. dune.com/queries/233623….
The newly released spec of #UniV4 brings novel development to the field. Do you think JIT will become more frequent or less seen?
#UniV3's concentrated liquidity created Just-In-Time MEV bots that extract fees from LPs, with risks for passive providers. JIT involves 3 more txs, it's hard to read the detail steps inside these txs. Let's dissect on of these JIT 🤖 and find out what's going on inside.
3️⃣ key transactions involved in a JIT trade: add liquidity, swap, and remove liquidity.
Let's take a look at the adding liquidity tx first.
bit.ly/42MvoFt
Steps 0-1: The LP provider added $7.8M $USDC and 98 $WBTC as liquidity to a #UniV3 pool.
🔔 A few things to know: To keep the balance of the bookkeeping in #UniV3, EigenTx marked the internal liquidity share changes using virtualLiquidity, a placeholder.
and we also added 2 virtual contract: virtualLiquidity & virtualLiquidity-350101.
🔔 UniV3 uses position NFT as a voucher issued to liquidity providers and records the number of liquidity tokens and the liquidity share provided by liquidity providers. In this TX: UNI-V3-POS-350101.
etherscan.io/nft/0xc36442b4…

🔔 In the chart, you can regard UNI-V3-POS contract as being used internally by Uniswap to matching the internal record of liquidity providers.
Like when each of us opens an account at a bank, the bank's internal database has corresponding account data.

🔔 On the other hand, NFTs like UNI-V3-POS-350101 are mainly for external uses, i.e.;liquidity providers and other external users.
It's like our own bank account after opening an account at the bank.
🔔 Hence, we use two virtual contracts: virtualLiquidity and virtualLiquidity-350101 to help balance the liquidity changes of #UniV3.🔔 And these is UniswapV3Pool contract,
representing the overall liquidity pool, stores liquidity tokens and keeps records of the overall liquidity, identified as a virtual contract-virtualLiquidity-in the token flow chart.
🆗, time to move on to the liquidity adding tx.

Step 2: #UniV3 records the liquidity tokens added by LP internally, being marked as minting 228,594,721,898,820 virtualLiquidity sending to UNI-V3-POS contract. Internal share changes added.
Step 3: 228,594,721,898,820 virtualLiquidy-350101 was minted as a placeholder for the sake of bookkeeping on the virtual external account contract: virtualLiquidity-350101 and sending to UNI-V3-POS-350101. "External" share changed added.
To summarize, the JIT 🤖 added 97.925989 $WBTC and 7,793,784.212848 $USDC in the first two steps and got a position NFT identified as 350101, in step 4, representing the corresponding liquidity share, 228,594,721,898,820 it added.
bit.ly/42MvoFt

Next is the user swap. The JIT 🤖 successfully bundled a user's swap transaction following its add-liquidity transaction within the same Uniswap V3 pool.
The user was swapping a substantial USDC to WBTC using an aggregator.bit.ly/42MiMOO

In the last tx, the JIT 🤖 effectively burned the position NFT to claim the entire liquidity share as well as the fee revenue.
bit.ly/43Q8MoP
EigenTx's token flow chart ensures balanced token transfers with the support of complete internal accounting details.In the liquidity removing process, we use
virtualOwed0WBTC and virtualOwed1USDC to represent the account balance of UNI-V3-POS, virtualOwed0WBTC-350101 and virtualOwed1USDC-350101 for UNI-V3-POS-350101.NOW, in the last tx.
👉 Steps 0-2: Created the internal account balances, virtualOwed0WBTC and virtualOwed1USDC, for UNI-V3-POS, and burned the JIT bot's corresponding liquidity share, virtualLiquidity.
The lines indicating the transfers 0-1 were intersected with others.
You can read these internal share changes in the transfer list table beneath the token flow chart. 👇
🔔 Think these 3 steps as balances moving from the liquidity of the pool to the internal account representation of the liquidity provider.
👉 Steps 3-5: Similarly, Created the internal account balances for UNI-V3-POS-350101 and burned the corresponding liquidity share, virtualLiquidity-350101.
🔔 Think these 3 steps as balances moving from the internal account representation of the LP to the external one.
👉 Steps 6-7: UniswapV3Pool removed 89.0881 WBTC and 7,975,062 USDC and sent them to the JIT bot's contract.

👉 Steps 8-11: Now that both the internal and external representation of the liquidity provider account should have no balance.
UNI-V3-POS and UNI-V3-POS-350101 burned the corresponding balances of virtual liquidity tokens created in Steps 0-5.

Step 12: The JIT bot burned the position NFT, UNI-V3-POS-350101.
Step 13: The JIT bot paid a tip to the block builder.
Eventually, the JIT bot profited about $285.5 from this trade.

As you can see, EigenTx presents a flow chart that perfectly aligns with every stage of a resource's lifecycle! 📈 And the best part?
Internal bookkeeping syncs with this flow so that you can keep track of all cash flows in one precise database 🤑 #EigenTx #CryptoAudit"
It's clear that EigenTx is crucial to discover the strategy we mentioned in this 🧵.
Please feel free to try it out on the EVM-compatible chains: eigenphi.io/mev/eigentx
And find more use cases here: docsend.com/view/ce853cukg…

• • •

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

Keep Current with EigenPhi MEV🤖 Alert

EigenPhi MEV🤖 Alert 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 @EigenPhi_Alert

Jun 19
🎥 NEW VIDEO ALERT! We break down the intricate process of #DeFi #Liquidation in light of the recent market liquidation topping $163 million due to USDT short-time depeg.
Dive deep into the #crypto world with #EigenTx: 🌐 #Blockchain

🔗 Collateral and borrowing play a crucial role in liquidation. In the video, we illustrate this by borrowing TUSD against vBUSD collateral via #Venus.
Understanding this exchange is crucial to navigating the volatile crypto market: #Cryptocurrency

🎬 And this is just the tip of the iceberg!
Read 6 tweets
Jun 17
A flash bot botched its arb by earning $3 using $200M ⚡️ loan.
bit.ly/3PfnkKC
1️⃣ flash loan from @MakerDAO
2️⃣ saved the loan to @AaveAave to borrow $WETH
3️⃣ used the $WETH to arb on $T between @CurveFinance and @balancerlabs
4️⃣ took the $3 profit
Why did the 🤖 only borrow such a small amount of WETH? The short answer is it's its intention. Since flash loans have no cost, there is no incentive for bots to consider and optimize the utilization of funds. This situation is common among arbitrage robots.
And the 🤖 has been doing this all the time 👇
You can find out its MEV history on this page: eigenphi.io/mev/ethereum/c…
Its trading volume reached $24.6M today on 40 txs with a profit of $867.

The top MEVs in the last 30D done by it always use Flash Loan.
No.
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 on Twitter!

:(