In 2014, Joseph Poon and Thaddeus Dryja were bitcoin-obsessed engineers hanging out at pizza-fueled meetups in San Francisco. Their conversation often turned to the central problem of bitcoin: How to make it more useful? The bitcoin network’s design effectively limits it to handling three to seven transactions per second, compared with tens of thousands per second for Visa. Poon and Dryja recognized that for bitcoin to reach its full potential, it needed a major fix.
The pair had an idea, one whose elements were already in the air at the time. On the weekends they met in unofficial coworking spaces to hammer out a paper describing their vision. Six months later, they revealed their work at a San Francisco bitcoin meetup. They called it the Lightning Network, a system that can be grafted onto a cryptocurrency’s blockchain. With this extra layer of code in place, they believed, bitcoin could support far more transactions and make them almost-instant, reliable and cheap, while remaining free of banks and other institutions. In other words, it promised to fulfill the cryptocurrency dream originally set out by Satoshi Nakamoto in 2008.
As word of their paper spread, blockchain enthusiasts started hashing out its technical details in blogs and on social media. Around the world, engineers began trying to turn the ideas in Poon and Dryja’s paper into working code. “It was the second most exciting paper I had read in the blockchain era,” says Rusty Russell, a developer at Blockstream, a blockchain technology company. “The first was Satoshi’s.”
Now, almost three years after Poon and Dryja shared their idea, the Lightning Network is coming to life. Last month the isolated groups developing the network, including Russell, banded together and released a “1.0” version. It has hosted its first successful payments, with developers spending bitcoin to purchase articles on Y’alls, a micropayment blogging site built for demonstration purposes by programmer Alex Bosworth. In a live but isolated test last month, Bosworth separately used the network to pay a phone bill with his own bitcoin. As he tweeted in late December, “Speed: Instant. Fee: Zero. Future: Almost Here.” And this week Blockstream launched an ecommerce site selling t-shirts and stickers that only accepts Lightning payments.
“When you first heard about bitcoin, you probably heard about ‘instant payments around the world for free,’” says Russell. “But if you dug into it, it wasn’t really that cheap, and it was never instant. Lightning actually does those things.”
The Crypto Conundrum
Fixing bitcoin has become an obsession among the developers, miners and investors who wish to see the cryptocurrency become the future of finance. The problem lies at the heart of its design. When a person buys or sells something using bitcoin, that transaction is broadcast to the entire bitcoin network. No matter how small or big, every payment is stored on the approximately 11,000 computers participating in the network. With bitcoin’s popularity soaring, that arrangement leaves the system straining to handle the load.
The blockchain is composed of literal blocks: collections of transactions organized into sequential chunks. For a transaction to become official, other actors on the network, called miners, must perform computationally intensive procedures to place it in a new block, a process that takes on average 10 minutes. About 2,000 transactions can fit into a block, so backlogs of unconfirmed transactions are common. That’s problem #1: the process is inherently slow.
Because space in a block is limited, spenders attach a fee to incentivize miners to include their transaction before others. As the backlog of payments grows, spenders offer increasingly lofty fees to attract miners to their transactions. On Thursday, for example, the fee to process an average payment in the next block (with confirmation in roughly 10 minutes) was $14. Those fees are the same for a payment of $5 or $50,000. That’s problem #2: the fees make small transactions impractical.
Developers have proposed and debated various ways of fixing bitcoin, but few solutions have the momentum of the Lightning Network. Its core idea is that most payments need not be recorded in bitcoin’s ledger. Instead, they can take place in private channels between users. The Lightning Network’s builders seek to move the bulk of everyday payments to private channels and use the blockchain as a secure fallback, to ensure honest commerce.
In this system, two parties open a channel and commit funds to it. The opening of a channel gets broadcast to the blockchain and incurs the normal bitcoin transaction fee. The channel can stay open for however long—say, a month—during which time the two users can exchange as many payments as they like for free. When the time expires, the channel closes and broadcasts the final state of the pair’s transactions to the blockchain, incurring another transaction fee. If one party believes at some point that he or she was cheated, the aggrieved individual can broadcast the contested transaction to the blockchain, where other users can verify it and miners can update the ledger, forcing the offender to forfeit funds.
This arrangement works well for parties that frequently do business together, such as a patron who buys coffee at the same diner everyday or a company paying its employees’ salaries. As long as a channel stays open, payments within it are free. Because they don’t rely on the blockchain, they can be completed at internet speeds. But the real innovation occurs when those channels stay open indefinitely, potentially even for decades, and when they connect into vast networks. The system’s design includes extra cryptographic features that allow a user to safely send payments not only through their direct connections but across their extended networks.
This aspect is vital, because it means a user only needs to open, and pay the transaction fees for, a small number of private channels in order to do commerce across the whole network. The code underlying the Lightning Network can find a path between a user’s immediate connections to more distant parties in the network, in a design akin to internet routing. For example, to make a first-time payment for an article posted on the blogging site Y’alls, you wouldn’t necessarily open a channel directly to the site or its writers. You’d instruct the network to route your money through your existing connections. Doing so would incur a small fee proportionate to the size of the payment—perhaps a fraction of a cent for a payment of a few dollars.
If the system proves successful, over time the flavor of bitcoin could change dramatically. Miners would only confirm transactions when a bitcoin user signaled the need. Most payments would occur in private. And microtransactions would finally become possible—you could, if you really wanted to, use bitcoin to buy a decently priced cup of coffee.
“When I first looked into bitcoin in 2011, I thought it made no sense and can’t possibly scale to all the payments one would want to make, so I walked away,” recalls John Newbery, now an engineer at the bitcoin research outfit Chaincode. “But in 2015, when I learned about payment channels and Lightning, my outlook changed. I thought, now this is a system that can scale.”
But first, someone had to build it. In Australia, Blockstream’s Russell was the first to try implementing it in the summer of 2015. Also around that time, a French bitcoin startup called Acinq began shifting from building a hardware wallet to devoting itself to Lightning. That fall Poon and Dryja partnered with a fellow enthusiast, Elizabeth Stark, to launch Lightning Labs. A quarrel splintered the founding team and Poon and Dryja went their separate ways, but Lightning Labs is now leading the overall network development effort with a rebuilt engineering team.
In December, interest in the project surged after the three teams announced that their separate implementations worked together as one larger network. Acinq CEO Pierre-Marie Padiou reports that downloads of his startup’s Lightning mobile wallet (the software that stores the private keys needed to spend one’s bitcoin) shot over 4,000. Lightning Labs, meanwhile, has attracted more than 1,000 participants to its public Slack room, where they ask questions of the developers, contribute code or flag bugs.
There are indeed bugs. Dryja highlights one alarming glitch: If you make a backup of your bitcoin wallet—on another computer or a USB drive, say—and decide to restore from the backup, you can accidentally claim money you’ve already spent. When that happens, the Lightning Network protocol allows your counterparty to take over all the funds in your channel. Dryja says the problem highlights the work to be done before the Lightning Network is ready for wide adoption.
Some entrepreneurs are willing to gamble on Lightning today. Last week a VPN provider called TorGuard may have become the first company to announce it will accept payments made through the Lightning Network. But it cautioned in a tweet that the network “is not production ready” and that the company would cover any lost payments. For now, Lightning’s users are hardcore bitcoin enthusiasts willing to risk some satoshi to bask in the glory of being first.
“There’s a great deal of hope pinned to Lightning,” says Chaincode’s Newbery. But as with any network, it success depends both on the quality of its engineering and its ability to kick off network effects. People have to use it, like it, and entice more users to join. That won’t happen in a flash.