stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Invalid

Missing check for mismatched array lengths

Summary

Missing check for mismatched array lengths

Vulnerability Details

The _rewardTokens and _rewardTokenAmounts input arrays having different lengths might cause the loop iteration over _rewardTokens to go out of bounds when accessing _rewardTokenAmounts

Impact

This can lead to an inconsistency where one array is exhausted while the other still has elements possibly causing errors

Tools Used

VS Code

Recommendations

The following code will revert the function execution if the lengths are different:
require(_rewardTokens.length == _rewardTokenAmounts.length, "Mismatched arrays");

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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