Header Ads

Header ADS

How do wallet works ?

 How do wallets work? See, to use a cryptocurrency, you need a wallet to store your virtual coins, and just like a bank account, it has a unique address. It looks something like this

bc1q9u47pw9p4y38rgzayexsysn0gn9trl977cdjlq

depending on the cryptocurrency, it seems like a randomly generated string of letters and numbers. But in reality there's a bit more going on. The first thing we need to know is how these are created. Anyone can create a new wallet by generating a key pair with a certain algorithm. In the case of Bitcoin or Ethereum, that is via an elliptical curve digital signature algorithm, and that's quite a mouthful. But the take away here is that the algorithm will spit out a private key and a public key. 

These keys are mathematically linked to each other, which means you can take the private key and derive the public key from it, but you cannot take the public key and turn it into the private one.  Now these two keys survey different purpose. The public key will become your wallet's address, kind of like your bank account number, and the private key is your way of proving that you are the owner of the wallet, and does that you can spend the coins inside of it. 

So in summary, public keys can be shared with everyone, while private keys should be kept to yourself unless you want other people to decide what to do with your money. So far so good, but this system has a few interesting side effects that I want to mention. For starters, everyone can generate an unlimited amount of wallets right on their own computers. It's only limited by how fast your computer can generate these key pairs. However, nobody will know about your newly created wallet until it receives some coins. See, a cryptocurrency only keeps track of transactions between wallets. It doesn't have a list of all wallets in existence. So if your newly created wallet hasn't been involved in any transaction, it simply doesn't exist for the outside world, think of it this way. The blockchain is just a giant spreadsheet with transactions between wallets. But the blockchain itself doesn't really care about if these wallets exists or not. It's only when you want to spend coins in a wallet that you have to prove that you are the owner, and you can only do that with the private key that is associated with the wallets address. Another side effect is that you can transfer coins to a wallet address that doesn't exist. Again, a blockchain doesn't have a list of valid addresses.

 So it cannot check if you're transferring coins to an existing one. In case you transfer coins to an invalid address, then those are lost forever unless someone can generate the private key for that particular wallet address, which right now isn't really possible because of how the algorithm works. Fun fact, this is often referred to as coin burning and it's sometimes done by cryptocurrency projects to reduce their total supply and increase their value, or it's done to get rid of coins that weren't distributed during their initial coin offering. The last cool side effect that I want to mention is that you can create a wallet while being offline. You can give that address to someone else and they will be able to send coins to it. And later when you get back online, you can use your private key to spend those coins. Cool, huh? So if you want to store some coins in the safest possible way, you can generate a wallet while being offline, print out the public and private key. Destroy the keys on your computer and then send some coins to it. This is called a paper wallet, and it's the most radical but most secure way of storing your coins. So this was a quick overview of how wallets work in a cryptocurrency. Thank you very much for reading.

 

No comments

Powered by Blogger.