How Bitcoin Works


How Bitcoin Works

Corey
Simon, I think a lot of people have heard of Bitcoin, but when someone asks 'what does it mean to have a Bitcoin?', most can't really answer beyond some vague analogy about digital gold. Let's break it down from the ground up.

Simon
Absolutely. The key idea is that Bitcoin is just a ledger — a list of transactions. No government, no bank. And to really get it, we should imagine inventing our own version, step by step.

Corey
Right. Start simple: you and your friends keep a communal ledger of who owes whom. Anyone can add a line, and at the end of the month you settle up in cash. But there's an obvious problem — how do you stop someone from writing a fake transaction, like 'Alice pays Bob $100' without Alice's approval?

Simon
That's where digital signatures come in. Everyone generates a public-private key pair. You sign a message with your private key, and others can verify that signature using your public key. It's much stronger than a handwritten signature because the signature depends on the message — you can't just copy it onto another transaction.

Corey
And even if someone tries to reuse a signed transaction, we fix that by including a unique ID so each payment needs a fresh signature. So now we've got a ledger with trusted signatures. But there's still a trust problem: people might rack up debt and never show up to settle in cash.

Simon
Good point. So we change the rules: instead of settling later, everyone pre-loads the ledger with, say, $100. Then you only allow transactions where the sender has enough balance. That means you need to check the whole history, but it also means the ledger becomes a self-contained currency — let's call them 'Ledger Dollars'. No need to ever convert to real dollars.

Corey
Exactly. And that's the first big insight: the history of transactions is the currency. But now we have another issue: who controls the ledger? If it's on a central website, you have to trust that host. To remove that, we go fully distributed — everyone keeps their own copy.

Simon
But then how do you get everyone to agree on the same order of transactions? If I broadcast 'Alice pays Bob 10 LD', how do I know everyone else recorded it and won't accept a conflicting transaction? That's the core problem Bitcoin solves: decentralized consensus.

Corey
And the solution involves a clever idea: proof of work using a cryptographic hash function. A hash takes any input and spits out a fixed-length string that looks random. Change one character and the hash changes completely. And critically, it's infeasible to reverse: if I give you a hash, you can't find an input that produces it except by guessing.

Simon
Right. So imagine I ask you to find a number that, when added to a list of transactions, makes the hash start with 30 zeros. On average, that takes about a billion guesses. But verifying is instant — just check the hash. That's a proof of work: it proves you did a huge amount of computation tied to that specific list.

Corey
Now apply that to the ledger. We organize transactions into blocks. Each block contains a list of transactions, a proof of work (a number that makes the block's hash start with many zeros), and the hash of the previous block. This chains them together — hence 'blockchain'. If you change an earlier block, you have to redo all the work for every subsequent block.

Simon
And anyone can be a 'miner' — they listen for transactions, assemble a block, and race to find a valid proof of work. The first one to find it broadcasts the block, and everyone adds it to their chain. The protocol says: if you hear two conflicting chains, trust the longest one — the one with the most work put into it.

Corey
To incentivize mining, the block creator gets a reward: they can include a special transaction that creates, say, 10 new Ledger Dollars out of thin air. That's how new money enters the system. It's called the block reward, and it's why mining is like a lottery — everyone guesses numbers until someone wins the reward.

Simon
Now let's revisit the trust issue. Suppose Alice tries to cheat by sending Bob a block that pays him but not broadcasting it to the network. Bob would see that block, but the rest of the network would keep building on a different chain. For Alice to keep Bob believing her fake chain, she'd have to do all the work herself to keep it growing faster than the entire rest of the network combined. Unless she has more than 50% of the computing power, that's essentially impossible.

Corey
That's why you shouldn't trust a new block immediately. Wait for a few more blocks to be added on top. If no longer chain appears, you can be confident that your block is part of the consensus. In Bitcoin, the proof-of-work difficulty adjusts so that a new block is found roughly every 10 minutes.

Simon
And the block reward halves every 210,000 blocks — about every four years. Initially it was 50 Bitcoin per block, now it's 12.5, and eventually it'll approach zero. Total Bitcoin will never exceed 21 million. But miners can also earn transaction fees — users optionally include a fee to incentivize miners to include their transaction in the next block.

Corey
Right. And that's actually a current issue: Bitcoin blocks are limited to about 2400 transactions, which is slow compared to Visa. Higher demand means higher fees. But the core technology — this decentralized, trustless ledger powered by proof of work — is revolutionary.

Simon
So to sum up: when you 'have a Bitcoin', what you really have is the ability to sign transactions that move an entry in a global, distributed ledger. The blockchain is the history everyone agrees on, and your coins are just unspent transaction outputs that only you can unlock with your private key.

Corey
Exactly. And while there's a lot more nuance — different cryptocurrencies make different design choices — this foundation should help anyone understand what's really going on under the hood. No more vague gold-mining analogies!

Simon
And hopefully, if you're thinking about investing, you now have a clearer picture of the technology behind all the hype. As always, understand what you're buying.

Ask anything
We've read this whole study set, so questions about it get the best answers.