Closed code423n4 closed 3 years ago
pmerkleplant
The function addValidator() does not check if the validator was present already. This maybe does not introduce security issues, but forfeits code clarity as the function addValidator() can also be used to update a validator's entry.
addValidator()
See line 345
can't update validator's entry since validatorsN determines new validatorId. And gets incremented.
validatorsN
validatorId
As per the sponsor's comment, the finding is not considering that the ids are sequential
Marking as invalid
Handle
pmerkleplant
Vulnerability details
Impact
The function
addValidator()
does not check if the validator was present already. This maybe does not introduce security issues, but forfeits code clarity as the functionaddValidator()
can also be used to update a validator's entry.See line 345