Explaining Public Ledgers and Cryptocurrency
Public ledgers are fundamental to a cryptocurrency's function. Learn how cryptography builds trustless, distributed systems.
Ledgers are a method of tracking and recording financial transactions. Humans have used ledgers for centuries, and their basic designs have remained mostly unchanged. A ledger is a book or electronic file that lists all financial transactions between two parties and can track debts, credits, payments, and other financial transactions.
First used by the Mesopotamians, ledgers were essential to the development of trade and commerce. Written on clay tablets, they developed a system of ledger-keeping that tracked all transactions, debts, and credits between parties. Later in history, these primitive ledgers led to the development of the Medici double-entry accounting system, which forms the basis of modern accounting.
An easy way to think about things: Ledgers are a way to track how much money an entity has, where it came from, and where it will send it in the future.
Historically, ledgers remained private or accessible only to a few people, which was necessary to ensure records' accuracy and prevent fraud. But accuracy and fraud didn't always go hand in hand. Ledgers have always been vulnerable to tampering and manipulation, as evidenced throughout history. With the advent of digital public ledgers, such as Bitcoin's blockchain, this gatekeeping is no longer necessary. Let's discuss.
What is a Public Ledger?
Public ledgers are a new way of keeping track of transactions. Unlike traditional bank ledgers, they are shared publicly across the internet. In most cases, they rely on cryptography, a mathematical technique for encoding messages, which protects certain information safely and securely. Two main functions undergird public ledgers: hashing and encryption.
Encryption protects private data on public ledgers by allowing secure communications between ledger users without revealing the actual contents of their messages. Hashing, on the other hand, is a way to verify data. It creates a unique fingerprint or code for each piece of data stored on a ledger. Systems can check this fingerprint and see whether the data has been tampered with or not.
The Building Block of the Ledger
In typical ledgers, central entities in charge can control and edit at will. For example, when you buy a coffee from Starbucks, the ledger of your purchase is stored on a central server. Their ledger communicates with your bank's ledger to complete the transaction. In this system, each corporation has to maintain its record of transactions. While no "man in the shadows" pulls the levers with each transaction, a centralized authority can be hacked, shut down, or made inaccessible.
Let's move to digital public ledgers. Let's say you use Bitcoin to buy a coffee from your favorite local barista. When you pay with Bitcoin, the Bitcoin protocol sends your transaction to a pool of pending transactions, where Bitcoin miners eventually verify it. These miners check to see if you have the necessary Bitcoin to make the purchase, and if you do, they add your transaction to the ledger. Miners work to verify transactions with hopes of being rewarded with newly minted Bitcoin. Miners have a great incentive to play by the rules and not defraud the ledger since they stand to lose out on Bitcoin rewards if they don't. It's basic game theory - people play by the rules because you assume the majority will, and deviating from them would leave you at a disadvantage.
Once your transaction is verified and added to the ledger, it cannot be changed or removed. This ledger of all Bitcoin transactions is called the blockchain. The ledger is public, and anyone can view it at any time. That's right. Anyone can see every single Bitcoin transaction that has ever taken place.
So instead of Chase Bank or Starbucks using their servers to keep track of their ledger of transactions, Bitcoin has a network of computers worldwide verifying transactions in an open, public, and decentralized way. If Chase Bank's servers go down, their ledger goes down. If a miner in China goes down, the Bitcoin ledger doesn't skip a beat.
A Word of Cautionary Context
While public ledgers are a new and exciting way of keeping track of transactions, they are not all created equal. Advancements in cryptography have birthed alternative ledger systems that have different characteristics. Some sacrifice decentralization for speed, while others aim for more democratic governance structures.
And some public ledgers are not as secure as some might think. Exploits in smart contracts or game theory incentives could lead to disastrous consequences. Just because a ledger is public, transparent, and decentralized doesn't mean it's immune to manipulation.
Developers have gone trigger-happy with features and functionalities while overlooking security. We've seen this repeatedly happen, from the original Ethereum DAO Hack to more recent ones such as the Ronin Network ($614 million stolen) or Poly Network hacks ($611 million stolen). However, it's not necessarily developer carelessness that's to blame—the more capabilities we bestow onto these ledger systems, the more systemic risk grows, giving hackers a larger surface area to exploit. If you have a wall made of one big solid brick, it will be harder to break through than a wall made of many smaller bricks.
What Sets Bitcoin Apart
That's the difference between Bitcoin and other public ledgers. Bitcoin is boring. You can only do one thing on the base chain—send money. While other ledger systems have expanded functionality, they've become more complex and, as a result, more vulnerable. Bitcoin is that solid brick wall, unbreakable and unhackable.
We can build on top of Bitcoin to create Layer-2 solutions that offer more functionality without sacrificing security, namely the Lightning Network. When application layers rest on strong, robust, and secure systems, we can create a world where they're difficult to manipulate, and people can transact without worrying about exploiting the system.