BITCOIN
Jas Chhabra
James Wood
What is Money?
Should be hard to counterfeit
Maybe Good store of Value
??
But, today we mostly deal with money
electronically
For all electronic transactions, we need
somebody to maintain the records/Ledger
Typically it is a Bank or Financial
institution
Banks can be thought of as maintaining a
trusted ledger for accounts and transfers
TRUST
Today’s Electronic money
+ Lot of protections against theft
+ Easy to use
- Not Anonymous
- Requires Trust
Cash
+Anonymous
+ Hard to Counterfeit
- Gone if stolen
Imagine an electronic cash system
E$: Just bits
Cash
+Anonymous
+ Hard to Counterfeit
- Gone if stolen
Background: Digital signatures
Electronic Cash
Double Spending ?
Transaction Amount Reference Signed
Joe->John 2E$ Previous
Transaction
Transaction
Signed by Joe
Joe->Jane 2E$ Previous
Transaction
Transaction
Signed by Joe
Previous
transaction
sending E$
to Joe
Ledger to prevent double spending
Transaction Amount Balance Status
Joe->John X$ 0 Accepted
Joe->Jane X$ -X Rejected
Who maintains this ledger?
Who do we trust?
Bitcoin network maintains a
Decentralized, distributed, p2p
payment ledger
First let us understand what is a
Ledger entry in Bitcoin network or
a transaction
What is a Bitcoin transaction
: One example transaction
From: Joe’s Anonymous Address (pub key hash)
Which contains: 50 BTC
Hash: Previous transaction
To: Bob’s Anonymous address (pub key hash)
Send: 10 BTC
To: Joe’s new Anonymous address (pub key hash)
Send: Change of 40 BTC
Signature: Proof that Joe is allowed to spend the 50
BTC
Bob will spend
using the private
key
Next transaction by Bob
From: Bob’s Anonymous Address (pub key hash)
Which contains: 10 BTC
Hash: Previous transaction
To : John’s Anonymous address (pub key hash)
Send: 10 BTC
Signature: Proof that Bob is allowed to spend the 50
BTC
How does everybody agree on
the same version of ledger?
Brilliant solution by Satoshi
Nakamoto
Background: Hash based proof of work
Ideal Hash Function
Arbitrary length
input
Fixed length
output
• Random mapping
• Same output for same input
What is a Hash ?
Background: Hash based proof of work
E.g. For 128 bit hash
Given
X
Find
Y
<Hash (X||Y) 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
Blocks and Proofs
Previous Block’s hash
Nonce
Transaction 1
Trasnsaction 2
Transaction N
Previous Block’s hash
Nonce
Transaction 1
Trasnsaction 2
Transaction N
Block in progress / mining
Previous Block’s hash
Transaction 1
Trasnsaction 2
Miner’s transaction
Nonce+
Hash < Network difficulty decided target
Broadcast Proof to
the network
Miner’s transaction
Special transaction that transfers 25 BTC
(current) to an address provided by the
miner(reward going down)
Makes every miner’s proof of search
different
Incentive for miner
Network Difficulty
Adjusts to ensure blocks are
generated every 10 minutes
Ensures that probability of you finding
a block is proportional to your
computing power
Multiple miners are
working
This causes forks
Longest chain is hardest to
reverse
So it Wins
How does this prevent
fraud?
Lot of computing power needed to
reverse a Tx few blocks ago.
Network is moving ahead
Nearly impossible to catch up.
Summary
Only one history(longest) is accepted
by the network
Computing power == Vote
Miner’s transactions provide incentive
for mining
Bitcoin as a platform for new types of
transaction
Standard Transaction
To Spend: OP_CHECKSIG
Operation in a stack
based language
Lots of other possible operations:
For example: OP_CHECKMULTSIG, OP_ADD,
OP_IF,…
Combine operations to create new transactions
History and Color : James Wood
http://prezi.com/4dsf-gkdyw55/bitcoins/
Bitcoin: Future
GPU Mining Rig picture
Using Bitcoins: Demo
• Resources: https://www.weusecoins.com/en/getting-
started
Questions?

Bitcoin

  • 1.
  • 2.
  • 3.
    Should be hardto counterfeit
  • 4.
    Maybe Good storeof Value ??
  • 5.
    But, today wemostly deal with money electronically
  • 6.
    For all electronictransactions, we need somebody to maintain the records/Ledger
  • 7.
    Typically it isa Bank or Financial institution
  • 8.
    Banks can bethought of as maintaining a trusted ledger for accounts and transfers TRUST
  • 9.
    Today’s Electronic money +Lot of protections against theft + Easy to use - Not Anonymous - Requires Trust
  • 10.
    Cash +Anonymous + Hard toCounterfeit - Gone if stolen
  • 11.
    Imagine an electroniccash system E$: Just bits
  • 12.
    Cash +Anonymous + Hard toCounterfeit - Gone if stolen
  • 13.
  • 14.
    Electronic Cash Double Spending? Transaction Amount Reference Signed Joe->John 2E$ Previous Transaction Transaction Signed by Joe Joe->Jane 2E$ Previous Transaction Transaction Signed by Joe Previous transaction sending E$ to Joe
  • 15.
    Ledger to preventdouble spending Transaction Amount Balance Status Joe->John X$ 0 Accepted Joe->Jane X$ -X Rejected
  • 16.
    Who maintains thisledger? Who do we trust?
  • 17.
    Bitcoin network maintainsa Decentralized, distributed, p2p payment ledger
  • 18.
    First let usunderstand what is a Ledger entry in Bitcoin network or a transaction
  • 19.
    What is aBitcoin transaction : One example transaction From: Joe’s Anonymous Address (pub key hash) Which contains: 50 BTC Hash: Previous transaction To: Bob’s Anonymous address (pub key hash) Send: 10 BTC To: Joe’s new Anonymous address (pub key hash) Send: Change of 40 BTC Signature: Proof that Joe is allowed to spend the 50 BTC Bob will spend using the private key
  • 20.
    Next transaction byBob From: Bob’s Anonymous Address (pub key hash) Which contains: 10 BTC Hash: Previous transaction To : John’s Anonymous address (pub key hash) Send: 10 BTC Signature: Proof that Bob is allowed to spend the 50 BTC
  • 21.
    How does everybodyagree on the same version of ledger? Brilliant solution by Satoshi Nakamoto
  • 22.
    Background: Hash basedproof of work Ideal Hash Function Arbitrary length input Fixed length output • Random mapping • Same output for same input What is a Hash ?
  • 23.
    Background: Hash basedproof of work E.g. For 128 bit hash Given X Find Y <Hash (X||Y) 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
  • 24.
    Blocks and Proofs PreviousBlock’s hash Nonce Transaction 1 Trasnsaction 2 Transaction N Previous Block’s hash Nonce Transaction 1 Trasnsaction 2 Transaction N
  • 25.
    Block in progress/ mining Previous Block’s hash Transaction 1 Trasnsaction 2 Miner’s transaction Nonce+ Hash < Network difficulty decided target Broadcast Proof to the network
  • 26.
    Miner’s transaction Special transactionthat transfers 25 BTC (current) to an address provided by the miner(reward going down) Makes every miner’s proof of search different Incentive for miner
  • 27.
    Network Difficulty Adjusts toensure blocks are generated every 10 minutes Ensures that probability of you finding a block is proportional to your computing power
  • 28.
    Multiple miners are working Thiscauses forks Longest chain is hardest to reverse So it Wins
  • 29.
    How does thisprevent fraud? Lot of computing power needed to reverse a Tx few blocks ago. Network is moving ahead Nearly impossible to catch up.
  • 30.
    Summary Only one history(longest)is accepted by the network Computing power == Vote Miner’s transactions provide incentive for mining
  • 31.
    Bitcoin as aplatform for new types of transaction Standard Transaction To Spend: OP_CHECKSIG Operation in a stack based language Lots of other possible operations: For example: OP_CHECKMULTSIG, OP_ADD, OP_IF,… Combine operations to create new transactions
  • 32.
    History and Color: James Wood http://prezi.com/4dsf-gkdyw55/bitcoins/
  • 33.
  • 34.
  • 35.
    Using Bitcoins: Demo •Resources: https://www.weusecoins.com/en/getting- started
  • 36.