Sezga
English
Sign in

Blockchain technology · · 6 min read

How Bitcoin works: the ledger, keys and miners

Bitcoin is a network that lets people transfer value without a central intermediary such as a bank or a payment company, using a shared ledger that thousands of computers keep identical copies of. The ledger records who owns how much bitcoin; digital signatures decide who may spend it, and miners decide the order in which transactions are recorded.

This article follows a single transaction from a wallet to a permanent record and looks at each of the parts that keep the system running.

The shared ledger: the blockchain

At the heart of Bitcoin is a ledger called the blockchain. It is made of blocks, each containing a batch of transactions. Every block carries the fingerprint (hash) of the block before it. If a single digit in an old block changes, that block's fingerprint changes too, and its link to every later block breaks. These links are what make it hard to rewrite history quietly.

The ledger has no balance lines such as "Alice holds 2 BTC". Instead, it tracks unspent outputs: every transaction spends some earlier outputs and creates new ones. The balance your wallet app shows is the sum of the unspent outputs that belong to you.

The smallest unit of bitcoin is the satoshi: 1 BTC equals 100,000,000 satoshis. This makes it possible to send small amounts such as 0.0005 BTC.

Keys and signatures: what proves ownership?

Bitcoin does not sit "inside" a wallet. It sits on the ledger, tied to a particular address. To spend the bitcoin at that address, you need the matching private key.

  • Private key: A very large, randomly chosen secret number. It is the spending authority itself and should never be shared.
  • Public key and address: Derived mathematically from the private key. The address is the shortened form you share to receive funds. Going the other way, from an address back to the private key, is practically impossible.
  • Digital signature: Proof, produced with the private key, that the owner really approved a transaction. Anyone can verify the signature with the public key, yet nobody ever sees the private key.

The consequence is simple: whoever obtains the private key can spend the bitcoin, and whoever loses it can never spend it again. The network has no "forgot my password" button.

The journey of a transaction

Let's use a hypothetical example. Alice's wallet holds a single output of 0.08 BTC she received earlier, and she wants to send 0.05 BTC to Bob.

  1. The transaction is built. The wallet spends the 0.08 BTC output and creates two new ones: 0.05 BTC for Bob and 0.0299 BTC back to Alice's own address as change. The remaining 0.0001 BTC is the transaction fee.
  2. It is signed. Alice's wallet signs the transaction with her private key.
  3. It is broadcast. The transaction is sent to nodes on the network. Each node checks the signature and confirms that the output being spent has not been used before.
  4. It waits in the mempool. A valid transaction joins the mempool, the waiting area for transactions that are not yet in a block.
  5. It is written into a block. A miner includes it in a new block. Because block space is limited, miners usually prioritize transactions that pay a higher fee relative to their size.
  6. Confirmations accumulate. Each new block added on top of the one containing the transaction counts as one more confirmation. The more confirmations, the more practically impossible the transaction becomes to reverse.

Once the transaction is in a block, Bob can see on any node or block explorer that 0.05 BTC is now tied to his address.

Miners and proof of work

The method that decides who writes the next block is proof of work. Miners keep changing a number in the block header, recalculate the fingerprint each time and look for a result below a certain target. It is a trial driven by luck and computing power. The first miner to find a valid result broadcasts the block, and everyone else can check it with a single calculation.

The system follows a few fixed rules:

  • The target is set so that a block is found every 10 minutes on average. Difficulty is recalculated every 2,016 blocks: if more mining power joins, the work gets harder; if power leaves, it gets easier.
  • The miner who finds a block collects the block reward, made of newly created bitcoin, plus the fees of the transactions in that block.
  • The block reward started at 50 BTC and halves every 210,000 blocks. This event is called the halving and happens roughly every four years.
  • Because of this halving schedule, total supply can never exceed 21 million BTC.

Mining costs electricity and hardware. Since any block that breaks the rules is rejected by other nodes, not wanting to waste that cost pushes miners to follow the rules.

Why can it be trusted? Nodes and consensus

Bitcoin's security does not rest on a single component but on the parts checking one another. Anyone running a full node re-verifies every block that miners produce against the rules in their own copy of the software. A block containing an invalid signature, a double-spent output or extra bitcoin created out of thin air is rejected, no matter how powerful the miner behind it.

If two conflicting chains appear, nodes treat the one with the most accumulated work as valid. Someone trying to alter a past transaction would have to redo every block after it and overtake the rest of the network. That requires controlling more than half of the network's total computing power, which is known as a 51% attack. The bigger the network, the more such an attack costs.

The system also has limits worth knowing:

  • Block space is limited, so fees can rise and confirmations can slow down during busy periods.
  • Transactions cannot be reversed; there is no authority that can recall bitcoin sent to the wrong address.
  • Addresses do not contain real identities, but all transactions are public. Bitcoin is therefore pseudonymous rather than fully anonymous.

Key takeaways

  • Bitcoin is a shared ledger, linked block by block, that thousands of nodes keep identical copies of.
  • Spending authority lives in the private key; transactions are approved with digital signatures, and a lost key cannot be recovered.
  • A transaction is broadcast, waits in the mempool, is written into a miner's block and becomes final as confirmations accumulate.
  • Proof of work produces a block every 10 minutes on average; the reward halves every 210,000 blocks and supply is capped at 21 million.
  • Security comes from nodes independently verifying every block and from the very high cost of rewriting history.

The Sezga terminal

Live prices, liquidation feed, multilingual news, the Fed calendar, event memory and a paper-trading account on one screen. Access is by invitation.

Sign in

Related articles