consensus-specs icon indicating copy to clipboard operation
consensus-specs copied to clipboard

Validator delegation

Open potuz opened this issue 4 years ago • 0 comments

Delegating validators

We allow for validators to delegate their excess earnings to another (possibly new) validator. Thus allowing for beacon-chain issuance to quickly start staking instead of either remaining inactive or impacting the exit churn. This all within the consensus layer, in particular not involving the deposit contract.

What is included in this PR

This PR includes the changes needed in the beacon chain and an annotated version of these changes together with the text below and a rationale for this PR, I suggest reading directly the design document

Why this PR is needed

At the time of writing the beacon chain has 264,676 active validators, the average earning is 1.34 ETH and over 150,000 validators have earned over 1ETH. There are over 100,000 validators accounted for staking pools according to beaconcha.in. There is no reason to expect these validators to not withdraw their proceeds as soon as they become available. Disregarding those validators that would want to perform a normal withdrawal of all of their funds, there will still be a large number of validators that will simply withdraw their excess earnings, either to keep it off the consensus layer, or to compound their interest rate by staking extra validators, as is expectedly the case of staking pools. Under the current leading proposals these validators will have two paths to withdraw their earnings

  • Enter an exit queue. Wait for their turn to become withdrawable. Deposit the principal. Enter an entry queue. Wait for their turn to become active.
  • Wait for their turn to propose a block to perform a partial withdrawal.

In average the latter will happen once every 37 days with current numbers. The former incurs in costs of earnings lost while in queue and gas costs of redepositing. This leads to an equilibrium in which the exit queue becomes at least large enough that the cost is comparable to waiting 37 days to extract funds. This equilibrium is not a one-time run for the exit queue, as validator rotation to compound interest will be a constant exit force, and the wait time for a proposal increases linearly with the number of active validators, so will the exit queue.

This makes for a bad user experience, particularly for a single staker, 20% of which will have to wait for 2 months for a proposal with current numbers (presumably much more as the validator registry increases)

Delegating validators

The current proposal solves the above problem by providing validators, and in particular staking pools, with a mechanism to continuously transfer their excess earnings to another validator. This new validator can be a new validator. There are several advantages to this mechanism:

  • It keeps the non-staking capital to a minimum since as soon as the delegate validator reaches MAX_EFFECTIVE_BALANCE it enters the activation queue.
  • Validators can compound their interest immediately and spin off new validators more quickly, avoiding the partial withdrawal and deposit cycle (but are still subject to activation queue)
  • Validators can trustlesly sell their excess earnings, providing liquidity for small stakers without requiring them to either wait possibly months nor withdraw their stake. Thus this could in principle be a decentralizing force.
  • It allows for faster withdrawal of earnings since validators can delegate all their validators and then exit the delegate instead of waiting for all their validators to propose.

Adding actual numbers: assuming that every current eligible validator decides to delegate, it would take a little over 1 day to clear the entire set of delegations with MAX_DELEGATIONS=16 and a little over 5 days to do it with MAX_DELEGATIONS=4. After that, beacon blocks would regularly be without delegations as validators need to reach the 1 ETH threshold to be able to delegate

potuz avatar Dec 03 '21 13:12 potuz