Open code423n4 opened 3 years ago
WatchPug
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L57
event TransferedUnstake(uint128 indexed oldValidatorId, uint128 indexed newValidatorId, address indexed delegator, uint128 amount, uint128 unstakingId);
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L419
emit TransferedUnstake(oldValidatorId, newValidatorId, msg.sender, amount, unstakingId);
Transfered should be Transferred.
Transfered
Transferred
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L303-L304
// if validator calls redeem rewards, first tokens paid from comissions will be redeemed and then regular rewards function redeemRewards( uint128 validatorId, address beneficiary, uint128 amount) public {
comissions should be commissions.
comissions
commissions
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L392-L393
// only owner can change comission rate function setValidatorCommissionRate(uint128 amount, uint128 validatorId) public onlyOwner {
comission should be commission.
comission
commission
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L374-L375
// calclate how much rewards would be distribited with the old emission rate uint128 futureRewards = allocatedTokensPerEpoch * epochs;
calculate should be calculate. distribited should be distributed.
calculate
distribited
distributed
https://github.com/code-423n4/2021-10-covalent-findings/issues/42
The sponsor has fixed the typos
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L57
https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L419
Transfered
should beTransferred
.https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L303-L304
comissions
should becommissions
.https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L392-L393
comission
should becommission
.https://github.com/code-423n4/2021-10-covalent/blob/ded3aeb2476da553e8bb1fe43358b73334434737/contracts/DelegatedStaking.sol#L374-L375
calculate
should becalculate
.distribited
should bedistributed
.