ReseedInternalBalances.init()
requires to pass all migrate-able balances at once because in the end it sets totalBalance:
Roughly speaking setting internal balance costs 20k gas because of SLOAD on every iteration:
There are L2s with block gasLimit 30M such as Optimism, Blast, Polygon. So migration won't succeed on these chains in case total number of balances prior to migration increases threshold 30M / 20k = 1500
balances.
Migration can run out of gas on certain L2s with block gasLimit 30M gas in case there will be more than 1500 internal balances prior to migration.
Manual Review
Refactor ReseedInternalBalances to allow divide migration into multiple transactions.
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.