Thursday, January 7, 2016

Introduction to BITCOIN

 What is the price of a Lamborghini in BitCoins ???








You should contact Lamborghini to find the today's price :). But you have to believe that this is real and world is moving towards digital currency. [1]

In this post, I would like to provide you a brief introduction to BitCoins after attending to a Meetup on introduction to BitCoins held on Silicon Valley yesterday.

There were plenty of questions I had in my mind before I attend to this meetup. So I thought many people will have the same and sharing the answers I got will help everyone.

What is a BitCoin?

BitCoin is a decentralized digital currency. It is virtual and you can not touch and feel. But you can transfer bitcoins from person to person or one organization to another organization. Basically, it is like normal cash or gold. But no any government or organization controls it.  As we have USD for US Dollars, BitCoins are identified as BTC. and its symbol is as in the bellow image.





In order to identify anything as a currency it should have four properties


  1. Divisible (Broken into small amounts)
  2. Durable ( Stands for a long time)
  3. Fungible 
  4. Verifiable (Verify that it is real)
All the currencies we trade for goods and services have all these properties. BitCoin also has the same four properties. The difference is, the currencies we use subjected to inflation. But BitCoins are not and it automatically controls the inflation.

As we know, US government can print US Dollars and issue to the market. There is no limit in how many bills it going to print over time. It makes the inflation. But in BitCoins, there is a limit of BitCoins which can be exchanged ever in the market. Currently, it has not reached that limit and that limit is 21 Million BitCoins.

How many BitCoins we have in the market at the moment?

At the moment I am writing this blog post, it has the amount in the following image.


You can get the most updated information on the count in [2]. BitCoins are not coming into the market automatically. BitCoins are mined by BitCoin miners. Approximately, in every ~10 mins, 25 new BitCoins are introduced to the market in the time I am writing this blog post. Reason behind saying that "at the time I am writing is", after another few years or months this rate of mining BitCoins become half of the current value.

Who Invented BitCoin?

Satoshi Nakamoto
In 2008 satoshi published a whitepaper on Bitcoin: A Peer-to-Peer Electronic Cash System[3]. Then he released the first client version of the bitcoin software in 2009. You can read more on satoshi with [4].

Who are BitCoin Miners?  

As I mentioned previously, BitCoins are not come into circulation automatically. They are mined by BitCoin miners. Satoshi was the first BitCoin miner and now there are huge amount of BitCoin miners in the world.

What is the task of a BitCoin Miner? Do they dig the soil to mine?

It is more than Digging :).  BitCoin mining comes into the picture with a transaction. Lets assume as following.



Alice has 50 BTC in her wallet. Then she needs to give 30 BTC to Bob and She needs to get 19 BTC as change and 1 BTC as transaction fee.  This is a particular transaction as we do in normal currency. Lets assume Alice has a 50$ bill. She gives it to intermediate party to give which Alice and Bob trust to give 30$ to Bob and get 19$ back to Alice as change. Then she asks intermediate party to keep 1$ as transaction fee.

So, in this digital currency transaction it is as same. But here this 50BTC is kept in an address which has a public key and a private key. This address is encrypted and the public key of this address can be used to decrypt and find the amount of BTC has in this address. But only the private key of this address can be used to send BitCoins from this address to another address.

So, it is important that this private key is stored very securely since once a hacker has this private key, it is like a thief got the wallet. When Alice wants to send money to Bob, what she does is three steps.

She uses a BitCoin Client application. She provides the address of Bob's wallet which she wants to send money. Then she provides the amount she expects to send to Bob, change she expects and the transaction fee. Once she confirms the transaction with her private key, this transaction is done.

Then this transaction is going to all the miners in the world through a distributed communication system. Like this transaction, there are plenty of transactions happening in the BitCoin world and all those transactions are received to the minors.

When there is some number of transactions received by the Miners,  Then they start to validate those transactions first. After validating all those transactions, they need to use a hashing algorithm to hash these set of transactions into a 10 digit number. When hashing these set of transactions to into a 10 digit number, they have to use a random number to make it happens. So it is not an easy task.

As I mentioned previously there are plenty of BitCoin miners in the world. It is like a contest and everybody tries to come up with this 10 digit number and the first one to come up with that number gets the reward.

The reward is 25BTC and all the transaction fees in this transaction. At the moment, the value of a BitCoin in USD is $456.77. So, what do you think? How much you can earn?

Ok, From where this 25BTC comes from?

It comes from Nowhere. That is called mining. When the minor starts to hash and find this 10 digit number, He adds this as a transaction like bellow.  This address 1axxas... is the public address of this miner. So this 25BTC is mined with this transaction.

25 BTC To Address 1axxas...

After finding 10 Digit number What happens?

Once a minor found this 10 digit number for the set of transactions, he broadcasts this number to the entire world.  These is common ledger called "Block Chain". Every minor has the same copy of this common ledger in the world and it has each and every transaction happen from the first BitCoin.
So, once the above 10 Digit number is broadcasted, everybody who mines adds this set of transactions with this number to their ledger. This set of transactions and the number is called a "Block".



The above mentioned 10 digit number is the link from one block to another block. As everybody agrees to use the same key over the entire world, this block is getting saved in everyone's block chain.
After this block is get saved in every ones ledger and it was added three more blocks, the transaction is confirmed.

You can read more information about block chains and how it works in [5].

Can I be a Miner?

Of course, you can. But you will get 25BTC only if you win the contest. You 'll need huge computational power to be the winner. Currently, there is huge computation power used to my miners to mine. Following is a BitCoin mining farm.




Where can I buy BitCoins?

You can buy BitCoins from BitCoin ATMs who are selling BitCoins[6]. You can pay with USDs if you are in USA and you can pay in Yens if you are in Japan.



Who accept BitCoins?

As I mentioned in the beginning, world is moving to the digital currency. So there will be most of the people accepting BitCoins for transactions like buying a coffee to buying a Lamborghini.

Conclusion
This is just an introduction to BitCoins and how it works. There are plenty of resources in the web which you can learn about BitCoins and how it works. Here I am listing few of them for your convenience.

Finally, I would like to thank to Donn Lee who held this meetup and Prabath Siriwardene who asked me to come to this Meetup.

[1] https://www.cryptocoinsnews.com/buying-cars-bitcoin-lamborghini-jeep-everything/
[2] http://realtimebitcoin.info
[3] http://www.coindesk.com/bitcoin-peer-to-peer-electronic-cash-system/
[4] http://www.coindesk.com/information/who-is-satoshi-nakamoto/
[5] http://www.coindesk.com/information/how-do-bitcoin-transactions-work/
[6] http://www.coindesk.com/bitcoin-atm-map/

Additional Resources