lidofinance / lido-l2

GNU General Public License v3.0
30 stars 39 forks source link

L1 Bridge does not work with SCWs #49

Closed derekchiang closed 1 year ago

derekchiang commented 1 year ago

The L1 ERC20 token bridge reverts if the sender is an SCW: https://github.com/lidofinance/lido-l2/blob/471993c23f3f8c378b9ef4598e703381e9462189/contracts/optimism/L1ERC20TokenBridge.sol#L58-L60

zdenham commented 1 year ago

This is an issue as AA wallets are increasingly adopted

TheDZhon commented 1 year ago

Worth noting: https://community.optimism.io/docs/developers/bridge/standard-bridge/#deposits tl;dr: there is a known limitation even for standard optimism bridge for SCW

TheDZhon commented 1 year ago

UPDATE

You can use depositTo if you know what are you doing for sure

image

If you use the same sender and destination addresses (like deposit does), you might send funds to the wrong address in general (suppose your SCW isn't represented with the same address on L1 and L2).

TheDZhon commented 1 year ago

Closing the issue as being relevant to the design decisions of Opti stack towards having a dedicated depositTo method for SCW