Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MEV (Miner/Maximum Extractable Value)

MEV (Miner/Maximum Extractable Value)

Avatar for mikan

mikan

May 10, 2021

More Decks by mikan

Other Decks in Technology

Transcript

  1. The purpose of this presentatioin - To review the MEV,

    I’m interested in one more time and find something that can connect to my research plan. - Why MEV is matter - What is the problem and how to solve it. - The solution pros/cons 2
  2. Review of the background - Txs are usually send to

    mempool, that anyone can visible the txs. - Blocks have an order to be processed, which is ultimately determined by the block producers. (By the default setting, sorted by Gas Price) - There is a tx fee. It is determined freely by the Sender in the Priority Gas Auction. (1st price auction) - Ethereum allows anyone to write/use scripts called contract. - Decentralized exchange, most of DEXs are AMM type (e.g. Uniswap). - AMMs allow up to x% slippage ("I'll buy up to ~yen") and request an exchange to contract. If successful, the exchange is executed. 3
  3. What is MEV - MEV is a measure of the

    profit a miner (Block Producer) can make through their ability to arbitrarily include, exclude, or re-order txs within the blocks they produce. - Benign - Front-running of DEX - Arbitrage between DEXs - Liquidation - Malignant - Re-org Extaction - Prevents ORU fraud proof tx from passing - Delay oracle update tx 4
  4. The Basic MEV - Frontrunning - Front-running: Detect orders and

    then use them to make a profit. - The main method is known as “Sandwich” in DEX 1. Alis send an order that "I want exchange 1,000,000 USDC to ETH with 2% slippage allowance" (Current Exchange Rate is 2,000ETH / USDC) 2. Sandwicher send an order that Alis would be exchanged with 2,020 ETH/USDC (so, Sandwicher exchange USDC to ETH Before Alice's order goes executed) 3. Alis exchange USDC to ETH at 2,020 ETH/USDC 4. Sandwicher sell ETH to USDC to make profit - There are also other interesting bots such as Generalized Frontrunner. - Backrunning: Tx A is broadcasted with a *slightly* lower gas price than already pending Tx B so that A gets mined right after B in the same block. 6
  5. Ongoing Research/Product Live - MEV-Geth - Dutch Auction/Frequent batch auctions

    AMM(e.g. Gnosis) Not Live - Chainlink FSS(Fair Sequencing Services) - MEV Auction - MEV-SGX - zk-Rollup VDF - Off-Chain Commitment 7
  6. MEV-Geth Problem - Transaction sender (esp. Front-runner) willing to pay

    a high gas fee to be included first, and Miner select the highest fee tx. (1st price auction) - MEV game wasn’t fair. (e.g. Private mempool) Solution - Tx directly send to the Miner. - Sender can set tx fee 0Gwei. If successful, a portion of the profits can be paid to Miner. - Success-based MEV open to all (After July 14th, It will not be allowed because of EIP1559) 8
  7. Reference - https://research.paradigm.xyz/MEV - https://explore.flashbots.net/data-metrics - https://arxiv.org/pdf/1904.05234.pdf - https://blog.chain.link/what-is-miner-extractable-value-mev/ -

    https://medium.com/@danrobinson/ethereum-is-a-dark-forest-ecc5f0505dff - https://samczsun.com/escaping-the-dark-forest/ - https://medium.com/flashbots/frontrunning-the-mev-crisis-40629a613752 - https://gerhard-wagner.medium.com/the-defi-liquidation-game-aaef5c0b903d - https://ethresear.ch/t/mev-auction-auctioning-transaction-ordering-rights-as-a-solution-to-mine r-extractable-value/6788 - https://uncommoncore.co/eip-1559/#accelerate-mev - https://arxiv.org/abs/2101.05511 - https://github.com/ethereum/go-ethereum/issues/21350 - https://pdaian.com/blog/mev-wat-do/ 11