Bitcoin - a distributed virtual currency system Cheung Chun Hin 1155015916 CHUNG ON PING 1155015471
Online payment You
Bitcoin
Bitcoin - Background World's first decentralized Cryptocurrency Invented in 2009 by Satoshi Nakamoto (中本哲史) No bank or central authority Distributed consensus system
What is a bitcoin Each bitcoin defined as a chain of digital signature When A wants to transfer a bitcoin to B, A creates a digital signature with A’s private key, based on the hash of The previous transaction of this coin The public key of B Everyone can verify the transaction by verifying the digital signature with public key of A
Blockchain Time Transactions are saved inside blocks Each block is linked to a previous block A long chain called “blockchain” is formed Anyone can process each transaction inside each block in the whole chain to manipulate the current status of system Time
How does the Bitcoin network runs 1. New transactions are broadcasted to all users 2. Each user creates new block consisting of new transactions existing blocks new block Time
How does the Bitcoin network runs 3. Each user find the solution to the proof of work of the block 4. When a user find the solution, the block is broadcasted to all users
How does the Bitcoin network runs 5. Each user accepts the received block if all transactions are valid (by digital signature) and unspent. 6. If the user receive two different version of blocks, the first block will be accepted while the second block is still saved as a branch. existing blocks branches Time
How does the Bitcoin network runs 7. The user will switch to the longest branch when new blocks arrive. 8. The user will keep working on the newest accepted block and creates new block on it. Time
Proof of work Nonce should be included in a block Everyone who wants to create a new block needs to compute the nonce such that hash value of the block begins with certain number of zero bits Hash is irreversible, each node need to try for every possible value until the desired one is found. Anyone who wants to change a block needs to redo the computation for the changed block and all blocks after it. CPU-intense work
Mining of bitcoins Successful solver of proof of work is awarded with a small amount of bitcoin Nodes provide computational power and gain bitcoins. This process is called mining. Provide incentives for users to help creating new blocks Reduce incentive for attackers to fake the system since they may gain more by mining with the same CPU power usage People join in groups to cooperate on solving blocks - Mining pools
Anonymity Only public key to be revealed to use bitcoin Anything related to identity can be hidden Users can easily generate new private and public key pairs for each transaction
Security – Double spending Suppose A creates transaction sending 10 bitcoins to B Once B has confirmed the payment, B sends products to A After shipping, A replace the blocks containing the above transaction with another transaction that A sends the 10 bitcoins to A itself
Security – Double spending Prevented by proof of work A need to compute the proof of work for each block including the block with the transaction of A and B, and all blocks after it A is in a race with the whole network Probability of A winning the race is very low even A with large CPU power Assuming a user or group of user having 10% of CPU power of the whole network, probability of it winning the race < 0.1% when the number of blocks in the branch is 6 or more Bitcoin suggests to wait for 6 confirmations for a block by default
Heterogeneity Android, iOS
Heterogeneity Website
Bitcoin's benefit Lower transaction fee Anonymity Government can't manipulate currency
Bitcoin's challenge Mining and solving blocks use a large amount of energy Difficult to exchange May be used in illegal activities Gambling Escaping capital control