ANALYSIS-TOTAL-STAKE-INFERENCE
| Field | Value |
|---|---|
| Name | [Analysis] Total Stake Inference |
| Slug | 198 |
| Status | raw |
| Category | Informational |
| Editor | David Rusu [email protected] |
| Contributors | Alexander Mozeika [email protected], Daniel Kashepava [email protected], Filip Dimitrijevic [email protected] |
Timeline
- 2026-05-29 —
67e498e— chore: fix math issues (#350) - 2026-05-28 —
d45eed2— Chore: mirror blochain specs into github/mdbook (#347)
Revision History
| Version | Changes | Date |
|---|---|---|
| 1.0.0 | Initial revision. | 2026-04-09 |
Introduction
Cryptarchia consensus leadership is determined by a lottery in which the chances of winning are higher for eligible nodes with a greater stake relative to the total active stake. At the same time, the true total active stake cannot be known by participants due to the privacy properties of Logos Blockchain notes. This tension is resolved in Cryptarchia by having the network estimate the total active stake based on the observed activity of the network.
Goals
The Cryptarchia total stake inference algorithm must satisfy the following criteria:
- The inference process converges quickly, yielding a mean estimate that closely matches the true total stake. However, mean accuracy alone is not sufficient—if the estimator’s variance remains high at steady state, block production rates may fluctuate significantly. Thus, effective total stake inference requires both rapid, accurate mean convergence and low variance to ensure stable, predictable block production throughout the protocol.
- The process can be approximated well enough with the information we have in Cryptarchia.
Overview
This document provides an analysis of the Cryptarchia total stake inference algorithm based on the following criteria:
- Accuracy: The closeness of the mean inferred total stake to the true total stake; it measures systematic bias in the estimator.
- Precision: The degree to which repeated inferences yield similar results at equilibrium; it is quantified by the variance of the estimator and reflects how tightly values cluster around the mean, independent of accuracy.
- Stability Conditions: The range of possible values for the learning rate that result in the stake inference values converging to the true total stake under stable conditions.
- Convergence Speed: The bounds under which the total stake inference values converge exponentially to the true total stake under stable conditions. This analysis also includes an optimal value for .
Total Stake Inference Process
The inference algorithm is described in 🔀[1.0.0] Total Stake Inference - Algorithm. In order to analyze the properties of this algorithm, we model it analytically as the following sequence . We then verify that this model aligns with the algorithm to ensure that the analysis accurately reflects the actual process.
where,
- is the inferred total stake at epoch ;
- is the learning rate which governs how quickly we adjust our estimate to new information;
- is the target slot occupancy rate;
- is the observation period in which we observe the slot occupancy rate;
- is the indicator function resolving to if is true, otherwise;
- is the number of nodes in the system;
- is the lottery result of node at slot , in epoch ; here, 1 signals a win, and 0 signals a loss;
- is the number of slots in epoch that could have extended the honest chain but instead were wasted on orphaned blocks.
We note that the form above captures how the protocol updates its estimate of the total active stake based on observed network activity, and the actual inference process is described at: 🔀[1.0.0] Total Stake Inference - Algorithm. Specifically, at each epoch , the estimate is adjusted according to the difference between the target slot occupancy rate and the observed average fraction of slots with at least one block extending the honest chain (after accounting for wasted slots, ). The learning rate and normalization by control how aggressively the estimate is updated.
Analysis
Accuracy
The process converges to the following value:
where,
- is the mean fixed point of the inference process;
- is the true total stake active during the consensus protocol execution;
- is the honest slot utilization rate representing the rate of occupied slots contributing to the honest chain growth.
We note that for , we have that . This suggests that increased network delay, which reduces the honest slot utilization rate through wasted blocks results in a systematic underestimate of true total stake.
For a derivation of this result, please see Accuracy Derivation.
Measuring from simulations
In simulation, we can derive the value by measuring how many of the active slots contributed towards the honest chain with this formula:
Since varies by epoch and is impacted by the total stake inference process, measurements should be taken after the system converges to a steady state. From simulations, this tends to be after 5 epochs.

Measured value for each epoch under different network delays. typically converges after a few epochs for reasonable networks.
Simulation Results
This result predicts that we consistently underestimate true stake by a factor of . We verified this prediction in simulations and saw a strong correlation between this prediction and the stake we inferred in simulation:

The percent of total stake that we converged to under varying honest slot utilization rates . The model provides a very accurate prediction of the behaviour in simulation. Here, .
Connecting Simulation to Logos Blockchain
With our choice of Blend Network parameters, we measured a value of 0.85 in simulation, plugging that into our model gives . That is, if the Blend Network behaves like our simulation, we expect to infer a total stake that is ~84.7% of the true total stake, or ~15% below true total stake. This loss in accuracy is due to not being able to count blocks off the honest branch.
Precision
The variance at equilibrium is given by
Furthermore, because of and , the variance is bounded above by:
The implication is that wasted blocks caused by network delays have a stabilizing effect on the inference process. As the network delay grows, the variance in our estimate decreases.
For a derivation of this result, see Precision Derivation.
Simulation Results
Checking these predictions in simulations shows very good agreement with analysis:

Here we measure the variance of the inferred total stake after the process has converged. We observe low variance across a wide spectrum of values suggesting that our epoch lengths are long enough to give us a sufficiently precise measurement of total stake for any reasonable learning rate. We see strong agreement with predictions from analysis.
We note that and is measured as described in Measuring from simulations.
Stability Condition
The inference process is stable for values that satisfy the following condition
where is the honest slot utilization rate as mentioned above.
Note that for (perfect network, all active slots are used by the honest chain), we have a lower bound on the stability condition, meaning we can tolerate a higher learning rate and converge faster when the network is inefficient:
For a derivation of this result, see Stability Condition Derivation.
Simulation Results
In simulations, we see that when we exceed the condition, the spread in values explodes for .

The plot shows the spread of values observed over 45 epochs after the process has been given sufficient time to converge. We observe that we have high precision when is comfortably within the stability condition range and grows rapidly outside of the range. Red line signals the boundary of the convergence condition ().
Here, and is measured as described in Measuring from simulations.
Convergence Speed and Optimal Learning Rate
The process converges exponentially with the following bound:
That is, for some constant , at epoch , the distance between the value for the total stake and the equilibrium estimate falls exponentially. Moreover, this result predicts an optimal convergence rate
For reasonable values, this gives us a slightly higher than 1. Choosing a smaller can only improve the stability of the inference algorithm. This fact, combined with the uncertainty in selecting a value suggests that we should just select as our learning rate.

Plotting optimal under varying values shows that is a close enough approximation to the optimal learning rate. Here .
For a derivation of this result, see Convergence Speed and Optimal Learning Rate Derivation.
Simulation Results
We verified these results in simulations, showing that the bound holds for varying ’s.
The plots show the measured normalized error decreasing as epoch increases. Cryptarchia parameters for all plots were .




Optimal convergence was checked as well showing that with optimal[#convergence-speed-and-optimal-learning-rate), even with massive shocks to total stake, we can converge within 2 epochs.
Plots show the distribution of normalized error at each epoch for the optimal parameter under different initial conditions. Cryptarchia parameters for all plots were .

Converging to new equilibrium after losing half active stake.

Converging to new equilibrium after doubling active stake.
Details
Accuracy Derivation
The following is the derivation for the property described in Accuracy.
- The total stake inference equation is given by
where is the learning rate. In the above, we write to emphasise that the random variable is conditional on .
- In the equation used in inference of total stake, we take but the starting point of our analysis uses a more general learning rate .
- We note that is the number of active slots, i.e. slots with at least one winner, in the -th epoch.
- For the outcome of leader election process at the time-slot , the probability of outcomes at times is given by
where
is the probability of winning and is the stake of node .
- We note that is a random variable.
- Node uses its (local) copy of the blockchain in the inference of the total stake and the latter can give a different count for the number of active slots because of a number of slots being “wasted”.
- To model this scenario, we introduce variable , i.e. is conditional on , such that
is the number of blocks on the chain of an honest node, i.e. the number of “honest” slots. The latter will be used for inference by an honest node as follows
where in above .
- We note that
i.e. for the same , the of the honest node’s equation is bounded above by the of the idealised equation.
- Let us assume that is a random variable from the binomial distribution with the parameters and .
- Here is the probability that a slot is “wasted” in epoch and hence there are (on average) number of slots wasted in epoch .
- We note that the above assumption about is mathematically convenient but not necessary true. However it is the simplest non-trivial assumption, and its validity can be tested in simulations.
- We first consider the equation
- Averaging above over the random variable gives us the equation
- Now, let us assume that is deterministic and consider the average of , , with respect to the distribution as follows
- Thus using in above the definition we obtain the following equation
where in above is the true total stake.
- We note that for we recover the following equation
- Next, we define the normalised inferred stake , and the average , and postulate that the latter satisfies the equation
where , i.e. the probability that a slot is not wasted in epoch .
- We note that is the average number of slots not wasted in epoch .
- Let us assume that , i.e. the probability is the same in all epochs, and consider the equation
- Then such that is the fixed point of the above equation. Solving the latter gives us
- We note that above solution exists for . The function is monotonic increasing function of on the interval and hence
Precision Derivation
The following is a derivation for the property described in Precision.
- We consider the equation
where is random variable from the binomial distribution with the parameters and .
- The variance of is given by
- We note that
by the identity.
- First, we consider
- Second, we consider
- Hence
- Third, we consider the variance
- Hence
- To obtain above, we used identities described in the Annex and the following results
- Finally, combining all of the above we obtain the following result
where .
- Thus we obtain
- Based on the above, the variance of the normalised total stake is given by
- Now, for , where , we obtain
- Furthermore, if we assume that above is true for all , i.e.
where . For and we have and hence
- We note that for we have and from the latter follows
- Thus assuming that the equation is correct, we have shown that
i.e. the variance for is bounded from above by the variance for .
Stability Condition Derivation
The following is a derivation for the property described in Stability Condition.
- Let us assume that and consider the equation for , where , as follows
- The above suggests that the solution is stable when
- We note that above is equivalent to
- Thus the solution is stable for
- Furthermore, is a monotonic decreasing function of and hence
i.e. the equation is stable for larger values of the learning rate when .
Convergence Speed and Optimal Learning Rate Derivation
The following is a derivation for the properties described in Convergence Speed and Optimal Learning Rate.
- Applying Corollary 2.1 to the equation with we obtain
where , for some constant .
- We note that for the learning rate , where
the base function is exactly zero suggesting that for any at . The latter is not possible and hence the bound, which assumes that the first order derivative of the map exists, can not be applied when .
- However, for any and learning rate the bound can be used and the speed of convergence is .
- What happens when ? Considering the equation for , the latter gives us
- Ignoring the higher order terms in above and solving $\epsilon(\ell+1) =A(q,f)\epsilon^2(\ell)A(q,f)=\frac{\log \left(1-\frac{f}{q}\right)^{2}}{2 \log \left(1-f \right)}\epsilon(0)$ gives us the equation
- We note that for the is doubly-exponential as .
- Thus locally, i.e. for with , the speed of convergence to is doubly-exponential. The latter suggests that for the learning rate
is optimal.
- The double exponential form dominates convergence to the fixed point for small as can be seen in the figures below




The difference between average (normalised) stake at epoch and its equilibrium value plotted as a function of for and . The solid (red) line is the solution of the difference equation using optimal learning rate and the dashed (blue) line is the double exponential. Here for and (top left, top right, bottom left, bottom right) the is, respectively, of order .
Annex
Why Use Total Active Stake instead of Total Supply
Rather than inferring total stake participating in consensus, we could conceivably relativize stake values for the leadership election by dividing by total supply. A good way to analyze this possibility is by using metrics from Cardano. As of January 23, 2023, there are 22.81B ADA staked vs. a total supply of 36.56B, meaning that ~62% of ADA is staked.
For a sense of how using total supply would affect block proposal rates in Cardano, consider the simple case where one validator controls all the stake. In this scenario, the ratio of the probability of producing a block when relativized with total supply compared to with total stake is
In other words, roughly a 40% suppression in occupied slots. This goes against Cryptarchia’s target of maintaining an average of occupied slots (i.e. roughly seconds between blocks).
Additionally, since we do not adjust our block production rate to compensate for variable participation, we can expect to see fluctuations in block production rates as the percentage of participation changes. This can lead to uncertain finality times, making it difficult to maintain the epoch schedule.
Prior Work
DarkFi
An earlier version of DarkFi also implemented Crypsinous and ran into the same problem. Their solution was to use a Proportional-Integral-Derivative (PID) controller to control the block rate:
A discrete PID controller has been implemented to stabilize the leader selection frequency. In simple terms, the controller is auto-tuning to produce a single leader per slot as often as possible. DarkFi Testnet v0.1 alpha
This has several problems:
-
Ouroboros Praos and its successors, including Crypsinous and Cryptarchia, deliberately select a small active slot coefficient to ensure there is sufficient time for blocks to propagate across the network before the next slot is activated. If were set higher—such that nearly every slot was expected to be filled—there would be insufficient time for block dissemination, leading to a significant increase in blockchain forks. This design choice is fundamental to maintaining network stability and minimizing chain splits in these protocols.
-
The PID controller in the earlier DarkFi implementation was used to dynamically adjust the active slot coefficient in an attempt to regulate block production rates. However, in protocols like Praos, Genesis, and Crypsinous, is a critical security parameter that must remain fixed for the underlying security proofs to hold. Dynamically changing undermines these proofs and could compromise protocol guarantees. Therefore, should be held constant rather than tuned by a PID controller during protocol execution.
-
PID is a heavy tool for the job. It requires careful tuning to system dynamics in order for the PID to behave optimally and modelling the system well enough is difficult.
Bibliography
-
Ortega JM. Stability of difference equations and convergence of iterative processes. SIAM Journal on Numerical Analysis. 1973 Apr; 10(2): 268-82.
-
DarkFi: anonymous, uncensored, sovereign. 2021 [cited 2025 Aug 9]. Available from: https://dark.fi/
-
David B, Gaži P, Kiayias A, Russell A. Ouroboros Praos: An adaptively-secure, semi-synchronous proof-of-stake protocol. EUROCRYPT 2018.
-
Kerber T, Kohlweiss M, Kiayias A, Zikas V. Ouroboros Crypsinous: Privacy-preserving proof-of-stake. IEEE Symposium on Security and Privacy 2019 .
Covariance Identities
- Let us consider , where is a random variable and is a random variable conditional on , as follows
- Hence
- The covariance can be computed as follows
and hence
- The variance can be computed as follows
and hence
Cryptarchia Metrics
The following plot shows various metrics from Cryptarchia as we run the total stake inference protocol. We can see that the total stake inference protocol is able to control the honest chain growth to maintain a growth rate of blocks/slot, the side-effect of this is an increased block production rate, more active slots and an underestimation of total stake.

Parameters: , and ; Logos Blockchain blend network: 3 hops, 2-second per‑hop delay, 6-second mean end‑to‑end network delay. The yellow horizontal lines show the ideal values for each metric given a perfect network (no block delay).