@@ -48,6 +48,7 @@ finalization.
48
48
- [ Security Considerations] ( #security-considerations )
49
49
- [ Key Properties of Withdrawal Verification] ( #key-properties-of-withdrawal-verification )
50
50
- [ Handling Successfully Verified Messages That Fail When Relayed] ( #handling-successfully-verified-messages-that-fail-when-relayed )
51
+ - [ OptimismPortal can send abitrary messages on L1] ( #optimismportal-can-send-abitrary-messages-on-l1 )
51
52
52
53
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
53
54
@@ -216,3 +217,15 @@ contracts if desired.
216
217
217
218
[` WithdrawalTransaction` type]: https://github.com/ethereum-optimism/optimism/blob/08daf8dbd38c9ffdbd18fc9a211c227606cdb0ad/packages/contracts-bedrock/src/libraries/Types.sol#L62-L69
218
219
[` OutputRootProof` type]: https://github.com/ethereum-optimism/optimism/blob/08daf8dbd38c9ffdbd18fc9a211c227606cdb0ad/packages/contracts-bedrock/src/libraries/Types.sol#L25-L30
220
+
221
+ ### OptimismPortal can send abitrary messages on L1
222
+
223
+ The ` L2ToL1MessagePasser` contract's ` initiateWithdrawal` function accepts a ` _target` address and ` _data` bytes,
224
+ which is passed to a ` CALL ` opcode on L1 when ` finalizeWithdrawalTransaction` is called after the challenge
225
+ period. This means that, by design, the ` OptimismPortal` contract can be used to send arbitrary transactions on
226
+ the L1, with the ` OptimismPortal` as the ` msg .sender ` .
227
+
228
+ This means users of the ` OptimismPortal` contract should be careful what permissions they grant to the portal.
229
+ For example, any ERC20 tokens mistakenly sent to the ` OptimismPortal` contract are essentially lost, as they can
230
+ be claimed by anybody that pre-approves transfers of this token out of the portal, using the L2 to initiate the
231
+ approval and the L1 to prove and finalize the approval (after the challenge period).
0 commit comments