Submitted by bin2chen, also found by rvierdiiev
The migration steps for L1ERC20Bridge/L2ERC20Bridge are as follows:
https://github.com/code-423n4/2024-03-zksync/blob/main/docs/Protocol%20Section/Migration%20process.md
Since L2ERC20Bridge will be updated first, and then L1ERC20Bridge will be updated, L2SharedBridge needs to be compatible with the old L1ERC20Bridge before L1ERC20Bridge is updated.
So in L2SharedBridge.initialize() we need to set l1LegacyBridge = L1ERC20Bridge and finalizeDeposit() to allow l1LegacyBridge to execute.
But the current implementation doesnt set l1LegacyBridge, its always address(0).
The above method just checks _l1LegecyBridge ! = address(0), and does not assign a value, l1LegacyBridge is always adddress(0).
This way any messages sent by the user before update L1ERC20Bridge will fail because finalizeDeposit() will not pass the validation
Until L1ERC20Bridge is updated, messages sent by the user will fail.
Context
saxenism (zkSync) confirmed and commented:
0xsomeone (judge) commented:
