Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: low
Invalid

L-2 stakingPool::_updateStrategyRewards only works when all the strategies are updated

Summary

the function is written as if it is expected to work with just a selected amount of strategies, however if not all strategies are passed, it would fail due to
https://github.com/Cyfrin/2024-09-stakelink/blob/f5824f9ad67058b24a2c08494e51ddd7efdbb90b/contracts/core/StakingPool.sol#L561-L567
here it would attempt to transfer to zero address if any strategy is not present causing a revert

Tools Used

manual analysis

Recommendations

https://github.com/Cyfrin/2024-09-stakelink/blob/f5824f9ad67058b24a2c08494e51ddd7efdbb90b/contracts/core/StakingPool.sol#L526-L527

should be written using _strategyIdxs.length instead of strategies.length

Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.