![](https://repool.wpengine.com/wp-content/uploads/2022/06/blockchain-g3f45a3b48_1920.jpg)
CryptoPrimer
Blockchain Investments: A Complete Guide
A blockchain is a shared and immutable digital ledger that stores and tracks transactions. Blockchain technology is often used in decentralized peer-to-peer or “P2P” networks.
![](https://repool.wpengine.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-21-at-3.26.23-PM.png)
Jess
Strategy at Repool, ex-Goldman Sachs Trader, Wharton MBA
Posted on
Read time
5 minutes
Everything you need to know about Blockchain (in 5 minutes)
Expand your mind while you’re waiting in line for coffee.
A traditional ledger is a book that companies use to track their transactions. This is highly centralized (only the company has it) with a single point of failure, opaque (only privileged people have access), and prone to human error.
We’ve since graduated from physical books to accounting software, but not much else has changed.
What is a blockchain?
A blockchain is a shared and immutable digital ledger that stores and tracks transactions. Blockchain technology is often used in decentralized peer-to-peer or “P2P” networks.
![A decentralized peer to peer network allows computers to directly exchange information with each other, while a traditional centralized server network relies on a server to relay information.](https://miro.medium.com/max/1350/1*GiwMVtFNngzrEdwTj5RVZA.png)
In this form, we have a ledger that is openly shared (accessible to anyone with a computer and internet access) without a single point of failure, highly transparent (all transaction data is public), and algorithmically governed.
These networks are extremely difficult to hack because it can be prohibitively resource intensive to do so. We’ll come back to this in a second.
Let’s use Bitcoin’s blockchain as an example from here on out.
What is a node?
A node is a computer that has installed Bitcoin software and a copy of the Bitcoin blockchain. Broadly speaking, nodes confirm, spread, and store information on the blockchain.
We’re going to focus on validating nodes (“validators”) and mining nodes (“miners”).
![What does a node do? Validators are responsible for validating and propagating transaction information, and adding new blocks to their copy of the blockchain](https://miro.medium.com/max/1350/1*4PnbIFr7jcuixPofIThSrg.png)
Validators receive new transactions, check if they are good, and relay them to other nodes if they are. Bad transactions include overspending (I spent 5 BTC but I only own 1 BTC) and double spending (I try to spend my 1 BTC two different times).
Validators also receive and validate new blocks from miners, then add them to their copy of the blockchain.
What is a block?
A block is a bundle of transaction information. When a new block is approved, it is added sequentially to the previous approved block.
Rinse, repeat, and ta-da, we have a chain of blocks.
Each block has a unique identifier called a hash. When you take all of the information inside the block and pop it into a mathematical function, you generate a hash.
![How does hashing work? The hash algorithm is a mathematical function that scrambles any amount of information into a single line of code of fixed length.](https://miro.medium.com/max/1338/1*UDPOqP42DEpn-xkzLNU2dA.png)
Hashes are written in numbers and letters or hexadecimal form. The numbers you’re used to are in decimal form — those digits range from 0 to 9. Hexadecimal goes from 0 to 9 and includes 10 (or a), 11 (b)…all the way up to 15 (f) — this is an easier way to express gigantic numbers.
In short, hex numbers are just regular ol’ numbers.
How are new blocks created?
Miners collect good transactions in temporary pools inside their nodes.
As these pools fill up, miners select bundles of transactions and add some metadata (collectively called a block header) to form a candidate block.
Metadata is data about data *snore*. You can see below what that entails.
![What is a block? A block on the blockchain is comprised of a block header containing the nonce, and a chunk of transaction data selected by the miner for block creation.](https://miro.medium.com/max/1338/1*UnlzLLCa9LXEChXKxAPDfg.png)
All of these fields are basically set in stone, except for the nonce.
The nonce is a random number that the miner can toggle to return potential hashes for a block. The blockchain program sets a target hash, which is the maximum value that a valid hash can have.
A candidate block becomes an approved block when a miner finds a hash value at or below the target hash, and a validator approves the hash. Miners are in constant competition with each other to find winning hashes.
This process is called Proof-of-Work.
![What is proof-of-work? Proof-of-work is process by which miners change the nonce until they produce a hash value at or below the target hash.](https://miro.medium.com/max/1336/1*LbvRXHnKjq1Z49BFiGu3_w.png)
The first miner to find a winning nonce gets to add their block to the blockchain and receive a reward of newly minted bitcoin. The reward is currently 6.25 BTC per block (~$188K).
This is how new bitcoins are created and put in circulation.
A new block and new BTCs are created roughly every 10 minutes. This steady rate of minting is meant to be anti-inflationary, preventing a flood of coinage.
More computing power means a higher hash rate and more frequent rewards; so you’ll often see people aggregating resources to create mining pools.
However, the mining reward can only be spent once the winning block is more than 100 blocks deep in the chain.
What does Proof-of-Work do?
Proof-of-work guarantees that a certain level of computing power was expended in the creation of a block. The more computing power spent on building a blockchain, the “longer” that chain is.
Nodes always adopt the longest chain as the only version of the blockchain.
Miners are extra incentivized to adopt the longest chain since they can’t collect their mining rewards until much later.
However, Proof-of-Work requires a massive amount of electricity and is environmentally damaging. We’ll cover alternatives in our Cryptocurrency piece next time.
Why is any of this necessary?
If a nefarious person wanted to tamper with a blockchain, they would have to create an even longer blockchain containing their modified transactions.
![What is a 51% attack? A 51% attack requires an attacker to control the majority of the network’s computing power in order to create a fraudulent version of the blockchain.](https://miro.medium.com/max/1350/1*zYWm1DGsy2WsI0XoAVXvmw.png)
The more computing power a network has, the harder this is to do. This tactic is called the 51% attack.
Simply put, the longest chain is the safest chain.
What if the longest chain grows a branch?
A branch forms when two blocks are mined at the same time. Different nodes receive different blocks first — creating disagreement about which new block should be added to the chain.
![What is chain reorganization? When a branch occurs, there are two versions of the blockchain. The version of the chain that mines the next block first becomes the official chain.](https://miro.medium.com/max/1340/1*NgbJgDK2pG9C-aH7DU9tpg.png)
Initially, every node keeps the block they first received and holds on to the other block.
The next mined block, which can only occur on one of the two chains, is the tie-breaker. Whichever chain produced the newest block is now the longest chain, and all the nodes reject the other branch.
Rejected transactions are sent back to temporary pools to start the process all over again.
The longest chain, proof-of-work, hashes, P2P networks etc. are all structural barriers that work together to ensure the blockchain is safe and reliable.
Time’s up! Luckily, that’s pretty much it.
While blockchain technology sounds foolproof, in practice it’s often very challenging to implement, resource intensive, and can be environmentally harmful. Learn more about decentralized finance systems and their impact.
Ready to take it to the next level? Check out our article on Cryptocurrencies.