Closed code423n4 closed 2 years ago
https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L364 https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L195-L198
There is no limits in function updatePenalties, so:
updatePenalties
rageQuit
Check penalty cannot be zero and set upper limit
This assumes a malicious admin. Lowering risk and merging with the warden's QA report #175
Lines of code
https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L364 https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L195-L198
Vulnerability details
Impact
There is no limits in function
updatePenalties
, so:rageQuit
won't work because of zero divisionRecommended Mitigation Steps
Check penalty cannot be zero and set upper limit