Closed code423n4 closed 3 years ago
jonah1005
No sanity check in addValidator. The commission rate can be set > 1e18. The same validator can be added multiple times.
addValidator
https://github.com/code-423n4/2021-10-covalent/blob/main/contracts/DelegatedStaking.sol#L345-L351
None
Recommend to add some check as in setValidatorCommissionRate.
setValidatorCommissionRate
Handle
jonah1005
Vulnerability details
Impact
No sanity check in
addValidator
. The commission rate can be set > 1e18. The same validator can be added multiple times.Proof of Concept
https://github.com/code-423n4/2021-10-covalent/blob/main/contracts/DelegatedStaking.sol#L345-L351
Tools Used
None
Recommended Mitigation Steps
Recommend to add some check as in
setValidatorCommissionRate
.