-
Notifications
You must be signed in to change notification settings - Fork 10
KingNFT - ETH withdrawn from L2 to L1 may stuck in OptimismPortal
contract
#148
Comments
Comment from Optimism Description: ETH withdrawn from L2 to L1 may stuck in OptimismPortal contract Reason: This is a non-issue, and it is the intended behavior of the |
Escalate for 22 USDC
Therefore, i insist the fact that funds may be permanently lost due to factors out of users' control is a problem. In a well-designed system, users should be able to recover from these scenes, but this issue can result in irreversible financial losses. In addition, we can also see disallowing replay along with no revert on failed subcall is a really bad design at the view of security, it opens doors for many known and unknown attack vectors, such as |
You've created a valid escalation for 22 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Escalate for 41 USDC I want to strengthen the claim that this is not a user error but can be caused by an state change in the target contract. I have provided a good scenario in the description in my issue which is a duplicate of this: #25 Please consider adding my issue as a duplicate if the escalation is accepted. |
You've created a valid escalation for 41 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Escalation rejected. The issue is pointing out the general lack of replayability on the portal, the risks of the portal are clearly described and this counts as a known risk. Moreover, you can see in this PR that is close to complete that Optimism did a ton of work to keep that lack of replayability in the portal: ethereum-optimism/optimism#5017 |
This issue's escalations have been rejected! Watsons who escalated this issue will have their escalation amount deducted from their next payout. |
KingNFT
medium
ETH withdrawn from L2 to L1 may stuck in
OptimismPortal
contractSummary
finalizeWithdrawalTransaction
function inOptimismPortal
contract doesn't support failed message replay, which may cause ETH stuck in theOptimismPortal
contract.Vulnerability Detail
As shown in
OptimismPortal
contract of L324https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L324
and L341,
https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L341
the
finalizeWithdrawalTransaction
function will not revert even on failed sub call (SafeCall.call
) for the withdrawal transaction iftx.origin != Constants.ESTIMATION_ADDRESS
.On the other hand, as shown on L308
https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L308
the transaction has been flaged
finalized
. So failed message can not be replayed, which may causes ETH stuck in the OptimismPortal contract.Impact
ETH withdrawn from L2 to L1 may stuck in
OptimismPortal
contractCode Snippet
Tool used
Manual Review
Recommendation
Allow replaying failed withdrawal messages
The text was updated successfully, but these errors were encountered: