Web3 Learning Notes
  • Web3 Learning Notes
  • 📖Crypto Basis 101
    • Blockchain & Cryptocurrency
    • Start dealing with Crypto
    • To invest safe
    • Risk Management
    • Web 3.0: User Ownership
    • Rethinking 'Why Crypto?'
  • 💰DeFi
    • What is DeFi
    • Stablecoin 101
    • Journey of a transaction
    • MEV (Miner Extractable Value)
    • Crypto Derivatives
    • To play safe in DeFi
    • DeFi Tools
  • 🧠DEFI Innovations
    • Lending & Borrowing
      • AAVE V3
      • Morpho - APY Optimiser
      • SILO - Risk Isolator
    • Automated Market Maker
      • Uniswap V3 - Concentrated Liquidity
      • Trader Joe V2 - Liquidity Book
      • 1Inch V2 - AMM Aggregator
    • Low Slippage Swapping
      • Curve V2
      • Bebop
      • Platypus Finance
    • Yield Aggregator
      • Yearn V2
      • Instaapp
      • Alpaca Finance
    • Perpetual Exchange
      • GMX
  • 🎇Techs of Chains
    • ETH - Ethereum
    • BNB - Binance Coin
    • AVAX - Avalanche
    • DOT - Polkadot
    • SOL - Solana
    • NEAR - Near Protocol
    • XTZ - Tezos
    • MINA - Mina Protocol
  • 🖼️NFT
    • What is NFT
    • Token standard 721 & 1155
    • How to get your first NFT
    • How to mint like a pro
    • To play safe in NFT
    • NFT tools
Powered by GitBook
On this page
  • MEV examples
  • Flashbots
  1. DeFi

MEV (Miner Extractable Value)

  • the profit can be extracted from a transaction

  • happen when miners prioritizing or re-ordering transactions in a block

    • traders paying higher gas fee to miners to prioritize their profitable arbitrage

    • miners make extra profit by executing TXs (transactions) with extra gas fee

  • Benefit: DEX arbitrage maintain correct price over different DEXs

  • Drawback: MEV incentive triggers bot gas war that makes normal users pay more gas/slippage

MEV examples

  • front running: putting a higher gas in a TX to win the gas auction, so blockchain finalise your TX before others to get a better deal , such as selling higher price/buying lower price, liquidators liquidating borrowers loans (selling borrowers’ collaterals) before they can repay the debt to extract profits

  • back running: putting a lower gas to proceed after a known pending target, such as queuing for token initial liquidity to be the first to trade

  • sandwiching: mix tactic of front & back running. When victim is queuing a TX on chain, attacker places one TX before & another right after a victim's pending TX. This allows attacker to buy before victim to push price up, then sell the token straight after the victim at a higher price, where the price gap is attacker's profit

  • DEX arbitrage: buy from DEX A at lower price and sell in DEX B at high price to make profit from price difference

Flashbots

A private network layer mitigates negative externalities of MEV to the Ethereum network

  • Flashbots Auction

    • private transaction pool with a blind auction mechanism

    • block producers to trustlessly outsource the work of finding optimal block construction

    • users can privately communicate their bid and not require to pay for fail bid

  • Flashbots Data

    • MEV inspector to find miner payments + tokens transfers and profit + swaps and arbitrages in a block

  • Flashbots Protect

    • Flashbots RPC endpoint can be easily add to users' wallet

    • TXs are masked by flashbots and not visible on public mempool

    • provide frontrunning protection and no fail transaction (drop if not executable)

PreviousJourney of a transactionNextCrypto Derivatives

Last updated 2 years ago

💰