---
title: "Autoloop — definition | Nuri Glossary"
description: "Software that rebalances Lightning channels automatically, usually by moving sats on-chain and back where liquidity is short."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/autoloop"
---

# Autoloop

Software that rebalances Lightning channels automatically, usually by moving sats on-chain and back where liquidity is short.

## Basically

Autoloop keeps payment channels on your Lightning Network node balanced. It follows your rules and moves funds automatically so you can keep sending and receiving payments.

## Key Takeaways

- Autoloop automates channel rebalancing. It monitors your node and triggers submarine swaps automatically based on configurable rules and thresholds, so you do not need to execute swaps manually when channels become unbalanced.
- Rules define when and how swaps execute. You set parameters such as minimum and maximum channel balances, fee budgets, swap sizes, and which channels to manage, and autoloop continuously evaluates these rules and acts when conditions are met.
- Autoloop reduces operational overhead for routing nodes. High-volume routing nodes can spend hours weekly on manual liquidity management, but autoloop turns it into a set-and-monitor operation and frees you for higher-value activities.

## What Is Autoloop?

Autoloop is an automated liquidity management system for Lightning Network nodes. It uses submarine swaps to maintain optimal channel balances without manual intervention, and Lightning Labs developed it as part of the Loop service. Professional node operators and Lightning Service Providers (LSPs) now use it as essential infrastructure.
Autoloop addresses liquidity drift, which you can read about in our research on Lightning Network liquidity. Your channel balances shift as your node routes payments, so a channel that starts with balanced liquidity (50% local, 50% remote) eventually becomes depleted on one side after enough payments flow through it. A channel that runs out of outbound or inbound capacity can no longer route payments in that direction, which reduces your node's routing capabilities and fee earnings.
Operators previously had to monitor channels manually, decide when to rebalance, and execute submarine swaps through the Loop service or similar providers. Constant attention and expertise were necessary. Autoloop turns that expertise into rules that execute automatically, making liquidity management a passive system rather than an active task.
The "auto" in autoloop refers to the automation layer built on top of the Loop submarine swap service. Loop provides the underlying swap mechanism, while autoloop provides the intelligence to use it effectively without human intervention.

## How Autoloop Works

Autoloop operates as a daemon that continuously monitors your node's channel states and compares them with your configured rules. Autoloop initiates submarine swaps to restore balance when channels fall outside acceptable parameters.

## The Monitoring Loop

Autoloop follows a continuous cycle. Your node's channel states and your configured rules guide that cycle.

## Rule-Based Decision Making

Autoloop's rules engine controls its automated decisions. You define the parameters that control swap behaviour.

## Loop In vs Loop Out

Autoloop manages two types of submarine swaps. Each type addresses a different liquidity problem.

## Loop Out

A loop-out swap converts Lightning funds to on-chain Bitcoin. You send sats through a Lightning payment and receive Bitcoin at an on-chain address. You use it when you have too much local (outbound) capacity and need more inbound capacity.
Your channels accumulate local balance after routing many incoming payments. Loop-out moves this excess on-chain and creates room for more inbound payments. You can use the on-chain Bitcoin to open new channels, hold it in cold storage, or convert it to fiat.

## Loop In

A loop-in swap converts on-chain Bitcoin to Lightning funds. You send Bitcoin on-chain and receive it as incoming Lightning liquidity. You use it when you have too much remote (inbound) capacity and need more outbound capacity.
Your channels deplete local balance after routing many outgoing payments. Loop-in uses on-chain funds to replenish outbound capacity. Nodes that serve as payment sources or need consistent sending capability commonly use it.

## Bidirectional Management

Most autoloop configurations use both loop-in and loop-out to maintain a target balance range. A typical configuration might aim for 40-60% local balance on routing channels, triggering loop-in when local balance drops below 40% and loop-out when it rises above 60%. Bidirectional management keeps channels optimally positioned for routing in either direction.

## Conservative Configuration

New operators often start with conservative settings: wide balance thresholds (20-80%), strict fee limits, and lower budgets. These settings minimise swap costs while you learn how your node's liquidity naturally flows. You can tighten thresholds and increase budgets over time based on observed routing patterns.

## Aggressive Configuration

High-volume routing nodes may use aggressive settings: tight balance thresholds (40-60%), higher fee tolerance, and larger budgets. Increased routing revenue from maintaining optimal liquidity positions offsets the additional swap costs. Professional operators often find that underbalanced channels cost more in lost routing fees than proactive rebalancing.

## Channel-Specific Rules

Channels do not all deserve equal treatment. Autoloop supports per-channel configuration. You can configure each channel separately.

## Cost Optimisation

Submarine swaps involve on-chain transaction fees, swap service fees, and Lightning routing fees. Autoloop includes features that minimise these costs.

## Fee-Aware Timing

Autoloop can delay non-urgent swaps until fee conditions improve. Elevated on-chain fees cause it to wait rather than execute expensive swaps. Configurable fee limits ensure you never overpay during fee spikes.

## Batching and Sizing

Larger swaps are more efficient per satoshi moved. Autoloop can aggregate multiple small-balance channels into single larger swaps, reducing per-satoshi overhead. Minimum swap sizes prevent inefficient micro-swaps.

## Budget Controls

Time-based budgets (daily, weekly, monthly) prevent cost overruns. Autoloop respects budget limits rather than depleting funds on expensive swaps if fees are consistently high. Node operators get predictable operating costs.

## Swap Provider Selection

Autoloop was built for Lightning Labs' Loop service, but its concept has inspired similar automation for other swap providers. Some operators run multiple automation systems to access different liquidity sources and fee structures.

## Lightning Service Providers (LSPs)

LSPs serving wallets and applications face constant liquidity demands. Customer payments flow in one direction and quickly deplete channel capacity. Autoloop enables LSPs to maintain service quality without dedicating staff to manual rebalancing, and the automation scales with customer growth.

## Professional Routing Nodes

Operators running routing nodes for fee revenue depend on balanced channels. Unbalanced channels miss routing opportunities. Autoloop keeps channels in optimal routing position, maximising fee capture, and operators factor the cost of swaps into routing profitability calculations.

## Merchant Payment Processors

Businesses receiving Lightning payments accumulate inbound capacity and deplete outbound capacity. Autoloop automatically converts incoming payments to on-chain funds and maintains receiving capability. High-volume merchants benefit especially from this automation.

## Exchange and Custodian Nodes

Exchanges moving funds between Lightning and on-chain benefit from automated liquidity management. Autoloop maintains the capacity needed for customer withdrawals and deposits without manual treasury operations.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
