# Depositing and Withdrawing Assets
Where is my money?
If you are not sure what is happening with your withdrawal, search for the transaction hash here (opens new window), the withdrawal might still be in the validity proof period. Alternatively, you might just need to finalize the transaction.
The easiest way to move assets between Layer 1 and Layer 2 is to use the Optimism Gateway (opens new window). You can make use of this gateway on any of our networks. Click here for a list of our networks and connection details.
Note that in Optimistic Ethereum there is no ETH as we know it. Instead, gas costs are charged using a wrapped ETH ERC-20 token. When you deposit ETH into Optimistic Ethereum, those ERC-20 tokens are what you get on L2.
# Which Assets?
We have a list of supported ERC-20 tokens (opens new window), but you are not limited to them, you can select any token that exists on both L1 and L2 (opens new window).
# Depositing into L2
First we'll go over the basics of transferring tokens for L1 into L2. We'll be depositing ETH in this tutorial, but you can also deposit any token supported on the Gateway frontend. This tutorial uses MetaMask (opens new window). Your experience may vary if using a different wallet provider.
- We'll be using the Kovan testnet during this tutorial. Make sure you're connected to the Kovan testnet before you continue:
You'll also need some Kovan ETH (KETH). If you don't already have Kovan ETH, try using this Kovan ETH faucet (opens new window). Alternatively, you can try asking someone for Kovan ETH on the Optimism discord server (opens new window).
Once you're connected to Kovan and you have some KETH, head over to gateway.optimism.io (opens new window). You'll be greeted with a disclaimer that contains some important information. Please read this disclaimer carefully. We also highly recommend reading through our FAQs to get a better basic understanding of the Optimistic Ethereum system. Whenever you're ready, click
- You'll now be asked to connect your wallet to the Gateway app. Select the MetaMask option:
- You should now see a popup asking you to connect your wallet to the website. Select the account you'd like to use and click
- Now you'll see a "deposit" page where you can input some amount of Kovan ETH to transfer from Layer 1 to Layer 2. You can also click on the
ETHdropdown to deposit other supported tokens but for this tutorial we'll stick with ETH. Input a small amount of Kovan ETH and click
- You'll be given another chance to review your transaction. Click
- You'll be presented with a transaction to sign. Go ahead and sign it by clicking
- Now you just need to wait a minute for your transaction to be processed! When moving assets from Layer 1 to Layer 2, you'll first have to wait for the transaction to be confirmed on Layer 1. This should only take about a minute. You'll also be showered with confetti once your transaction is confirmed. 🎉🎉🎉
- Your deposit is officially finalized on Kovan! Head back to the previous page to check your balance:
- Assuming everything went according to plan, you should now have a balance on the Optimistic Kovan testnet:
Congrats! You just made your first deposit. Next we'll look at the process of moving tokens back to Layer 1.
# Withdrawing back to L1
After you've deposited some tokens into L2, you might want to try withdrawing those tokens back to L1. This tutorial will show you how to perform the full withdrawal process. Please make sure you've already completed the previous tutorial about depositing into L2 before you continue. As in the previous tutorial, we'll be using MetaMask connected to the Kovan testnet.
- First, head over to gateway.optimism.io (opens new window).
- Click on the
Withdrawbutton on the main page in order to switch into withdrawal mode:
- You'll be greeted with a popup asking you to switch over to the Optimistic Kovan test network. Accept this popup by clicking on the
- Next, input some amount of ETH to transfer back to L1 and click
- You'll now be presented with another disclaimer. Please ready this disclaimer carefully. It includes information about the cost to finalize your withdrawal on L1 and the required waiting period before you can claim your withdrawal on L1. Note that the Optimistic Kovan testnet has a waiting period of only 60 seconds to speed up the testing process. Once you're ready, click the
WITHDRAWbutton to trigger your withdrawal:
On withdrawal times
While communication from Layer 1 to Layer 2 only takes a few minutes, communication from Layer 2 to Layer 1 on the Optimistic Ethereum mainnet takes about a week. This is a security measure that leaves enough time for invalid transaction results to be caught and reverted before they become "finalized." This means that you must wait one week before you can claim a withdrawal on the Optimistic Ethereum mainnet.
- Accept the transaction in MetaMask:
# When is the Withdrawal Ready?
During the challenge period there are several ways to check on your withdrawal:
Use the gateway (opens new window) to see a list of withdrawals and deposits.
Use Etherscan (opens new window) to view the L2 transaction (identified by its hash). and once it is recorded in L1 click the L1 State Root Submission Tx Hash:
The challenge period starts at the timestamp of the L1 state root transaction. On Optimistic Ethereum you can withdraw once seven days have passed from that timestamp.
# Finalizing the withdrawal
- After the waiting period has passed, you'll need to submit a second transaction on L1 to complete your withdrawal. You should now see a screen that displays the date and time when your withdrawal can be completed. Since we're on Kovan, this should only be a minute from the time when you started the withdrawal on L2:
- Click on your address in the top right corner of your screen to see the status of your withdrawal:
- You should be presented with a list of withdrawals that you've made. Now you simply need to wait for the withdrawal challenge period to elapse! On the Optimistic Kovan testnet this withdrawal period is only 60 seconds. Feel free grab a drink or go to the bathroom or something while you wait. Click on your withdrawal once the status symbol turns yellow:
- Assuming you've waited 60 seconds or more, you can now claim your withdrawal on L1. Click the button that says
- You'll be brought to a page on Etherscan that looks something like the following. Note that the status of your withdrawal is
Ready for relay:
- Since you'll be claiming this withdrawal on L1 (Kovan) you'll need switch back to the Kovan test network in MetaMask before you can continue:
- Once you've switched back to Kovan, click the
Executebutton on the Etherscan page:
- Accept the confirmation popup:
- After a few seconds you'll be asked to sign a final transaction in MetaMask:
- Wait for the transaction to be confirmed on Kovan, then refresh the page. If you see that the message is now
Relayed, then your withdrawal was successful:
- You can also confirm that your withdrawal was completed by going back to gateway.optimism.io (opens new window) and confirming that your L2 balance has decreased and your L1 balance has increased:
Congrats! You've now completed a deposit and a withdrawal. You're an Optimistic Ethereum pro.
We hope this tutorial was helpful ❤️. If you're still confused by something, we'd love to hear how we can make this tutorial better. Please always feel free to leave feedback by creating an issue on GitHub (opens new window). We read through our issues almost every day and try to fix issues within a week.