Why Bitcoin’s Lightning Network is Ingenious
There are three systems of accounting: single entry, double entry, and triple entry. Blockchain and Bitcoin’s revolution is that it brought about triple entry accounting. But this has some serious drawbacks which Lightning Network’s double entry accounting solves. What?!? The revolutionary technology’s drawbacks are solved by something that hasn’t been revolutionary in over 500 years?? Yes indeed!
Single Entry Accounting
Single entry accounting is simply when an entity records negative and positive transactions to their ledger. Like if you’re old school and you balance your checkbook. You’re simply writing down a negative or positive number on each line, and adding them up at the end, along with the initial balance. That’s fine for personal use, because you’re just keeping track of your own finances and you know you can trust yourself — you wouldn’t defraud yourself would you?! But single entry accounting doesn’t work for commerce because how can you trust another party’s ledger? In single entry accounting anyone can simply add funds with no accountability because single entry accounting only records how a transaction affects your own ledger in isolation. Fraudulent activities are easy to create and hard to prove if everyone only keeps their own isolated records.
Double Entry Accounting
Then came along double entry accounting, a verifiable revolution in commerce! Here each participant in a transaction records two lines per transaction, a debit/credit on their own ledger and the corresponding credit/debit of the other participant. Now you can’t just create funds from nowhere because any credit to yourself has to come from a debit from someone else, and if that someone else doesn’t have that matching transaction, well that is fraud! You can still cook the books though, but it requires creating a whole back history of fake transactions to hide your fraudulent behavior. In commerce auditors make sure everyone is playing fair by checking the accounting books of companies to make sure everything lines up. But wouldn’t it be nice to have an accounting system that prevented fraud by its very nature and didn’t require manual audits by a trusted third party.
Triple Entry Accounting and Blockchain/Bitcoin
Hooray! A new revolution is born! No more need to trust third party auditors, no more need to rely on participants in the economy not trying to cook their own books and commit fraud. Triple entry accounting is where not just each participant in the transaction records the debit and associated credit of the transaction for each party, but every participant in the entire economy gets a receipt of this transaction. It is now impossible to create fraud without gaining control over the whole economy of participants (in blockchain terms this is called a 51% attack). Since everyone keeps a record of every transaction a single actor cannot create a fraudulent credit for themselves because everyone would immediately know that the money came from nowhere. Now we have ultimate security in a commerce ecosystem where fraud (“double spending”) is essentially impossible (assuming the ecosystem of participants is setup as a decentralized network as Bitcoin is). And furthermore there is no longer a need to trust any third party like auditors and banks, so now people can freely do commerce with each other without involving the banks and all the middlemen that involves.
But uhoh! A problem arises. If everyone has to record every transaction, that means every time a transaction is made is must be passed around to the entire community. This obviously takes time, and even using computers and the internet it still takes time to propagate these transactions across the entire network. This creates a bottleneck for how many transactions can be done. Triple entry accounting’s — and blockchain/Bitcoin’s — revolution is that it is secure and removes the need to trust anyone (“trustlessness”) because everyone has all the records, but its flaw is that it can’t handle a lot of transactions due to having to pass receipts from every transaction to everyone participating in the the network.
Fixing Blockchain’s Bottleneck
Hmm how to fix this…
Well since triple entry accounting’s slowness is due to having to pass around every transaction to all participants, let’s just make it so there are only a few participants that get to keep all the records, thus speeding up the whole process. This is known as centralization. In blockchain this can be done by cordoning off who can act as a record keeper, either by making the blockchain private and therefore controlled by a single or several entities, or by creating so called master-nodes that have strict requirements, or simply making the blockchain allow so many transactions that only the most efficient, powerful, well connected computers can actually keep up. All of these solutions centralize the accounting of the blockchain by restricting access of who can actually do the accounting. But the whole power and revolution of triple entry accounting and blockchain is that it is secure and trustless due to its decentralized nature of allowing anyone to record the transactions and therefore protect against fraud. So these centralized concepts offer a solution to the triple entry accounting / blockchain slowness problem while degrading its revolutionary value of security and trustlessness. We already have plenty of high throughput, non-secure, double entry systems, so trying to bring a triple entry system closer to a double entry system just to make it compete with the double entry system, while picking up the flaws of the double entry system and losing the value of the triple entry system, doesn’t seem to be much of a solution at all!
But wait…what if we combine the two by layering a double entry accounting system on top of the blockchain’s triple entry accounting system. Sounds pretty stupid right? In fact it is genius! It solves the flaw of triple entry accounting while not allowing the flaws of double entry accounting.
The Lightning Network
The Lightning Network is simply a double entry accounting system built on top of Bitcoin’s triple entry accounting system. Double entry accounting is fast and has no transaction throughput bottleneck because only the two participants in a transaction have to keep track of their transactions, they don’t need to pass around the receipt of that transaction to everyone else. But by having the double accounting system rely on and be backed up by the triple accounting system you get the throughput of the double with the security and trustlessness of the triple.
The Lightning Network works by creating an interwoven network of two-participant payment channels. Basically just a way for two people to transact only with one another. But by creating a network in which all these channels connect together you can route payments through the network of double entry channels. If you want to send a payment to someone anywhere in the network, you can credit the participant’s account that you are directly connected to in your Lightning Network channel, and then they can credit someone else they are directly connected to by the same amount (thus debiting themselves so they don’t actually have any net change in value), and this continues through the network until the participant in the network that you are actually trying to transact with receives the credit. But technically you only transacted with that one person you are directly linked to in the payment channel that your funds were initially sent through. So each link on the route between you and the destination of the payment is made up of two participants who are simply transacting with one another, each keeping their own account with one another — a series of double entry accounting paths. The Lightning Network is a network of two-participant double entry accounting channels and therefore has no bottleneck in how many transactions can be done.
But the key here is that it is backed up by Bitcoin’s secure and trustless triple entry blockchain. All those Lightning Network transactions happen just between the users, off of the blockchain. But no fraud can be committed because the capacity of each channel (its total funds) is recorded on the blockchain when opening the channel, and the only way to add more funds or get the funds out of that channel is to make another record on the blockchain. So each channel is a closed system in which the ends (opening and closing) are recording on the triple entry blockchain, thus providing security against fraud. No funds can be created out of thin air, the Lightning Network channel will always have the exact amount of funds as was recorded going into it on the blockchain. Within the payment channel itself one user could try to defraud their fellow channel user, but Bitcoin’s smart contracts built into the creation of each Lightning Network channel penalize anyone who tries to defraud their channel partner. For as long as a channel is open it can use the Lightning Network’s double entry accounting to complete as many transactions over whatever period of time they desire with no bottleneck, and it is all backed up by the security of the blockchain’s triple entry accounting system.
Bitcoin and the Lightning Network together combine to create the best of both worlds from double entry accounting and triple entry accounting. Two revolutions combined into one! The synergy of this pairing allows a system of commerce that neither legacy double entry accounting systems, nor blockchain-only triple entry accounting systems can come close to matching.