create account

Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks by phistr

View this thread on: hive.blogpeakd.comecency.com
· @phistr ·
Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks
A lot of users would like to trade their ETC but are afraid of replay attacks.

Here I want to provide a simple step by step guide.

(Hint: for lazy ones I recommend OPTION 1)


***What is a replay attack?***

The Ethereum classic chain (non forked Ethereum chain) and the ETH chain (hard forked Ethereum chain) share the same network layer. 

If 'A sends B 1ETH' on the ETH chain, it is therefore possible to send the same transaction 'A sends B 1ETC' on the ETC chain and vice versa.


***What are the options to avoid this?***

You have to move the funds of an address to seperate addresses for each chain but avoiding a replay attack of these transaction at the same time.
This can be done by contracts that transfer funds to an address depending on if the hard fork happened on the chain or not.
You end up with funds in address A on ETH chain and B on ETC chain.

Basically there are two options.


**OPTION 1)**

Exchanges that trade ETH and ETC need to avoid these replay attacks as well. Therefore one option is to trust them that they do the fund splitting correctly (in their own interest). If you deposit ETH on poloniex the transaction will be replayed and ETC are also sent to this address. Poloniex detects this and credit you these ETC. You can then trade the ETC and withdraw ETH and ETC to two new different addresses.

*Step 1:* Generate two addresses. 

    Lets call them addr_ETH and addr_ETC. 

    If you use geth use the command: geth account new or if you use Mist click 'create account'.

    Note the address and password for addr_ETH and addr_ETC.


*Step 2:* Send funds to Poloniex.

    Generate an ETH deposit address or use an existing one.

    Then send a test transaction (for example 1ETH) to this address.

    You should be credited ETH and the same amount of ETC.

    If so go ahead and send the rest of the ETH.


*Step 3:* Trade your ETH and/or ETC if you want

    Do normal trading if you like or go on with Step 4


*Step 4:* Withdraw funds to seperate addresses.

    Withdraw ETH funds to addr_ETH.

    Withdrae ETC funds to addr_ETC.


*Step 5:* Done :)

You have successfully splitted your fund in two seperate addresses which are safe against replay attacks since they exist only on one chain.


**OPTION 2)** This option use a contract written by Vitalik Buterin in order to transfer your funds under the condition that the hard fork happened or not happened.

*Some contract info:*

The **contract address** is: 

    0xb671c3883307cf05bb3dff77a9754e87b4347195


**Contract ABI:**

    [{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"transferIfHF","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"transferIfNoHF","outputs":[],"type":"function"}]


*Step 0:* Setup if you used the 'hard fork chain before' and/or Mist before.

NOTE: If you used the option to support the hard fork in Mist before, go to:

    Mac: ~/Library/Ethereum

    Linux: ~/.ethereum

    Windows: %APPDATA%\Ethereum

and move everything except the 'keystore' folder to a new folder 'blockchainHF'

Then go to blockchain data folder:

    Mac: ~/Library/Application Support/Mist/"

    Linux: ~/.config/Mist

    Windows: C:\Users< Your Username >\AppData\Roaming

and rename the Mist folder to 'MistHF':


*Step 1:* Download the newest version of Mist (0.8.1):

    https://github.com/ethereum/mist/releases


*Step 2:* Start Mist and select 'No'


*Step 3:* Wait until synced.


*Step 4:* Create a new account.

    Click 'ADD ACCOUNT'.

    Note the password.

    Note the address.

    Lets call this address 'addr_ETC'.


*Step 5:* Watch the contract.

    Click 'CONTRACTS'.

    Click 'WATCH CONTRACT'

    Give it the name 'HFConditionalTransfer'.

    Paste the contract address in the 'CONTRACT ADDRESS' field: 

    0xb671c3883307cf05bb3dff77a9754e87b4347195

    Paste the contract ABI in the 'JSON INTERFACE' field: 

    [{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"transferIfHF","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"transferIfNoHF","outputs":[],"type":"function"}]

    Click OK.


*Step 6:* Transfer the ETH funds to addr_ETC.

    Click 'CONTRACTS'.

    Click on the contract 'HFConditionalTransfer'.

    At the right side you see 'WRITE TO CONTRACT'.

    Select the function 'Transfer If No HF'.

    Paste in addr_ETC in the 'TO-address' field.

    Let's do a test transaction first and type in 0.1 in the 'Send ETHER' field.

    Click 'EXECUTE'.

    Type in your password.


*Step 7:* Check if transfer was successful.

    Click 'WALLETS'.

    Wait a bit and see if the contract execution gets confirmed.

    After confirmation check the balance of addr_ETC.

    If it is 0.1 go ahead.


*Step 8:* Send the rest of your balance.

    Do the process of Step 7 again but take the total balance (a little less for the fees) this time.

*Step 9:* Check the balance

    Go to 'WALLETS' and check the balance of addr_ETC.

If it is now the full balance you have transfered your funds successfully on the non hard fork chain to an safe address.


*Step 10:* Do same trading with ETC or whatever you like to do with your ETC


***If you want to be super safe you do the same procedure on the hard fork chain again and send it to an new address addr_ETH:***

*Step 11:* Do it all over again :)

    Start with Step 0.

In the *blockchain data folder* move all folders except *blockchainHF* to *blockchainNonHF*. Move all content from the *blockchainHF* folder in this blockchain data folder.

Then rename the 'Mist' folder in MistNonHF and the MistHF into Mist.

    Skip Step 1.

    In Step 2 select 'YES'.

    Do Step 3.

    In Step 4 generate a new address addr_ETH.

    Do Step 5.

    In Step 6 select 'Transfer If HF' and send to addr_ETH.

    Do Step 7-9 with addr_ETH.

    Step 10: Enjoy sending, trading, using your ETH. :)


If I missed something please leave a comment below.

#ethereum #ether #eth #etc #ethereumclassic #crypto #cryptocurrency #cryptonews #blockchain #relay #replay #hardfork #hf
👍  , , , , ,
properties (23)
authorphistr
permlinkayvsf-ethereum-step-by-step-guide-to-protect-your-eth-and-etc-funds-and-avoid-replay-attacks
categorycrypto-news
json_metadata{"tags":["crypto-news"],"links":["https://github.com/ethereum/mist/releases"]}
created2016-07-26 03:39:12
last_update2016-07-26 03:39:12
depth0
children6
last_payout2016-08-26 03:50:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6,573
author_reputation6,678,137,004
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id365,682
net_rshares1,960,825,565
author_curate_reward""
vote details (6)
@jholdsworthy ·
Great tutorial man.
👍  
properties (23)
authorjholdsworthy
permlinkre-phistr-ayvsf-ethereum-step-by-step-guide-to-protect-your-eth-and-etc-funds-and-avoid-replay-attacks-20160726t034121782z
categorycrypto-news
json_metadata{"tags":["crypto-news"]}
created2016-07-26 03:41:21
last_update2016-07-26 03:41:21
depth1
children0
last_payout2016-08-26 03:50:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation10,526,147,451,360
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id365,724
net_rshares65,037,882
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @phistr! You have received a personal award!

[![](https://steemitimages.com/70x70/http://steemitboard.com/@phistr/birthday1.png)](http://steemitboard.com/@phistr) Happy Birthday - 1 Year on Steemit
Click on the badge to view your own Board of Honor on SteemitBoard.

For more information about this award, click [here](https://steemit.com/steemitboard/@steemitboard/steemitboard-update-8-happy-birthday)
> By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-phistr-20170723t011114000z
categorycrypto-news
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2017-07-23 01:11:12
last_update2017-07-23 01:11:12
depth1
children0
last_payout2017-07-30 01:11:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length584
author_reputation38,975,615,169,260
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,365,111
net_rshares0
@steemitboard ·
Congratulations @phistr! You have received a personal award!

[![](https://steemitimages.com/70x70/http://steemitboard.com/@phistr/birthday2.png)](http://steemitboard.com/@phistr)  2 Years on Steemit
<sub>_Click on the badge to view your Board of Honor._</sub>


**Do not miss the last post from @steemitboard:**
[SteemitBoard World Cup Contest - The results, the winners and the prizes](https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-the-results-and-prizes)

> Do you like [SteemitBoard's project](https://steemit.com/@steemitboard)? Then **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-phistr-20180723t015218000z
categorycrypto-news
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2018-07-23 01:52:18
last_update2018-07-23 01:52:18
depth1
children0
last_payout2018-07-30 01:52:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length711
author_reputation38,975,615,169,260
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id65,641,894
net_rshares0
@steemitboard ·
Congratulations @phistr! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@phistr/birthday3.png</td><td>Happy Birthday! - You are on the Steem blockchain for 3 years!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@phistr) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=phistr)_</sub>


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-phistr-20190723t003114000z
categorycrypto-news
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-07-23 00:31:15
last_update2019-07-23 00:31:15
depth1
children0
last_payout2019-07-30 00:31:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length612
author_reputation38,975,615,169,260
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,625,996
net_rshares0
@upvotes ·
upvote this to add your post to Best of Category candidates
Hello! I am @upvotes and I am here to help you get upvotes!

 Just upvote this comment and your post automatically becomes an @upvotes candidate for: @people, @places, and @headlines 
 Several times a day the most upvoted candidates become the Best of Category post
👍  
properties (23)
authorupvotes
permlinkre-phistr-ayvsf-ethereum-step-by-step-guide-to-protect-your-eth-and-etc-funds-and-avoid-replay-attacks-r1504569917
categorycrypto-news
json_metadata{}
created2016-07-26 03:41:12
last_update2016-07-26 03:41:12
depth1
children0
last_payout2016-08-26 03:50:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length265
author_reputation-45,462,376,817
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id365,721
net_rshares65,037,882
author_curate_reward""
vote details (1)
@upvotes ·
upvote this to add more categories
Thank you for using @upvotes! I have submitted your post to be a Best of Category candidate in @people, @misc and @headlines
 Feel free to upvote and add comments to your own candidate but more importantly please upvote exactly one other candidate to help improve quality, your ranking wont be lowered by this.

 Just reply to this with a comment starting with a specific @category to become a candidate
👍  
properties (23)
authorupvotes
permlinkre-phistr-ayvsf-ethereum-step-by-step-guide-to-protect-your-eth-and-etc-funds-and-avoid-replay-attacks-r35005211
categorycrypto-news
json_metadata{}
created2016-07-26 04:12:27
last_update2016-07-26 04:12:27
depth1
children0
last_payout2016-08-26 03:50:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length404
author_reputation-45,462,376,817
root_title"Ethereum: Step by step guide to protect your ETH and ETC funds and avoid replay attacks"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id366,414
net_rshares63,737,125
author_curate_reward""
vote details (1)