140 likes | 308 Views
Introduction to Bitcoin A P2P Electronic Cash System. COMS 486 Iowa State University. Contents. What is Bitcoin ? . Who issues it? Who use it? How to make a payment with it?. Transaction Management. Where and How do all the Bitcoin transactions stored ? How to prevent fake transaction?.
E N D
Introduction to BitcoinA P2P Electronic Cash System COMS 486 Iowa State University
Contents What is Bitcoin? Who issues it? Who use it? How to make a payment with it? Transaction Management Where and How do all the Bitcointransactions stored ? How to prevent fake transaction? Bitcoin Mining Why is Bitcoin Mining so important? Will there be Bitcoin Inflation?
What is Bitcoin? Bitcoin starts from a simple idea: Creating a “Free Currency” that does not relay on any authority/Banking System. BANK Based on Free P2P Network Community Electrical Currency No Central Authority who issues Bitcoin
An example of P2P based currency 3 4 1 Design a protocol to generate Bitcoin on the network. Everyone must agree on the protocol The transaction is broadcasted on the whole network such that everyone knows it. 2 Problem: How to safely conduct a transaction ? The owner of the Bitcoin can use it to buy things from others on the P2P network. It is called a Transaction. Based on a protocol, one coin is issued to someone in the P2P network
Encryption-based Bitcoin Transaction. Use the Public-Private Key technology to ensure Verifiable Transaction Transaction of 1 Bitcoin from A to B: A asks for B’s public key. A add B’s public key at the end of previous transactions, and sign it with his private key. Broadcast the transaction to the whole network. Problem: How to preventA from Cheating ?
TransactionManagement We need a mechanism to store all transactions ever happened on the P2P network in a timely manner We can use a simple chain of evidence to store all transactions distributed on the P2P network Problem: The Chain is too easy to fake
TransactionManagement The Chain of evidence must require significant amount of efforts to build, such that no one can easily fake it. Proof of Efforts? In Computer Science, we usually use solving hard computational problem as a proof of efforts, aka: Proof of Work I Example: One-way Hashing Function Given a hashing function and a string Problem: Find such that For most common hashing function like SHA and MD5, finding x is known to be very hard. The problem can only be solved by trying all possible value of till find the correct one(ones). This technique can be used to make generating the chain of evidence very hard.
TransactionManagement Besides all the necessary information, each block of the Chain of evidence need also have a field of Random Number, called Nonce. Even if we change 1 bit of Nonce, the hash value of the entire block will be totally changed. I How to choose Nonce? Requirement for a Valid Block: The hash value of each block MUST start with n Continuous Zeroes. It is very hard to find such a nonce number for large n.
TransactionManagement To generate a Fake but Valid block, the adversary must be faster than EVERYONE else combined. This mechanism works as long as the power of good guy is larger than cooperated bad guy. Example of Valid Block I 2 1 A Transaction is broadcasted on the P2P network EVERYONE on the network starts to compute a valid block to add in the transaction How can this mechanism prevent an adversary from faking a block? ? 3 4 When a valid block is generated, it is broadcasted on the P2P network too. The first valid block will be accepted by the P2P network. Problem: How to motive everyone participate in computing blocks?
Bitcoin Mining Whoever contributes a Valid Block receives Bitcoin as reward I Bitcoin Mining Problem: If hardware becomes faster and faster, will there be Bitcoin Inflation? Bitcoin Mining You can do it too! Get a Bitcoin Account. (Join the P2P network) Download a mining software (Or write your own) Run the software! Pray, or go get a faster machine.
Bitcoin Mining Requirement for a Valid Block: The hash value of each block MUST start with n Continuous Zeroes. It is very hard to find such a nonce number for large n. The difficulty of computing a Valid Block will be raised if the number of Bitcoin generated grows fast. The faster you mine The harder it is to mine The overall speed is controlled to 6 blk/hr Problem: Even speed of issuing new Bitcoin is controllable, the number of existing Bitcoin is still growing always. Is the number of Bitcoin Infinite or Finite?
Bitcoin Mining The number of Bitcoin is finite Estimated time of running out Bitcoin: 2140 What to do when we run out of Bitcoin? Fractional-reserve Banking. i.e., break down existing Bitcoin into smaller units like 0.1 Bitcoin, 0.01 Bitcoin, etc.
Bitcoin: Statistics Global Transaction Map Transaction Charts Market Price