Manage episode 194925307 series 1906795
In 1514, Andries van Wesel was born in Brussels, but he was better known by his latin name Andreas Vesalius.
Andreas grew up to become a very well-respected doctor, but he kept noticing certain inaccuracies in medical knowledge – particularly related to the human body. And, as he discovered, these inaccuracies were due primarily to one cause…
You see, in ancient Rome, human dissection was illegal, so the foremost doctor of that time (a man named Galen) had performed dissections on macaques – a small primate – and had extrapolated that information to humans.
And doctors had trusted Galen’s findings for almost 1,400 years.
Andreas did not trust Galen’s findings, and in 1543, he conducted a public dissection – of a convicted felon, of course, since no upstanding citizen should be dissected. And he showed many of the medical inaccuracies to the public.
(By the way, you can still see that preserved criminal body in a Swiss Museum.)
The knowledge that Andreas exposed to the world at large was not particularly complex or advanced, but because of his findings, other researchers and doctors were able to start making better decisions and to work toward future medical advances.
A Conversation about How Cryptocurrency Works…
This article and episode of Curious are just a bit like Andreas’s work, because for much of Season 1 on Cryptocurrency, I’m chatting with people who are quite deep into cryptocurrency – whether investing, developing, or doing other interesting things. But those conversations can sometimes gloss over the ‘basics’ or ‘fundamentals’ just a bit. It’s easy to do if you’re an expert in an area.
So we decided (our producer Heather and I) to record a conversation just between us. The purpose of the conversation is to give you some background into how cryptocurrency works – if you’re not already intimately familiar with some of the details.
After recording the conversation, I decided that it’d also be a good idea to get all this put into written format.
When Heather and I started this season, I had already been researching and following cryptocurrency for a couple years, but Heather had very little knowledge about cryptocurrency. I’m still not an expert, but in some ways, that’s a good thing, because it wasn’t that long ago that I had to figure out all of the basics of cryptocurrency.
So in this episode, Heather and I have a conversation. We cover some of what she’s learned so far and what she’s found interesting, but I also spend some time covering the fundamentals of how cryptocurrency works.
If you feel like you already have an excellent grasp of cryptocurrency and the blockchain, then feel free to skip this article and episode.
The 6 Big Pieces of Cryptocurrency – How it All Works and Fits Together
“Cryptocurrency” is the word I’m going to use for the overall technology – and this includes all the things you’ve heard of: blockchain, bitcoin, ethereum, etc.
There are 6 Big Parts of Cryptocurrency that You Generally Need to Understand…
1. The Blockchain
The blockchain is the most basic and fundamental part of cryptocurrency.
The easiest way to think about the blockchain is as a record book (or a ledger or database).
The blockchain records things that have happened. So when you think about money, before the internet, your parents or grandparents might have recorded everything they spent in a checkbook or in a paper ledger. After all, when you spend cash, there’s no automatic record of where it went.
The blockchain is simply a long record of every transaction that’s ever happened on that particular blockchain. So if you take Bitcoin, for example, the bitcoin blockchain records every movement of bitcoin in history.
The blockchain actually gets a bit more complicated than this – it can also store rules and code for things that should happen in the future or based on certain conditions. For example, you could include a rule that your daughter gets 10 bitcoins on May 3rd, 2027. Or you could potentially include entire code about how an app like Facebook should run.
But for now, it’s enough to think about the blockchain as a record book.
And it’s called a “blockchain” because it’s literally a string of “blocks”. If you think of the blockchain as a physical record-book, then each block is like a page in that book. Each page or block contains information about a certain set of transactions, and the following page contains information about later transactions. And so on.
But each block in the blockchain also contains 2 other things.
First, it contains a reference to the prior block. This reference to the prior block is called a “hash”, and this is important to understand, because it’s what allows the blocks to form a “chain.” In other words, you know that one block MUST follow another because it references that prior block in a particular way.
Second, each block also contains the answer to a very hard math puzzle – this answer is called a “nonce” – a number used once. This puzzle is the key to mining, which I’ll talk about next.
So blocks contain a list of transactions, a hash reference to the prior block, and a “nonce” which is just a meaningless number that is the answer to a hard math puzzle.
So where is the blockchain located?
Right now, your bank has a record similar to the blockchain for all movement of money into and out of your bank account. And your bank has those records for every single account at the bank, going back many years.
The difference with the blockchain is that it’s not stored centrally by one particular entity or entities.
The blockchain is stored across tens of thousands of computers around the world.
In fact, if you wanted to, you could have your computer store the blockchain. The blockchain – although encrypted – is entirely public.
Side note – you could have a “private” blockchain that not everybody has access to – and there are some of these blockchains that are useful in certain instances. But for now, we’re just talking about public blockchains, which includes all of the major cryptocurrencies.
Mostly, though, the blockchain for cryptocurrencies is stored by what are called “miners”. These are computers – usually built with special graphics cards that allow them to solve problems very quickly. These miners compete to find the answer to the very hard math problem that each block in the blockchain requires before it can be added to the blockchain – they compete to find the “nonce”.
Basically, the first miner to solve the problem will get a reward. If it’s the bitcoin blockchain, then it will get a reward of bitcoin tokens.
And by the way, it’s not necessarily the fastest mining computer that wins every time. Speed makes a big difference, but only in terms of probability. The math problem is hard enough that the computer essentially has to go through sets of random (long) strings until it finds one that works. Most mining computers are actually huge sets of servers run by very large companies in China. This allows them to have a higher chance of winning each time, and China has much lower electricity costs, which makes it a more profitable venture.
When a miner solves a block, that solution is sent out to the other miners (in a matter of milliseconds), and the solution is verified. That block – in other words, that record of transactions – is then added to the blockchain on all computers.
The beauty of all of this is that the mining system actually incentivizes compliance:
- It’s nearly impossible to change prior blocks. Once a block is in the blockchain, going back and changing it would require recalculating the “puzzles” for all subsequent blocks, which you could never do fast enough.
- Even if you could do it quickly enough, other miners won’t accept the blocks if they don’t fit the rules of the protocol (e.g., if they try to ‘double-spend’ tokens, etc.)
- Even if you can falsify aspects of the blockchain, it doesn’t make financial sense to do so. In effect, you would be harming the value of the cryptocurrency that you’d be stealing.
3. The Protocol
The protocol is really the heart of cryptocurrency.
The protocol is the rules system by which cryptocurrency must operate.
The protocol includes:
- the rules by which transactions are allowed to occur,
- the rules by which miners are required to solve puzzles,
- the rules by which miners are rewarded for mining, and
- every other rule that governs operations in the blockchain.
The protocol is also the way that all of the computers (usually referred to as ‘nodes’, since they’re usually just sets of mining rigs with specific chips and cards to do the mining) communicate with each other.
Technically, the rules can get more complicated than what I’ve explained here. However, it’s generally enough if you understand that the protocol is a set of rules for communicating, processing, and recording transactions.
The protocol can also change.
For instance, one of the particular rules of the protocol governs what data must be included in each block that is recorded. And in August 2017, that rule changed just a bit so that the signature (also known as the “witness”) piece of a transaction no longer needed to be recorded in the block.
Changes to the protocol generally require a consensus of miners before the protocol change can occur. (There are exceptions to this that are outside the scope of this article.)
Cryptography is part of what allows cryptocurrency to exist in the first place, and you really can’t think about cryptocurrency without thinking a little bit about cryptography.
Cryptography gets complex quickly because it’s now based on complicated mathematical equations.
In the old days, say more than 50 years ago, cryptography worked by having a cipher on each side. A cipher is simply a way to decode a message.
This is generally called “symmetrical” cryptography.
In symmetrical cryptography, if I wanted to send a message to you, then I would use the cipher to encode the message, and you would use the cipher to decode the message.
If anyone else had the cipher, they could also decode the message.
But also, if someone had just a few of our messages, they could eventually reverse-engineer the cipher.
Modern cryptography, beginning mostly in the 1970s, is based on one-way equations. In other words, these are mathematical equations that you can only be solved in one direction.
Here’s how it works (generally)…
With a cryptocurrency like Bitcoin, you have a public key and a private key.
When you send Bitcoin to somebody, you send the Bitcoin from your public address to their public address. (Public addresses are your public keys.)
However, to properly send the transaction from your public address, you must “sign” the transaction with your private key.
And here’s the twist…
Nobody ever sees your private key.
But through fairly complicated math equations, anyone can verify that you actually signed the transaction with your private key.
In other words, they can verify that you have the private key without ever being able to figure out what your private key is.
This technology is not unique to cryptocurrency, but without it, cryptocurrency wouldn’t be possible.
Bitcoin, for instance, refers in the overarching case to the entire cryptocurrency of Bitcoin, which is – at its root – mostly a blockchain and protocol.
But on top of the protocol layer is a set of “tokens”.
These tokens are what are more commonly known as bitcoins. In terms of transactions, these are the “dollars” or “euros” that you can spend.
Interestingly, if you want to get a little bit more technical about it, any token can only ever be spent one time. And I know that sounds odd at first, because it seems obvious that if you transfer the token to somebody else, then they can surely use it again.
But technically, what they receive is not the same token. Each token is given a unique identifier (a long string of letters and numbers), and when you transfer all or part of a token, what really happens is that new tokens are created.
There are various reasons that tokens are “single-use”:
First of all, tokens don’t actually exist.
The blockchain is just a long record of transactions. And in that record, one of the rules is that a token identifier (the long string of numbers and letters given to a unique token) can’t be used more than once.
Secondly, you can only spend 100% of a token.
So if I give you a bitcoin, but you only want to spend half of it, what happens is that the entire bitcoin goes into the transaction record, and two new halves are created – one that goes back to your public address and one that goes to whomever you’re trying to send it to.
Token are necessary for a variety of reasons:
- To allow transactions;
- To represent (tokenize) other goods – either tangible or not;
- To reward miners.
However, beginning in 2017, there were a proliferation of tokens, 99% of which are likely neither necessary or beneficial.
6. Decentralized Applications
Finally, on top of everything is a layer that we commonly call D-Apps (Decentralize Apps).
This layer barely exists right now.
What I mean by that is that D-Apps have been built, but they’re largely in their infancy and are not yet very useful.
However, going forward, many people believe that this may be one of the biggest benefits and promises of cryptocurrency – the ability to build an enormous set of apps on top of the blockchain. This might include everything from social media apps like Instagram to payment apps like Paypal.
OK…But How Does Cryptocurrency Work in Very Simple Terms?
Here’s a brief synopsis of everything above:
- A blockchain is simply a “record-book”, usually public.
- A copy of the blockchain will be hosted on computers around the world, which means that you don’t need to trust any particular person, company, or institution to keep the correct copy.
- The protocol is the set of rules that cryptocurrency operates by. It controls how things are recorded in the blockchain, how everyone communicates about transactions, etc.
- Miners are the computers (usually “rigs”) that do the work of recording everything on the blockchain. They’re incentivized to do good work and to stay honest by the structure of the protocol.
- Tokens are like the actual currency – the bitcoins or the ether or the zcash that you can actually trade with other people.
So Why is Cryptocurrency Better?
This is another question that gets asked often.
It’s hard to answer, because it depends on what we mean by “better”:
- Better for WHO? and
- Better for WHAT PURPOSE?
For instance, for someone in Venezuela or Zimbabwe, where the currency often fluctuates wildly in value, cryptocurrency is already easier and more stable to deal with.
For someone in a country with very little banking, sending bitcoins to someone as payment is sometimes the only way to transact.
For someone trying move large amounts of money around the world, doing so with cryptocurrency might save a lot in fees.
Those are all just examples, and the real benefits of cryptocurrency will only be realized if/when it becomes more widely accepted. However, for a good view into the fundamental difference that cryptocurrency is likely to make, check out Episode 1.
Here are a few other reasons cryptocurrency might be very good…
1. Decentralization. Cryptocurrency is decentralized. Basically, what this means is that the blockchain – the record book – isn’t stored on a central computer or set of computers, and it isn’t controlled by a central entity. This means that central entities can’t corrupt or alter cryptocurrency in problematic ways. Decentralization is not a good or bad thing in and of itself, but it definitely offers the promise of benefits in certain areas, such as public record-keeping.
2. Operates outside of countries, regulations, etc. This is not automatically a good thing. Pirates also fall into this category. But not being dependent on governments and countries might be a good thing for currency – this is not something that’s been tested on a big scale yet. But the possibility is that it will allow easier movement of currency around the world (fewer hurdles and lower transaction costs), which will allow greater economic growth and prosperity. Also, not being dependent on countries and governments means that the currency itself wouldn’t fluctuate as much depending on things that happen in a particular country.
3. Digitizes Trust. Traditionally, for money to have value, people must TRUST that it has value. This started thousands of years ago when people trusted a particular merchant who would give them an IOU. Later, when governments started issuing money, people trusted that the money was valuable because they trusted that their country and government would ensure that it had value. In other words, it’s not that they trusted their government to always do what is right – rather, they trusted that the government would prohibit counterfeiting, would protect the country (with police and military), and would maintain social and economic stability, all of which allowed money to be a relatively stable means of exchange. That doesn’t mean that government-backed money had a stable value – the price of a loaf of bread still went up or down over time and sometimes very quickly. But it does mean that generally, the money issued by the government didn’t all of a sudden become worth nothing because the country had been invaded or because counterfeiters had printed a bunch of money. Cryptocurrency changes all of this by doing what I call “digitizing” trust. So, for instance, the internet digitized newspapers – you didn’t need the physical paper any longer. And online music “digitized” the CD. The internet also “digitized” money – after all, most of our money isn’t in paper or coin form. But cryptocurrency takes this a step further. Cryptocurrency digitizes the “trust” that is necessary for money to have value. By keeping a public ledger that is transparent, cannot be hacked, and cannot be counterfeited, cryptocurrency builds trust into the digital code itself. (Note that hacking and counterfeiting are near impossible for the blockchain itself, but not for apps built on top of the blockchain.)
4. Transparency and Accountability. Everyone thinks that bitcoin and cryptocurrencies are very hidden and private. For the most part, the exact opposite is true. Putting aside certain cryptocurrencies like ZCash, most blockchains are publicly viewable. They’re encrypted, and the public keys are anonymous, but as some people (like Arvind – who I interview in a later episode) have shown, anonymity is not the same as privacy. You can almost always trace transactions back to real people and entities. On the one hand, there is a need for some privacy, which is why alternative cryptocurrencies like ZCash and Monero exist. But at the same time, having transparency is very good and useful in many contexts. Imagine if public election financing and ad spending were required to go through a fully-transparent blockchain.
5. Lower Transaction Fees. This one is up in the air right now, but potentially a very big benefit.