Builder's Guide
  • Welcome to the Builder's Guide to the LND Galaxy!
  • The Lightning Network
    • Overview
    • Payment Channels
      • Lifecycle of a Payment Channel
      • Watchtowers
      • Understanding Sweeping
      • Etymology
    • The Gossip Network
      • Identifying Good Peers on the Lightning Network
    • Pathfinding
      • Finding routes in the Lightning Network
      • Channel Fees
      • Multipath Payments (MPP)
    • Lightning Network Invoices
      • Understanding Lightning Invoices
    • Making Payments
      • The Payment Cycle
      • Timelocks
      • ⭐Hashed Timelock Contract (HTLC)
      • Payment Etymology
      • ⭐What Makes a Good Routing Node
      • Understanding Submarine Swaps
      • Instant Submarine Swaps
    • Liquidity
      • ⭐Understanding Liquidity
      • Managing Liquidity on the Lightning Network
      • Liquidity Management for Lightning Merchants
      • How to Get Inbound Capacity on the Lightning Network
      • Lightning Service Provider
    • L402: Lightning HTTP 402 Protocol
      • Macaroons
      • L402
      • 📋Protocol Specification
      • Implementations and Links
    • Taproot Assets
      • Taproot Assets Protocol
      • Taproot Assets on Lightning
      • Edge Nodes
      • Taproot Assets Trustless Swap
      • FAQ
      • Glossary
  • Lightning Network Tools
    • LND
      • 🛠️Get Started
      • lnd.conf
      • First Steps With LND
      • Wallet Management
      • Sending Payments
      • Atomic Multi-path Payments (AMP)
      • Receiving Payments
      • Unconfirmed Bitcoin Transactions
      • Channel Fees
      • Inbound Channel Fees
      • Macaroons
      • Configuring Watchtowers
      • Pathfinding
      • Blinded Paths
      • Key Import
      • Secure Your Lightning Network Node
      • Configuration of a Routing Node
      • Quick Tor Setup
      • Configuring Tor
      • Enable ‘Neutrino mode’ in Bitcoin Core
      • Send Messages With Keysend
      • Partially Signed Bitcoin Transactions
      • Bulk onchain actions with PSBTs
      • Sweeper
      • Debugging LND
      • Fuzzing LND
      • LND API documentation
      • Channel Acceptor
      • RPC Middleware Interceptor
      • HTLC Interceptor
      • NAT Traversal
      • Recovery: Planning for Failure
      • Migrating LND
      • Disaster recovery
      • Contribute to LND
    • Lightning Terminal
      • What is Lightning Terminal?
      • 🛠️Get litd
      • Run litd
      • Integrating litd
      • Demo: Litd Speed Run
      • Connect to Terminal
      • Recommended Channels
      • Rankings
      • Health Checks
      • Liquidity Report
      • Opening Lightning Network Channels
      • Managing Channel Liquidity
      • Autofees
      • AutoOpen
      • LND Accounts
      • Loop and Lightning Terminal
      • Loop Fees
      • Pool and Lightning Terminal
      • Command Line Interface
      • Troubleshooting
      • Lightning Node Connect: Under the hood
      • LNC Node Package
      • LITD API Documentation
      • Privacy and Security
      • Privacy Policy
      • Terms of Use
    • Loop
      • 🛠️Get Started
      • The Loop CLI
      • Autoloop
      • Static Loop In Addresses
      • Instant Loop Outs
      • Peer with Loop
      • Loop API Documentation
    • Pool
      • Overview
      • Quickstart
      • 🛠️Installation
      • First Steps
      • Accounts
      • Orders and Asks
      • Sidecar Channels
      • Zero-confirmation Channels
      • Channel Leases
      • Batch Execution
      • Account Recovery
      • Pool API Documentation
      • FAQs
    • Taproot Assets
      • Get Started
      • First Steps
      • Taproot Assets Channels
      • Asset Decimal Display
      • Become an Edge Node
      • RFQ
      • Collectibles
      • Universes
      • Asset Loop
      • Debugging Tapd
      • Multisignature
      • Minting Assets With an External Signer
      • Lightning Polar
      • Operational Safety Guidelines
      • Taproot Assets API Documentation
    • Aperture
      • ⚒️Get Aperture
      • LNC Backend
      • LNC Mailbox
      • Pricing
    • Faraday
      • 🛠️Get Started
      • The Faraday CLI
      • Faraday API Documentation
  • LAPPs
    • Guides
      • Use Polar to Build Your First LAPP
        • Setup: Local Cluster with Polar
        • Setup: Run the Completed App
        • Setup: Run the App Without LND
      • Add Features
        • Feature 1: Connect to LND
        • Feature 2: Display Node Alias and Balance
        • Feature 3: Sign and Verify Posts
        • Feature 4: Modify Upvote Action
      • Make Your own LNC-powered Application
    • Next Steps
  • Community Resources
    • Resource List
    • Lightning Bulb 💡
    • Glossary
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Lightning Network Tools
  2. Loop

Instant Loop Outs

Instant Loop Out is a form of submarine swap that uses pre-committed onchain funds to make Loop Outs immediately available once the offchain payment has been settled.

PreviousStatic Loop In AddressesNextPeer with Loop

Last updated 1 year ago

Was this helpful?

Instant Loop Out is a new Loop feature available from version 0.28. It allows users to swap offchain to onchain funds immediately without waiting for onchain confirmations through the use of a pre-configured reservation in the form of an onchain commitment.. These funds can then be sent to any other onchain address within a set number of blocks within the creation of the reservation. Funds not sent out in that time frame are swept into your LND node’s internal wallet. These optimizations allow for better fee estimations, expression of time preference, and liquidity management.

Select users are able to take advantage of Instant Loop Outs. This service will be rolled out slowly and will require some manual intervention on both the server and client side.

Configuration: To make use of Instant Loop Outs, you must run loopd version 0.28 and add experimental=true to your loopd.conf file under ~/.loop/mainnet or start Loop with the --experimental flag.

To be invited, reach out to and be prepared to share your L402, which you can obtain under id under loop listauth or in the Lightning Terminal dropdown menu. For now, reservations are done manually upon request and valid for 1000 blocks.

Once a reservation is made, it can be inspected with loop reservations list

[
    	{
        	"reservation_id":  "9f54c37bfa17766a35c48e810d7076842cc7e74f25fb60f2be954032e001f7cf",
        	"state":  "Confirmed",
        	"amount":  "250000",
        	"tx_id":  "0ccd141613f4f71996fba808a3a4604d985be7f166dca621cfd47d7de2706ddc",
        	"vout":  0,
        	"expiry":  2583088
    	}
]

The expiry shows the block height at which the reservation can be swept back by the Loop service. The Loop Out should be completed before this block height.

As of now, Instant Loop Outs can only be completed with the full amount of the reservation. To perform an Instant Loop Out, run loop instantout. You will see your available reservations and will be able to select one or multiple to complete.

Available reservations:

Reservation 1: shortid 9f54c3, amt 250000, expiry height 2583088

Max amount to instant out: 250000

Select reservations for instantout (e.g. '1,2,3')
Type 'ALL' to use all available reservations.
ALL

Estimated on-chain fee:                   	112 sat
Service fee:                              	500 sat

CONTINUE SWAP? (y/n): y
Starting instant swap out
Instant out swap initiated with ID: b59f246c6a96e7775f8693561fe23926a6f13289251e9b4980c92b2a0f910272, State: WaitForSweeplessSweepConfirmed
Sweepless sweep tx id: b18a829161f1b05dd6f6a369e5a8f5d7530c451978e6907ce6b4387bb815c33c

To get a list of completed swaps, run loop listinstantouts

{
	"swaps":  [
    	{
        	"swap_hash":  "b59f246c6a96e7775f8693561fe23926a6f13289251e9b4980c92b2a0f910272",
        	"state":  "FinishedSweeplessSweep",
        	"amount":  "250000",
        	"reservation_ids":  [
            	"9f54c37bfa17766a35c48e810d7076842cc7e74f25fb60f2be954032e001f7cf"
        	],
        	"sweep_tx_id":  "b18a829161f1b05dd6f6a369e5a8f5d7530c451978e6907ce6b4387bb815c33c"
    	}
	]
}

Read more: Instant Submarine Swaps
support@lightning.engineering
Running loop as part of litd? Read here on how to use the command line interface