The most amazing place on reddit! A subreddit for sharing, discussing, hoarding and wow'ing about Dogecoins. The much wow innovative crypto-currency.
[ELI5] How wallets work
After writing this response to the paper wallet ELI5 request just now, I realised others may benefit if I post it separately.
This also makes it easier to deal with followup questions people may have. I've answered these sorts of things repeatedly, and clearly people don't look in comment threads.
A lot of people think paper wallets are pieces of paper.
This is not quite correct. They can be, but they can also be metal, plastic, stone, or even not physical at all.
Really, its just a matter of having the keys in a human-readable form, not inside a wallet client or service.
First thing to understand is that ALL wallets are the same. They are big numbers, generally written as Base58 (to avoid some confusing characters, like 1 and l, O and 0), which are the private keys which allow coins to be spent. And they generally come as a pair with a public key generated from them (each wallet can actually have many corresponding public keys, but that's another matter).
Its also important to realise that coins do not live in wallets. They never leave the blockchain. The private keys simply give you access to transfer control of coins to someone else's wallet, by signing a transaction.
Now, if you look up any wallet on one of the blockchain explorers, you will see transactions, possibly many of them. Each block of coins is transferred from wallet to wallet in its entirety, but can (and usually is) be split between different receivers. The last transaction containing these coins is called an Unspent Transaction Output or UTXO. These UTXOs are kept in memory (RAM) by all nodes, so the more there are, the more resources are required.
It is therefore a good idea to consolidate coins into fewer UTXOs. 100 doge could be a single UTXO, or it could be a hundred with 1 doge each, which is obviously less efficient. Also, since miners charge 1 doge per 1k block of data, and 1k can hold about six transactions, it will cost about 15 times more to spend the 1 doge UTXOs than the big one.
It is a good idea to use a set of cascading paper wallets (remember they don't need to be printed... entries in a text file or spreadsheet are fine) to consolidate coins. Like so:
Say you have a wallet used for faucets, A. You generate two more, B and C. Then you use A with your faucets, which pay you small amounts. Once you reach say a hundred transactions, you sweep A into B, which destroys the hundred inputs and creates one output in B for the total amount, less fee. When B has a hundred UTXOs, you sweep it into C, further consolidating the coins. So one UTXO in C replaces 10,000 UTXOs in A. You can continue using these wallets indefinitely, despite people advising not to reuse wallets, because signing transactions does not expose the key to the service you're using.
If you need to spend coins, you can sweep a wallet to the destination if the total amount in it is correct. There are several sweeping services online, such as dogechain.info and redeempaper.com that you can use for this.
If the amount to be paid is less than the wallet contains, then it is necessary for the remaining balance to go somewhere. A change address, either an existing wallet, which can be the same one used to send the payment, or a newly generated change address. Wallet clients tend to generate new change addresses, and you need to be aware of them.
Redeempaper does allow for change, enabling it to be used to partially spend funds. However it may be preferable to import the wallet into a client or online service if you're going to do this a lot, if only because the accounting is easier that way. Each client has its own way of importing, but it basically involves telling it the private key, which it then adds to its internal list of wallets.
You CAN use the same wallet in multiple clients and services. This is generally not recommended, because it can get confusing, and because some clients which don't maintain a complete blockchain may have trouble synchronising transactions which occurred externally.
Two things which are critical with ALL wallets is to keep the keys safe, and to not ever expose them to anyone else.
ANYONE who knows a private key can spend the coins in it.
NOONE can spend any coins without the private key.
So you can lose your coins to a thief one way, or effectively destroy them the other way. Make sure you have copies of your keys recorded, both electronically and in human-readable form, in multiple locations and that they are kept away from prying eyes.
Hope this helps.
Awesome work, Shibe.
+u/dogetipbot gigaroll verify
[wow so ^verify]: u/loupe_garrou -> u/fulvio55 Ð1558 ^Dogecoins __($0.297687)__ [help]
nice, can you repost with a tutorial flair in r/dogeducation?
+u/dogetipbot megaroll verify
[wow so ^verify]: u/peoplma -> u/fulvio55 Ð30 ^Dogecoins __($0.0056763)__ [help]
I can do that I guess.
I keep forgetting to print out my wallet :/ I should really start doing that...
Start by making a text list of all the keys, and keep it updated. Then just print it out and put a copy with the USB backup of both the list and the wallet.dat files.
woohoo always one looking to help out!
I'm three and a half.
Not till next year, you're not. :P