Invoiceless Lightning Payments with Sphinx

In the unending deluge of innovation on the various Lightning Network implementations, another hugely significant step towards a streamlined payments infrastructure has been made: that is, the release of Sphinx.

For a system that’s often attacked for being ‘vapourware’, things seem to be going pretty well on the Lightning Network front. From software solutions like BTCPayServer and OpenNode facilitating merchant adoption, to end user wallets like WalletofSatoshi or Zap, the second layer ecosystem is slowly but surely establishing itself.

As you may know, Lightning payments function differently from their base layer progenitors. While all you need for an on-chain transfer is the requisite amount of funds and the desired address to send them to, Lightning payments require that the receiver generate a single-use invoice, which the sender then uses to move their sats. This can be somewhat cumbersome.

With the implementation of Sphinx, however, the reliance on invoices could very well come to an end. Olaoluwa Osuntokun (@roasbeef), CTO of Lightning Labs, added the commit to Github that would grant individuals the ability to send spontaneous payments directly to each other, removing the invoicing step from the equation.

In this commit, we add new feature to lncli sendpayment (and the RPC): the ability to send a payment to a destination without first needing to have an invoice. This allows users to start exploring a new set of use cases that benefits from this type of spontaneous payment. The payment can also carry additional application-specific data such as an account ID, API call, etc.

Though still a work in progress, the new feature is fully operational and can be used by parties today:

This is only a draft implementation and while it works today on mainnet out of the box (if both sides are upgraded) much this will likely change. Notably the modifications in the link are very hacky and will likely be refactored in preparation of AMP and the like.

As upgrades go, Sphinx is undoubtedly an important addition to the code. Such integrations are crucial to rendering Lightning even more flexible and opening the door to a wider assortment of use cases.

Cover photo from Pixabay.