Attackers can deny commission rewards to validators by repeatedly calling forceSettleValidatorCommission()
The commission accrual calculation rounds down to zero when settlement is triggered with a small time delta, so an attacker can repeatedly call the public settlement function to keep a validator's accrued commission at zero. Validators whose stake, reward rate and commission rate produce sub-unit results would never accrue commission.
Plume Network
Originally disclosed on Immunefi
51961 sc high attackers can deny commission rewards to validators by repeatedly calling forcesettlevalidatorcommission
- Report ID: #51961
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/lib/PlumeRewardLogic.sol
- Submitted on: Aug 6th 2025 at 21:02:21 UTC by @KlosMitSoss
- Context: Attackathon | Plume Network — https://immunefi.com/audit-competition/plume-network-attackathon
#51961 [SC-High] Attackers can deny commission rewards to validators by repeatedly calling forceSettleValidatorCommission()
Brief / Intro
An attacker can repeatedly call ValidatorFacet::forceSettleValidatorCommission() with a low timeDelta to cause the commission accrual to always round down to zero in certain scenarios. As a result, the affected validators will never accrue any commission.
Vulnerability Details
When ValidatorFacet::forceSettleValidatorCommission() is called, it triggers settlement of accrued commission for a specific validator. This updates the validator's cumulative reward-per-token indices (for all reward tokens) and their accrued commission storage. It uses the validator's current commission rate for settlement.
Within this function, PlumeRewardLogic::_settleCommissionForValidatorUpToNow() is called. This calls PlumeRewardLogic::updateRewardPerTokenForValidator() for every reward token. Here, grossRewardForValidatorThisSegment is calculated using the following formula:
totalStaked * timeDelta * effectiveRewardRate / PlumeStakingStorage.REWARD_PRECISION
This value is then used for calculating the commissionDeltaForValidator:
grossRewardForValidatorThisSegment * commissionRateForSegment / PlumeStakingStorage.REWARD_PRECISION
This leads to the following formula for the accrued commission:
totalStaked * timeDelta * effectiveRewardRate / PlumeStakingStorage.REWARD_PRECISION
* commissionRateForSegment / PlumeStakingStorage.REWARD_PRECISION
The validatorAccruedCommission[validatorId][token] (the commission that can later be claimed) is then increased by commissionDeltaForValidator.
Example scenario:
- totalStaked = 1e9
- effectiveRewardRate = 1_587_301_587 (value used in tests)
- commissionRateForSegment = 5e16 (5%)
When a user calls ValidatorFacet::forceSettleValidatorCommission() every 12 seconds, the calculation rounds down to zero:
1e9 * 12 * 1_587_301_587 / 1e18 * 5e16 / 1e18 = 0.95
As a result, anyone can exploit this by repeatedly calling ValidatorFacet::forceSettleValidatorCommission(). This prevents the validator from ever accruing any commission as long as the configuration remains the same. This also works for different rate values and different totalStaked amounts; this is just one example.
Impact Details
Validators will never accrue any commission if their different rates and totalStaked amounts produce values that round down to zero for a low timeDelta.
Proof of Concept
{% stepper %} {% step %}
Step
Call ValidatorFacet::forceSettleValidatorCommission() to manually trigger settlement of accrued commission for a specific validator.
Reference: https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/ValidatorFacet.sol#L745-L756 {% endstep %}
{% step %}
Step
Within the function, PlumeRewardLogic::_settleCommissionForValidatorUpToNow() is called, which calls PlumeRewardLogic::updateRewardPerTokenForValidator().
Reference: https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/lib/PlumeRewardLogic.sol#L794-L802 {% endstep %}
{% step %}
Step
The accrued commission is calculated and rounded down. In certain scenarios (as described above), depending on totalStaked, the reward rate, and commission rate, this rounds down to zero.
Reference: https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/lib/PlumeRewardLogic.sol#L175-L187 {% endstep %}
{% step %}
Step
An attacker repeatedly calls ValidatorFacet::forceSettleValidatorCommission() every block (or frequently enough) such that the calculation always rounds down to zero. The validator will never accrue any commission as long as the values remain the same. {% endstep %} {% endstepper %}
References
- ValidatorFacet::forceSettleValidatorCommission(): https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/ValidatorFacet.sol#L745-L756
- PlumeRewardLogic::_settleCommissionForValidatorUpToNow() / updateRewardPerTokenForValidator(): https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/lib/PlumeRewardLogic.sol#L794-L802
- Accrued commission calculation: https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/lib/PlumeRewardLogic.sol#L175-L187
Context
Plume Network is a staking system whose reward accounting lives in a set of Solidity contracts. The target of this report is PlumeRewardLogic.sol, the library that computes how much reward and commission accrues to validators over time. Validators earn a commission on the rewards generated by the stake delegated to them, and that commission is tracked in storage as validatorAccruedCommission[validatorId][token], which can later be claimed.
The entry point relevant here is ValidatorFacet::forceSettleValidatorCommission(). Calling it settles the commission accrued for a specific validator up to the current moment: it updates the validator's cumulative reward-per-token indices for every reward token and adds the newly accrued commission to the validator's accrued commission storage. Settlement uses the validator's current commission rate for the segment being settled.
The report is a smart contract finding of High severity, submitted against the Attackathon version of the codebase.
Setup
The report does not describe any accounts, roles, tooling or deployed environment. The only concrete preconditions it gives are the state values used in its example scenario:
| Parameter | Value |
|---|---|
totalStaked |
1e9 |
effectiveRewardRate |
1_587_301_587 (the value used in tests) |
commissionRateForSegment |
5e16 (5%) |
| Settlement interval used by the attacker | every 12 seconds |
The attacker needs the ability to call ValidatorFacet::forceSettleValidatorCommission().
Finding it
The researcher looked at how commission is accrued when settlement happens. Inside forceSettleValidatorCommission(), the library function PlumeRewardLogic::_settleCommissionForValidatorUpToNow() is called, and that in turn calls PlumeRewardLogic::updateRewardPerTokenForValidator() for every reward token.
In that path, the gross reward for the validator for the current segment is computed as:
totalStaked * timeDelta * effectiveRewardRate / PlumeStakingStorage.REWARD_PRECISION
That value then feeds the commission delta for the validator:
grossRewardForValidatorThisSegment * commissionRateForSegment / PlumeStakingStorage.REWARD_PRECISION
Combined, the accrued commission for a segment is:
totalStaked * timeDelta * effectiveRewardRate / PlumeStakingStorage.REWARD_PRECISION
* commissionRateForSegment / PlumeStakingStorage.REWARD_PRECISION
The result is added to validatorAccruedCommission[validatorId][token]. Because the arithmetic is integer division, the intermediate and final results round down. The report shows that with a small enough timeDelta, the whole expression can round down to zero.
Exploitation
Step 1: trigger settlement manually
The attacker calls ValidatorFacet::forceSettleValidatorCommission() to manually trigger settlement of accrued commission for a specific validator. The report references the function at ValidatorFacet.sol#L745-L756.
Step 2: settlement reaches the reward-per-token update
Within that function, PlumeRewardLogic::_settleCommissionForValidatorUpToNow() is called, which calls PlumeRewardLogic::updateRewardPerTokenForValidator(). The report references this at PlumeRewardLogic.sol#L794-L802.
Step 3: the commission rounds down
The accrued commission is calculated and rounded down. Depending on totalStaked, the reward rate and the commission rate, it can round down to zero. The report references the calculation at PlumeRewardLogic.sol#L175-L187.
With the example values, calling settlement every 12 seconds gives:
1e9 * 12 * 1_587_301_587 / 1e18 * 5e16 / 1e18 = 0.95
That is below one unit, so the integer result stored is zero.
Step 4: repeat to keep the accrual at zero
The attacker repeatedly calls ValidatorFacet::forceSettleValidatorCommission() every block, or frequently enough, so that the calculation always rounds down to zero. As long as the values stay the same, the validator never accrues any commission.
Root cause
The commission is computed with integer division by PlumeStakingStorage.REWARD_PRECISION twice, once for the gross reward and once for the commission, and the result is added to storage on every settlement. If an attacker keeps timeDelta small, the per-segment product stays below one unit of precision and truncates to zero, , and it does not describe any access control or rate limit on forceSettleValidatorCommission() that would stop repeated calls.
Impact
Validators never accrue any commission if their rates and totalStaked amounts produce values that round down to zero for a low timeDelta. The report states this holds for different rate values and different totalStaked amounts, with the 12-second example being just one case. The denial lasts as long as the configuration remains the same. The report does not quantify the value lost or state whether the condition affects every validator or only those whose parameters fall into the rounding-to-zero range.
Fix
The report does not propose or describe a fix. A remedy would need to stop the per-segment truncation from discarding the fractional commission, for example by carrying remainders between settlements or by settling over a period that cannot be shrunk to zero by an outside caller, but the report itself does not say which approach was taken.
Variants to test
- Look for other settlement or checkpoint functions that accept an implicit or explicit time window and are callable by anyone. A positive result is a function where repeated calls with a small window leave accrued balances unchanged while the underlying rate is non-zero.
- Check reward and commission formulas that divide by a precision constant more than once. A positive result is a product of stake, time and rate that falls below the precision for realistic small time windows.
- Test whether truncated fractions are carried forward anywhere. A positive result is a storage variable that accumulates remainders; its absence, combined with a callable settlement, is the signal.
- Vary
totalStakedand the commission rate across the range the protocol allows and compute the minimumtimeDeltaat which the result reaches one unit. A positive result is a threshold above the block time, meaning an attacker can always stay under it.
Hunting notes
This class of bug hides in reward accounting libraries where integer division is applied to a product of stake, elapsed time and a rate, and where the elapsed time is reset by a permissionless call. During recon, look for public settle, checkpoint, harvest or poke functions, then read the library they call and write out the full expression including every division. If the expression contains two divisions by the same precision constant, compute the smallest time window that yields a non-zero result and compare it with the block time. The report made the impact concrete by plugging in test values and showing the arithmetic evaluating to 0.95, which is below one unit, and by noting that the same holds for other rates and stake amounts.
What happened, in plain words
Imagine a shop that pays its staff a small slice of every sale. The slice is calculated as a percentage of the sale, and the shop rounds the result down to the nearest whole penny. If a sale is tiny enough, the percentage works out to less than a penny, and the staff member gets nothing. Now imagine a customer who can walk in and force the shop to close the till every few seconds, so every sale is tiny. The staff member never gets paid, even though the shop is busy all day.
That is roughly what this report describes, but for a blockchain staking system called Plume Network. Validators (the computers that help run the network) earn a commission on the rewards generated by the stake that people delegate to them. The commission is calculated with whole-number arithmetic that rounds down. If someone calls a particular function often enough, each calculation covers only a very short stretch of time, the result rounds down to zero, and the validator never builds up any commission.
The report is a smart contract finding of High severity, submitted against the Attackathon version of the codebase.
Before going further, a few words on the building blocks, because the rest of this article leans on them.
- A smart contract is a program that lives on a blockchain. It runs automatically when someone sends it a transaction, and its code and data are public. You can think of it as a vending machine: anyone can press a button, and the machine follows its programmed rules without a human in the middle.
- Solidity is the programming language most of these contracts are written in. It looks a bit like JavaScript, but it is compiled to run on the blockchain.
- A library in Solidity is a bundle of reusable functions that other contracts can call. It is like a shared toolbox: several contracts can use the same tools without copying them.
- Staking means locking up cryptocurrency to support a network and earn rewards for doing so. People who stake are called stakers or delegators.
- A validator is the operator that runs the staking machinery. Delegators hand their stake to a validator, and the validator takes a cut of the rewards, called a commission. The commission is usually a percentage, for example 5%.
- Storage is the part of a contract that remembers data between transactions, like a database table. In this report, the commission owed to a validator is kept in a storage entry named
validatorAccruedCommission[validatorId][token], which maps a validator and a reward token to an amount that can later be claimed. - Integer division is division between whole numbers where any fraction is thrown away. In everyday maths, 7 divided by 2 is 3.5. In integer division it is 3, and the 0.5 simply disappears. This detail is the heart of the bug.
- A reward token is the cryptocurrency in which rewards are paid. A validator may earn several different tokens, so the contract keeps a separate running total for each one.
- A reward-per-token index is a running number that tracks how much reward has accumulated per unit of stake over time. Contracts use it so they do not have to loop over every staker on every transaction. Think of it as a mileage counter on a car: you do not record every metre driven, you just read the counter when you need to know how far you have gone.
- A facet is a contract that groups related functions, in the style of the Diamond standard (a way of splitting a large contract into smaller pieces).
ValidatorFacetis the piece that handles validator actions. - Settlement means updating the books: working out how much has accrued since the last update and writing the new total into storage.
- A permissionless function is one that anyone can call, with no special login or role required. If a function is permissionless, an attacker can call it as often as they like, as long as they pay the transaction fee.
timeDeltais the amount of time that has passed since the last settlement. If the last settlement was 12 seconds ago,timeDeltais 12.REWARD_PRECISIONis a large constant used to keep fractional values in whole-number arithmetic. Because the blockchain cannot store decimals natively in these calculations, contracts multiply by a big number (often 1e18, which is 1 followed by 18 zeros) to keep precision, then divide back down. It is like working in pennies instead of pounds to avoid fractions, then converting back at the end.1e18is shorthand for 10 to the power of 18, that is 1,000,000,000,000,000,000. Similarly1e9is one billion and5e16is 50,000,000,000,000,000.- Rounding down (also called truncation) means discarding the fractional part of a number. It is what integer division does by default.
- A denial-of-service (DoS) attack is one where the attacker does not steal anything but stops a legitimate function from working properly. Here the denial is of the validator's commission accrual.
- Proof of concept (PoC) is a set of steps that demonstrates the bug actually works, rather than just describing it in theory.
Context
Plume Network is a staking system whose reward accounting lives in a set of Solidity contracts. The target of this report is PlumeRewardLogic.sol, the library that computes how much reward and commission accrues to validators over time. Validators earn a commission on the rewards generated by the stake delegated to them, and that commission is tracked in storage as validatorAccruedCommission[validatorId][token], which can later be claimed.
The entry point relevant here is ValidatorFacet::forceSettleValidatorCommission(). The double colon notation is just a way of writing "the function forceSettleValidatorCommission inside the contract ValidatorFacet". Calling it settles the commission accrued for a specific validator up to the current moment: it updates the validator's cumulative reward-per-token indices for every reward token and adds the newly accrued commission to the validator's accrued commission storage. Settlement uses the validator's current commission rate for the segment being settled.
The word "segment" here means the slice of time between the previous settlement and this one. Each time settlement runs, it looks at the time elapsed since the last run, works out the reward for that slice, takes the commission percentage of it, and adds the result to the running total.
Setup
The report does not describe any accounts, roles, tooling or deployed environment. The only concrete preconditions it gives are the state values used in its example scenario:
| Parameter | Value |
|---|---|
totalStaked |
1e9 |
effectiveRewardRate |
1_587_301_587 (the value used in tests) |
commissionRateForSegment |
5e16 (5%) |
| Settlement interval used by the attacker | every 12 seconds |
In plain terms, the table says: in the example, one billion units of stake are delegated to the validator, the reward rate is 1,587,301,587 (a number taken from the project's own tests), the validator's commission is 5%, and the attacker triggers settlement every 12 seconds. The underscores in 1_587_301_587 are just a readability aid in code; the number is 1,587,301,587.
The attacker needs the ability to call ValidatorFacet::forceSettleValidatorCommission().
Finding it
The researcher looked at how commission is accrued when settlement happens. Inside forceSettleValidatorCommission(), the library function PlumeRewardLogic::_settleCommissionForValidatorUpToNow() is called, and that in turn calls PlumeRewardLogic::updateRewardPerTokenForValidator() for every reward token.
In that path, the gross reward for the validator for the current segment is computed as:
totalStaked * timeDelta * effectiveRewardRate / PlumeStakingStorage.REWARD_PRECISION
Line by line, in plain words:
totalStakedis how much stake is delegated to this validator.timeDeltais how many seconds have passed since the last settlement.effectiveRewardRateis the speed at which rewards are generated.- Multiplying the three together gives the raw reward for this slice of time, before precision handling.
- Dividing by
PlumeStakingStorage.REWARD_PRECISIONscales the result back down to normal units. Because this is integer division, anything after the decimal point is discarded.
That value then feeds the commission delta for the validator:
grossRewardForValidatorThisSegment * commissionRateForSegment / PlumeStakingStorage.REWARD_PRECISION
Again in plain words:
grossRewardForValidatorThisSegmentis the number just computed, the reward for this slice.commissionRateForSegmentis the validator's commission percentage, expressed in the same scaled whole-number form (5% becomes5e16).- Multiplying them gives the commission before scaling.
- Dividing by
REWARD_PRECISIONscales it back down, and once more the fraction is discarded.
Combined, the accrued commission for a segment is:
totalStaked * timeDelta * effectiveRewardRate / PlumeStakingStorage.REWARD_PRECISION
* commissionRateForSegment / PlumeStakingStorage.REWARD_PRECISION
This is the same two steps written as one expression. Notice that the division by REWARD_PRECISION happens twice. Each division is a chance to lose a fraction.
The result is added to validatorAccruedCommission[validatorId][token]. Because the arithmetic is integer division, the intermediate and final results round down. The researcher noticed that with a small enough timeDelta, the whole expression can round down to zero, and that timeDelta is controlled by whoever triggers settlement.
Exploitation
The exploitation follows four steps. The report presents them as a numbered walkthrough with code references; here they are with the reasoning spelled out.
Step 1: trigger settlement manually
The attacker calls ValidatorFacet::forceSettleValidatorCommission() to manually trigger settlement of accrued commission for a specific validator. The report references the function at ValidatorFacet.sol#L745-L756.
Step 2: settlement reaches the reward-per-token update
Within that function, PlumeRewardLogic::_settleCommissionForValidatorUpToNow() is called, which calls PlumeRewardLogic::updateRewardPerTokenForValidator(). The report references this at PlumeRewardLogic.sol#L794-L802.
Why this step matters: it shows the path the call takes. The public function is only the door; the arithmetic that matters happens deeper inside the library. Following the call chain is how the researcher found where the rounding occurs.
Step 3: the commission rounds down
The accrued commission is calculated and rounded down. Depending on totalStaked, the reward rate and the commission rate, it can round down to zero. The report references the calculation at PlumeRewardLogic.sol#L175-L187.
With the example values, calling settlement every 12 seconds gives:
1e9 * 12 * 1_587_301_587 / 1e18 * 5e16 / 1e18 = 0.95
Line by line:
1e9is the total stake, one billion units.12istimeDelta, twelve seconds since the last settlement.1_587_301_587is the reward rate.- The first
/ 1e18scales the reward down, discarding any fraction. 5e16is the 5% commission rate in scaled form.- The second
/ 1e18scales the commission down, discarding any fraction again. - The result is
0.95, which is less than one whole unit.
That is below one unit, so the integer result stored is zero. In other words, the maths says the validator earned 0.95 of a unit, but the contract can only store whole units, so it stores nothing.
Step 4: repeat to keep the accrual at zero
The attacker repeatedly calls ValidatorFacet::forceSettleValidatorCommission() every block, or frequently enough, so that the calculation always rounds down to zero. As long as the values stay the same, the validator never accrues any commission.
Root cause
The commission is computed with integer division by PlumeStakingStorage.REWARD_PRECISION twice, once for the gross reward and once for the commission, and the result is added to storage on every settlement. Each settlement resets the segment: the elapsed time since the last settlement becomes the new timeDelta. If an attacker keeps timeDelta small, the per-segment product stays below one unit of precision and truncates to zero, , and it does not describe any access control or rate limit on forceSettleValidatorCommission() that would stop repeated calls.
Impact
Validators never accrue any commission if their rates and totalStaked amounts produce values that round down to zero for a low timeDelta. The report states this holds for different rate values and different totalStaked amounts, with the 12-second example being just one case. The denial lasts as long as the configuration remains the same. The report does not quantify the value lost or state whether the condition affects every validator or only those whose parameters fall into the rounding-to-zero range.
In everyday terms: a validator can have stake delegated to it and still receive no commission at all, because someone else is calling settlement often enough.
Fix
The report does not propose or describe a fix. A remedy would need to stop the per-segment truncation from discarding the fractional commission, for example by carrying remainders between settlements or by settling over a period that cannot be shrunk to zero by an outside caller, but the report itself does not say which approach was taken.
Variants to test
These are general hunting ideas for similar bugs elsewhere. They are written for someone learning to look for this pattern.
- Look for other settlement or checkpoint functions that accept an implicit or explicit time window and are callable by anyone. A positive result is a function where repeated calls with a small window leave accrued balances unchanged while the underlying rate is non-zero.
- Check reward and commission formulas that divide by a precision constant more than once. A positive result is a product of stake, time and rate that falls below the precision for realistic small time windows.
- Test whether truncated fractions are carried forward anywhere. A positive result is a storage variable that accumulates remainders; its absence, combined with a callable settlement, is the signal.
- Vary
totalStakedand the commission rate across the range the protocol allows and compute the minimumtimeDeltaat which the result reaches one unit. A positive result is a threshold above the block time, meaning an attacker can always stay under it.
Hunting notes
This class of bug hides in reward accounting libraries where integer division is applied to a product of stake, elapsed time and a rate, and where the elapsed time is reset by a permissionless call. During recon, look for public settle, checkpoint, harvest or poke functions, then read the library they call and write out the full expression including every division. If the expression contains two divisions by the same precision constant, compute the smallest time window that yields a non-zero result and compare it with the block time. The report made the impact concrete by plugging in test values and showing the arithmetic evaluating to 0.95, which is below one unit, and by noting that the same holds for other rates and stake amounts.
Glossary
- Smart contract: a program stored on a blockchain that runs automatically when called, with its code and data visible to anyone.
- Solidity: the programming language used to write most smart contracts.
- Library: a reusable bundle of functions that other contracts can call, like a shared toolbox.
- Staking: locking up cryptocurrency to support a network and earn rewards.
- Staker / delegator: a person who locks up stake, often by handing it to a validator.
- Validator: the operator that runs staking machinery and earns a commission on rewards.
- Commission: the percentage cut of rewards that a validator keeps.
- Storage: the part of a contract that remembers data between transactions, like a database table.
validatorAccruedCommission[validatorId][token]: the storage entry holding commission owed to a validator, per reward token, which can later be claimed.- Integer division: division between whole numbers where the fractional part is discarded.
- Rounding down / truncation: throwing away the fractional part of a number.
- Reward token: the cryptocurrency in which staking rewards are paid.
- Reward-per-token index: a running counter of reward accumulated per unit of stake, used to avoid looping over every staker.
- Facet: a contract grouping related functions, in the style of the Diamond standard.
- Settlement: updating the books by computing newly accrued amounts and writing them to storage.
- Segment: the slice of time between one settlement and the next.
- Permissionless: callable by anyone, with no special role or login.
timeDelta: the time elapsed since the last settlement.REWARD_PRECISION: a large constant used to keep fractional values in whole-number arithmetic.1e18: shorthand for 10 to the power of 18, that is 1,000,000,000,000,000,000.1e9: shorthand for one billion.5e16: shorthand for 50,000,000,000,000,000, which represents 5% in scaled form.- Denial of service (DoS): an attack that stops a legitimate function from working properly without necessarily stealing anything.
- Proof of concept (PoC): a set of steps demonstrating that a bug actually works.
- Attackathon: a time-boxed security competition in which researchers look for bugs in a project's code.
- High severity: a severity rating meaning the bug has a serious impact and should be fixed promptly.