Beginner FriendlyFoundryBridge
100 EXP
View results
Submission Details
Severity: high
Invalid

depositTokensToL2 doesn't validate min amount.

Summary

The code provided contains a method depositTokensToL2 for depositing tokens to an L2 vault. It's missing a check for a deposit of 0 tokens and lacks a validation process for the amount being deposited. The absence of these checks can potentially lead to unexpected behavior.

Vulnerability Details

The method does not include a check to disallow deposits of 0 tokens, which might be an undesired action. Additionally, it lacks validation for the amount being deposited; there's no verification against negative values or potential overflow scenarios.

Impact

onsidering the off-chain tools that are listening to events and sending transactions to L2, a bombardment of transactions at 0 value could potentially create significant congestion or load on the system.

If the off-chain tools are programmed to process every event, including those with a 0-value deposit, and these events trigger transaction processing, a high volume of such transactions could cause inefficiencies. Even though the value is 0, the sheer volume might create congestion due to the increased number of transactions being processed and the associated computational load. Potential DOS.

Tools Used

Manual inspection

Recommendations

Implement a check to disallow deposits of 0 tokens if that's the desired behavior, perhaps even consider setting a min amount allowed to be bridged.

issues are relatively simple to fix but are crucial in ensuring the stability and expected behavior of the deposit function.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi 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.