These are the slides for a talk I gave to the Fredericksburg Linux User Group about Bitcoin and cryptocurrency in general on 2014-02-22. Audio is forthcoming from one of the attendees as a podcast.
2. Why Digital Currency?
●
Cash for the Internet
–
–
Privacy
–
●
Security
Crypto-anarchy
Examples
–
Digicash – one of the very first cryptocurrencies
–
PayPal
–
eGold
–
Liberty Reserve
3. How they work
●
●
●
●
Digicash used Chaumian blind signatures and
a mint to check for double spends
PayPal and Liberty Reserve balance/d user
deposits against deposits with partner
institutions
eGold kept bullion in a vault and balanced
user deposits against that
Centralized ledgers – single point of failure
4. Decentralization
●
A public ledger so everyone plays by the rules
–
●
Each full peer verifies all transactions
Timestamps to prevent double-spending
–
–
●
Miners operate distributed timestamp server
Proof of work = lottery
Initial distribution
–
Mining rewards
–
“Scamcoins” often “pre-mine” - SolidCoin
5. The Nitty Gritty - Transactions
●
Each transaction is a set of ledger entries
●
Two lists
–
–
●
●
Outputs consist of amount and condition to redeem that
money - debit
Inputs consist of pointer to previous output and script that
makes the condition return true - credit
Total input amount >= total output amount, the
remainder is miner fees
All outputs are fully used up when used as inputs,
change outputs to new “address” help preserve privacy
6. Transaction Diagram
By Matthäus Wander (Own work) [CC-BY-SA-3.0 (http://creativecommons.org/licenses/bysa/3.0)], via Wikimedia Commons
http://commons.wikimedia.org/wiki/File%3ABitcoin_Transaction_Inputs_and_Outputs.png
7. Blocks
●
●
●
●
Each block contains header and list of Txes
Header contains hash of last header, timestamp,
target, root of TX Merkle tree, nonce, and TX count is
replaced with padding
Arranged in a TREE of possible TX orderings
Hash of the block being less than the target is proof of
work – like HashCash, but reusable
●
First TX is the “coinbase” - trustless inflation
●
Until a TX is in a block, no work secures it
8. Blockchain
●
●
The blockchain is a ledger, blocks are pages
Longest branch of block tree by cumulative
proof of work is blockchain
●
Represents current network consensus state
●
Parameters change to keep time, limit supply
–
difficulty retargeting every 2016 blocks
–
subsidy halves every 210,000 blocks
9. Blockchain Diagram
By Matthäus Wander (Own work) [CC-BY-SA-3.0 (http://creativecommons.org/licenses/bysa/3.0)], via Wikimedia Commons
http://commons.wikimedia.org/wiki/File%3ABitcoin_Block_Data.svg
10. P2P Network
●
Message-based protocol
●
Provides for
–
Peer discovery
–
Broadcast of transactions and blocks
–
Download of blockchain by new nodes
–
Download of memory pool by newly started nodes
–
Stateful (Bloom filter) connections for “lite” nodes
–
Alert broadcasts
11. Transaction Example
●
Alice has received two outputs – 5 mBTC and
10 mBTC, wants to pay Bob 12 mBTC
●
Bob generates “address,” gives it to Alice
●
Alice generates “change address,” creates TX:
–
Input 1: 5 mBTC
–
Input 2: 10 mBTC
–
Output 1: 12 mBTC to Bob's address
–
Output 2: 2.9 mBTC to her change address
12. Transaction Example, Continued
●
Alice broadcasts TX to peer nodes
●
Peers verify TX, add to mempool, rebroadcast
●
Eventually, transaction makes it to Bob's node
●
Miners include TX in block they're working on,
recalculate Merkle root and keep hashing
●
When a block is found, miner broadcasts
●
Peers validate and rebroadcast
●
Alice and Bob see their first confirmation!
13. Result
●
Decentralized payment network – more like
settlement network
●
Unconfirmed TXes = “cleared,” confirmed = “settled”
●
All TXes are in bitcoins
●
Limited supply – Thiers' Law
●
Open platform for commerce and innovation
●
No middlemen, no borders, no censorship, no SPOF,
only the rules of its own design
14. The Future Is Here
●
●
●
Criteria for redemption can specify complex
contracts using scripts
Scripts can check signatures, hashes, m-of-n
signatures, and transactions can enforce
nLockTime and limited selection of
input/output combinations
Applications include deposits, assurance
contracts, escrow, micropayments, bets
15. Caveats
●
Privacy is user-defined
●
Scalability
–
–
UTXO indexing/blockchain pruning, SPV
–
Off-chain transactions, centralized and not
–
●
Block size – CPU, network, storage
Off-chain bets and other complex contracts
Transaction malleability
–
Important to contracts with refund failsafes
–
Cause of the latest ruckus
16. Alt-coins
●
●
Many use same technology but alter
parameters like hash algorithm, block
frequency, monetary policy – Litecoin, Freicoin,
Dogecoin
Some use unique concepts – proof of stake,
additional scripting and data storage
capabilities – PPCoin, NXT, Ethereum,
Mastercoin
19. Alt-coin mining
●
●
Bitcoin mining software and ASICs can often
be adapted for SHA256-based coins
Litecoin and other scrypt-based coins are still
using GPUs, though ASICs are rumored
–
–
●
cgminer for AMD GPUs
cudaMiner for Nvidia GPUs
P2Pool supports Litecoin as well (maybe not
any more?)
20. Getting and Using Bitcoins
●
●
●
●
Buy from Coinbase, LocalBitcoins, or exchange –
caveat emptor
Sell goods or services for Bitcoin – Coinbase and
BitPay make it easy, or use FOSS
Trade for altcoins at Cryptsy and other
exchanges
Buy from many Coinbase and BitPay enabled
merchants like Overstock.com, Gyft.com,
fiverr.com, and adafruit.com
21. Desktop Bitcoin Wallets
●
Multibit – simple, SPV wallet
●
Electrum – uses a blockchain server
●
Hive – SPV wallet for Mac OS X
●
Bitcoin-QT and bitcoind – the full node
●
Armory – advanced security features, requires
bitcoind
22. Android and Web Bitcoin Wallets
●
Bitcoin Wallet by Andreas Schildbach – SPV
●
Mycelium – Android, uses a blockchain server
●
Blockchain.info – web-based and Android app
●
Coinbase – web-based and Android app
●
CoinKite – web wallet and debit card/terminal