Bitcoin's lightning network has taken a big step toward a better user experience courtesy of new work by one of its principal open-source developers.
Widely believed to be the key to helping the cryptocurrency reach a mainstream audience by pushing it to handle millions of transactions, lightning still has a lot of work ahead of it. First and foremost, it's not exactly safe to use yet. No less important is that the user experience has its kinks. Namely, the current way of generating addresses for accepting payments is not as easy or dynamic as it could be for many use cases.
But that is starting to change. Lightning Labs CTO Olaoluwa Osuntokun recently released a rough draft of a code change that would allow users to accept an address that doesn’t need to change each time. It's a proof of concept, showing that payments can be made with a static address.
"When you do a payment, you request an invoice, that works well for some cases. But sometimes you might want to send to just a node – interaction from the receiver or not," as Osuntokun put it in conversation with CoinDesk.
He added it might be good for games or tips, where people don't necessarily need all the details an invoice provides, like who sent them money and for what item.
“It’s definitely needed,” Bitcoin Core and lightning network contributor Ben Woosley told CoinDesk.
Though, very importantly, it’s not a perfect code implementation — not by far. Plus, the usual warnings about using bitcoin’s lightning network while it’s still early-stage definitely still apply.
Right now in lightning, users and merchants accept payments via invoices.
Say a user wants a cup of coffee. The barista will generate an invoice saying a user owes them $3 worth of bitcoin. The invoice is fulfilled when the sender submits the correct amount.
Similar to bitcoin addresses, it's a jumbled string of letters and numbers. This tweet from Twitter CEO Jack Dorsey might be the most widely seen example so far.
The main drawback to this method is an invoice can only be used once. If a user were to accept a second payment to the address, the payment could be stolen.
This works for a lot of commercial applications until it doesn't. Some users want another option: to just slap an address somewhere, maybe to pull in donations. People often use bitcoin addresses in this way. People just post an address somewhere that multiple people can send donations to – a user might get 20 donations from people from across the world.
So, it's no surprise that other developers have already thought a lot about how to implement this feature. Lightning developer René Pickhardt even "hacked" the lightning software to allow users to do so, releasing code for others who would want to do the same.
"That allows [users] to do spontaneous payments with the current implementations without the necessity for others to upgrade their nodes," he told CoinDesk.
But with Osuntokun's Sphinx send, spontaneous payments get a more formal – not accidental – introduction. With the change to LND, it adds an option for receiving payments.
"You just need the public key of the receiver," he told CoinDesk, which doesn't need to change each time the way an invoice does.
People call the new feature “spontaneous payments” because the recipient of a payment doesn’t have to approve that they’re getting a payment ahead of time, as is done with an invoice.
A 'hacky' start
While the code works, Osuntokun admits it's "hacky" so far.
"Much of this [code] will likely change," he said in the pull request introducing what he called a "rough draft" of the new feature. The next steps are pretty nitty gritty. Osuntokun told CoinDesk he's next working on "finalizing" the software's "extra blob format" (EOB), a change that would allow users to send more data attached to payments over the network.
In addition to Sphinx send, the code change will lay the foundations for future much-anticipated code changes, including Atomic Multi-Path Payments (AMP), a way to combine many lightning channels into one.
But even if it's not ready for prime-time yet, Osuntokun is excited to see the lightning community start exploring it as an option. He and other developers think this could open up a range of new use cases, including donations and easier exchanges from one cryptocurrency to another.
As he said in the proposal:
Light bulb via Shutterstock
The leader in news and information on cryptocurrency, digital assets and the future of money, CoinDesk is an award-winning media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. In November 2023, CoinDesk was acquired by Bullish group, owner of Bullish, a regulated, institutional digital assets exchange. Bullish group is majority owned by Block.one; both groups have interests in a variety of blockchain and digital asset businesses and significant holdings of digital assets, including bitcoin. CoinDesk operates as an independent subsidiary, and an editorial committee, chaired by a former editor-in-chief of The Wall Street Journal, is being formed to support journalistic integrity.