Ethereum Fork: Step-by-Step Guide to Safely Splitting your ETH/ETC



  • Background

    Recently the Ethereum network successfully forked it's protocol so as to return the compromised funds taken from the DAO smart contract and return them to DAO token holders.

    While there was a healthy amount of debate and disagreement, eventually most of the Ethereum network switched to the hard fork. However those strongly against the hard fork have decided to maintain the pre-fork chain and reject the new chain. Thus the Ethereum Classic project (ETC) was born.

    As of yesterday Poloniex, the largest ETH exchange, announced that they have added market support for Ethereum classic.

    What this means is that if you were holding ETH before the hard fork, your tokens now exist in 2 separate realities: ETH and ETC. Markets exist for both so you are free to hedge your bets on whichever version of the chain you think will be successful. You can essentially sell all of your ETC while maintaining all of your ETH, or vice-versa.

    The problem is that separating your tokens on each chain carries risk. Specifically something called a replay attack. A number of solutions have been proposed and this post aims to walk you through one such method. While I make no guarantees for this method, I can confirm that I have used this method successfully using 5+ accounts. I'll be making use of smart contracts which you need to trust for this procedure, but I'll give a brief explanation of how they work.

    Prerequisities

    • Mist Wallet 0.8.1 with the Hard Fork option activated (when prompted on startup, select 'Yes')
    • Loaded Mist account(s) with ETH that you wish to split between the chains.
    • Separate accounts for each chain. You can either create new accounts in Mist, or use another wallet provider/exchange. I would highly recommend only using Mist for one chain, and some other provider for the other (another computer will work as well). Otherwise you will need to switch between chains and re-sync Mist every time. I used Mist for ETH and Poloniex for ETC.

    Step 1: Adding the Split Contract

    In order to split the same ETH into ETH/ETC on two separate accounts, we'll make use of a contract designed to split funds between chains and which was deployed before the hard fork. It is now in a different state on each chain and will send to a different address in each version. The contract details can be found here. I encourage you to look over the code yourself and not trust my word for it. If you are unsure, have someone you trust check the code for you to ensure it's doing what you intend and that I'm not simply stealing your funds ;)

    • In Mist, navigate over to the 'CONTRACTS' tab.
    • Under 'CUSTOM CONTRACTS', click 'WATCH CONTRACT'
    • Fill in these details:
      • CONTRACT NAME: ReplaySafeSplit
      • CONTRACT ADDRESS: 0xaa1a6e3e6ef20068f7f8d8c835d2d22fd5116444
      • JSON INTERFACE:
    {"constant":false,"inputs":[{"name":"targetFork","type":"address"},{"name":"targetNoFork","type":"address"}],"name":"split","outputs":[{"name":"","type":"bool"}],"type":"function"}]
    • Click OK







    You should now have a new contract listed under CUSTOM CONTRACTS called 'ReplaySafeSplit'.



    tep 2: Calling the Split Function on the Contract

    Now that we've added the contract let's click on it. It should look something like this



    Under 'WRITE TO CONTRACT' there's a dropdown with only 1 option called 'Split'. Let's select it.



    *THIS IS THE IMPORTANT PART**

    • The 'Target fork' field is the address of the ETH account you will use
    • The 'Target no fork' field is the address of the ETC account you will use

    DON'T MIX THESE UP!!!!!

    Fill in these fields with your two separate accounts. Double check that they are correct. Send whatever amount of ETH you would like to split between the chains.

    Step 3: Keep Them Separate

    You now have ETH/ETC in separate accounts on each chain. In order to avoid confusion and mistakes keep these separate going forward. Don't send ETC into your ETH account or vice-versa.

    Hope this was useful to some of you and that you can now make your own decisions about which version of Ethereum reality you choose, or choose not, to participate in.


    Thanx:




    https://steemit.com