Seriously, What is a Blockchain?
Still don't know, but afraid to ask? Tight! Let's dig into this.
A Blockchain is a shared ledger of data (think public database) that is validated in blocks (sections) through a consensus mechanism. We call it a chain because each block is cryptographically linked back to the previous one (called a hash).
Okay.
Let’s pause.
Thanks for joining us today.
It takes a pretty secure and mature person to either:
A. Be vulnerable enough to learn about a new thing when the internet tends to make fun of people who don’t know things yet.
B. Be humble enough to read more about something you already know about
I truly appreciate your willingness to spend the time to check out my dumb essays.
Now on to the thing.
Shared Ledger? wtf I’m not an accountant
Cool. Me neither. While the history of bookkeeping is actually pretty fascinating and colorful, all that you need to understand here is that trade happens in the world (buying and selling) and our dumb, monkey brains need to write that stuff down on paper or computers to keep track of that because we forget what we’re doing in the middle of doing it sometimes. Also, that stuff gets complicated really fast.
Like for example, if I’m a farmer selling some rice I have a problem.
My problem is that rice is heavy af.
If I want to sell my rice to you, but I don’t want to carry it (because its heavy af) how can you trust that I have it? An NFT?
Not yet, but maybe. The real answer is that you used to have to demand I carried all that heavy dang rice to you when you bought it. We soon figured out that was a pain, but unless you already knew and trusted me as Rice Farmer Cameron, it was what we were mostly stuck with. Eventually we got a bit smarter and agreed that we both have to trust someone else to keep track of how much rice I sold you and we shook on that and that third party eventually would need to enforce that one off sale.
Now what happens if you’re actually a rice trader and not just a rice connoisseur? You (the trader) are directly trying to buy my premium rice at a good price from me and sell it to someone else (perhaps in another city or country).
You certainly don’t want to carry heavy af rice while you’re searching for another buyer! Fortunately, all these buyers and sellers figured out that it made sense to meet in one spot. That spot became called an exchange.
Once you start adding in multiple parties, it just made a ton of sense to find an even more trusted, good with numbers, third party (in this case the folks running the whole exchange) to keep track of the ledger (hey!) of rice transactions so the rice could stay in storage until someone actually wanted to carry it. They traded currency instead and did a lot of accounting all just to avoid picking up bags of rice. Fintech amirite? (more rice exchange facts here)
The fastest way to understand the modern economy is to understand this ledger thing. Once you understand that, you’re basically an economist (chin not included).
Now. Big Brains. As we developed more and faster and varied exchanges over the past few hundred years, did we continue to physically move money around?
No. Of course not. We don’t want to carry that heavy ass rice so why would we want to carry those heavy dang sacks of cash? Banks (and Visa and Stripe etc etc) just talk to each other and update their respective ledgers when money “moves” around.
The economy is basically just one giant, “he said, she said, they said” game that keeps track of all our money and stuff everywhere at all times (hopefully).
Blockchains also do this, but with more computer work.
Stateful Systems
A “stateful” system is one that is designed to remember preceding events or interactions. Doesn’t really matter how, but if it needs to have a past (and some things don’t) then it’s stateful.
Web 1.0 (the early 90’s internet) wasn’t really stateful. That’s why we invented things like session cookies and caching. Turns out storing information is useful sometimes??
Banks are stateful (how much money you had yesterday is important when you surprisingly have $0 today hmmm). However, your debit card itself is not. Nor is your debit card processor (sometimes). Yet the combo of the stateless debit card asking the stateful bank if you have enough money to buy something (checking your balance “state”) let’s you do useful things (like buy rice) and do them relatively securely.
How do Banks maintain an accurate state? Well they don’t always. The short version is just lots of practice (terrifying). They upgraded over time from handwritten ledgers to typed ledgers to digital ledgers and created systems upon systems to track that ish.
It mostly works. Sometimes doesn’t. ¯\_(ツ)_/¯
It all comes down to banks just being “trustworthy” enough and competent enough and have data from enough places to get pretty close to what the reality should be for how much $$$ you have.
Kinda scary how the world is held together by duct tape, but here we are.
This bothered some people a lot so they’ve tried to invent new ways of tracking things - ideally ways of tracking things without having to trust folks. Like any folks. They’ve got a grudge against folks (like in general but also mostly bank and government folks).
These new ways of tracking things essentially come down to Consensus Mechanisms.
Consensus Mechanisms???
It’s just voting with extra steps tbh.
If you can’t (or don’t want to) trust one person, then you need many people (or computers voting on behalf of people) to say what they think a state should be (ie. everyone could agree that Cameron has $1B USD).
The bitcoin blockchain, for example, uses a consensus mechanism called Proof of Work (PoW). PoW requires you to solve hard (but not complex), random math problems (SHA 256) before you’re allowed to vote.
In Bitcoin PoW - when you solve it first, you’re allowed to vote by shouting it at everyone (yes really). Your vote needs to include a representation (hash) of the previous history of all transactions (connecting the chain back in time). Then the other participants confirm your solution (validate) and add it to their own blockchain record (ledger). Then the same process happen again for the next block. And again. And again. 730392 times (and counting).
There a lot of ways to vote about this history, but the big takeaway is that there needs to be some sort of vote. Even if it’s just one computer voting (I personally wouldn’t trust this network, but it still counts).
After a while - if the network works the way it’s supposed to, this process builds a sequential record of transactions in a way that lets you reliably conduct business.
Ok. Wrapping up.
There are a lot of other neat details around the specific decisions that went into the Bitcoin consensus mechanisms (here’s a deep dive if you’re interested in those deets) and others, but what’s important to understand is that we’ve accomplished two things.
We know* that someone is who she says she is because of their private key signatures.
We know* they can’t spend their money more than once.
*I mean we’re pretty confident here because of economics (hahaha)
With these two things accomplished, we’re in good shape to start sending digital money around and track it with our digital ledger. This ledger has a voting process to decide what the true state of the network should be and we can see the records of past transactions in each subsequent operation.
This whole set of activities put together is called a blockchain. That’s it!
I hope this added value to your day.
Please share this with someone who might find this interesting!
If you have any thoughts or questions about this essay - Let’s Chat
To hear more from me, add me on Twitter or Farcaster,
and, of course, please subscribe to Wysr