In the L1BossBridge::depositTokensToL2()
function, the deposit limit is checked by adding the amount to be deposited to the current balance of the vault. If the sum of the current balance and the amount to be deposited exceeds the maximum value of a uint256, this could potentially lead to an overflow error.
In the event of an overflow, the deposit limit check could pass even when it should not, allowing more tokens to be deposited than the intended limit.
Manual Review
To mitigate this risk, check if the deposit limit is exceeded before adding the amount to the current balance of the vault. This would prevent the possibility of an overflow error.
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.