Unlocking Legacy Tokens

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


- 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)

- Link to the legacy wrapper contract. Please find below the links to each of the contracts:


ETHW - 0xaA7427D8f17D87a28F5e1ba3aDBB270bAdbe1011


DAIW - 0xD9ebeBfDab08c643C5f2837632De920c70A56247

SPANK - 0x70B04d0684EA9Dc0c8e244E0A1453744350F3864

ZRXW - 0xcf67d7a481ceeca0a77f658991a00366fed558f7

OMGW - 0x60f8526f09caaF0008187945ccd88Bc43790042C

REPW - 0x1488f99d305990694e19b3e72f6f0307cfa1df4e

SANW - 0xB0Abd4cC5195560209492b6854c666d7CFF8C03c

SNTW - 0x8AA72DD6045505836F643B39b82e70Fd705F9686

EDOW - 0xAb056A8119BB91ca50631Bd319eE3DF654bEBfa2

FUNW - 0xB33CE6b1e48F450b4c6D4C0A3f281237Eeea2DEc

NIOW - 0x680bf2eebf0ad9b183ac2ff88d16f5a4e41480e9

BATW - 0xe82cfc4713598dc7244368cf5aca1b102a04ce33

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?