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:
âI think itâs a really cool feature. Alice can send to Bob without Bob expecting it or having to do anything at all. Which is cool because it removes some friction.â
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 been a much-requested feature since lightning, still in beta, was launched. Lightning K0ala, the pseudonymous developer who created lightningâs first hit game, even argued on Twitter: âThis unlocks a whole set of possibilities for end-user UX.â
â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.
lnbc28600u1pw9n7g7pp5enjn8exsyymyl6mlxmcvy7fdcwuh04z96swfmtasznppglgdyvsqdqqcqzysc8rve6vdwuvketcn7yp8gu3ltvq29vj588erp3at9z2msqj0yhhjdwsf7qtfy5lwf8favm6u3wr5qklvprlhrz89pknpdfxnc55wy6sqnrxjh7
â jack (@jack) February 5, 2019
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.
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:
âThis allows users to start exploring a new set of use cases that benefits from this type of spontaneous payment.â
Light bulb via ShutterstockÂ