This document contains my notes and some thoughts on Censorship resistance in Ethereum. Topics discussed here will be mainly based on the current PoS architecture and will not consider the PoW architecture. We will also consider mostly PBS(with trusted relays) and not enshrined PBS which is in a very early stage as of now.
I might have made some errors below, please do forgive my ignorance and do correct me where I went wrong

Background

Ethereum is an immutable database which is populated when user transactions are commited to it. These user transactions can range from simple ethereum transfers to arbitrary code execution(smart contracts). User transactions are batched up into blocks which is added to chain when voted by more than 2/3rd of validators in the system.

In PoS, we have a proposer builder seperation model where we can treat the proposer and the builder seperately. This allows the proposer(i.e validator) to defer block building to external builders using a relay as a broker. Proposer's prefer transactions which give them the most value. They would prefer transactions from external builders who tend to be more sophisticated and also have private orderflows which opens them up to a market of searchers who bundle up very profitable transactions. This sophistication has decreased homestakers competitiveness in the builder market. The main competitiveness of homestakers is that they can propose blocks in a fast and reliable way. Using external relays can sometimes cause validators to publish late blocks if the there is high latency in the software or miss block production altogether if the relayer fails to give a block.

Below we attempt to describe how block builder competitiveness could have been reduced as the type of transactions in ethereum evolved.

As Ethereum evolved, the type of transactions had evolved too. From simple ethereum transfers, we soon had DeFi applications like AMMs, Lending markets, on-chain trading derivatives etc. This opened up various markets to buy tokens, to lend tokens, to borrow tokens, to auction liquidations etc. This opened up opportunities for block builders to arbitrage b/w AMMs, sandwich attacks etc. Now builders were incentivised to use sophisticated algorithms to re-order their tx mempools to gain the highest profit. If builders gained too much power, they could remove certain txs from the mempool which could potentially cause a loss to them, e.g a large dump of a token held by the builder in significant quantities. Builders started creating sophisticted algorithms to re-order the mempool to increase their profits. Not all builders were able to create these sophisticated algorithms. Through this a certain %ge of the builders became uncompetitive in the builder market.

With full danksharding coming up, a new tx type called blob transactions has been introduced. Blob txs contain objects called blobs which are just opaque binary data to the protocol. These binary data only mean anything to the sender of the tx. The senders will usually be rollups who will use blobs to store the batched up txs. Someone who want to send a fraud proof can pick up these blobs and create a fraud proof. Blobs are much cheaper than calldata. Blob txs also don't compete with regular txs for gas as they have their own seperate market. Full danksharding is bound to put a lot of strain on regular homestakers to build blocks as it increase n/w bandwidth requirements by a lot and also might involve expensive KZG commitment related computations. Through this a lot of homestakers end up becoming uncompetitive in the builder market.

According to rated, ~70% of external blocks built by ethereum is done by 3 builders. This is a lot of power to a few builders which can potentially bite the n/w back through censoring transactions, stopping the n/w by producing empty blocks, by removing regular txs from mempools and builders placing their own txs.

Censorship resistance is clearly an important problem which has to be solved for the health of the n/w.

Below, we will try to develop a few ways we can think of censorship and slowly try to develop the intuition as to why the market will get more and more centralized.

Ways to Think about Censorship

  1. Through transaction sequencing

In the Ethereum n/w, blocks are broadcasted throughout the entire n/w to all the participants. Each participant applies the block to their current state to transition to the latest state. Applying a block means sequentially executing the transactions of the block. Note that the order is very important. If the orders are changed, then we can potentially get a different state i.e transaction execution in ethereum has to be deterministic.

So, how is the sequence of transaction determined?

It is whatever the block builder wants it to be! This flexibility in ordering the tx mempool how ever a block builder wants it allows block builder to remove certain txs and prioritise certain txs. As long as the final set of txs chosen by the block builder is sequentially applied to the state, it really doesn't matter how its chosen.

A proposer doesn't validate the quality of the transactions. The proposer just applies the txs sequentially and as long we generate the same state root as in the block header post applying of the txs, the proposer is happy.

Imagine, if ethereum had enforced a FIFO like tx mempool processing where each transaction has a uuid and if there was a gap in the tx uuid, the block producer would get penalized. Will censorship be possible in such a system?

  1. Through the idea of a blockspace market

If we assume the proposer and builder as 2 seperate entities in the blockspace market. We can define their roles as proposer being the one who is trying to sell blockspace and builder trying to bid for blockspace to get their built payloads in the block and earn their rewards for it. It is a capitalistic market of sorts where the various builder compete with each other to give the highest bid to the proposer. In this market a relay acts like a trusted broker b/w the builder and proposer. The relayer ensures that the blocks which are submitted by the builder are valid and the relayer also ensures that the proposer commits the particular block submitted by builder i.e it doesn't steal the transactions from the builder.

The relayer is not really responsible for examining the quality of the transactions submitted by the block builder, it is only responsible for ensuring the sanity of the block submitted.

Summary

In both the above 2 models to think of censorship, we can see how builders have most of the power in dictating the quality of transactions. And as we also explored above, as the protocol is evolving a lot of builders are loosing their competitiveness due to increasing demands from the protocol. We can easily visualize a builder market with a few players and a lot of power. We can end up with an dishonest minority group with a lot of power.

An important note is that, in an ideal case we assume that the proposers will be an honest majority since we should move in a direction where it ll be easy to become a proposer easily. And builders should be an honest minority since builders require more higher end machinery which ends up becoming an economy of scale.

Risks of a centralized builder market

In the above 2 sections, we have tried to slowly develop our intuition as to how the builder market can get centralized. In this section, we try to list down a few issues with a centralized builder market.

  1. Transactions can be censored out
  2. Builders can prioritise their own self interests over the protocols by promoting their own transactions:
  3. They can build empty blocks which can delay finalization in the chain
  4. Builders can build private orderflows which can only be accessed for a fees

Design Goals of Censorship Resistance Solutions

The following are design goals which we should consider when we are designing censorship resistant solutions:

  1. We should ensure that we are not increasing the compute, memory, storage and n/w requirements of homestakers by too much since we want proposers to be lightweight.
  2. We are able to reduce the abuse a builder can do
  3. Allign incentives with proposers in such a way that they participate in mechanisms we use to reduce censorship. Censorship resistance could be a pareto efficient problem where the builder might loose out on some value or proposer(which is the entire n/w) ends up loosing out on some value.
  4. Reduce in protocol changes
  5. Try to find a good balance b/w how much %ge of a block can be built by builders and proposers in order to extract the most MeV.
  6. DoS protection in the mempool: The proposer shouldn't include transactions which no one pays for to avoid attackers from bloating up the mempool with invalid txs.
  7. Don't create incentives for proposers to be sophisticated which could lead them to becoming centralized.
  8. Don't make altruism expensive [5].

Potential Solutions

1. Inclusion lists

Inclusions lists and partial block auction is an idea suggested in [2], [4] and [6] by Vitalik and Franceso from EF Research. The fundamental idea is that, the builder will not have a complete say in which txs will enter the block. The proposer will inform the builder of certain txs that they feel should be included in the block.
As suggested in [5], in a non-PBS world, we can have a scheme where proposer of slot n publishes a list to the p2p n/w and attestors of slot n+1 enforce the list for block proposed in slot n+1.

Vitalik Buterin suggests a similar idea in [9]. He adds the constraint of enforcing only 1 tx per sender in the inclusion list. The proposer publishes a crList summary of the txs which includes tx.sender, tx.gasLimit for every tx in the crList. The builder must include the cr list summary in their block. Validators can validate the block by checking if either the sender in the crlist has sent some other tx in the block or if block.gasUsed + tx.gasLimit > block.gasLimit.

Partial Block Auction

In [6], Franceso suggests splitting a block into priority and regular area, where the prioirity area can be built by the block builder and the regular area can be built by proposers. To acheive this, it is proposed to an in protocol definitions to priority transactions vs regular transactions. Priority txs would get executed in the first position of the block to extract priority MeV(which is MeV which gets extracted based on the previous block state).

Socializing the inclusion list

A proposer needs a good incentive to add a decent amount of txs to the inclusion list since a proposer will ideally want a block with large value. Since a builder will be better equipped to build more valuable blocks, a proposer could potentially send empty inclusion lists. We could mitigate this by having proposers not participating in block building propose an inclusion list a few slots prior which will be used by builders to build a block. But despite this, there is no real incentive for a proposer to put in the work to do this. A malicious validator could put a lot of invalid tx in the inclusion list which could potentially reduce the block rewards for the proposer.

One potential solution could be to have a socialized inclusion list mempool from which builders pick transactions to add(The question on why they will have to add the tx will be discussed in the next section). When blocks are proposed using these txs, the block rewards for these paricular txs can be socialized across the validators who have participated in adding txs to the socialized pool. This can potentially give incentives for validators to keep adding transactions to the socializing mempool every slot or so.

Enforcing a dynamic split of proposer and builder txs in a block in-protocol

The protocol could potentially enforce a dynamic split b/w proposer and builder txs in a block. The split %ge can be determined by various factors such as:

  1. Maintain an onchain centralization score: We could maintain an onchain score which could indicate how centralized the block building process. This score could be updated based on the number of blocks built by a particular builder for a given time window. If the score gets very high, we can reduce the %ge blockspace dedicated to the builder and give more blockspace to proposer txs. If the score gets very low, we can give more space for block builders to give more chance for builders to propose a lot of valuable txs to gain more MeV.

The proposer txs can be picked from a socialized mempool as discussed in the previous section. We can maintain a merkle tree of the mempool or some other cryptographic commitment. Builders will have to prove that they have included the transactions from the socialized mempool by providing some proofs. If they fail to provide valid proofs, they will be slashed.

By enforcing a split in-protocol, we can potentially reduce the capacity for censorship or bad acting.

Questions

  1. Will a builder ever have any incentive to prioritise censorship resistance? i.e to include an inclusion list. How can we incentivize decentralization? Will this always be a pareto efficient problem?
  2. Can censorship resistance solutions be without in protocol changes? I believe that adding some form of trustless censorship guarantees in protocol(like reserving certain blockspace for proposer inclusion lists) could be the most secure way as putting trust on a third party might give rise to more censorship related problems. e.g, if we stream proposer inclusion lists txs to an external relay, there might be risks that the relay operator could censor them. We might have to remove trust at some point to get the best censorship resistance solution.
  3. Can we socialize proposer inclusion list and when a tx is picked from the socialized pool of proposer transactions, we socialize the block rewards amongst all validators? Or in general, can we think of solutions in the line of socializing i.e we don't think of one proposer proposing a txs but all the proposers propose txs together and their rewards are socialized.
  4. Continuing on point 3, Does censorship arise from one entity caring more about their self interests rather than the collective whole? i.e If we have a solution, where an entity makes a decision optimizing for their local maximum(which can be their profit for now) vs a global maximum(a decentralized censorship resistant n/w). Can we have censorship resistance without altruism?
  5. Will there ever be a strong incentive to decentralization? Right now, we have validators who are capped at 32eth, but that is not altruism but a protocol specification. If validators could stake more and increase their voting rights, would they not do that to gain more rewards and power over the n/w?
  6. One advantage local builders have over proposers who use external builders is the fact that, proposers who use local builders produce blocks in a much more safe and reliable way. Could this be an incentive?
  7. Can censorship ever be objective? In https://notes.ethereum.org/Dh7NaB59TnuUW5545msDJQ#Natural-language-specification Franceso describes a censored tx as a tx not put into a block even as the block has enough space for it. That is one objective way of looking at it, do we also have to look at censorship from the perspective of few builders having too much power? In my mind, this is a very subjective problem. What if a builder is prioritising certain other txs which are against the self interest of the Ethereum eco-system. In such a case, the objective method fails to account for it.
  8. Rather than solving specifically for censorship, should we solve to reduce centralization of block building in general? This can indirectly solve censorship wouldn't it?

Resources

  1. https://youtu.be/7fyydhPWGhg
  2. https://ethresear.ch/t/how-much-can-we-constrain-builders-without-bringing-back-heavy-burdens-to-proposers/13808
  3. https://ethresear.ch/t/relays-in-a-post-epbs-world/16278
  4. https://notes.ethereum.org/@fradamt/H1TsYRfJc
  5. https://notes.ethereum.org/Dh7NaB59TnuUW5545msDJQ#Natural-language-specification
  6. https://notes.ethereum.org/@fradamt/HJRwnGQ3_
  7. https://ethresear.ch/t/proposer-block-builder-separation-friendly-fee-market-designs/9725
  8. https://dankradfeist.de/ethereum/2021/02/14/why-stateless.html
  9. https://notes.ethereum.org/s3JToeApTx6CKLJt8AbhFQ#Hybrid-PBS-can-we-use-proposers-only-for-inclusion-of-last-resort
Select a repo