The deposit
function mints shares to depositors proportional to the LINK tokens deposited into the StakingPool. It should always be mandatory to check that the number of shares minted is never equal to 0.
When minting shares to the depositor, it is safe to ensure that the shares minted are not equal to 0. This prevents small depositors (e.g., 1000 wei) from receiving 0 shares minted against their staked value, which can protect against inflation or donation attacks. By implementing a check to ensure that the shares minted are not equal to 0, small deposits like the above can be prevented.
Allowing the minting of 0 shares to depositors makes the StakingPool contract prone to attacks.
Manual Review
Add the check below:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.