Announcing Lightning Loop Beta: An On and Off Ramp for the Lightning Network

Alex Bosworth
February 5, 2020

We’re excited to announce the release of the Lightning Loop Beta. Loop is a service that makes it easier to send and receive funds on Lightning, serving as an on and off ramp between the Lightning Network and the Bitcoin blockchain. This release brings substantial improvements including batching (for on-chain fee efficiency), time preference-based discounts, volume discounts, authentication tokens, a more complete developer API, improved stability, and increased limits for Loop transactions.

We shipped an early alpha of Loop Out last March for testing purposes, making it easier to receive funds on Lightning. In June we released the full alpha, adding the non-custodial Loop In service that helps move funds from on-chain to off-chain for people refilling their depleted Lightning channels. This complements our Loop Out service for on-demand inbound liquidity to receive and route payments.

Since then, we've been steadily rolling out iterative improvements to the service, but we've also been working on some more fundamental improvements so that Loop can provide a liquidity service that is cheaper, faster, and more private than alternatives.

In Beta we will now begin to aggregate Loop on-chain transactions using a much more efficient batching technique. When multiple Bitcoin transactions are merged together in a batch, large amounts of redundant data can be eliminated, meaning lower fees and less overall pressure on the shared Blockchain resource.

A prerequisite to batching is having sufficient volume to justify batching, so in Beta we will help drive that with major swap discounts to those who specify they are willing to wait a bit longer to join a batch. Additionally we will offer a system for high volume services to receive discounts, and the maximum allowed swap sizes will more than double from 0.02 BTC to 0.042 BTC.

Loop Beta is the start of a roadmap to evolve the technology of Lightning bridging to take a permanent place in the Lightning ecosystem. Using coordinated batched swaps across multiple parties, Loop can offer fine-grained capital liquidity control to a growing array of wallets and services on the network.

Like our earlier Alpha release, Loop Beta is still a command-line and API level project that is designed for integration by Lightning-connected services, wallets, and developers. Lightning businesses are already relying on Lightning Loop via these backend integration tools, but we also anticipate this Beta period will bring about more user-friendly applications to make it easier to take advantage of the service.

Delayed Swaps

Delayed Loops are a new concept we have introduced to Lightning Loop in Beta, and they work in a very powerful way for reducing the on-chain cost of a swap.

Every Loop Out that Lightning Loop performs needs to have roughly four major on-chain pieces of data:

  1. Data specifying the funding coins that are the input to the transaction
  2. Data specifying the swap smart contract and amount, as an output to the transaction
  3. Data for a change output that accounts for funds not used in the swap
  4. Data for the consumption of left-over input from a past swap

But with the new batching feature multiple simultaneous Loop Outs can be created in a much more efficient way. All four components will still be required for each swap, but when there are simultaneous swaps happening each additional Loop Out will only require one additional output instead of four, it can share in the other three components.

So delayed Loops have been introduced in order to find opportunities for maximal simultaneous swap execution. The on-chain fees used to fund the swaps can also be dramatically reduced. These savings will be passed back to users in the form of discounted swap fees for swap requests that specify a longer acceptable execution time.

Volume Discounts

In addition to offering a discounted rate for delayed swap execution, batches in Beta will be encouraged through a discounted Loop service fee for high volume users. Even if you are not a high-volume user, more high-volume use of the service should help to reduce the cost of the Loop service for all users due to the savings from batching.

In Lightning Loop Alpha there was no required signup flow or user account or API key to obtain to start using the service, and that will persist in Beta. But in Beta, Lightning Loop will start to offer a new method of accessing the API that is based on the LSAT project for light-weight authenticated access of APIs. This will add an authentication credential for accessing Loop which will enable the discount rate to be applied for high-volume usage.

If you are operating a business or otherwise using the Loop service at a high sustained volume and can help Loop minimize its on-chain footprint through regular batching, contact [email protected] to inquire about getting a volume discount.

Improving Loop In

Although the majority of Loops use the Loop Out feature, Loop In has also been dramatically improved in the Beta version. The Alpha version of Loop In was initiated by sending a transaction on-chain to the Loop In swap smart contract address. This caused a problem for some users who didn't have great inbound liquidity as some Loop Ins would fail to complete.

In Beta, Lightning Loop will pre-check Loop In requests to help confirm that a swap can be completed before a transaction is sent-on chain. This will help users save on chain fees and time-locked coins by proactively preventing liquidity errors.

Another great feature of Loop was unlocked with the recent release of LND 0.9.0 which allows Lightning channels to close out their funds to any on-chain address. This will enable users to avoid tiny amounts in their wallet and help maintain a singular wallet balance by using Loop In on small remainders of closed channels.

Try Beta Today

Lightning Loop Beta is available on the command line using the reference Go client, and APIs are available for the Go client and for direct integration.

If you are working on integrating Lightning Loop in your application or trying it out for your service, we want to hear about it, so please email us or join our community Slack to give feedback, get help, or ask questions.

Advancements in the Bitcoin and Lightning protocols will allow for far more efficient submarine swaps, and ongoing adjustments to the swap execution are also in-development so stay tuned for cheaper, faster, and more private Loop functionality.

About the authorAlex Bosworth

Alex is a technical program manager from SF. Originally drawn to economics at the University of Chicago, Alex left to pursue software development. Alex started working on open-source software for Enterprise deployments, and in 2007 Alex co-founded an indie mobile software studio in Beijing. Back in the USA in 2016 Alex started working in the Bitcoin industry on backend exchange APIs and helped develop a blockchain project used to provide transparency for the Royal Mint of the United Kingdom.

Alex is a technical program manager from SF. Originally drawn to economics at the University of Chicago, Alex left to pursue software development. Alex started working on open-source software for Enterprise deployments, and in 2007 Alex co-founded an indie mobile software studio in Beijing. Back in the USA in 2016 Alex started working in the Bitcoin industry on backend exchange APIs and helped develop a blockchain project used to provide transparency for the Royal Mint of the United Kingdom.