ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.68k stars 3.32k forks source link

ERC20 token stuck in gateway #1380

Closed tobias-gp closed 3 years ago

tobias-gp commented 3 years ago

Describe the bug When using the gateway with custom token addresses, my transfer has not succeeded but the amount is still bound to the gateway's address.

To Reproduce Steps to reproduce the behavior:

  1. Go to the Optimistic Gateway
  2. Transfer sUSD (ETH token address: 0x57ab1ec28d129707052df4df418d58a2d46d5f51, Optimistic token address: 0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9)
  3. Transaction is executed.

Expected behavior Amount should be in the Optimistic wallet.

Additional context Exemplary transaction: https://etherscan.io/tx/0xf13d4e3594edd062e858620211facaaef34c668da74200943612db50c45211aa

I would be grateful for completing the transfer on your side :)

smartcontracts commented 3 years ago

@tobias-gp did you use gateway.optimism.io to make this deposit? If not, how did you make the deposit?

Edit: we found the issue, see comment below.

smartcontracts commented 3 years ago

@tobias-gp sUSD uses a different bridge and the deposit was rejected. This is a UX bug in the gateway which should be blocking users from making these sort of deposits into L2 if the target token uses a different bridge. Luckily, the bridge on L2 is smart enough to send your funds back to you automatically in the case of an error like this. You will have to wait a few days (7 days from when the deposit occurred) and then we will trigger a transaction on mainnet that will send the funds back to you. We'll also send over some extra ETH to cover the gas cost of the deposit + enough to make another deposit if you'd like.

smartcontracts commented 3 years ago

Sorry for the inconvenience here, we're going to make an update to the gateway to prevent this sort of thing from happening again in the future.

tobias-gp commented 3 years ago

@smartcontracts : Thank you very much for the great way of dealing with this issue! Now I understand why you chose the optimistic approach 🥇 I very much accept your proposal to resolve it.

gigamesh commented 3 years ago

@tobias-gp here is the gas refund + extra ETH that @smartcontracts promised. :)

https://etherscan.io/tx/0x9197bd51a80b89b0bc5553a3438c7fd22d2c28181aceceaf87aab2af61ec1f1b

tobias-gp commented 3 years ago

@gigamesh : This is amazing, thank you very much. I see that the sUSD are still on the gateway, is the system going to refund those automatically?

I would have never expected this, you are a truly great dev team! 👍

tobias-gp commented 3 years ago

@gigamesh : This is amazing, thank you very much. I see that the sUSD are still on the gateway, is the system going to refund those automatically?

I would have never expected this, you are a truly great dev team! 👍

@smartcontracts : Just raising this, thanks so much for the handling so far! It would be great if you could return the 816.590441048994936987 sUSD to the wallet above, it's still on the Gateway's wallet :)

smartcontracts commented 3 years ago

Hi @tobias-gp, I just relayed the transaction to send your funds back on Ethereum :-) https://etherscan.io/tx/0x3d0a9165bffe719398b2467a2528d85d935e392006d68322c34623fe251e5e21 I'll send you an email as well to confirm.

smartcontracts commented 3 years ago

I'm closing this issue as it's now fully handled! Sorry for the inconvenience here, and thank you for your patience.