--- tags: flashbots, mpc, research --- # Using MPC to provide full privacy for flashbots Given the current Ethereum state and a set of bundles, we want to use MPC to do the following: - Calculate the score of each bundle - Check each bundle against the Ethereum state for validity - Ideally, this can be done with some form of zk-EVM In order to achieve this, we need do have MPC programs for: - Scoring each bundle using $$ s_{v0.3-4} = \frac{\Delta_{coinbase} + \sum_{T\in U}g_Tm_T - \sum_{T\in M \cap U}g_Tm_T}{\sum_{T\in U}g_T} $$ where $s$: bundle $U$ score used to sort bundles. $U$: ordered list of transactions $T$ in a bundle. $M$: set of transactions $T$ in the mempool. $g_{T}$: gas used by transaction $T$. $p_{T}$: gas price of transaction $T$. $c_{T}$: fee cap per gas of transaction $T$. $\delta_T$: priority fee per gas of transaction $T$. $e_{T}$: effective fee per gas of transaction $T$ equal $\min$($c_{T}$, BASEFEE + $\delta_T$). $m_{T}$: miner fee per gas of transaction $T$ equal $e_{T}$ - BASEFEE. $\Delta_{coinbase}$: coinbase difference from direct payment. - Checking the bundles against the current Ethereum state - requires a lot of ORAM ## Who will run the MPC nodes? In a basic version of this, the relayers can run the nodes. However, we don't get full privacy because the miners can still see the bundles after the fact. Ideally, the miners run the MPC amongst themselves. That way searchers can send their bundles directly to miners as private inputs into the MPC computation and don't see a priori what the bundles are. We still have a problem though that after the MPC computation is done, 1) Which miner gets access to these bundles? - Can be solved by adapting the auction process so that miners also bid for who gets access to the most profitable bundles. This would also be done in an MPC-like fashion 2) Miners can still order bundles as they see fit. - This is hard to solve since we need to answer the question of is it more profitable to create bundles or full blocks? In the latter case, then we solve this problem since the miner themselves bid to have the most profitable block. In the former case, the miner can still front-run the bundles. It seems like in practice, miners front-running bundles through flashbots is rare so may not be a big problem. ## Can this be implemented today The bundle scoring and the modified auction can be implemented today with current MPC tooling. However, verifying the Ethereum state within an MPC will be a challenge. This may potentially be remediated, initially with some cryptoeconomics. Ideally, though, we can verify the validity of the Ethereum state against a set of bundles within a ZKP.