https://hackmd.io/@flashbots/MEV-1559

Kristof Gazso (Nethermind) & Alejo Salles (Flashbots)

The incorporation of EIP-1559 in the London hardfork brings a major restructuring of the Ethereum fee mechanism, aiming to allow for easier fee estimation by users and consolidate ETH as the base currency of the network by burning part of the transaction fees. This post analyzes some of the consequences of this EIP under the light of the MEV (Maximal Extractable Value) phenomenon, that is, the permissionless extraction of value by the reordering, addition, or censoring of transactions.

Under the new fee mechanism, instead of choosing a gas price for their transactions, users set a “priority fee” for miners to incentivize inclusion, alongside a “max fee”, stating the absolute maximum price that they are willing to pay. The protocol will now set a per-block “basefee”, computed programmatically from the amount of gas used in the block immediately before, in a negative feedback loop meant for block sizes to stabilize around a target size s0 (initially equal to the maximum current block size). Valid transactions pay a gas price equal to the basefee plus the prioirity fee (only up to the max fee–needed in case of sudden basefee increases); the prioirity fee goes to the miner, and, crucially, the basefee is burnt.

These changes have some obvious immediate implications for MEV-related infrastructure, like eliminating the possibility of zero-Gwei transactions, which are presently used for front-running protection in some DEXes like MistX, where miner fees are taken directly from the transferred tokens. On the other hand, we don’t expect radically new sources of MEV to arise from the novel fee mechanism. In this note, we highlight three areas where EIP-1559 might have interesting consequences for MEV: increased MEV extraction incentives for miners, the coexistence of different auctions in the Ethereum protocol and its implications for EIP design, and the role of Flashbots as a miner coordinating agent and its ethical implications.

Miners economics and the increased incentive for MEV extraction

Either due to proper economic incentives or because of their loyalty to the network, miners have produced blocks since the inception of Ethereum without major malicious deviations from the protocol. The Flash Boys 2.0 paper however warned of the nefarious consequences that indiscriminate MEV extraction might bring to the protocol like transaction censoring, or chain re-orgs ultimately threatening consensus stability. Notably, however, it was only recently that MEV extraction became the standard for miners when Flashbots introduced MEV-geth, a fork of the geth client that miners can run to start receiving “MEV bundles”, packaged sets of transactions that ensure a payment to miners upon inclusion. Partly due to the looming threat of EIP-1559 reducing their income, most miners were quick to adopt MEV-geth to partially palliate the shock. It is then reasonable to ask, when EIP-1559 comes into action, whether miners will devote extra efforts for further MEV extraction, in particular in ways that are harmful to the network.

While we are not able to make a quantitative prediction due to the hard to quantify loyalty component, we find it useful to be able to think of MEV extraction on the same footing as other strategies miners have to compensate for lost revenue, like switching their hashrate to other GPU chains. To this effect, we provide a basic model of miner economics allowing us to estimate the required increase in Realized Extractable Value[1] to match the profit hike from switching chains post-London.

We start by defining a set of Proof-of-Work GPU-based chains X excluding Ethereum where miners could (we assume costlessly) point their hashrate to. We then posit that, in equilibrium, total GPU hashrate H will be distributed between Ethereum (pre- and post-London) and X in a way that maximizes profit-per-hashrate (otherwise more miners would switch until this equilibrium is attained). Finally, assuming cost-per-hashrate is constant and the same for all chains, we can derive the hashrate fraction that will remain in Ethereum after the London hard fork. This can be succintly expressed as:

where H1559 is the post-London Ethereum hashrate, HE is the pre-London Ethereum hashrate, γ= is the fraction of total revenue left for miners in Ethereum after EIP-1559, and δ= is the ratio of total X revenues to pre-London Ethereum revenues (we save the reader from the algebra, which can be checked here). The relation between these quantities can be visualized as follows:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/108e069a-bf59-4bba-a898-d81157e838ed/r1OgLZITO.png

Gas prices in Ethereum have suffered variations of two orders of magnitude, which makes it extremely hard to produce accurate estimations for the parameters of the model. We can still use data from the Flashbots dashboard and Etherchain’s data on mining reward to pick a value of γ=0.86 for the fraction of total miner revenues that will still be available in Ethereum after EIP-1559, based on recent gas prices. Finally, using CoinMetrics data to find the mining revenue in USD per day for GPU-based PoW chains other than Ethereum to find RX, we get an approximate value of δ=0.15[2]. Plugging in these value we obtain ≃98% for the fraction of hashrate staying in Ethereum after the London fork[3].

This constitutes an extremely simplified model of miner economics, neglecting in particular the cost of switching to other chains. It does however provide a framework to reason about MEV revenues in the broader context of miner economics. Based again on highly-varying Flashbots data, we find that, all other things being equal, the fraction of miners’ revenue coming from Realized Extracted Value will rise from 2.9% pre-London to 3.4% after the fork[4]. If, instead of switching their hashrate to other chains until attaining equilibrium miners decided to compensate for the reduced revenue by extracting more MEV, it would take them an extra 22% of extracted MEV to match the profit hike of switching lanes (which would still entail a great revenue reduction from the pre-London rates). A more detailed model including an explicit formulation of the costs of extra MEV extraction vs. chain switching is outside the scope of this note. The wildly varying nature of the values involved casts some doubt about the utility of highly elaborate models, on top of the subjective factor of miner loyalty playing a big part in miners’ course of action.

On this note, most mining pools have publicly opposed the EIP, feeling that they are being thrown under the bus after half a decade of maintaining Ethereum’s security. Tim Roughgarden’s analysis of EIP-1559 points out that miner loyalty might be a major reason why there haven’t been any major disruptions to Ethereum’s consensus since genesis, even if deviations from the protocol might have temporarily yielded increased profits. This might make a decrease in miner revenue that arises from the implementation of this EIP more dangerous than if it came from a drop in the price of ETH, since it comes accompanied by a loss of trust on the miners’ side. Ultimately, we will need to wait until the EIP goes live to see the extent to which miners start going to extra lengths to extract more MEV in ways detrimental to general network health, as we discuss later in the post.

The fee mechanism put forth in EIP-1559 was designed (and later analyzed) with an auction for transaction inclusion in mind. In fact, however, much of the activity in Ethereum is concerned with not only inclusion but also transaction ordering within a block. Most MEV extraction opportunities depend on the relative positioning of transactions, just having transactions included won’t cut it. The current first-price mechanism is limited in that users can express their wish to be included earlier than a certain target transaction, or, at most, aim at landing just after one by picking its exact gas price and hoping luck will be in their favor (backrunning). This limitation has led to systems like Flashbots, which provide a richer language for expressing preferences (users can bid for precise relative ordering of transaction sets, the “MEV bundles” mentioned above).

Another desirable property not provided by the current pricing mechanism is privacy. Searchers extracting MEV typically wish their maneuvers to be kept private–at least until they are inevitably made public when mined in a block–to prevent other actors from stealing their lot. Flashbots, as well as other private pool providers, offer this kind of guarantee (apart from uncle risk or miner misbehavior). Recently, several user-facing applications like MistX and 1inch have turned to Flashbots to provide users front-running protection in their trades. If an increasingly larger fraction of the network is concerned with bidding for ordering and privacy as opposed to simply inclusion, this begs the question whether EIP-1559 brings any advantage at all, or will instead be entirely superseded by Flashbots-like, more expressive mechanisms. In an extreme scenario, these different coexisting auctions could show negative interactions, where users participating in one of the auctions disrupt the other one.

This richer landscape where users care for ordering and privacy apart from inclusion raises concerns about the actual applicability of rigorous formal analyses like Tim Roughgarden’s (cited above). In his paper, he shows that the EIP-1559 mechanism is Myopic Miner Incentive Compatible (MMIC, meaning that miners are incentivized to act according to it in the single-block scale), Off-Chain Agreement-proof (OCA-proof, meaning that users and miners cannot outgame the system by using off-chain communication), and, apart from periods of high-demand, User Incentive Compatible (UIC, meaning that it achieves the desired UX improvement of users expressing their true preferences for inclusion without needing to speculate on other users’ actions). These conclusions rely however on the “purely inclusion” auction, and it’s not clear how they would hold out in the current, more complex setting.

In particular, the paper discusses an alternative proposal, the “tipless mechanism”, where there’s no miner priority fee, and which is shown to be MMIC, always UIC, and OCA-proof apart from periods of high demand. In short, it trades OCA-proofness for preserving the UX improvements throughout. The fact that, unlike what is suggested in the paper, Off-Chain Agreements are nowadays common via systems like Flashbots suggests that perhaps a tipless mechanism would have been a better choice than 1559’s basefee + priority, optimizing the standard auction for regular users who only care about inclusion and directing more sophisticated users to ordering-focused auctions.

It is unfortunately extremely hard to rigorously model the ordering auction (consider for instance that the allocation rule cannot be simply expressed in terms of binary–included or not–values, or that the feasibility condition needs to take into account the interaction between transactions and hence cannot be expressed as a single inequality). Instead, it might be more useful to think of the different auctions separately and analyze their potential interactions, as pointed out before. To give one example of one such interaction we can take the case of μ, the marginal cost of including a transaction. In an MEV-less world this could be thought of as a constant, and has actually been estimated. In the MEV-rich setting, however, a huge MEV reward present in the mempool might render it pointless to even run a regular auction for inclusion in the block, greatly raising greatly the value of μ, making it in turn impossible for users to converge on a reasonable value for the priority fee[5].