A rounding mismatch between how validator commission and per-user commission are computed causes a systematic loss (burn) of reward funds. Validator commission uses floor division while user commission uses ceiling division. The mismatch means Σ(user commissions) > validator’s accrued commission, permanently shaving small amounts from the reward pool every settlement.
Description
In updateRewardPerTokenForValidator the validator’s commission is calculated with floor division:
Rounding up per-staker but rounding down for the validator’s total introduces a consistent deficit: users collectively pay more commission than the validator receives. No reconciliation logic restores the difference.
Example: two stakers with a 1 Wei reward can cause users to pay 2 Wei of commission while the validator receives 0 Wei — permanently removing 2 Wei from the pool.
Impact
Stakers are systematically under-paid per user per segment, silently draining value from the reward pool. Over time this can lead to significant loss of funds and protocol insolvency.
Recommendation
Use the same rounding rule on both sides so that Σ(user commissions) exactly equals the validator’s accrued commission. Concretely:
Replace the validator’s floor division with a ceiling (_ceilDiv) to match per-user rounding, or
Switch users to floor division (remove per-user ceil) to match the validator-side floor.
Either approach removes the systematic bias; prefer the approach consistent with intended economic behavior and documented invariants.
Proof of Concept
Show PoC (Forge test demonstrating discrepancy and a fixed variant)
Notes
Do not change any external links or query parameters; the target file link above is preserved as-is.
The core issue is a deterministic arithmetic rounding inconsistency — fixing it requires making rounding symmetric between the aggregated validator calculation and per-user calculations.