## Distortion of MEV Auctions by Withdrawals
[Data Always](https://twitter.com/Data_always) - Feb 20, 2024
**tl;dr**
> MEV-Boost auctions are distorted by withdrawals much more frequently than most people realize, but the losses to proposers tend to be very small. The majority of these distorted auctions go unseen and involve partial withdrawals. Over the past month the median loss to proposers has been $7 and the total loss has been $4,300.
[Improvement Proposal](https://notes.ethereum.org/@ralexstokes/mbip-0) | [Dune Dashboard](https://dune.com/dataalways/mev-withdrawals#how-many-daily-blocks-have-withdrawals-to-the-mev-recipient) | [Raw Data](https://github.com/dataalways/mev-withdrawals)
---
**Motivation:**
> Pool operators are being constantly tricked by builders that include withdrawals in the block value thus invalidating any minimal bid to fall back to local execution. This behavior should be immediately banned by clients under ePBS. Can't stress enough how urgent it is.
> -- [@potuz_eth](https://twitter.com/potuz_eth/status/1758878601020051892)
## What is block scoring and how does it work?
Before The Merge and the genesis of PBS, there were a lot of questions about how MEV-Boost would work in practice. One of the big questions was how relays should handle edge cases around determining the highest bid. The solution was to score blocks by the [interblock change in balance](https://collective.flashbots.net/t/block-scoring-for-mev-boost-relays/202) of the MEV recipient.
Withdrawals did not ship until six months after The Merge and up to that point only the rarest of edge cases would crop up, but now that withdrawals have been live for almost a year it may be time to ask whether we should carve out an exception to the block scoring rules.
The tweets that trend usually describe blocks where full withdrawals account for hundreds of ether, but partial withdrawals actually make up the majority of the problem. To date, there have only been 10 blocks with full withdrawals to the MEV recipient since Shanghai, that's about one per month.
| Slot Number | Date | Withdrawals to Recipient | Proposer |
| -------- | -------- | -------- | --- |
| 6,335,873 | 2023-04-30 | 96.182 ETH | Upbit |
| 6,587,728 | 2023-06-04 | 128.013 ETH | Binance US |
| 7,491,709 | 2023-10-08 | 64.042 ETH | Binance US |
| 7,612,523 | 2023-10-24 | 64.103 ETH | Upbit |
| 7,665,170 | 2023-11-01 | 32.194 ETH | Upbit |
| 7,777,543 | 2023-11-16 | 32.098 ETH | Upbit |
| 7,800,265 | 2023-11-19 | 128.086 ETH | Celsius |
| 7,937,982 | 2023-12-08 | 64.304 ETH | Celsius |
| 8,051,424 | 2023-12-24 | 512.070 ETH | Figment |
| 8,444,661 | 2024-02-17 | 320.172 ETH | Chorus One |
> Table 1: list of all MEV auctions distorted by full withdrawals to the fee recipient since the Shanghai upgrade. Proposers decoded using [Hildobby's pubkey mapping](https://dune.com/queries/3428654).
By contrast, there have been over 2,400 blocks with partial withdrawals to the mev recipient. This means that partial withdrawals account for 99.5% of potential distortions in MEV auctions. In Figure 1, we see that there are about 10 blocks per day with partial withdrawals to the fee recipient--this represents about 0.15% of all blocks.
<iframe src="https://dune.com/embeds/3444652/5787008/" width=100%, height=350/></iframe>
> Figure 1: daily counts of MEV auctions potentially distorted by withdrawals to the fee recipient. On average we see about 10 blocks per day, representing 0.15% of all blocks.
The entities most affected by these blocks are those who set their fee recipient address to their withdrawal address, and then proceed to heavily reuse addresses across their proposer set. Solo stakers are unlikely to be affected by this because the odds of a withdrawal sweep perfectly aligning with their block proposal is very small. Usually those affected are medium-sized poorly configured entities.
In Figure 2, we see that the majority of auctions potentially skewed by these withdrawals pay out to Upbit, Frax Finance, Figment, and Celsius. Whether Daniel Wang is actually his personal wallet or a [wallet for Taiko](https://twitter.com/hildobby_/status/1750214225958412670) is unknown.
![chart 2](https://hackmd.io/_uploads/ByPhMPfna.png)
> Figure 2: breakdown of proposer sets the most frequently affected by these withdrawal distortions. The entities most affected tend to be mid-sized staking providers and CEXs.
## How much do these withdrawals cost proposers?
The easiest way to determine the fair value for hundreds of blocks is to whitelist builders who don't include withdrawals in their bids. Our whitelist includes pubkeys from Titan Builder, rsync-builder, Jet Builder, and bloXroute. All other builders, including Flashbots and beaverbuild, are ignored in our fair value calculation.
We then take the highest bid from this subset of builders that is detected before the winning bid time or the end of the slot, whichever comes last. We call this highest bid the fair value of the auction. The result usually resembles Figure 3.
![bids](https://hackmd.io/_uploads/Hy9RIwf3p.png)
> Figure 3: an example distorted MEV auction. In this block the proposer was paid 82% of what we consider fair value and lost out on 0.011 ETH (~$30).
Repeating this for all blocks affected by withdrawals in the past month and calculating the ratio of the direct payout to the winning bid allows us to create the histogram in Figure 4. We find that the median of these blocks still pays the proposer 93% of fair value and results in a loss of 0.0025 ETH, a little over $7 at current prices.
![share-paid](https://hackmd.io/_uploads/HkoLU3-2a.png)
> Figure 4: the distribution of losses to proposers for these blocks over the last month. Most auctions still pay the proposer the majority of fair value, but in some edge the proposers lose out significantly.
Taking the entire set of blocks, and ignoring cases where the payout was over fair value, throughout the past month these blocks have cost proposers a total of $4,300. The largest loss was $715, with only six of the blocks resulting in losses over $100, and the average loss being $24.
---
## Appendix: Bid Profiles for the Top 5 Edge Cases
Defined as the largest losses vs fair value to proposers over the past month.
**Block 19,167,592:**
![bids-19167592](https://hackmd.io/_uploads/BJf1k_fn6.png)
> Figure A1: a loss of 0.247 ETH or $715. The affected proposer was Upbit and the builder was Flashbots.
**Block 19,066,335:**
![bids-19066335](https://hackmd.io/_uploads/ryESJ_fhp.png)
> Figure A2: a loss of 0.163 ETH or $470. The affected proposer was Revolut and the builder was penguinbuild.
**Block 19,102,368:**
![bids-19102368](https://hackmd.io/_uploads/ByaqJOfhT.png)
> Figure A3: a loss of 0.066 ETH or $190. The affected proposer was Swell and the builder was Flashbots.
**Block 19,205,601:**
![bids-19205601](https://hackmd.io/_uploads/S1jxg_fhT.png)
> Figure A4: a loss of 0.063 ETH or $183. The affected proposer is not tagged and the builder was Flashbots.
**Block 19,217,707:**
![bids-19217707](https://hackmd.io/_uploads/Sym8e_z36.png)
> Figure A5: a loss of 0.053 ETH or $153. The affected proposer was Upbit and the builder was Flashbots.