This is part 3 in my series of blog posts on cryptocurrency:
Each part builds on the previous ones, so I suggest starting with Part 1.
- Part 1: Why should I care? What’s in it for me? Plus, crypto is about a lot more than just making money
- Part 2: How crypto actually works, why Bitcoin is valuable (even if it’s just “made up!”), and what you should know about blockchains (the tech behind them and how they could influence the future of our world)
- Part 3 (this post): How the blockchain keeps running, where new Bitcoins come from (i.e., how mining works), and concerns about Bitcoin’s environmental impact
- Part 4: How crypto offers autonomy, why it can’t be stopped, and the value of decentralization
- Part 5: How to actually store and use Bitcoin (and other cryptocurrencies), a basic intro to cryptography, and how wallets and keys work
- Part 6: Overview of the different types of wallets, which one is best for you, what to be careful of, and why a hardware wallet might be worth the investment
- Part 7: Ethereum (the #2 most popular cryptocurrency, and the one I’m most excited about), smart contracts, dapps, gas (and the high gas fee problem), Proof of Stake (PoS), and Ethereum 2.0
- Parts 8-10 (in progress): Ethereum use cases and dapps (oracles, NFT’s, DAO’s, etc.), more crypto coins and tokens, other ways of mining and staking, mining pools, crypto indexes, investing, leverage, gurus, risks, DeFi, yield farming, liquidity staking, other opportunities, and how to make money in crypto (a comparison of the risk/reward of some of my favorite options)
Part 3 Reading Time: 19-23 minutes
How does the blockchain keep running 24/7? Who’s paying for all this?
Remember: With a blockchain, every single time the ledger (i.e., the record of transactions) is updated, it’s copied to a huge network of computers across the world.
But how does that actually work? What are these computers running the blockchain?
Each of the computers supporting the blockchain network (whether for Bitcoin or a different cryptocurrency like Ethereum) is called a “node.”
Anyone in the world—assuming they have powerful enough hardware and reliable Internet—can run the software that turns their computer into a node. (To be transparent, this used to be easier. Nowadays, fancier hardware is required since the blockchain has grown so large and competitive—more on this in a moment).
Think of each node like a neuron in the brain. All those neurons are constantly communicating, and the more of them there are, the more secure and powerful the network becomes.
What are all these nodes doing?
Each node works to validate transactions (i.e., to make sure no one is trying to cheat).
Remember the car example from Part 2: When you try to send Bitcoin to someone’s account from your phone, the app doesn’t just check the ledger on your phone to see if you have the necessary funds available. That wouldn’t be nearly as secure since you could manipulate the data there to make it look like you have more money. Instead, before the funds can be transferred, your phone checks with the blockchain ledger distributed across lots of other computers. That distributed ledger is much, much harder to fool.
So, what do nodes do? They check all the transactions that come in from all over the world to make sure they’re legitimate; then, they update the shared blockchain ledger.
When you run the node software on your computer, everything is securely handled in the background. You can’t modify any of the transactions that go through your node (or, rather, you could try, but your node would be flagged and booted off the network since all the other computers would see that you’re out of sync with the rest of them).
Why would ordinary people turn their computers into nodes? And where do Bitcoins come from?
To recap, people volunteer their computer resources to act as nodes and support the blockchain by validating transactions.
But keeping a computer running 24/7 isn’t free. You have to pay for your electricity and your computer hardware (plus, there’s an opportunity cost since you could be using your computer for other purposes instead).
Furthermore, the Bitcoin blockchain has become so sophisticated that most nodes are using specialized computer hardware designed specifically for that purpose.
So, what’s in it for them?
By setting up your computer as a node on the network, your computer gets to participate in “mining.”
Mining is how new Bitcoins are created.
The basic idea is this:
- The whole point of the blockchain is that it’s distributed across lots of computers (nodes).
- Every single Bitcoin transaction is checked to make sure no one is cheating.
- By volunteering your computer as a node, it participates in validating Bitcoin transactions.
- As transactions are validated, new Bitcoins are sometimes created.
- If your computer was the one to create new coins, you get to keep them.
Wait, who decides which node gets to create coins?
Again, the incentive to run a node is that you might be rewarded with Bitcoin. Here’s what that actually looks like:
- Every time an end-user makes a Bitcoin transaction (e.g., buying something), that user is charged a small transaction fee.
- Remember that all transactions must be validated, so that’s what the blockchain node computers are doing—acting as auditors to make sure everything is legitimate according to the rules programmed into the Bitcoin blockchain (and thus the software that the node is running).
- Transactions are grouped into “blocks” (1 block = 1 MB worth of transactions, which might be hundreds or thousands of transactions). Why? To make it more efficient rather than processing transactions one at a time.
- That’s why it’s called a “blockchain”—because it’s a chain of all the blocks of transactions that have happened over time.
- (Incidentally, the ideal block size is hotly debated in the crypto community because smaller blocks are faster to process, but larger blocks are more secure and efficient.)
- Anyway, as those nodes are validating transactions, they’re also participating in a highly-complex mathematical guessing game (all this is built into the software your computer runs to become a node).
- Essentially, they’re trying to solve math puzzles that involve guessing numbers between one and several trillion. The node does this automatically over and over again.
- If it guesses right, it “wins” a set of new Bitcoins that the node owner gets to keep. This set of Bitcoin rewards is a combination of (a) brand new coins being minted and added to the general circulation and (b) the transaction fees from all the transactions that node just validated.
- Solving those math puzzles is called “proof of work” because you’re being rewarded for doing work to prove that the blocks of transactions were accurate.
- (This is relevant because other, newer crypto coins use alternatives to “proof of work.” More on this in a future post.)
- It might sound too good to be true that all you have to do is run some software on your computer and you might win free Bitcoin. But remember that every node in the world is competing to solve the same puzzles and guess the right numbers first (and, faster computer hardware lets nodes guess more quickly); so, you’re definitely not going to win a coin every time.
(Note for highly detail-oriented readers: Technically, there are several different levels of node in the crypto world, especially related to Ethereum. For example, you could run a “full node,” a “light node,” an “archive node,” etc.—each of which has different duties and requirements. There’s also technically a difference between running a “full node” and running a “miner.” You could choose to run a full node or light node without mining simply because you believe in crypto and want to support the blockchain. If you choose not to mine, it will use up less of your computer resources, but you won’t get anything tangible in return (i.e., you won’t have a chance of winning new coins). In any case, the vast majority of people don’t need to worry about all this. You can research the topic more if you ever decide to run a node yourself.)
Mining has gotten pretty competitive, and there are important consequences.
Consequence: High barrier to entry
In the beginning, you could run the Bitcoin node software on any computer. But Bitcoin has been around for over a decade now, and enthusiasts have iterated a lot on their mining approaches to become more and more efficient. Nowadays, most miners use special computers designed specifically to solve the “proof of work” math puzzles increasingly quickly.
This has made it harder for a new person to get into mining, and it’s also given Bitcoin the reputation of being environmentally unfriendly.
Consequence: Negative environmental impact
It takes a lot of electricity to keep so many specialized processors running 24/7 to solve the “proof of work” puzzles.
This environmental concern is one of the most commonly discussed issues around Bitcoin.
Detractors argue that this is way too much pollution for something that isn’t even a tangible product.
Proponents might make a few different arguments:
- Bitcoin has processed over $10 trillion of transactions, and it’s reasonable that validating that type of volume takes a lot of energy.
- Bitcoin is only being criticized so much here because it’s completely transparent (unlike other industries). With Bitcoin, you can easily calculate how much energy is being used. It’s much less clear how much energy is used by, say, video game playing across the world (there are all sorts of articles out there with comparisons of energy usage across other common activities—for example, Christmas lights in the US use more energy than entire small countries like El Salvador).
- More importantly, cryptocurrency is aiming to displace the financial industry, which uses ten times as much energy as the entire Bitcoin infrastructure (e.g., large banks have hundreds of thousands of employees and offices all over the world using up a whole lot of power; but, much of that bureaucracy would be automated for cryptocurrency).
In any case, it’s absolutely true that Bitcoin mining uses a lot of electricity, and every prominent figure I respect in the crypto community agrees that that needs to change.
The industry is working hard on that problem, and there are two major solutions:
- Many mining companies in the United States and Canada have committed to only using sustainable power such as hydroelectric. This piece often gets lost in discussions about Bitcoin’s power usage: Not all energy usage is equivalent. The environmental impact is much less if Bitcoin miners use power from renewable energy sources, which more and more of them have been trying to do.
- Newer cryptocurrencies like Ethereum and Chia use alternative approaches to mining that are dramatically less energy-intensive overall. More on this in a moment.
Consequence: Human rights
Another consequence of the mining arms race is that 65% of mining today happens in China.
There’s growing concern about this in the crypto community because of two things: pollution and human rights abuses.
And in terms of pollution, most of the electricity used there is from dirty coal plants (potentially mined using forced labor, though reporting on that piece is inconclusive).
Because of all this, a lot of crypto groups are working on ways to move mining out of China.
Consequence: Disproportionate resources
Because Bitcoin mining has become so lucrative, some individuals and companies have gone all-in to build giant server farms for their mining operations. The community refers to these as “whales.”
To stand a chance against them, it’s become common for regular people to join forces by creating mining pools—groups of nodes that all work together to mine and then split any rewards. More on this in a future post.
New blockchain technologies are addressing these issues
The crypto community has been creating new types of cryptocurrencies with all the above issues in mind.
Remember that “proof of work” math problems are purposefully designed to be hard to solve (so that new coins aren’t “won” too quickly). It makes sense then that it takes a lot of energy to solve them.
But, alternative approaches are very much possible.
The big one is Ethereum, which I’ll be talking a lot more about in future posts. Ethereum is switching over to a “proof of stake” algorithm instead, which should reduce the energy requirement a hundredfold.
In short, rather than solving math problems, nodes will support the Ethereum network by “staking” Ethereum coins, which is like agreeing to put your money in a vault for a certain period of time without using it to prove that you trust the network.
Another example is Chia, a new cryptocurrency invented by the creator of BitTorrent. Instead of using a “proof of work” algorithm, Chia rewards “proof of time” and “proof of space.”
To put it simply, it rewards people who stick with it and donate their extra hard drive space rather than their processor power. Theoretically, that should make it more environmentally friendly; but it’s still very new, so we’ll have to see how it plays out.
Won’t mining in general lead to inflation since new coins are continually created?
Actually, Bitcoin was intentionally designed to only ever accommodate a certain number of coins. In other words, once a certain number is mined, it’s impossible to create more.
To keep all the possible coins from being released at once, the creator designed it so that new coins would be released slowly over time.
Not only do the math puzzles get increasingly complex, but the rewards halve every few years. Initially, guessing the right number won you 50 Bitcoins. Now, you only get 6.25 coins.
There are currently nearly 19 million Bitcoins in existence. The total number that can ever be created is 21 million. But because the math puzzles are programmed to get increasingly harder, it will likely be at least a hundred years before all 21 million are mined.
What happens after all coins have been mined? Do nodes become useless?
Bitcoin nodes will still be necessary to run the network. Instead of mining new coins, the people running the nodes will be compensated with a cut of the transaction fees.
For now, there are thousands of Bitcoin miners in the US alone, and it can take a solo miner (someone not part of a mining pool) months of running a node 24/7 to “win” and be rewarded with brand new coins.
All that effort can pay off: Each Bitcoin is currently worth over $50,000.
Don’t worry if that number seems intimidating: It’s common to own fractions of a Bitcoin—for example, $1 USD would be 0.000018 BTC (Bitcoin). So, even if you don’t have $50K to spare, you can still participate in the Bitcoin economy with a much smaller investment.
Ok, so new Bitcoins are created via mining. What’s special about blockchain-based cryptocurrency, again? And how secure is all this, really? Let’s find out: Part 4: How crypto offers autonomy, why it can’t be stopped, and the value of decentralization.