Open code423n4 opened 2 years ago
dmvt marked the issue as primary issue
vince0656 marked the issue as sponsor disputed
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.
dmvt marked the issue as satisfactory
dmvt marked the issue as selected for report
Lines of code
https://github.com/code-423n4/2022-11-stakehouse/blob/4b6828e9c807f2f7c569e6d721ca1289f7cf7112/contracts/liquid-staking/LiquidStakingManager.sol#L948-L955
Vulnerability details
Impact
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 exceedingMODULO
, which means it can be set to a 100%.LiquidStakingManager.sol#L948-L955
This percentage is used to calculate
uint256 daoAmount = (_received * daoCommissionPercentage) / MODULO
in_calculateCommission()
. Remaining is then caculated withuint256 rest = _received - daoAmount
, and in this caserest = 0
. When node runner callsclaimRewardsAsNodeRunner()
, the node runner will receive 0 rewards.Tools Used
Manual Review
Recommended Mitigation Steps
There should be maximum cap on how much commission DAO can take from node runners.