What:

  • A decentralised digital currency that allows transferring value over the internet without a central authority.
  • It was the first successful implementation of blockchain technology.

Analogy:

Think back to when you were in New York. Everyone bought different things, with different people. At the end, a SplitWise (alternatively, a “ledger”) was tallied to calculate how much everyone owed everyone in the end. What if, everyone put in $500 at the beginning, and we forbade anyone from spending more than they’ve put in.

This same concept can be thought of as “UTXOs (Unspent Transaction Outputs)” - essentially there’s always a pot that you can take from (assuming you’re following some protocol). This prevents overspending.

Scaling Bitcoin (Slow…):

  • Bitcoin prioritises safety (avoids conflicting histories)
  • Thus, blocks are limited in size (to 1MB)
  • The number of trailing 0’s (N) is set to ensure that a block gets added to the chain roughly every ~10 minutes.
  • Thus Bitcoin is capped at ~7 transactions per minute. (Visa is ~30k/minute)

Discovering Bitcoin Nodes:

  • New nodes contact DNS servers for active IP addresses, with fallback hardcoded IP addresses.
  • When choosing a peer, the node randomly selects from the tables.

Eclipse Attack:

  • Attacker isolates a victim, so the victim exclusively communicates with attacker.
  • Attacker floods victim with bogus IPs (filling list of potential new connections) as well as connects frequently (filling list of of recently tried).
  • When victim reboots, they select new peers (which are now exclusively malicious)
  • Now, the victim is isolated from the real network and can be fed a false version of the blockchain

Sending Bitcoin:

  • Not like banks; balance is not debited and credited from accounts.
  • Every Bitcoin you own exists as a UTXO. They’re essentially digital treasure chests locked with scriptPubKey; essentially a hash of your public key.
  • When you want to “send” Bitcoin, you’re broadcasting an “unlocking script” (scriptSig) for those funds. This proves you’re allowed to send that money.
  • Then, you also broadcast a scriptPubKey for the person you’re paying.

Bitcoin Privacy:

Bitcoin is pseudonymous, not anonymous. How can we improve it?

  • Laundromats (CoinJoin) Hides Path: Users pool their inputs and outputs into a single transaction. The laundromat needs to coordinate, who could be malicious.
    • We can then just use onion routing instead.
  • Confidential Transactions Hides the Values: MimbleWimble hides the amount of money being transferred.
    • Commitments (sealed envelopes) can hide the values, but commitments can also be added without decrypting. We can thus verify inputs - outputs = 0 without knowing the values.
  • Blind Signatures: A bank (authority) signs coins.
  • Monero (Ring Signatures) Hides Sender: When a user signs a transaction, they pick a group of other users to include in the signature. The network sees someone in this group signed it but can’t say exactly who.
  • ZCash: (Zero Knowledge) Hides sender, receiver and amount: The Zcash blockchain is a list of commitments.
    • Some are spent, some unspent.
    • Alice proves she knows the key to one the commitments by publishing a “Nullifier”
    • Every coin has a hidden serial number, and the nullifier is the hash of that number. When Alice spends that coin, the Nullifier is permanently recorded. If she tries to double spend, the nullifier created is the same, it’s already there and so network rejects the transaction.