Asymmetric rounding in commission (ceil for users, floor for validators) enables per-segment rounding loss; validators can amplify via frequent commission checkpoints.
The smart contract calculates user commission with ceiling rounding per time segment, while validator commission accrual uses floor rounding. A validator admin can create many commission checkpoints, increasing the number of segments and causing small user rewards to be rounded down to zero, leading to economic leakage from users to validators.
- Disclosed after under an hour
53061 sc high asymmetric rounding in commission ceil for users floor for validators enables per segment rounding loss validators can amplify via frequent commission checkpoints
Submitted on Aug 14th 2025 at 18:31:09 UTC by @tansegv for Attackathon | Plume Network
- Report ID: #53061
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/lib/PlumeRewardLogic.sol
- Impacts:
- Theft of unclaimed yield
- Contract fails to deliver promised returns, but doesn't lose value
Description
Users are charged commission with ceiling rounding per time segment while validators accrue commission with floor rounding on aggregated math. By creating many commission checkpoints (more segments), a validator can increase rounding events so that small segments yield zero user net rewards more often, causing economic leakage from users.
The reward/commission pipeline divides time into segments at reward/commission checkpoints. In each segment, user commission is computed with ceil, validator accrual with floor. Increasing the number of segments (by updating commission frequently) increases the number of ceiling events on users, leading to consistent, compounding rounding loss for stakers.
Vulnerability Details
- User commission uses ceil (bias up):
// In _calculateRewardsCore(...) for the user
uint256 grossRewardForSegment =
(userStakedAmount * rewardPerTokenDeltaForUserInSegment) / REWARD_PRECISION;
uint256 commissionForThisSegment =
_ceilDiv(grossRewardForSegment * effectiveCommissionRate, REWARD_PRECISION);
if (grossRewardForSegment >= commissionForThisSegment) {
totalUserRewardDelta += grossRewardForSegment - commissionForThisSegment;
} else {
// net reward becomes 0 for this segment
}
- Validator commission accrual uses floor (bias down vs exact):
// In updateRewardPerTokenForValidator(...) for the validator
uint256 grossRewardForValidatorThisSegment =
(totalStaked * rewardPerTokenIncrease) / REWARD_PRECISION;
uint256 commissionDeltaForValidator =
(grossRewardForValidatorThisSegment * commissionRateForSegment) / REWARD_PRECISION;
- Segmentation multiplies rounding events:
getDistinctTimestamps(...)merges reward-rate and commission-rate checkpoint times. Each commission update creates another segment. With many short segments,grossRewardForSegmenttends to small integers; with any nonzero commission rate,ceilfrequently rounds the per-segment user commission to1, making net0for that segment. - Who can drive it:
The validator admin (not protocol admin) can callsetValidatorCommission(...)repeatedly (bounded only bymaxCommissionCheckpoints, min allowed ≥10). Same-block updates are coalesced, but across blocks they can push many checkpoints.
{% hint style="warning" %} Impact: Economic leakage from users to validators/protocol due to asymmetric rounding and “zeroed” segments. Especially harmful for small stakers or when reward rates are low. {% endhint %}
Impact Details
- Impact: Economic leakage from users to validators / protocol (due to asymmetric rounding and “zeroed” segments). Over many periods and many users, this can be material—especially for small stakers or when reward rates are low.
- Exploitability: No privileged roles required beyond a validator admin of their own validator; they can create many commission checkpoints (until hitting the configured cap).
- Bounded but amplifiable: Loss per user is roughly bounded by O(#segments) × 1 unit per relevant segment while reward is small; increasing segment count amplifies loss. Even if validator accrual floors globally, users are still charged via ceil per segment, so users can be systematically shorted on small segments.
Proof of Concept
{% stepper %} {% step %}
Setup
- One validator V with small nonzero commission (e.g., 10%).
- A staker Alice with a small stake so that per-block reward for Alice is tiny (e.g., ~1 wei per short segment). {% endstep %}
{% step %}
Create many commission checkpoints
Each block, the validator admin calls:
setValidatorCommission(V, 10%)
(repeating each block records a new checkpoint per block). Repeat until near maxCommissionCheckpoints.
{% endstep %}
{% step %}
Accrue rewards
Let time pass so reward accumulates but remains small per segment. {% endstep %}
{% step %}
Observe user rounding
- For each segment,
grossRewardForSegment ≈ 1. - User commission per segment =
ceil(1 * 10%) = 1, so net = 0 for that segment. - After many segments, Alice’s total net is far lower than if the same period were computed as a single segment. {% endstep %}
{% step %}
Contrast scenario (control)
With no extra commission checkpoints, the same elapsed time would be computed as one segment, producing gross >> 1 and commission = ceil(gross * 10%) once, yielding a larger net to Alice.
{% endstep %}
{% endstepper %}
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
Economic leakage from users to validators or the protocol could occur, especially for small stakers or low reward rates, and the loss can be amplified by increasing the number of segments.
What the attacker needed
Validator admin role; small stake or low reward rate; many commission checkpoints
How it was found
- Set up a validator with a small nonzero commission and a staker with a small stake so per-segment reward is tiny.
- The validator admin repeatedly calls setValidatorCommission each block to create many commission checkpoints.
- Let time pass so rewards accumulate but remain small per segment.
- Observe that for each segment, user commission rounds up to 1, making net reward zero for that segment.
- Compare with a control scenario without extra checkpoints, where the same period yields a larger net reward for the user.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a smart contract splits rewards into many small time periods, rounding errors can add up. Here, the code always rounds up the fee taken from users but rounds down the fee given to validators, so users lose a tiny amount each period. A validator can make many periods by frequently updating their commission, making the losses add up for users.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.