From ba246355db2284990987a3b08bf354a7fbacb33e Mon Sep 17 00:00:00 2001 From: bt3gl <1130416+bt3gl@users.noreply.github.com> Date: Fri, 23 Sep 2022 06:14:37 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=82=20mempool=20and=20mev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MEV/the-mempool.md | 51 ---------------------------- MEV_on_Ethreum/mempool.md | 70 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 51 deletions(-) delete mode 100644 MEV/the-mempool.md create mode 100644 MEV_on_Ethreum/mempool.md diff --git a/MEV/the-mempool.md b/MEV/the-mempool.md deleted file mode 100644 index 80356ad..0000000 --- a/MEV/the-mempool.md +++ /dev/null @@ -1,51 +0,0 @@ -## The Mempool and MEV - -
- -## Ethereum's Mempool (The Dark Forest) - -**"Whenever you make a transaction in the Ethereum network (you sign the transaction), you have to wait until it to be confirmed in the blockchain. During that period, it sits in the memory pool. Anyone can listen to these transactions, and their details, while they are there, and even modify them. If someone pays a higher gas price, their modification will be included a block first."** - - -
- ---- - -## MEVs - -*"Miner extractable value (MEV) is a measure devised to study consensus security by modeling the profit a miner (or validator, sequencer, or other privileged protocol actor) can make through their ability to arbitrarily include, exclude, or re-order transactions from the blocks they produce. MEV includes both ‘conventional’ profits from transaction fees and block rewards, and ‘unconventional’ profits from transaction reordering, transaction insertion, and transaction censorship within the block a miner is producing."* - Alex Obadia - -* MEV exists in places where there is high complexity which requires significant knowledge of smart contracts to understand. -* ~90% arbitrage - -
- -### Arbritage bots - -* Monitor pending transactions and attempt to exploit profitabe opportunities. -* Usually loo for specific types of transactions in the mempool, such as DEX trade or an oracle update - - -
- -### To find Extracted MEV: - -1. look at each Ethereum's transaction trace -2. parse it and go through the token transfers -3. calculate the starting balance of the sender address and its ending balance (taking into account proxy addresses) - -``` -Extracted MEV = Successful MEV transactions + Successful MEV transactions gas fees + Failed MEV transactions gas fees - - -Failed MEV transactions gas fees = Reverted MEV transactions gas fees + Checked MEV transactions gas fees -``` - -
- - ---- - -## References - -* [Frontrunning MEV crisis](https://writings.flashbots.net/writings/frontrunning-mev-crisis/) diff --git a/MEV_on_Ethreum/mempool.md b/MEV_on_Ethreum/mempool.md new file mode 100644 index 0000000..fa5e9f8 --- /dev/null +++ b/MEV_on_Ethreum/mempool.md @@ -0,0 +1,70 @@ +## 🎂 mempool and mev + +
+ +### the dark forest tl;dr + +
+ +* whenever you make a transaction in the Ethereum network (you sign the transaction), you have to wait until it to be confirmed in the blockchain. +* during that period, it sits in the memory pool. +* anyone can listen to these transactions, and their details, while they are there, and even modify them. +* if someone pays a higher gas price, their modification will be included a block first. + + +
+ +--- + +### mev + +
+ +* miner extractable value (MEV) is a measure devised to study consensus security by modeling the profit a miner (or validator, sequencer, or other privileged protocol actor) can make through their ability to arbitrarily include, exclude, or re-order transactions from the blocks they produce. +* mev includes both ‘conventional’ profits from transaction fees and block rewards, and ‘unconventional’ profits from transaction reordering, transaction insertion, and transaction censorship within the block a miner is producing. +* mev exists in places where there is high complexity which requires significant knowledge of smart contracts to understand. +* ~90% arbitrage + +
+ +--- + +### arbritage bots + +
+ +* monitor pending transactions and attempt to exploit profitabe opportunities. +* usually loo for specific types of transactions in the mempool, such as DEX trade or an oracle update + + +
+ +--- + +### find extracted mev + +
+ +1. look at each Ethereum's transaction trace +2. parse it and go through the token transfers +3. calculate the starting balance of the sender address and its ending balance (taking into account proxy addresses) + +
+ +``` +Extracted MEV = Successful MEV transactions + Successful MEV transactions gas fees + Failed MEV transactions gas fees + + +Failed MEV transactions gas fees = Reverted MEV transactions gas fees + Checked MEV transactions gas fees +``` + +
+ + +--- + +### references + +
+ +* [frontrunning mev crisis](https://writings.flashbots.net/writings/frontrunning-mev-crisis/)