Brapse·Nov 7th, 2022

Toxic Order Flow

Toxic order flow is what we fear when we speak about “bad MEV”. In essence operations, typically transactions, that benefit one party by manipulating the execution quality of others. In this short article we'll break down the terms and inspect the relationship between toxic order flow and MEV in the context of simple automated market makers (AMM).

Toxic Order Flow

Order flow toxicity is a measure of a trader's exposure to the risk that counter-parties possess private information or other informational advantages. - Rand Kwong Yew Low et al.

Toxic order flow or adverse selection are instances of information asymmetry, i.e. one party in an exchange knows more than the other.

A well known example of adverse selection was outlined in a 1970s paper : You want to buy a used car but before, you would want to know if there is anything wrong with it. A used car dealer is incentivized to hide defects in order to get a higher price — selling you a lemon (slang for a defective car). The problem with adverse selection is when it happens repeatedly. If too many used car dealers are sleazy, people will stop trusting used cars and demand for used cars will decrease. With decreased demand, even the most honest used car dealer will have a hard time selling. Over time the market will collapse. This is what we mean by toxic: its ability to poison the well.

HFTs process public (hard) information so as to extract valuable signals about the incoming order flow (Hirschey, 2018), firm fundamentals (Chakrabarty, Moulton, and Wang, 2019), or short-term price movements (Brogaard, Hendershott, and Riordan, 2014). HFTs can even free-ride on information acquisition by slower fundamental traders (Yang and Zhu, 2019; van Kervel and Menkveld, 2019), which could actually discourage fundamental research (e.g., Weller, 2018). - Rand Kwong Yew Low et al.

Exactly quantifying toxic order flow is impossible unless we consider closed systems, where all information can be somehow observed. This should seem familiar to MEV connoisseurs.

Who is hurt by toxic order flow in AMMs

If we inspect our AMM, then we can identify information asymmetries that are legible to the system, e.g. transaction ordering in a public mempool, and some that are not, e.g. PFOF (pay for order flow) where the payer only forwards toxic orders to the AMM and internalizes the rest.

The former generally have no influence on LPs (liquidity providers) because pure AMMs are path independent—that changes when for example external oracles are used for exchange rate updates—but is very much important, and possibly toxic, for traders.

AMMs are vulnerable to toxic order flow from two different perspectives, traders and liquidity providers. LPs provide liquidity in exchange for fees, while traders pay transaction and swap fees in exchange for a quoted “execution quality”. Both are users of the AMM and important to a functioning market but have disjoint incentives. We’ll look at their incentives separately to understand how they at times conflict.

Traders want Execution Quality

Execution quality is typically defined as :

  • quoted price (against some index)
  • speed of execution
  • likelihood of trade executions

These metrics are distributions that help understand the impact of a trade. However to simplify, users want cheap, fast and reliable execution, which are in contention. In traditional markets, brokers are required to report these numbers periodically (one example , another example )

Liquidity Providers want uninformed volume

LPs contribute the liquidity traders swap against. In exchange for this service they are paid exchange fees. Their revenue is tied directly to the volume that moves through their pools.

The risk LPs take has had the unfortunate name of “impermanent loss”. It tries to capture the fact that as the prices of the provided asset diverge from the prices at which the liquidity was provided initially, the LPs will underperform versus just holding the assets. But if prices converge back and the LP will end up with the same ratio of assets, plus fees. In practice most LPs seem to be unprofitable. (references: here , here and here ).

A better framework was provided by Milionis et al which decomposes the risk LPs take on into market risk, LVR (loss-versus-rebalancing) and the trading fee. Market risk is the exposure LPs have to market movements of their assets, which could be hedged. LVR—the difference between the rebalanced portfolio, that buys assets on an external market, and the the AMM pool—is then the adverse selection cost that an LP pays, as they commit to a payoff function in advance. Their inability to adjust the current pool exchange rate to the true market price sets them up to be exploited by informed traders unless the trading fees they are paid offset the LVR. The problem is that a simple AMM uses fixed fees, ignoring market conditions, while the LVR will vary heavily.

It is important to note that LPs here are not affected by the typical “bad MEV” strategies, that we consider for traders, e.g. front running, because toxicity for them comes from information that is not part of the system. Though the picture changes if we start considering the entering and exiting of LP positions.

A Nuanced Conversation

With the stage set we can now start exploring some of the nuanced relationship between Toxic Order flow and MEV.

In general, it is important to distinguish between the different parties involved.

Is arbitrage toxic order flow?

Arbitrageurs are by definition informed traders. They play an important role to keep exchange rates in line with other venues whenever it is profitable to do so, which generally means better execution quality for traders. But since LPs are not able to react to the external prices changing their “stale orders” are executed which puts them on the losing end of the trade. These flows are toxic in general but it is not entirely clear yet if that implies LPs are always losing money ( yes , maybe )

We found that for the 17 pools we analyzed, covering 43% of TVL and chosen by size, composite tokens and data availability, total fees earned since inception until the cut-off date was $199.3m. We also found that the total IL (impermanent loss) suffered by LPs during this period was USD 260.1m, meaning that in aggregate those LPs would have been better off by USD 60.8m had they simply HODLd. - Loesch et al

Is Sandwiching toxic order flow?

Yes, for the person being sandwiched—though some people argue if a trader sets a slippage tolerance of 10% then it is well within the right of anyone to exploit that commitment. It increases the experienced price of another traders swap, i.e. makes their execution worse. However, sandwich attacks increase the number of trades, once for the front run and then for the back run. The increased volume results in more fees for the LP.

Conclusion: Is all MEV Toxic Order Flow?

As we’ve discussed, toxic order flow is about information asymmetries. By definition these asymmetries have at least one party that benefits and at least one that is harmed.

We can generally split these into two classes of information:

  • inherent to/contained within/legible to or
  • external to/illegible to

the system and MEV strategies can rely on any combination of them.

For the first class of asymmetries there are remedies available to reduce the asymmetries via mechanism design, some of which we will be discussing in future articles.

In the second case, information is difficult if not impossible to attribute to a specific source. The system might be changed such that some information becomes more legible and therefore improves execution quality for its participants. But in general it seems impossible to completely remove information asymmetries, i.e. unless one system can fully internalize all other systems, there will always be asymmetries across their domains.


Contact us at: