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

risk of DoS in depositTokensToL2

Summary

There is a slight risk of temporary DoS in depositTokensToL2().

Vulnerability Details

Funds only move out when the off-chain service picks up events emitted by the contract by submitting signed withdrawal transactions.
A well funded attacker could donate tokens to make the token balance of the contract reach DEPOSIT_LIMIT, effectively preventing future deposits since no events is emitted for donations and thus, the off-chain service will not move funds out. This is only temporary until an admin with access to the off-chain service private key sends a manual transaction to move funds out.

Impact

DoS of future deposits.

Tools Used

Manual review.

Recommendations

Use state variables to do the accounting instead of relying on token.balanceOf(address(vault)).

Updates

Lead Judging Commences

0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

depositTokensToL2(): DoS deposits via DEPOSIT_LIMIT

Support

FAQs

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