Let's look into the most occurred MEV on Zeromev: Sandwich attack.
What happened here: 1. A victim's tx (swapping $ETH for $USDC) was sandwiched and received a worse swap rate 2. An attacker net a profit from frontrun (sell $ETH at high price) and backrun (buy $ETH at low)
2/10
Let's dive into the txs details
1. Frontrun tx
An attacker
- sold 169.12 $ETH for 183,725 $USDC (avg sold price = 1,086.36)
- paid 0.008 $ETH as tx fee
Now, $ETH price decreased as there are more $ETH and less $USDC in the pool.
3/10
2. Sandwich tx
The victim
- sold 450 $ETH for 487,972 $USDC
The tx further decreased $ETH price.
4/10
3. Backrun tx
An attacker
- bought 169.4 $ETH using 183,725 $USDC gained from the frontrun tx (avg bought price = 1,084.56)
- paid 0.27 $ETH as tx fee
5/10
From frontrun and backrun tx, the attacker
- net 0.002 $ETH free money (mostly the earning is paid to miner for Gas Price Auction)
6/10
But how much did the victim lose?
If there was no frontrun and backrun, the victim would get 488,749 $USDC from selling 450 $ETH, an extra 777 $USDC!
7/10
So why did this occur?
The victim allowed some price slippage when using the swap router.
Low price slippage: before your tx gets executed, the price may alr move, so your tx will be rejected.
High slippage: you accept a worse swap price and are prone to sandwich attack.
8/10
How can you avoid MEV?
One solution provided by Zeromev is to use Layer 2 chains with first come first serve (FCFS) implemented e.g. @arbitrum. FCFS ensures your txs are executed in order of arrival time. No more frontrun.
9/10
If you find the thread helpful, Like, Retweet, and Follow me @0xSh1r0 for more threads like this.
The current #BEAR market hits hard. I've listed out some strategies you can do to earn juicy APRs.
Disclaimer: Farming strategies can be on different chains. You may need to bridge your asset.
The strategies do not come without risks. Please DYOR!!!
Let's start. 🧵
1/
Strategy 1 : Stablecoin Farming
Stablecoin pools like @CurveFinance normally offer low-risk stable income but earn little APY. However, @defi_sunio provides farmers with a whopping 30%+ APY on their stableswap pools.
There are rumors about @justinsuntron game on $USDD and $TRX. There is a chance $USDD will suffer the same fate as $LUNA/$UST. But in the short run, I think it is safe to assume it will not depeg.
Regards to the current potential crisis $stETH - $ETH can lead to, here's an ELI5 on what's happening
🧵
1/ For context, $stETH is a token that represents a share of staked $ETH on @LidoFinance to earn 3.6% APR.
1 $stETH (theoretically) == 1 $ETH.
$stETH is only redeemable for staked $ETH after the ETH2.0 merge.
@LidoFinance 2/ Each stETH is backed by locked ETH, so it’s fully collateralized. Even if stETH price dumps or pumps, there’s literally no effect on the actual staking/unstaking mechanism.