Blockchain Basics
1/8
1/14
This material was developed with funding from the
National Science Foundation under Grant # DUE 1601612
Back
Next
Restart
Money Transfer Problem
Blockchain is the record-keeping technology used in cryptocurrencies such as Bitcoin which allows digital coins or other types of assets to move from one party to another. Blockchain helps streamline dealings such as transferring money by using a distributed, decentralized public ledger to keep track of transactions.
2/14
Day 3
$9.9
3/14
Day 1
$10
Alice is in the U.S., and she wants to transfer money to Bob in Japan. This transaction typically requires a trusted third party such as a bank. Alice uses a bank to transfer the money to Bob. Both Alice and Bob trust the bank. The function of the third party is to identify Bob’s bank account and deposit the money into the account. The bank charges a fee to perform this service. This transaction can take up to three days to complete.
Day 2
Fee
Trusted Third Party
4/14
What if Alice could transfer money to Bob without the trusted third party in the middle? Alice could communicate with Bob and complete the transfer faster and cheaper without the fee. This is where blockchain comes in. Blockchain moves digital coins or assets from one party to another and streamlines money transfer.
Streamlining Transactions
$10
Carol moves $10 to David
5/14
Alice has $100
The first principle with Blockchain is the concept of an open ledger. Say there is a network of four people that want to transfer money from one to another. At the inception of this network (the Genesis), Alice has $100. Alice wants to give Bob $50. A transaction gets added to the open ledger and links to the first transaction.
The open ledger is a chain of transactions that is open and public. Everyone can see where the money is and how much each party has.
$50
Principle 1 – Open Ledger
Alice moves $50 to Bob
$20
Bob moves $20 to Carol
Everyone on the network can also see if a transaction is valid or not. If Alice wants to move $75 to David, everyone can immediately see that this is not a valid transaction since Alice only had $50 left after her initial transfer. This transaction will not be added to the open ledger and it does not become part of the chain.
6/14
$75
Invalid Transaction
Principle 2 – Distributed Ledger
7/14
Remember, though, that one of the goals of Blockchain is to do away with the third party. Blockchain uses a distributed ledger. Each user node on the network can have a copy of the ledger.
One of the concerns that needs to be addressed with the distributed ledger is to make sure that all the copies are synchronized and that all parties see the same copy of the ledger.
From:
Hash of
previous
block
Click each side of the block for more information.
To:
Once the block is created, a hash is calculated. If something inside the block changes, the hash also changes. Hashes are used to detect whether a block was changed. A hash value is always unique just like a fingerprint.
The last element inside a block is the hash of the previous block. This creates the chain of blocks and it makes a blockchain secure.
Amount:
Hash
bd1878237b5cdba15afdf02dc52a5b6111a9f9c7d8212018ebf1964b0a15127a
Block Contents
60bb47626fc4affb141f08478ca7b6e47f9d0b8a6bd7b5eb6f096a6f0452d092
Data
8/14
The data that is stored inside a block depends on the type of blockchain. The Bitcoin blockchain stores the details about a transaction and includes the sender, receiver and amount of coins.
Bob wants to move $10 to David. Bob is going to publish and broadcast his intended transaction to the network. Everyone in the network will see the broadcast, but this is considered an unvalidated transaction. No central authority is in control of updating the ledger. The update that Bob wants to make is validated against strict criteria defined by the blockchain protocol.
Several cryptocurrencies use Proof of Work as their consensus algorithm. Blockchain employs miners.
Principle 3 – Synchronized Ledger
blockchain protocol
A method implemented to reach consensus and validate transactions within a blockchain network
9/14
Close
Miners are special nodes on the network. Miners participate in the network by contributing large amounts of computing power. The miners compete to be the first one to solve a complex mathematical problem and earn a financial reward. If this were a Bitcoin scenario, the miner would receive bitcoins as the reward.
Miners
10/14
11/14
mining rigs
the advanced hardware consists of graphics processing units, fans, CPUs and lots of electricity
Validating the transaction is easy since the ledger is open and distributed. Any node can easily calculate whether Bob has the funds to make the transaction.
Solving the complex mathematical problem requires the advanced hardware computing power in systems called mining rigs. The solution the miner finds is referred to as the Proof-Of-Work.
In the Bitcoin world, a new block takes about ten minutes to validate. The reward to miners decreases every 210,000 blocks to maintain a finite supply of 21 million in total. As more miners compete to add blocks, the difficulty of solving the encryption increases.
Validate and Proof-of-Work
Alice successfully solved the problem, so she can include the transaction into the next block within the blockchain.
Add Bob’s transaction to Alice’s ledger.
Bob moves $10 to David
12/14
The nodes confirm that the transaction is valid and add it to their ledger. David receives $10 from Bob. Look at the transaction data on Bitcoin's blockchain. Notice that there is no identifying information about the users making transactions which provides anonymity.
Drag and drop the new transaction here.
Healthcare providers can securely store patients’ medical records using blockchain. The patient would have complete confidence that his or her record cannot be changed.
Blockchains form the foundation for cryptocurrencies such as Bitcoin, Ethereum, or Litecoin. Currencies like the U.S. dollar are regulated by a central bank or government. Cryptocurrencies mitigate the risks of living in a country with an unstable government.
Smart Contracts
Cryptocurrency
Suppliers
Property
13/14
Healthcare
Practical Applications
Elections
There are many practical applications for blockchain technology as it stands to make business and government operations more accurate and efficient. Blockchains have no single point of failure which improves security. And, since blockchains are distributed across hundreds of thousands of computers, it is virtually impossible to attack every single one simultaneously.
Element
with Audio
HTML
By integrating blockchain into banks, consumers could see bank transactions processed in about ten minutes regardless of the time or day of the week since blockchain never sleeps. In the stock trading world, the settlement and clearing process can take 3 days or more (the money and shares are frozen during that time).
Smart contracts use computer code that is built into the blockchain to facilitate, verify, or negotiate a contract agreement. If Bob is renting an apartment from Alice. When Bob pays the security deposit, he receives the door code to the apartment. Both Bob and Alice would send their portion of the deal to the smart contract. If Alice does not provide the door code by the rental date, the smart contract refunds Bob’s security deposit.
Blockchain has the potential to eliminate election fraud by storing each vote as a block. The blockchain would make it almost impossible to tamper with, and it would make the electoral process more transparent.
The process of recording property rights is burdensome and inefficient. A physical deed must be delivered to a government employee at the recorder’s office where it is manually entered into the county’s central database. If property ownership is stored and verified via blockchain, property owners can trust that the deed is accurate.
Suppliers can use blockchain to record the origins of the materials purchased. Labels like organic, local, and fair trade can be verified. Blockchain can also track the path and safety of food throughout its journey to the consumer.
Bank
14/14
Less human involvment
Possibility of being hacked
Accuracy
Pros and Cons
Transparent
Great Job!
Technology cost associated with mining
Use in illicit activities
Decentralized
Low transactions per second
Pros
See if you can determine what the Pros and Cons of Blockchain are by dragging and dropping each item to the correct column.
Cost reductions
Cons
Secure, private, efficient