Unstake Lifecycle

Estimating the time between user Unstake Requests and the availability of ETH for claiming.

Validator Withdrawal Time

Maximum Wait Time Calculation

  • After the exit queue, a withdrawal will happen based on the Consensus Layer / BeaconChain (CL) processing loop.

  • Each Slot allows a maximum of 16 withdrawals, which are typically full due to rewards being withdrawn.

  • Maximum time to wait for a withdrawal can be given by the following formula assuming 12 seconds per slot: Seconds = (numActiveValidators / 16) * 12

Example

As of 2023-10-30 there are 871591 active validators.

Max time would be 653693 seconds, or 7.5 days (worst-case scenario, assuming the last positions in the processing queue).

Average time can be estimated assuming a normal distribution, which is approximately half the worst-case time, or ~3.75 days.

Per-Validator Analysis

  • For a more accurate per-validator estimate, consider their position in the processing queue (given by the index).

Example

If the last withdrawal was validator number 430,130 and the exiting validator has index 810,230, there are approximately 380,100 validators ahead in the processing queue, with some slight overestimation.

Per-Request Analysis

  • The above is considering time on a per-validator basis, but not a per unstake request basis. To give an estimate on a per-request basis, you need to also analyze the queue.

The process would be:

  • Determine the unstake request's position in the queue.

  • Determine the number of unfilled requests ahead.

  • Calculate the total ETH of those unfilled requests.

Example

If there are 3 requests before one requesting 20 ETH and a total of 100 ETH, 120 ETH must be returned to the queue before the request can be claimed.

Now you need to estimate how long it will take for 120 eth to be allocated to the queue:

  • Using the above knowledge of validator exits, search all currently exiting validators, and estimate when the withdrawal for each will happen.

  • Account for rewards which will be earned in the future.

  • Optional: Look at the average incoming stake rate - if there is usually 50 ETH inflowing per-day, then only 70 extra is needed to fill the 120.

  • From all the above, find the expected time that 120 ETH will be returned. This is the time the user will need to wait.

Oracle Update Frequency

When a validator withdrawal happens, the ETH can't be allocated until the Oracle provides an updated report containing the the amount of principal v rewards. In most instances, the total time required before the unstake request can be claimed is the sum: of the time it takes for the validator withdrawal to complete and the time until the next Oracle report.

The currently target Oracle update frequency is 8 hours.

Number of Blocks to Finalize

The unstakeRequestsManager.numberOfBlocksToFinalize() sets the minimum time that a claim can happen, which is currently 600 blocks or approximately 2 hours. This means that even if there are unstake requests and immediately another user stakes enough for the request to be filled, the requestor will still need to wait 2 hours to claim.

Last updated