JoinMarket-Org / joinmarket

CoinJoin implementation with incentive structure to convince people to take part
400 stars 119 forks source link

Many users will skip backing up their 12 word seed #159

Open chris-belcher opened 8 years ago

chris-belcher commented 8 years ago

Sadly we've seen users incredibly resistant to good advice in this ecosystem.

The current wallet-tool.py just prints out the 12 word seed and then continues.

The Electrum GUI forces you to type in the words again which you can only do if you've saved them. JoinMarket is a command line app so users can just scroll up to get around this trick.

Of course we all believe in FREEDOM but I think we as developers have a responsibility to warn users against the easy ways of losing their money. So we need a way to compel users to actually write down their seed, preferably along with a message that the seed is a JoinMarket wallet so they know which software to use years later.

I'm thinking that raw_input() is used to ask a series of yes/no questions that the users would read. If you've ever filled out safety documentation or disclaimer forms you might be familiar with the format.

"Do you understand this seed can be used to recover your money and must be backed up, preferably written down on paper?" "Do you understand that not backing up this seed could lead to loss of money if your wallet file is lost or you forget the passphrase?" "This seed is only for JoinMarket and not any other wallet program, when writing down it's a good idea to write the name" "Do you understand etc etc etc" "Many people in the past have thought that it would be okay if they skipped writing down their mnemonic seed, some of them ended up losing their bitcoins" "Have you written down your mnemonic seed on paper"

Preferably a mixture of yes and no answers. Need more thinking on the exact questions and phrasing.

chris-belcher commented 8 years ago

'Enter wallet encryption passphrase: ' must become 'Enter wallet file encryption passphrase: ' to make it clear only the seed is enough to redeem.

Have a while loop which asks the user again if the passwords dont match.

Questions should be in a while loop which simply asks you again if you answer incorrectly.

"Do you understand that as with physical cash, with bitcoins and JoinMarket in particular you are responsible for your own security?" "Do you understand that the seed must be kept secret, anyone with knowledge of it could steal your bitcoins?"

Electrum's message is "Please write down or memorize these 12 words (order is important). This seed will allow you to recover your wallet in case of computer failure. WARNING: Never disclose your seed. Never type it on a website."

We should add that the seed is used in case of forgetting your password too.

So this is all very easy coding but the questions need some thinking about.

chris-belcher commented 8 years ago

Some text worth reading for ideas https://bitcoin.org/en/you-need-to-know and https://bitcoin.org/en/secure-your-wallet

"The wallet file is stored encrypted on disk, Enter wallet file encryption passphrase:"

The seed must be kept secret and kept safe.

chris-belcher commented 8 years ago

Ultimately there's only one concept we want users to understand, which is that they must write down their seed. Asking 5 or 6 of the same questions slightly rephrased should really drill the idea into the user's minds.

"You MUST back up this information, preferably many ways, one way is pen and paper in a locked safe"

"Not writing this down is like setting the combination to a safe an intentionally forgetting it"

JulianTosh commented 8 years ago

Personally, I think this project, in its current form, is technical enough that people either only keep acceptable-loss value in the wallet OR they are savvy/experienced enough to back up their keys. But that's just me.

I will say that being hounded about backing up my keys would be a real annoyance for me but I understand the need to "take care" of the users.

I would be content with this IF there was a secret "undocumented" joinmarket.cfg parameter I could set like "backup = I have backed up my key, leave me alone. insert secret handshake here" which would bypass any backup reminders.

chris-belcher commented 8 years ago

This reddit discussion is worth a read. Recently an Electrum user lost their money by not writing down their seed. https://www.reddit.com/r/Bitcoin/comments/3p4bq1/electrum_v25/cw33htf

I understand experienced users are inconvenienced, but I think the real possibility of monetary loss by newbs must override that. Furthermore it sets a good example for experienced users who then might go onto write wallets of their own. I was influenced by Electrum's way of displaying addresses which I now regret #259

chris-belcher commented 8 years ago

This reddit user suggested an alternative approach which is to add spaces between letters in the words and ask the user to type in the words again to check.

https://www.reddit.com/r/Bitcoin/comments/3p4bq1/electrum_v25/cw3ydjs?context=4

chris-belcher commented 8 years ago

(14:13:38) bailbonds: I was hoping someone here could help me with my noob issue (14:14:28) bailbonds: I downloaded the newest release and it was working fine until I accidentally tried to send an amount larger than was available in that depth (14:14:39) bailbonds: now I can't even start it (14:14:45) bailbonds: I get a fatal error (14:15:19) bailbonds: joinmarket -qt returned -1 (14:18:13) waxwing: bailbonds: sorry i'm rather busy right now, but the first q i have is: do you have a copy of the seed phrase? (14:18:58) bailbonds: no. I know, total dummy move. (14:19:04) bailbonds: I know the encryption passphrase though! (14:19:06) bailbonds: lol (14:19:46) waxwing: well, ok, makes life hard. there are a ton of things i don't know here (why it crashed, why it would not restart - that part sounds really weird to me, because when you start the app it doesn't load the wallet) (14:20:10) waxwing: but - back up the wallet.json file (or whatever you called it) (14:20:31) waxwing: the coins will still be available as long as you have that file and the encryption password, even if you don't have the seed phrase. (14:20:40) waxwing: (but you get a big slap on the wrist for that :) (14:21:59) waxwing: what OS? does it def always fail when you restart (that is unintelligible to me)? (14:23:45) bailbonds: I accept the slap (14:24:03) bailbonds: well it won't start at all now (14:24:08) bailbonds: I get the same fatal error every time (14:24:14) bailbonds: I'm on Windows (14:24:16) bailbonds: 8.1 (14:24:21) bailbonds: I tried restarting, still the same thing (14:24:33) bailbonds: I just have it saved on my desktop

Happy ending. He did get his coins back.

AdamISZ commented 8 years ago

For anyone who needs to know the ending :) https://github.com/Joinmarket-Org/JMBinary/issues/1

chris-belcher commented 8 years ago

OverlordQ: wellll fml belcher: https://imgur.com/M9EEgq5 belcher: what happened OverlordQ OverlordQ: something stupid OverlordQ: deleted my wallet.json :| belcher: you wrote down the seed right ? grbs: :( belcher: if not, shut down your computer straight away and use a disk recovery tool belcher: every second your operating system runs, it might overwrite your wallet file belcher: could someone just implement this now? https://github.com/JoinMarket-Org/joinmarket/issues/159 belcher: its tagged as easy, its probably the easiest idea on the whole issue tracker OverlordQ: well the yieldgen is still running, so it knows what the seed is. belcher: so, you have to get the seed / decrypted private master key / bip32 keys out of python ? belcher: best of luck, i dont know how to do that.. OverlordQ: yerp belcher: it will probably crash next time it calls get_new_address() because that reads wallet.json to update index_cache belcher: let us know how ti goes OverlordQ OverlordQ: heh :) OverlordQ: I used gdb to dump the process belcher: and you got it ? OverlordQ: still poking OverlordQ: trying to figure out in what code paths wallet is available and seeing if I can trigger it by hand belcher: the decrypted keys are stored in wallet.keys belcher: they look like string encoded bip32 keys, so start with xprv belcher: also theres wallet.seed belcher: which is the decrypted seed as hex OverlordQ: Yeah, that's what Im looking for OverlordQ: Just gotta wait for it to trigger belcher: for what to trigger ? belcher: you can talk to your yieldgenerator yourself on irc OverlordQ: ah, true OverlordQ: I'll do that once I get home belcher: or pm me your nickname and i can pm it !fill 0 1000000 somehexhere belcher: that should be enough to make it call get_new_address() if thats what you're waiting for belcher: just to confirm OverlordQ you didnt write down the recovery seed ? OverlordQ: yit got trashed too belcher: what is yit ? OverlordQ: sorry, *it belcher: did your house burn down or something ? OverlordQ: Nah, nuked a wrong directory belcher: but your recovery seed is written down on physical paper.. ? OverlordQ: no, I didn't do a physical hard copy.

So much for the idea that technically experienced people will know to write down their recovery seed.

OverlordQ commented 8 years ago

I did, but it was in the same folder :).

It'd be smart(er) to keep the wallet files not in the same folder as the app.

IE: wallets go in ~/.local/joinmarket

My mistake was I was doing Dev and running into merge issues so I figured I'd just nuke the clone and start over.

chris-belcher commented 8 years ago

We may need to reword our instructions to make absolutely sure that users understand they need to literally write down the words on a physical piece of paper.

chris-belcher commented 7 years ago

Another example of someone not writing down the seed, luckily he found out how to do it before he needed it: https://www.reddit.com/r/joinmarket/comments/4us9i9/how_do_i_see_the_12_word_mnemonic_for_my_wallet/

chris-belcher commented 7 years ago

I've been reading about behavioural psychology lately (Thinking Fast and Slow, Nudge, etc) and we could use those principles when writing this stuff. Loss aversion and stuff like that.