•Maximal Extractable Value (MEV): the max value (not including block reward or gas fees) that can be obtained by changing the order of transactions in a block
3. But how can you change the order of transactions?
•The order in which transactions(TX) are processed in a new block depends on Gas Fees
•TXs with Higher gas fee=Higher Priority
•Thus, to change TX order, you can submit a TX with a higher gas fee & give yours priority
4. Why would someone do this?
•Simple Answer: Money
•Unfortunately, since profits can be made by reordering TXs, sometimes independent actors (Searchers) take advantage of every day users to make a profit. Lets look at an example 👇🏻
5. Sandwich Trading
•Imagine a Searcher runs a algorithm to find a unprocessed Large TX to buy OSMO
•Knowing this large order will raise price of OSMO, this person utilizes bots that auto submit a TX with a higher gas fee to buy OSMO right before the large TX & sell after
6. What are the effects of Sandwich Trading?
•The original user who submitted the large TX first gets a lot less OSMO than expected (Slippage)
•Sandwich Trading and Front running can cause higher gas prices for everyone and network congestion
7. However, there are good sources of MEV
•Liquidation: Buy collateral at a discount from unhealthy borrow positions. This ensures Lenders are paid back
•Arbitrage: Buy a token at low price on one DEX, sell high on another. This ensures Stable Prices