Description
(ref #3494, but let's hold this discussion in an issue)
Note: I think it would be helpful to discuss separately the long-run design goals and the short-term plans for the launch of the Hub. I don't think these proposed changes are implementationally risky, but nonetheless it may be the case that we don't want to make any incentive changes prior to Hub launch and would prefer to let governance decide this later.
Desiderata
We assume validators are rational actors and will take the actions which, ceteris paribus, will maximize their expected rewards. I think we want to incentivize four distinct actions:
- Validators proposing a block, when pending fee-paying transactions are awaiting inclusion
- Validators voting (sending their precommits) on valid proposed blocks, always
- Proposers including other validator's votes (from the last commit) in their proposed block, always
- Validators staying online and continuing to participate in consensus and vote on blocks, always
Current distribution scheme
Presently, we pay collected fees and inflation at the beginning of each block as follows:
baseProposerReward
percent directly to the proposer, regardless of precommit inclusion.bonusProposerReward * fractionPrecommits
percent to the proposer, wherefractionPrecommits
is the fraction of precommits the proposer has chosen to include.(1 - baseProposerReward - (bonusProposerReward * fractionPrecommits))
percent to all bonded validators proportionally by stake, regardless of whether or not their precommit was included.communityTax
, plus any unclaimed bonus proposer rewards, percent to the community pool.
We also:
- Track fees collected and inflationary rewards in the same pool, and pay them out simultaneously.
- Slash validators some
SlashFractionDowntime
percent, after missingn / k
(configurable) blocks.
I argue that this scheme partially fails at (1), fails at (2), succeeds at (3), and partially succeeds at (4).
Why?
- Proposers are rewarded regardless of whether or not their block includes any transactions, so rational proposers will elect to propose empty blocks, which produces no utility (no transactions were confirmed) and imposes a cost on the network (block storage, bandwidth).
- Validators are rewarded regardless of whether or not they signed a particular block. As long as a validator is confident that they will not be slashed for downtime - and they can miss a substantial fraction of blocks in a row before being slashed for downtime - electing to withhold their votes will decrease the reward given to the proposer at no cost.
- Proposers opting to include or exclude a given precommit always increase their rewards if they include the precommit (those rewards would otherwise be split among the bonded validators).
- Validators who remain offline for an extended period of time will be slashed (and jailed) for downtime, although they can intermittently go offline without punishment.
Possible alternatives:
Possibly, we could elect to make the liveness requirements more stringent - perhaps slashing and jailing validators who miss 10% of blocks. That would decrease the likelihood of validators withholding signatures to punish the proposer or infrequently voting to save bandwidth/hardware costs, but it would enable concerning precommit censorship attacks such as in #2522 (the lower the liveness requirements are, the smaller stake cabal could coordinate to censor, slash, and jail validators).
Notes:
Previously, with the "piggy bank" fee distribution system, we were limited in our ability to pay differently to each validator. Now, with F1, we can easily pay different amounts to each validator on each block, and for that reason I think we can construct a distribution scheme which satisfies all of these requirements.
Proposed distribution scheme
I instead propose (credit also to @sunnya97 @jaekwon) that we utilize our new ability to pay each validator differently on each block to restructure distribution to directly incentivize voting on blocks, remove downtime slashing (but retain downtime jailing), and tweak parameters slightly to ensure incentive compatibility between the proposer and block signers.
Collected fees and rewards will still be tracked together, and payed as follows:
proposerReward * fractionPrecommits
percent to the proposer.signerReward
percent to all validators who signed the block, proportionally to their stake.(1 - proposerReward - signerReward - communityTax)
percent to all bonded validators (whether or not they signed the block), proportionally to their stake.communityTax + (proposerReward * (1 - fractionPrecommits))
to the community pool (the usual community tax, plus any unclaimed proposer reward).
Slashing would be altered:
- Downtime (
n / k
unsigned blocks) no longer causes a validator to be slashed, but still causes them to be jailed. Since we no longer need to use downtime slashing to punish offline validators, the uptime requirements can be reduced (maybe1000 / 5000
blocks or something), which means that a 34% (or smaller) cartel could not execute the attack outlined in The 34% cabal & selective precommit censorship #2522 (although they could still execute other kinds of censorship attacks).
I argue that this new scheme partially fails at (1), succeeds at (2), succeeds at (3), and succeeds at (4). On those criteria, that makes it strictly better than our current scheme, and as such I suggest we adopt it.
Why?
- Unchanged from the current scheme; proposers are still rewarded for proposing empty blocks.
- Validators are rewarded in part just proportionally to bonded stake, but in part only if they have signed any particular block, so validators who withhold precommits will still succeed in punishing the proposer a bit but will also punish themselves.
- Proposers opting to include or exclude a given precommit always increase their rewards if they include the precommit (given a particular relation between
proposerReward
andsignerReward
, see below); unclaimed proposer rewards go to the community pool. - Validators who miss
n
blocks will be punished exactly proportional ton
, for alln
, since validators are punished (a tiny bit) in withheld inflation for failing to sign any particular block. Validators who remain offline for an extended period of time will also be jailed (but this should be unnecessary to incentivize liveness, and is primarily useful for kicking offline validators to speedup consensus).
Possible alternatives:
- Separately track transaction fees and inflation, and pay them in different fractions to the proposer and to bonded or signing validators. I think this might make sense in the future when fees are substantial, but in the immediate future we should expect fees to be minimal, so I think if we don't incentivize the behaviours we want with inflation (for example, by paying fees to the proposer proportional to precommits included and inflation to bonded / signing validators) they won't be performed (if the fees were negligible, the proposer would just worry about their fraction of the signatures, and thus censor signatures above 2/3).
Notes:
For the Hub to succeed in incentivizing both (2) and (3), a particular relation must hold between proposerReward
and signerReward
, which will constrain our choices.
The block proposer receives rewards proportional to:
rewards ~ P * f + S * (t / T) + (1 - P - S - C) * (t / B)
where:
P = proposerReward
f = fractionIncluded
S = signerReward
t = proposerStake
T = signingStake
B = bondedState
T = f * B
, by construction, so simplifying:
rewards ~ P * f + S * (t / (f * B)) + (1 - P - S - C) * (t / B)
The proposer chooses f
(choosing whether or not to include a precommit), so derive w.r.t f
:
drewards/df ~ P - (S * t) / (f^2 * B)
We want this to be positive:
P - (S * t) / (f^2 * B) > 0
Setting the worst-case t = B / 3
and f = 2/3
, solving for P
:
P > 3S/4
.
That gives us a minimum bound on the proposer reward, given a particular signer reward, to maintain the incentive for a proposer to always include signatures.
It remains, of course, to choose the exact proposer reward and signer reward values - we could choose P = 10%
and S = 10%
, for example - this requirement is only of a ratio between the two, we can choose the "strength" of incentivization relative to just paying bonded validators independently.
🎉 🍌 🚀 - you made it to the end!
Feedback, concerns, questions, or suggestions welcome.