flashbots / mev-research

Project management for MEV Research

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Develop an MEV Taxonomy

CarboClanC opened this issue · comments

commented

Defining a taxonomy for MEV is important at this stage of our research, in particular a systematic framework, and consistent language and definitions for the sake of clarity and rigor.
Related FRP: FRP-1

We adopted the following definition for MEV in our blog post:
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.

A formal definition of Miner Extractable Value in the context of Extractable Value in the soon to be published paper by Daian et. al "Clockwork Finance" is as follows:
mev_FormalDefinition

Please post your questions you would like to address in our discussion of MEV taxonomy, or your suggested approach in defining MEV taxonomy, as comments under this issue.

Thank you @CarboClanC for putting this issue up! Here are questions I'd like to address in our discussion on MEV taxonomy today:

  1. MEV is currently used interchangeably to both denote the upper bound (extractable) and the value taken (extracted). How do we better differentiate between the two concepts?

Suggestion: We stop calling value extracted MEV extracted but simply keep to value extracted from transaction prioritisation/ordering?

  1. Many individuals read MEV as value extracted by miners which is misleading yet accurate since the upper bound that is MEV is bounded by the rights that miners have on transaction ordering. How do we make it clearer that this value is not exclusively extracted by miners?

  2. Should we replace the term MEV with a term that includes validators and other network actors with such rights in other smart-contract blockchains?

  3. Can we differentiate different kinds of extracted value?

  • Good or bad extracted value? (ie. one that has a clear negative social impact)
  • Extracted value that is more desirable than others? (eg. the Uniswap arb value created is desirable in order for the pool to be rebalanced, in that case it is part of a mechanism)
  • Is extracted value only coming from meddling with transaction ordering?

I like the taxonomy of sticking with extractable and extracted MEV. Not sure I understand your suggestion @obadiaa.

In the same direction as @obadiaa can extraction strategies be defined in terms of their external effects? Think of price slippage, liquidation of user funds, some other subversion of protocols (governance? staking?).

The problem with such an approach is that there may be lots of overlap where extraction can actually do several of them at once.

Summary: I am supportive of extractable/extracted at a high level. Then, identify if it's a trade, an arb, or a liquidation in the single transaction context. Finally, in the multi-transaction context, identify if it's good MEV or bad MEV.


Re-writing the definitions:

  • extractable value: The value which can be extracted in block N as a result of transactions in block N-1 before applying block N's transactions. Finding this means you need to look at the blockchain's state and enumerate all the arb, liquidation etc. opportunities.
  • extracted: The value which got extracted in block N, after applying block N's transactions. Finding this means you need to look only at the block's transactions and enumerate all the arb, liquidation etc. opportunities that got taken.

For example, we'd say that a block was 75% extracted if there were 10 ETH worth of arbs, but only 7.5 ETH was arbed. Finding a number for the "extractable value" of a block seems difficult to me, as it is effectively equivalent to writing a searcher that can discover every opportunity given the blockchain's current state (and optionally a list of pending mempool txs).

As for "labelling", the current labels are in terms of the action being done: trade, arb and liquidation @sbaks0820. These labels are quite simplistic, because they only inspect 1 transaction which does 1 or more things (e.g. a tx may be tagged as both a liquidation and an arb).

I can see us generating additional labels over multi-transaction contexts.

  • "bad MEV": e.g. sandwich Uniswap trades with large slippage, oracle manipulation triggering a liquidation, censoring L2 disputes, ...
  • "good MEV": e.g. arbitrage causing tighter spreads, saving a CDP

Subversion of protocol attacks may matter in the case of a governance vote, where the deadline to reach quorum is in T and the miner is bribed to censor all transactions voting towards the quorum for T+1. Observing censorship-related MEV generation seems hard to me. Maybe we could call that dark MEV, in the sense that the miner makes money but nobody can detect it since a censored transaction is indistinguishable from a normal pending transaction or one that was dropped due to network conditions? cc @pdaian

@obadiaa I do not think we should exchange the MEV term for more granular terms. Insertion and ordering-related MEV looks the same on-chain, and as I wrote above we wouldn't be able to meaningfully detect censorship-related MEV.

I like the distinguishing between extracted and extractable. Not to bikeshed too much, but maybe worth picking a different word for either so we don't have ambiguity when using "MEV"?

One thing I've been wondering about it is like x-block re-ordering or censoring (e.g. instead of just re-ordering your liquidation so mine lands first, I simply leave it sitting the mempool for another block) as well as L2 extraction (e.g. if you're on a zk-rollup AMM and your proof generator sandwiches you)

The mev-inspect system has not yet implemented a distinction between "good" and "bad MEV. After working with the mev-inspect data, it also seems like there is another bucket of data i'm not sure what to call:

  • ExtractABLE - The theoretical maximum available to extract in a single block
  • ExtractED - How much the miner ACTUALLY extracted (mostly, this is 0 at the moment)
  • ??? - How much the various bots and other users were able to walk away with, due to the miner allowing them to do so

Because this ??? term is not the delta between extractable and extracted. We are outsourcing the searching for extractable to bots and assuming they are perfect at what they do.

And while we're bike-shedding: it is kind of unfortunate to distinguish subtly different concepts via a suffix to "extract". It has already confused conversion in discord.

  1. Should we replace the term MEV with a term that includes validators and other network actors with such rights in other smart-contract blockchains?

The meme of 'MEV' in my head mostly corresponds to single-block extractions (and I wonder if that's true of others who haven't generalized to multi-block), in which case 'mempool' extractable value could be a consideration.

Obviously doesn't cover multi-block, re-org oriented extractions as phil pointed out.

Hello 👋 Here is a brief summary of the outcome of the discussion we had yesterday on MEV taxonomy, thanks to everyone who joined and participated in the discussion!
You can find the recording of the call here.

Proposition 1: MEV re-defined from Miner Extractable Value to Maximum Extractable Value

Pros:

  • Preserves the MEV meme and the mindshare that has been built around it
  • Backwards compatible (MEV_new and MEV_old mean the same thing)
  • Smooth transition of the ‘M’ to now encapsulate other consensus protocols
  • Avoids the confusion that solely miners are extracting this value

Cons:

  • Potentially confusion of the M in MEV
  • The miner’s power is less obvious (and so less scary to people)
  • There is no mention of transaction ordering

Proposition 2: creating a term to denote the value that has been extracted: Realised Extractable Value (REV)

Pros:

  • Avoids the regular confusion between extractable and extracted

Cons:

  • Introduces a new term
  • May be a little too financy?

Proposition 3: creating a term to denote the value extractable by entities with no hashrate: Bot Extractable Value

The introduction of this new term is less for academic reasons and more for practical reasons.

Pros:

  • Avoid the confusion solely miners are extracting this value
  • Gives a name to a figure we point to a lot and that is significant to our efforts

Cons:

  • Introduces a new term

Proposition 4: Differentiate between different types of value extracted

@gakonst proposal: labelling single txs into simple buckets (eg. arb, liquidation, etc) and then looking at sequences of txs for more advanced labels (eg. Uniswap sandwiching).

It can be hard to label sequences for example:
A Maker liquidation can be good in some context (if the system works as intended), and bad in others (if an actor manipulates the price to trigger liquidation and censors top ups). So we need a more advanced understanding of classification before we start thinking about systematic sequence classification.

Intuitively there seems to be a difference between intended (incentivised bot activity) and unintended MEV, the negative consequences of MEV usually falling in the unintended MEV case.

It's easier to classify things as 'good' MEV, much harder to classify them as bad unless we've already classified similar sequences in the past.

What needs to be done:

  • The validation of comprehensiveness
    • It would be good to cross-validate how much MEV we cover
  • A more formal taxonomy of the types of patterns that we’re seeing.
    • While we’re currently doing a per-tx labelling, we should get started labelling recognisable sequences.

To dos:

  • Blogpost announcing new taxonomy
  • Get buy-in from individuals in the industry so that term is widely accepted
  • Updating language in upcoming public communications and public tooling
  • Starting identifying recognisable sequences in MEV-Inspect data
  • Get started on the coverage metric (see proposal from Phil)

Other suggestions of terms and ideas

  • New term: Extractable Value (EV)

    • Fear we are overloading the term EV that is already heavily used
  • New term: Order Extractable Value / Sequence Extractable Value

    • Does ordering include censorship? That's a philosophical question
    • It would maybe confuse people when it comes to whether ordering includes inserting your own tx
  • New term: Mempool extractable value

    • Re-orgs are extractable value that aren't included in this term
    • Would we want to split off MEV in single-block and multi-block MEV? In that case single-block would be mempool-extractable value!
    • While not fully accurate it does give a newcomer a clearer picture of what's happening here
  • New term: Value extracted from transaction ordering

  • New term: Realised MEV

  • New terms: MEV for maximal extractable value, EV for extracted value

    • Fear that we are overloading the term EV though given it is used already as expected value
  • New term: Re-using and re-purposing the Keeper concept

    • The Keeper term has gained traction (KeeperDAO, Keep3rs etc), it might be interesting to use that term as well
    • It’s not 1-1 with bot activity or MEV but still evokes the right idea

Am a big fan of maximum extractable value and realized extractable value

Mainly because "Damn, have you seen the REVs on Uniswap last week?!" is now a valid sentence

Milkshake Extracted Value

Quite simply, we know that this milkshake will in fact, (sic) "...bring all the 'boys to the yard."

Re: Proposition #3

There are already ERC20 tokens that enable/derive utility by being tied to miner hash rate. What constitutes not "having hash rate"?

Comment on transactional taxonomy

Also, bad and good? Could we use a term similar to negative externality or something similar? Maybe Full Deadweight Transactions, Partial Deadweight, etc.

Thank you all for a wonderful discussion! :)

We're partitioning FRP-1 into smaller chunks, the first of which will keep the number and tackle this issue #39. Closing in favor of that.

Proposition: Do nothing

"Miner extractable value" is Lindy already. It is perfectly fine for researchers to continue referring to it as miner extractable value long after miners are out of the picture. At that point, we'll likely just continue using MEV as the term, and its full form will be a tidbit from history. Plenty of acronyms evolve this way, their full forms are forgotten instead of being redefined.

As for extractable versus extracted, just go with whatever flows naturally. "MEV" could by definition refer to extractable value, and "MEV extracted" would refer to actually extracted value. I personally don't relate to the whole formalising language thing.

More specifically I don't think the field has ossified anywhere enough to warrant freezing definitions for what terms mean or forcing researchers to use a common language .. when everything has exceptions and nuances that could potentially evolve with time. Maybe 2 years from now MEV is a solved topic, maybe it isn't but looks completely different due to consensus changes.

wip here from @fiiiu, closing this issue :) please re-open if you'd like to comment!