Three Transactions, Making Two Unique Types of Sandwiches by Upgraded Jaredfromsubway.eth
Mastering the Double Play of Swap-JIT and Split-Front-Run Sandwiches
Why has Jaredfromsubway.eth been so successful for 18 months until today? His sandwich-making recipes emerge one after another, demonstrating Jared’s versatility and in-depth comprehension of DeFi mechanisms. Adding and removing liquidity, strategically moving assets from one trading venue to another, and acutely monitoring the public mempool enable their gains to outperform other sandwich bots.
Strategy One-liner
Jaredfromsubway.eth uses three transactions to cook two unique types of sandwiches: a swap-JIT sandwich and a split-front-run one.
Simplified Illustration
All transactions involved are in Block 18563314, occupying from Position 1 to Position 6.
The number after “TX” indicates the current transaction’s position on the block. We will use such representation below.
Big Picture
Swap-JIT Sandwich
Split-Front-Run Sandwich
Key Steps
We explain this strategy’s key steps by splitting them into two sandwiches, in which we use each transaction’s steps regarding the current sandwich for clarity.
Swap-JIT Sandwich
TX1: Swap-JIT Sandwich Front Run. Add ETH and GROK Liquidity, then swap GROK for ETH.
This transaction serves two roles in this strategy:
The front run of the Swap-JIT sandwich, composed of TX1, TX3, and TX4;
And the first of the two front-run transactions of the Split-Front-Run sandwich that is composed of TX1, 2, 4, 5, and 6.
Steps 3 & 4: swap GROK for WETH in the Uniswap V3 pool.
Steps 5-7: Add GROK and WETH liquidities to the Uniswap V3 pool. Visit this page to understand what happens when liquidity providers process liquidity in a Uniswap pool.
Steps 3 & 4 and 5-7 increase the rate of GROK against WETH in the pool, making the transaction the front run of this Swap-JIT sandwich.
TX3: Swap GROK for ETH.
This is the victim transaction of the Swap-JIT sandwich.
Steps 2 & 3: the victim swaps GROK for WETH in the Uniswap V3 pool, suffering the loss under the influence of their slippage setting.
TX4: Swap-JIT Sandwich Back Run. Remove GROK and ETH Liquidity.
This transaction also plays two roles:
The back run of the Swap-JIT sandwich;
And the second of the two front-run transactions of the Split-Front-Run sandwich.
Steps 3-9: Remove GROK and WETH liquidities from the Uniswap V3 pool.
Split-Front-Run Sandwich
TX1: Split Front Run 1. Swap WETH for ide.
Steps 1 and 2 increase the rate of WETH against ide in the Uniswap V2 pool, making this transaction also operate as the front run of the first normal sandwich.
TX2: Victim TX. Swap ETH for ide.
Steps 0 - 4: The victim swaps ETH for ide in the Uniswap V2 pool, suffering the loss of receiving less ide than they should be because of the front run done by Jaredfromsubway.eth.
TX4: Split Front Run 2. Swap WETH for ide.
Steps 1 and 2 increase the rate of WETH against ide in the Uniswap V2 pool, making this transaction also operate as the front run of the second normal sandwich.
TX5: Victim TX. Swap ETH for ide.
Steps 0 - 4: The victim swaps ETH for ide in the Uniswap V2 pool, suffering the loss of receiving less ide than they should be because of the front run done by Jaredfromsubway.eth.
TX6: Split-Front-Run Sandwich Back Run. Swap ide for WETH.
This transaction acts as the back run of the Split-Front-Run sandwich.
Steps 1 & 2: Jaredfromsubway.eth swaps back WETH with ide, pocketing the gain from the Split-Front-Run sandwich concerning the Uniswap V2 pool for WETH and ide.
Key Addresses
The oval labeled “to MEV bot 0x6b75” is the sandwich contract used by Jaredfromsubway.eth.
The pentagon labeled “from 0xae2…fae13” is the EOA of Jaredfromsubway.eth.
All other pentagons labeled “from…” are victims’ EOAs.
Key Factors
Why the group of TX1, 3, and 4 is a sandwich instead of a JIT?
We placed TX3 of the sandwiched user at Position 1 of this block for simulation. The returned result showed success, and the user only needs to put in fewer GROK to exchange for 11 WETH in the sandwiched pool, which would happen if this were a JIT. In actual execution, the user incurred a loss because of Jared's liquidity operations, effectively acting as the front run and back run of a sandwich attack.
Why did the adding liquidity action not mint a Position NFT?
By invoking the ABI, you can skip the minting of Position NFTs and directly add, remove, or adjust liquidity.
What’s the Profit and Loss of this strategy?
The intertwining of the two sandwiches makes the PnL calculation mind-boggling. To avoid confusion, we only give the results.
The net gain of the Swap-JIT sandwich: 0.046 WETH and 3592 GROK.
The net gain of the Split-Front-Run sandwich: 0.031 WETH.
Based on the contemporary prices, this strategy brings about $80 profit to Jaredfromsubway.eth.
Why was TX2 not put behind TX4?
We simulated putting TX2 to Position 1, and the result was that the victim could have received more ide with 0.1 ETH, proving this transaction suffered a loss caused by the Split Front Run 1 transaction.
However, when we put it to Position 5, the simulation failed, resulting from the victim’s slippage setting. Thus, Jaredfromsubway.eth could not bundle this transaction with TX5, the other victim, which was why Jaredfromsubway.eth had to split the front run into two transactions.
The amount of Split Front Run 1 has to ensure the success of TX2, whose same direction exchange also helped push up the price of ETH against ide. Our calculation proved that Jaredfromsubway.eth’s first Split Front Run’s swap amount WAS based on TX2’s slippage, demonstrating the attacker’s expertise.
Want to learn more about DeFi strategies to enhance your trading? Visit our Head First of DeFi to decode the DNA of DeFi Transactions & Strategies.
Follow us via these to dig more hidden wisdom of DeFi:
EigenTx | Website | Discord | Twitter | YouTube | Substack | Medium | Telegram