Joint document by Francesco and Caspar.
We need to pick a proposer LMD score boost value, WPB. Currently WPB is defined in the specs as PROPOSER_SCORE_BOOST: 70
. General opinion is that this value is too high.
On the one hand, you want the proposer boost to not be too high: The reason is that a high proposer boost enables an adversary to abuse it and do ex post reorgs or sandwich ex ante reorgs. Consider the following sandwich scenario: A 10%-adversary proposing block n
and n+2
can reorg block n+1
despite the proposer boost, or in fact because of the proposer boost: 10% (adv. slot n
votes) + 10% (adv. slot n+2
votes) + 70% (WPB) = 90%, which is equal to honest weight voting for block n+1
(assuming all honest validators vote correctly etc.)
On the other hand, you want proposer boost to be high enough to prevent “simple” ex ante reorgs and balancing attacks.
So what is the right middle ground? Let’s consider the trade off space.
A 1-ex-ante reorg refers to the vanilla ex ante reorg that forks out a single honest block.
We need WPB>β to protect against 1-ex-ante reorgs. Simple enough. If you want to account for a 1/3-attacker we need a proposer boost of 1/3.
If we assume favorable attacking conditions with the adversary controlling l blocks in a row we get: WPB>lβ
To protect against a vanilla sandwich reorg attack as described in the intro, we need WPB+2β<1−β, put differently we need WPB<1−3β.
If we assume favorable attacking conditions with the adversary controlling l−1 blocks in a row and one afterwards, we get: 1−β>WPB+lβ.
The security condition being this inequality is actually only true for l>1. For l=1 there’s no ex-ante component, and the sandwich is really just an ex-post reorg, which can be done by a minority adversary by abusing boost. To be safe against this we then need WPB<1−β: the additional β from the formula above does not apply because it would come from the honest slot and the adversary does not yet have a block to vote for (again, the ex-ante component is missing)
To be protected against balancing attacks in expectation we need the following to hold: [(1−β)min(1−β,WPB)]−[βmin(1−β,WPB)+β]>0.
Intuition for this inequality is this: First term represents the number of attestations that the honest validators accumulate, whereas the second term represents the accumulation of adversarial voting power. We need the honest votes to dominate the adversarial votes. The min(1−β,WPB)-term chooses the smaller value between the honest fraction and the boost value, because that is what the adversary will choose to overpower to keep the balancing going. With this in mind and assuming e.g. (1−β)=0.8 and WPB=0.7 we get: With probability (1−β) the honest validators control the slot and gain WPB votes. With probability β the adversary controls a slot in which case they get a boost worth WPB votes as well as the β adversarial votes (validators they control in that slot). Note that the honest validators don’t gain (1−β) votes in an honest slot, because they get balanced by the adversary!
We are still considering the attacker only controls the minimal amount of slots such that the attacks are feasible. In a moment we’ll also consider more favorable attacking conditions: The adversary may control several blocks in a row such that they can accumulate votes to be used in the attack.
The plot can be played around with here.
The following plots the above inequalities. We want to be in the intersection of all colored sets.
The plot suggests we can protect against ex-ante+balancing attacks for any WPB<β (and against sandwich attacks by the l=1-assumption).
Adversary controlling one block, l=1:
The plot suggests WPB=0.5 to protect against ex-ante and sandwich reorgs with l=1, ignoring long-term balancing attacks. Given the incentives at play, it may be reasonable to prioritize reorg protection.
Adversary controlling two blocks in a row, l=2:
This suggests that for l=2 we have an optimal ex-ante+sandwich+balancing protection against <20% attackers by choosing WPB=0.4.
Adversary controlling three blocks in a row, l=3:
This suggests that for l=3 we get ex-ante+sandwich+balancing protection against <14.3% attackers with a boost of WPB=0.43.
Similarly, for l=4 we get ex-ante+sandwich+balancing protection against <11.1% attackers with a boost of WPB=0.44.
Essentially there is a tradeoff between protecting against smaller adversaries with favorable attacking conditions (i.e. controlling multiple blocks in a row) vs. protecting against larger adversaries at all. If we want to be safe against smaller adversaries that control several blocks in a row we need a higher boost value WPB. But a higher WPB allows larger adversaries to do sandwich reorgs more easily. So it’s a question of what we want to be better protected against: smaller adversaries with favorable attacking conditions or be safe at all with larger adversaries.
Here are some useful things to keep in mind as we explore the tradeoff-space and try to come up with a reasonable value:
This would suggest that we should choose a boost value which works well against l=2 and l=3 reorgs. Let’s start with the two values which are optimal for l=2 and l=3, respectively, i.e. 0.4 and 0.43. How do they work for “the other” reorg classes? To check this, we need to compute the maximum β which a certain boost value protects against “at a certain l”. It’s easy to show that this is how to do it:
def max_beta(boost, l):
if l == 1:
return min(1/2, boost)
else:
return min(boost/l, (1-boost)/(l+1))
WPB=0.4 protects against 2-reorgs by β=0.2 adversaries (as we already knew from the plot), and we can now compute that WPB=0.43 protects against β=0.19 adversaries at l=2, quite close.
Similarly, WPB=0.4 at l=3 protects against β=0.133 adversaries, whereas the optimal value WPB=0.43 protects against β=0.143 adversaries.
We can already see that these values work almost identically at both l=2 and l=3, with only a minor tradeoff, so they are intuitively good candidates to be chosen.
To confirm this intuition, we can extend this reasoning to evaluate a whole range of boost values, simply by computing what percentage of all blocks can be reorged with a given boost value, for a variety of adversaries. For a given (β,WPB)-pair, we compute cumulative_reorg_percentage(beta, boost)
, the percentage of blocks which a β adversary can reorg with this WPB, through l-reorgs for l∈{1,2,3}. In practice, l=1 and l=4 are irrelevant, as already discussed above. The table below shows the results of this computation, for boost values ∈[0.37,0.46] and β∈[0.1,0.24]. Each column corresponds to a boost value, and shows the cumulative reorg percentage for a variety of adversaries, so comparing columns is a way to compare boost values.
Note on how to understand the table and on the choice of β values: the reason why the table does not contain higher values of β is that we cannot protect against those β at l=2, so there’s “nothing interesting” happening for those values. At β=0.2, l=2 reorgs become impossible do defend against, and nothing changes afterwards. The next “critical point” would be when l=1 reorgs come into play, but that’s for values of β which are too high for us to care. Similarly, the other “critical point” in the table is for β=0.15, when l=3 become impossible to defend against, so all boost values perform similarly until we get to adversaries for which l=2 reorgs become possible (and since we have chosen a reasonable range of boost values to analyze, this happens almost all at once, for WPB=0.19)
The table suggests that WPB=0.43 is the best proposer boost value, but values are discrete and after all it’s a decision whether we want to be better protected against larger adversaries or smaller adversaries with favourable attacking conditions. Any value WPB∈[0.4,0.43] seems reasonable.
Note that considering l≥4 would add some rounding errors, but we are talking about frequencies of roughly once per day and less.
Feel free to play around with the code computing the above here.
WPB=0.4 optimally protects against reorgs by 20%-adversaries with l=2, while minimally trading off for l=3 by protecting against β≤0.133 adversaries, as opposed to the optimal l=3 protection against β≤0.143 adversaries as achieved by WPB=0.43.
By choosing WPB=0.4 over higher boost values such as WPB=0.43 we are slightly better protected against larger adversaries in l=2 settings, at the expense of being slightly less protected in l=3 settings. A reasonable tradeoff.
We think any value WPB∈[0.4,0.43] is reasonable, with a minor preference for WPB=0.4.