Node runners can lose all their stake rewards due to how the DAO commissions can be set to a 100%
The DAO revenue commission could be set to 100% without any upper limit, so node runners would receive zero rewards when claiming. An attacker or compromised DAO could take all unclaimed stake rewards.
Submitted by yixxas, also found by joestakey, sahar, pashov, and cccz
Node runners can have all their stake rewards taken by the DAO as commissions can be set to a 100%.
Proof of Concept
There is no limits on _updateDAORevenueCommission() except not exceeding MODULO, which means it can be set to a 100%.
LiquidStakingManager.sol#L948-L955
function _updateDAORevenueCommission(uint256 _commissionPercentage) internal {
require(_commissionPercentage <= MODULO, "Invalid commission");
emit DAOCommissionUpdated(daoCommissionPercentage, _commissionPercentage);
daoCommissionPercentage = _commissionPercentage;
}
This percentage is used to calculate uint256 daoAmount = (_received * daoCommissionPercentage) / MODULO in _calculateCommission().
Remaining is then calculated with uint256 rest = _received - daoAmount, and in this case rest = 0.
When node runner calls claimRewardsAsNodeRunner(), the node runner will receive 0 rewards.
Recommended Mitigation Steps
There should be maximum cap on how much commission DAO can take from node runners.
vince0656 (Stakehouse) disputed and commented:
Node runners can see ahead of time what the % commission is and therefore, they can make a decision based on that. However, on reflection, a maximum amount is not a bad idea.
I will leave this in place as I think it’s a valid concern. If the DAO is compromised (specifically included in scope), the impact is felt immediately and applies to all unclaimed rewards. The node runners can’t necessarily see a high fee rate coming in advance.
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
Root cause
The commission update function only required the percentage to be less than or equal to a modulo constant, with no lower maximum cap, allowing it to be set to 100%.
Impact
If the DAO is compromised, all unclaimed stake rewards could be taken immediately, and node runners may not see a high fee rate in advance.
What the attacker needed
DAO is compromised or malicious; node runner has unclaimed rewards
The fix
A maximum cap should be placed on how much commission the DAO can take from node runners.
How it was found
- The DAO calls the function that updates the revenue commission and sets it to 100%.
- A node runner later calls claimRewardsAsNodeRunner().
- The commission calculation takes the full received amount as the DAO amount, leaving zero for the node runner.
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.
In this staking system, a DAO (a decentralised organisation) can set a commission percentage that is taken from the rewards earned by node runners. The code only checked that the percentage was not above 100%, so it could be set to exactly 100%, leaving nothing for the node runners. This means if the DAO is compromised or acts maliciously, all pending rewards can be taken.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.