Technology

How blockchains actually work

The mechanical parts of crypto that don't change when the price does. What a blockchain is, how strangers agree on it, what smart contracts can and can't do, and how networks try to go faster without breaking.

By the soop.wiki teamUpdated 9 min read

Crypto Twitter can make blockchains sound like magic or a scam, depending on the day. They're neither. They're a clever combination of a few older ideas, mostly from cryptography and computer networking, put together in a way that lets strangers agree on who owns what without a bank or company in the middle.

You don't need to be a developer to understand the basics, and understanding them changes how you think about risk. This guide goes from the ground up: what a blockchain is, how your keys work, how a transaction gets confirmed, how networks agree, and how they try to scale.

What a blockchain actually is

Strip away the branding and a blockchain is a specific kind of database: an append-only ledger (you can add to it but not edit the past), copied across many independent computers called nodes. New entries are added in batches called blocks, and each block includes a cryptographic fingerprint of the block before it. Chain those fingerprints together and you get, well, a blockchain.

That chaining is the key trick. If anyone tried to edit an old entry, its fingerprint would change, which would break the link from the next block, and the next, all the way to today. Every honest node would instantly notice the mismatch and reject it.

Nobody owns the master copy. Thousands of nodes each keep their own, and the network uses a set of rules called a consensus mechanism to agree which version is the real one.

Hashing: the fingerprint machine

A hash function takes any input, a word or a whole block of transactions, and produces a fixed-length string of characters that looks random. Three properties make it useful:

  • Same input, same output. Hash the same thing twice and you get the identical fingerprint.
  • Tiny change, totally different output. Change one letter and the hash changes completely and unpredictably.
  • One-way. You can't work backwards from a hash to the original input.

That's how blocks are linked and how tampering is detected. It's also part of how mining works, as you'll see below.

Keys, signatures and your seed phrase

This is the most important section for anyone holding crypto. You don't have an account with a username and password the way you do with a bank. You have a key pair:

Private key
A huge secret number. It lets you sign transactions that move your funds. Anyone who has it controls the funds, completely and permanently.
Public key and address
Derived from the private key. Your address is what you share so people can send you crypto. Sharing it is safe.
Digital signature
When you send crypto, your wallet uses your private key to sign the transaction. Anyone can verify the signature with your public key, but nobody can forge it without your private key.
Seed phrase
Usually 12 or 24 ordinary words that can regenerate all your private keys. It's a human-friendly backup. It's also the single most valuable secret you own.
Real talk

There's no "forgot password" button on a blockchain. Lose your seed phrase and you lose access. Share it and someone else gets access. No legitimate wallet, exchange or support agent will ever ask for it. Ever.



The life of a transaction

Here's what happens between tapping "send" and your friend seeing the money:

  1. Your wallet builds and signs it

    It creates a transaction saying "move X from this address to that one, with this fee", and signs it with your private key.

  2. It's broadcast to the network

    Your wallet sends it to nodes, which pass it along to other nodes within seconds.

  3. It waits in the mempool

    Unconfirmed transactions sit in a waiting area called the mempool. Block producers usually pick the ones paying the highest fees first, which is why fees spike when the network is busy.

  4. It's included in a block

    A miner or validator puts it into a new block. Bitcoin produces a block roughly every 10 minutes; Ethereum roughly every 12 seconds.

  5. Confirmations pile up

    Each new block built on top makes it harder to reverse. That's why exchanges wait for a number of confirmations before crediting a deposit.

Why this matters for your money

This structure is what lets crypto exist without a bank in the middle. A transaction is final once enough independent participants have accepted the block it's in, not when a company's database says so. That means no chargebacks, no account freezes by a middleman, and no business hours. It also means no undo button: send to the wrong address or sign a malicious transaction and there's usually nobody who can reverse it.

Consensus: how strangers agree

The core problem is simple to state: how do thousands of computers that don't trust each other agree on one history, and stop anyone spending the same coin twice? Two answers dominate.

Proof of work (mining)

Miners race to find a number that, combined with the block's data, produces a hash below a target. There's no shortcut; you just try trillions of guesses. The winner adds the block and earns a reward. Because finding a valid block takes enormous computing power and electricity, rewriting history would mean redoing all that work faster than the rest of the network combined. Bitcoin uses proof of work.

Proof of stake (validators)

Instead of burning electricity, validators lock up the network's own token as collateral, called a stake. The protocol picks validators to propose and confirm blocks, roughly in proportion to their stake. If a validator cheats or breaks the rules, part of its stake can be destroyed, which is called slashing. Ethereum switched from proof of work to proof of stake in September 2022, in an upgrade known as the Merge, cutting its energy use dramatically.

Proof of work Proof of stake
Who produces blocks Miners with specialized hardware Validators who lock up tokens
What makes cheating expensive Electricity and hardware costs Losing staked collateral
Energy use Very high Much lower
Main criticism Environmental impact; mining can concentrate in big operations Influence can concentrate among the largest holders; more complex rules
Best-known example Bitcoin Ethereum (since 2022)

Neither is simply "better". They're different bets about what should be expensive to fake. Both aim to make attacking the network cost far more than an attacker could gain.

What's a 51% attack?

If one group controlled the majority of mining power (or stake), it could potentially rewrite recent history, for example to spend the same coins twice. On large networks this would be extraordinarily expensive. On small networks with little mining power, it has actually happened. It's one reason security tends to be stronger on bigger, more established chains.

Smart contracts: programs that live on the chain

A smart contract is code deployed onto a blockchain. Once it's there, it runs exactly as written, anyone can inspect it, and it's enforced by the same consensus that secures the network. Ethereum made smart contracts mainstream, and many other networks now support them.

What makes them different from normal apps

A normal app's backend can be changed by whoever runs the server. A deployed smart contract usually can't be altered. What's on the chain is what runs, bugs included, unless it was deliberately built with an upgrade mechanism (which brings its own trust question: who can upgrade it?).

That's both the appeal and the danger. No company can quietly change the rules on you, but no company can quietly fix a mistake either. That's why audits, bug bounties and careful, gradual launches matter so much.

Gas: paying for computation

Every action a smart contract performs costs a little computation, paid for with a fee called gas. Complex actions cost more gas than simple transfers, and gas prices rise when the network is busy. Even failed transactions usually cost gas, because the network still did work.

What they're used for

  • Tokens. Most tokens on Ethereum-style networks are themselves smart contracts that keep track of balances.
  • NFTs. Contracts that track ownership of unique items.
  • Decentralized exchanges and lending. The engines behind DeFi yield.
  • Stablecoins. Issuing and managing dollar-pegged tokens. See stablecoins explained.
  • DAOs. Organizations whose treasury and voting rules live in contracts.

Oracles: getting real-world data in

Blockchains can't see the outside world by themselves. A lending contract needs to know the price of ETH; it gets that from an oracle, a service that feeds external data onto the chain. If the oracle is wrong or manipulated, the contract will happily act on bad data. Oracle failures have been behind several major DeFi losses.

Scaling: layer 1 and layer 2

A base blockchain, called layer 1, where every node checks every transaction, tends to be secure but slow and sometimes expensive. That's the "blockchain trilemma": it's hard to get security, decentralization and speed all at once. Scaling solutions try to bend that trade-off.

Layer 1 scaling
Changing the base chain itself: bigger blocks, faster blocks or more efficient data storage. This raises capacity directly but can make it harder for ordinary people to run a node, which hurts decentralization.
Layer 2 rollups
Separate networks that process transactions off the main chain, then post compressed data and a proof of correctness back to layer 1. They inherit much of layer 1's security while handling far more activity at a fraction of the cost.
Sidechains
Independent chains with their own security, connected to a main chain. Often faster and cheaper, but you're trusting their security, not the main chain's.

Two kinds of rollups

Optimistic rollups Zero-knowledge (ZK) rollups
How they prove correctness Assume batches are valid unless someone submits a fraud proof during a challenge window Post a mathematical proof with every batch that it was processed correctly
Withdrawing to layer 1 Native withdrawals usually wait for the challenge window, often about 7 days Faster once the proof is verified
Trade-off Simpler to build and widely used More complex technology, rapidly improving

Bridges: useful and historically risky

A bridge moves assets between blockchains, usually by locking tokens on one chain and issuing a matching token on the other. It's essential plumbing, but it concentrates a lot of value behind a relatively small amount of code and a small group of signers. That makes bridges a top target. In March 2022, attackers took roughly $600 million from the Ronin bridge, and a month earlier the Wormhole bridge lost around $320 million. If a bridge fails, the tokens it issued can become worth nothing.

Zero-knowledge proofs, briefly

A zero-knowledge proof lets you prove something is true without revealing the information that makes it true. A classic analogy: proving you know where Waldo is on a huge page by showing him through a small hole in a large sheet of cardboard. Your friend sees you know, without learning where on the page he is.

In scaling, ZK proofs let a rollup prove thousands of transactions were handled correctly with one compact proof the main chain can check quickly. In privacy, they let someone prove they meet a condition (enough balance, over a certain age, on an approved list) without revealing the underlying data.

Why we keep it mechanical

None of this tells you whether a specific project is a good investment. It tells you what's possible, what's being trusted, and which questions to ask before you put money anywhere.

Questions people ask

Can a blockchain be hacked?

The core of a large, established blockchain is extremely hard to attack. Most "crypto hacks" target things built on top: smart contracts, bridges, exchanges, or individual users tricked into signing malicious transactions.

Is blockchain the same as Bitcoin?

No. Bitcoin is one blockchain, and the first. There are many others, like Ethereum, with different designs and purposes.

Why are fees sometimes so high?

Block space is limited. When lots of people want to transact at once, they bid against each other with higher fees. Layer 2 networks usually offer much lower fees.

What happens if I send crypto to the wrong address?

Usually it can't be reversed. If the address belongs to an exchange or a person, you can ask them to return it, but there's no central authority that can undo it.

Are blockchains anonymous?

Most are pseudonymous. Addresses aren't names, but all activity is public, and addresses can often be linked to real people through exchanges. See on-chain analysis.

This article is general education about how things work. It is not financial, investment or tax advice, and it doesn't consider your circumstances. Do your own research and talk to a licensed professional before making decisions with money.