Unlocking Legacy Tokens

Legacy Wrappers


This article explains how to unlock tokens that were initially locked in the DeversiFi smart contracts prior to 16th July 2019

To unlock tokens that were initially locked in the DeversiFi contracts between 17th July 2019 and 3rd June 2020, use the intuitive legacy token unlock UI here



On 16th July 2019, after a security vulnerability was discovered in the 0x v2 exchange contract, DeversiFi (Ethfinex Trustless at the time) redeployed its wrapper contracts used to interact with the exchange, reflecting the changes made to the underlying 0x protocol.

The wrappers that DeversiFi was using up until that point now have legacy status and users are not able to see their legacy locked balances on the trading platform.

To access legacy balances for further trading, users are required to unlock them from these legacy wrappers and re-lock them in the live version.

The process involves interacting with the legacy wrapper via Etherscan in order to unlock your tokens:

**Please note that it is possible to interact with the legacy wrappers via other site like myetherwallet, but this tutorial will focus on the unlocking method via Etherscan


Requirements:


  1. A browser with Metamask installed. (If using a Hardware wallet, you'd need to first install Metamask, and then Connect your hardware wallet to Metamask)
  2. Link to the legacy wrapper contract. Please find below the links to each of the contracts:

    How to

    Step 1:

    Navigate to the appropriate wrapper where your funds are. For this example we'll be using the DAIW contract. Please have your ETH address where your funds are copied. Click on the contract tab as shown below:



    Step 2: 

    Click on the Read Contract button:



    Step 3:

    We need to get the exact number for the locked balance, so proceed to option 4 - Balances, in the read contract information. Enter in your ETH address and then click query. The exact amount that you have locked will then be shown. Copy this number for the next step. 


    Step 4:

    Proceed to the Write Contract tab this time. Underneath it should display a red icon with the words 'Write Contract'. Click on the option 'Connect to Web3'. This will connect to Metamask. You will need to sign the message via Metamask to complete the connection. The red icon will change to green once connection to Metamask has been made.



    Step 5:

    In the second option, Withdraw, enter in the number copied in step 3 into the _value field.  

    Proceed to enter the following into the next 3 fields: v = 0; r = 0x0; s = 0x0. 

    For the signatureValiduntilBlock field, we need to enter a block number in the future. To find the current block number, navigate to the Etherscan home page, and note the number under 'Latest block':


    To ensure that the signature won't time out when interacting with the contract, it's good to add at least 30 blocks to the current block to be on the safe side. So in the example above 9266203 becomes 9266233. We'd then place this number into the signatureValidUntilBlock field. So all together you should have something like this:


    Step 6:

    Proceed to click on the write button. You'll need to then enter a gas cost. How much gas you enter is entirely up to you, but if it's too low it might go beyond the signature valid time, so it's good to enter in a bit more. To do this click on the edit option in the gas amount section in metamask, then the advanced tab. You can then choose the average or fast option. You then need to accept the amount and click through on your hardware wallet if you are using one. 

    Step 7:

    Voila! That should be it! After the transaction has processed you will see your updated balance with your tokens successfully unlocked and withdrawn from the wrapper contract! If you have any further queries or are stuck in any way, please stop by our Telegram or raise a ticket here.


    Did this solve your problem?