Interim ERC-20 ZIL Token Swap Tutorial
Swapping your interim ERC20 tokens is a simple process. We explain below the steps involved with some screenshots to guide you through the process. While swapping your tokens, you may pause at any step or sub-step and restart later at your convenience.
Introduction
Prior to the launch of the Zilliqa mainnet in 2019, the ZIL token, in the interim, was issued as an ERC-20 token on the Ethereum network. Those interim ERC-20 tokens were to be later swapped for native ZIL tokens on the Zilliqa mainnet.
The token swap process started in April 2019, a few months after the mainnet launch and ended in February 2020. The process was simple: Users were required to deposit their interim ERC-20 tokens to a centralized exchange and withdraw an equivalent number of native ZIL tokens on the Zilliqa network. Several well-known partner exchanges facilitated the swap, including but not limited to Binance, KuCoin, OKEx, Huobi, CoinHako, Upbit and Bithumb.
However, at the end of the swap period, we observed that 213,272,942.183558446345 interim ERC-20 ZIL tokens had remained un-swapped. The community has since been requesting to re-open token swap to allow those who missed out in 2019/2020.
Given that all major exchanges had moved away from ERC-20 ZIL tokens, we had to come up with a different solution to re-open token swap. ZILBridge to the rescue! By leveraging the recently released ZILBridge that connects Ethereum to Zilliqa and vice-versa, we have developed a decentralized token swap dApp that allows holders of interim ERC-20 ZIL to swap their tokens for native ZIL on the Zilliqa mainnet.
Does this concern me?
This tutorial does not concern users who own ZIL on the Zilliqa mainnet on an address that starts with `zil1`, but instead, it is only meant for those who own interim ERC-20 tokens on an Ethereum address that starts with 0x.
Is there a deadline for this swap too?
As this swap mechanism is fully decentralized, there is no deadline per se. However, we encourage all users to swap as soon as they can and be a part of a growing economy powered by ZIL. For example, once your tokens have been swapped, you could stake them on stake.zilliqa.com.
Token Contract Addresses
Interim ERC-20 ZIL: 0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27
Bridged ERC-20 ZIL (aka eZIL): 0x6EeB539D662bB971a4a01211c67CB7f65B09b802
Fees
The swap application itself does not charge any fees, but you will need to pay for gas on the Ethereum network. Make sure that you have enough ETH at your disposal for at least four smart contract transactions. The bridge also charges a small fee of about USD 0.30 in the tokens being bridged. So, by the end of the swap process, you will not get the exact same number of native ZIL tokens as your interim ERC-20 tokens. The difference should be about 4–5 ZIL.
How does the swap work (TLDR)?
Token swap happens in two main steps. First, you swap your interim ERC-20 ZIL for another ERC-20 ZIL on the Ethereum network called the bridged ERC-20 token or eZIL using the token swap interface: tokenswap.zilliqa.com. Second, you convert your eZIL tokens to native ZIL on the Zilliqa mainnet by moving them over the bridge by using the ZILBridge interface: zilswap.io/bridge.
In the sections below, we describe the swap process in more detail.
Questions?
Please go through the rest of the tutorial as it should answer all questions that you may have. However, if you are still unsure or stuck and would like to get some help, join our Telegram community: https://t.me/zilliqachat.
How to swap?
Swapping your interim ERC20 tokens is a simple process. We explain below the steps involved with some screenshots to guide you through the process. While swapping your tokens, you may pause at any step or sub-step and restart later at your convenience.
Step 1: Prepare your Metamask wallet
The token swap dApp assumes that your interim ERC-20 ZIL tokens are held in an account address that can be accessed via the Metamask browser extension. In case your tokens are held in a Ledger hardware wallet, you will have to import the Ledger account into Metamask.
However, if you cannot access your account via Metamask, you will need to transfer your tokens to an account that can be accessed via Metamask.
More info on how to setup and use Metamask extension can be found on its webpage: metamask.io/
Reminder: The account holding interim ERC-20 ZIL tokens must have enough ETH to pay for gas. You will be sending at least 4 smart contract transactions from this account.
Step 2: Swapping on Ethereum for Bridged tokens aka eZIL
- Go to tokenswap.zilliqa.com and connect your Metamask extension to the token swap application by clicking on the “Connect” button on top-right.
2. Once connected, you will see the below screen. The arrow points to the interim ERC-20 ZIL balance of the account.
3. First-time users will then be asked to approve their tokens to be used by the swap application. Click “Approve Token Swap” as indicated in the screen below:
4. You will have to confirm this transaction on your Metamask extension. This will require paying gas in ETH.
5. While the transaction is being processed by the network, you will see the following loading screen.
6. One the transaction is confirmed, you will see the following screen to perform the actual swap. Fill in the desired number of tokens to swap or click max for the entire balance and then click the swap button.
7. You will have to confirm this transaction on your Metamask extension. This will require paying gas in ETH.
8. While the transaction is being processed by the network, you will see the following loading screen.
9. Once the swap is successful, you will see the balance of the bridged tokens aka eZIL tokens.
At this stage, we are halfway through. You have successfully swapped your interim ERC-20 ZIL for bridged ERC-20 ZIL. This swap is loss-less, i.e., you should expect to receive the same number of Bridged ERC-20 ZIL as the number of interim ERC-20 ZIL.
In the next step, we have to move these bridged tokens over to the Zilliqa-side and convert them into native ZIL tokens on the Zilliqa mainnet.
Note: An alternative but equally pleasing UI for Step 2 has been developed by the ZILSwap team and is hosted at zilswap.io/bridge/erc20-zil-upgrade.
Step 3: Converting bridged ERC-20 tokens to native ZIL tokens.
Go to zilswap.io/bridge and follow the instructions described in the bridge tutorial to move bridged ERC-20 ZIL token from Ethereum to Zilliqa. For this, you will need to connect your Metamask account and a ZILPay account and select eZIL from the asset dropdown to move from Ethereum to Zilliqa. At the end of the bridging process, you will have your native ZIL tokens in your ZILPay account. A screenshot of what you should see is provided below:
Note that the bridge does charge a small fee of about USD 0.30 in the tokens being moved across the bridge to cover for the gas cost of the transaction on the Zilliqa network. This step of bridging is lossy, i.e., you will not get the exact same number of native ZIL tokens as your eZIL tokens. Some of the eZIL tokens will be used to pay for fees to the bridge.
Happy swapping!