A Reward Function That Balances Validator Participation and Network Security
Proof-of-Stake networks live and die by one tension: reward validators enough to keep them staking, without letting rewards concentrate stake in the hands of a few whales. Too little participation and the chain becomes cheap to attack. Too much stake concentrated in a handful of validators and the chain becomes cheap to capture. This article walks through a concrete reward-function design that tries to sit at the sweet spot between these two failure modes, and solves it numerically in Python.
The Design Problem
Consider a network with $N$ validators, each holding a stake $s_i$, with total network stake $S = \sum_i s_i$. Define the stake share of validator $i$ as:
$$x_i = \frac{s_i}{S}$$
and the network-wide staking participation ratio (staked tokens over max stakeable supply) as $p$.
Component 1 — Base reward rate. Like most real PoS issuance curves, the per-validator annual reward rate should shrink as more of the network stakes, to keep inflation under control:
$$R_{base}(p) = \frac{C}{\sqrt{p}}$$
Component 2 — Security gain. More total stake means a higher cost to attack the network, but with diminishing returns:
$$Sec(p) = 1 - e^{-kp}$$
Component 3 — Liquidity cost. Capital locked into staking has an opportunity cost that grows faster than linearly as participation rises:
$$Cost(p) = p^2$$
Component 4 — Decentralization adjustment. To prevent whales from snowballing their share, each validator’s effective reward is scaled by a redistribution factor that penalizes stake above the equal share $1/N$ and rewards stake below it:
$$g(x_i, \alpha) = 1 - \alpha\left(x_i - \frac{1}{N}\right)$$
where $\alpha \in [0, 1)$ controls how aggressively the protocol redistributes rewards toward decentralization.
Component 5 — Centralization risk (HHI). The Herfindahl–Hirschman Index measures how concentrated stake is:
$$HHI(\alpha) = \sum_{i=1}^{N} \left(\frac{x_i \cdot g(x_i,\alpha)}{\sum_j x_j \cdot g(x_j,\alpha)}\right)^2$$
Lower HHI means a more decentralized, more attack-resistant validator set.
Putting it together — the Network Health Score (NHS), the objective the protocol designer wants to maximize by choosing the right $\alpha$ (redistribution strength) and $p$ (target participation ratio):
$$NHS(\alpha, p) = w_1 \cdot Sec(p) - w_2 \cdot Cost(p) - w_3 \cdot HHI(\alpha) + w_4 \cdot \frac{R_{base}(p)}{\max R_{base}}$$
The optimization task is simply:
$$(\alpha^*, p^*) = \arg\max_{\alpha, p} ; NHS(\alpha, p)$$
Python Implementation
1 | import numpy as np |
Code Walkthrough
Section 1 — Validator population. A lognormal distribution generates a realistic PoS stake landscape: a small number of large validators (whales) and a long tail of small ones. Sorting descending and dividing by S_total gives each validator’s baseline stake share x. The baseline HHI and an approximate Nakamoto coefficient (how many validators it takes to reach 33% of stake) are computed as reference points.
Section 2 — Reward components. Each of the five formulas from the math section is implemented as its own function, so the model stays modular and easy to re-tune. base_reward_rate uses np.clip to avoid a division-by-zero when p is near zero. redistribution_factor is the key decentralization lever: for a whale with $x_i \gg 1/N$, the factor drops below 1, shrinking its effective reward share; for a small validator, the factor rises above 1.
Section 3 — Vectorized grid search. This is the performance-critical part. Instead of looping over every (alpha, p) pair with nested Python for loops (which would be $O(120 \times 120)$ slow Python-level iterations), the HHI is computed only once per alpha value (since it doesn’t depend on p), and then broadcast across the p axis using np.repeat. The full NHS surface is then computed in a single vectorized NumPy expression across the entire 120×120 grid, which runs in milliseconds instead of seconds. np.unravel_index(np.argmax(...)) locates the optimal (alpha*, p*) pair directly from the flattened array index.
Section 4 — Visualization. Four panels are built from the same computation: the full 3D NHS design surface, the HHI-vs-alpha decentralization curve, the security/liquidity trade-off curve, and a before/after bar chart showing how redistribution reshapes the top 15 validators’ stake shares.
Optimal redistribution strength alpha* = 0.950 Optimal network staking ratio p* = 0.400 Maximum Network Health Score = 0.8216 Baseline HHI (alpha=0): 0.02292 -> HHI at alpha*: 0.02238
Visualizing the Results
The top-left 3D surface is the heart of the analysis: it plots the Network Health Score across the entire $(\alpha, p)$ design space, with the red marker showing the optimal point found by the grid search. Notice the surface isn’t a simple bowl — there’s a ridge along the $\alpha$ axis where decentralization gains taper off, and a peak along the $p$ axis where the security benefit of more participation is outweighed by liquidity cost beyond a certain point.
The top-right panel shows why redistribution matters: as $\alpha$ increases, HHI drops steadily, meaning stake becomes more evenly distributed and the network becomes harder to capture. The dashed red line marks the optimal $\alpha^*$ — pushing redistribution further than this point yields diminishing decentralization benefit while increasingly discouraging large validators from participating at all.
The bottom-left panel visualizes the classic security-versus-cost trade-off in $p$ alone: security gains saturate quickly, while liquidity cost accelerates. Their crossover region is where $p^*$ tends to land.
The bottom-right panel makes the redistribution mechanism concrete: it compares the top 15 validators’ baseline stake share against their effective share once the optimal redistribution factor is applied — visibly flattening the whale-heavy tail.

Interpreting the Optimum
The optimization converges on a moderate redistribution strength $\alpha^*$ and a mid-range participation ratio $p^*$ — not the extremes. This reflects the core insight of reward function design in PoS systems: pushing either lever to its maximum backfires. Full redistribution ($\alpha \to 1$) punishes large validators so heavily that it can discourage the capital efficiency of large institutional stakers, while zero participation incentive collapses network security. The Network Health Score framework gives protocol designers a single, tunable objective that makes this trade-off explicit and searchable, rather than something set by intuition alone.


































