# On the toxicity classification of MEV transactions

**URL:** https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521
**Category:** Data
**Created:** [October 12, 2022, 5:54pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521 "2022-10-12T17:54:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Eru\_Iluvatar](https://collective.flashbots.net/user_avatar/collective.flashbots.net/eru_iluvatar/32/310_2.png) [@Eru\_Iluvatar](https://collective.flashbots.net/u/Eru_Iluvatar)
#### Post date: [October 12, 2022, 5:54pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/1 "2022-10-12T17:54:41Z")

</div>

Given a FB bundle containing some MEV (eg: [https://flashbots-explorer.marto.lol/?block=15537389](https://flashbots-explorer.marto.lol/?block=15537389)), do we have a proven way to analyze whether the MVE was toxic (sandwich/frontrun) or non-toxic (backrun)? This would be very useful to feed all the discussions on the toxicity of MEV. Essentially what we need is a way to classify a bundle into one of the following categories:

- frontrun
- backrun
- sandwich
- liquidation
- something else

---

<div class="post-metadata">

### Author: ![Quintus](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@Quintus](https://collective.flashbots.net/u/Quintus)
#### Post date: [October 12, 2022, 10:39pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/2 "2022-10-12T22:39:41Z")

</div>

I think consensus is that it’s hard to detect frontruns if someone is trying to hide them. Current data is mostly heuristics. @taarushv should know

---

<div class="post-metadata">

### Author: ![MikolajBarczentewicz](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@MikolajBarczentewicz](https://collective.flashbots.net/u/MikolajBarczentewicz)
#### Post date: [October 13, 2022, 9:25am UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/3 "2022-10-13T09:25:28Z")

</div>

Pmcgoohan may have more to say - check out his [zeromev.org](http://zeromev.org) project if you don’t know it already.

---

<div class="post-metadata">

### Author: ![pmcgoohan](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@pmcgoohan](https://collective.flashbots.net/u/pmcgoohan)
#### Post date: [October 13, 2022, 10:56am UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/4 "2022-10-13T10:56:12Z")

</div>

In order to identify MEV as being toxic, you first need to admit that validators reordering is what makes it toxic.

> **[definition of terms](https://info.zeromev.org/terms#toxic-mev)**
>
> Ethereum miners can take money from you by frontrunning and censoring your transactions. Learn about this and the zeromev frontrunning explorer.

Flashbots have not seemed able to do this so far, perhaps because their business is maximizing the ability of validators to reorder transactions for profit.

But it’s not hard to grasp. Uniswap, for example, is completely time order dependent. If Alice and Bob are trying to buy the same asset, the amount they get differs depending on who executes first. There is no way around this, it is literally how Ethereum/Uniswap were designed.

It is also the reason why Flashbots continued assertion that time order is not objectively fair must be false in the case of L1 Uniswap.

Grabbing the latest example as I’m writing this:

> **[zeromev ethereum frontrunning explorer - showing user losses from miner...](https://zeromev.org/block?num=15738654)**
>
> Ethereum miners can take money from you by frontrunning and censoring your transactions. Watch this in realtime using the zeromev frontrunning explorer.

Here you can see 2 sandwiches where the victim has been delayed by 11 secs and 1 min 22 secs respectively. Hover over arrival times and check the network latency box and you’ll see the p2p latency was around 798 ms in this case. This is so much less than 11 secs that there can be no doubt these transactions were frontrun.

By looking for reordering beyond measured network latency in this way, we can identify to a very high degree of accuracy whether txs have been frontrun or not- it’s not difficult or ambiguous.

---

<div class="post-metadata">

### Author: ![Eru\_Iluvatar](https://collective.flashbots.net/user_avatar/collective.flashbots.net/eru_iluvatar/32/310_2.png) [@Eru\_Iluvatar](https://collective.flashbots.net/u/Eru_Iluvatar)
#### Post date: [October 13, 2022, 1:40pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/5 "2022-10-13T13:40:28Z")

</div>

> [@Quintus](#):
>
> I think consensus is that it’s hard to detect frontruns if someone is trying to hide them.

How can one hide a frontrun?

> [@pmcgoohan](#):
>
> In order to identify MEV as being toxic, you first need to admit that validators reordering is what makes it toxic.

I see your point, different definitions. I qualify a MEV transaction as toxic if it is a frontrun/sandwich while I qualify it as non-toxic if it is a backrun/liquidation. Is your fork of mev-inspect open source @pmcgoohan ?

I am trying to formalize all of this in mathematical terms, I should have something clean to share soon.

---

<div class="post-metadata">

### Author: ![pmcgoohan](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@pmcgoohan](https://collective.flashbots.net/u/pmcgoohan)
#### Post date: [October 13, 2022, 2:25pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/6 "2022-10-13T14:25:40Z")

</div>

> [@Eru\_Iluvatar](#):
>
> I qualify a MEV transaction as toxic if it is a frontrun/sandwich while I qualify it as non-toxic if it is a backrun/liquidation

Yes, we’re pretty much saying the same thing.

The backrun is non-toxic because it follows after the target tx. However, if that backrun was to be re-ordered so that it also frontruns another swap, that would become a frontrun. I’m interested in finding out how much that happens with arbs, for example.

A liquidation is also non-toxic, as long as it doesn’t involve frontrunning someone elses attempt to liquidate, or censoring a tx attempting to recollateralize.

Will be interested in your formalization!

Counter to my defining toxic mev as reordering for profit, I define fair order as send time order.

---

<div class="post-metadata">

### Author: ![defi\_viking](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/d/b19c9b/32.png) [@defi\_viking](https://collective.flashbots.net/u/defi_viking)
#### Post date: [October 21, 2022, 1:39pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/7 "2022-10-21T13:39:24Z")

</div>

> [@pmcgoohan](#):
>
> Counter to my defining toxic mev as reordering for profit, I define fair order as send time order.

I do understand your preference for time order as the fairest. But what is the argument against gas order (economically rational)? Do you expect in a strict gas-order world, that proposers wrap their gas fees around a potential MEVable transaction?

---

<div class="post-metadata">

### Author: ![Eru\_Iluvatar](https://collective.flashbots.net/user_avatar/collective.flashbots.net/eru_iluvatar/32/310_2.png) [@Eru\_Iluvatar](https://collective.flashbots.net/u/Eru_Iluvatar)
#### Post date: [October 24, 2022, 8:14am UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/8 "2022-10-24T08:14:35Z")

</div>

> [@pmcgoohan](#):
>
> Counter to my defining toxic mev as reordering for profit, I define fair order as send time order.

Yes I see your points, because as a user, even if you do not get a worse price by being sandwiched/front ran, your tx is still delayed because some MEV txs got included in front of you. I am very much reasoning in terms of toxic/non-toxic in a world where I accept that MEV is happening and I try to see which form is worse than the other.

> [@pmcgoohan](#):
>
> Will be interested in your formalization!

Work In Progress but taking some time. I have actually submitted a [FRP](https://github.com/flashbots/mev-research/pull/85), I think it is worth the time investment to create a framework where we formalize everything and on which we can build further research.  
Who has never dreamt to see the “toxic” vs “non-toxic” MEV split on the [flashbots explorer](https://explore.flashbots.net/)? (cc @bert)

---

<div class="post-metadata">

### Author: ![MikolajBarczentewicz](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@MikolajBarczentewicz](https://collective.flashbots.net/u/MikolajBarczentewicz)
#### Post date: [October 24, 2022, 6:22pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/9 "2022-10-24T18:22:49Z")

</div>

I just realised that there may be a partially overlapping effort: [mev-research/FRP-1.md at main · flashbots/mev-research · GitHub](https://github.com/flashbots/mev-research/blob/main/FRPs/completed/FRP-1.md)

@alex @fiiiu - has the new taxonomy been published?

---

<div class="post-metadata">

### Author: ![Eru\_Iluvatar](https://collective.flashbots.net/user_avatar/collective.flashbots.net/eru_iluvatar/32/310_2.png) [@Eru\_Iluvatar](https://collective.flashbots.net/u/Eru_Iluvatar)
#### Post date: [October 25, 2022, 5:08pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/10 "2022-10-25T17:08:20Z")

</div>

> [@MikolajBarczentewicz](#):
>
> I just realised that there may be a partially overlapping effort: [mev-research/FRP-1.md at main · flashbots/mev-research · GitHub](https://github.com/flashbots/mev-research/blob/main/FRPs/completed/FRP-1.md)

No, as mentionned in the FRP, we want to build on this paper and further develop the concepts for specific set of transactions (i.e. bundles), to have a more precise taxonomy + corresponding formulas for sandwiches/backruns/frontruns…

---

<div class="post-metadata">

### Author: ![MikolajBarczentewicz](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@MikolajBarczentewicz](https://collective.flashbots.net/u/MikolajBarczentewicz)
#### Post date: [October 26, 2022, 6:26am UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/11 "2022-10-26T06:26:41Z")

</div>

Good point, I didn’t notice that “Quantifying Realized Extractable Value” was the output of that FRP. But I thought that there was a more detailed MEV taxonomy about to be published by Flashbots - isn’t that right @alex ?

---

<div class="post-metadata">

### Author: ![Quintus](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@Quintus](https://collective.flashbots.net/u/Quintus)
#### Post date: [November 7, 2022, 11:46pm UTC](https://collective.flashbots.net/t/on-the-toxicity-classification-of-mev-transactions/521/12 "2022-11-07T23:46:39Z")

</div>

> [@Eru\_Iluvatar](#):
>
> How can one hide a frontrun?

Using a different EOA to the backrun. Potentially even inserting some other irrelevant transactions in between the frontrun and the target.
