jonah1005
Validator can fail to receive commission reward by calling redeemAllRewards.
Thereβs a check in redeemAllRewards
uint128 rewards = sharesToTokens(s.shares, v.exchangeRate) - s.staked;
require(rewards > 0, "Nothing to redeem");
The validatorβs tx might be reverted here even if he got some commission reward to receive.
DelegatedStaking.sol#L275-L276
We can trigger the bug by setting commisionRate to 1e18 - 1
None
Though this may rarely happen and the validator can redeem the reward through redeemRewards, this may cause some issues when the validator is handled by a contract.
I consider calling redeemRewards in redeemAllReawards as a more succinct way to do this.
The text was updated successfully, but these errors were encountered:
All reactions