What is Channel Rebalancing?
Channel rebalancing is the work of moving funds between the two sides of Lightning channels so that a node can keep sending and receiving payments. It is also called channel balancing.
Why channels go out of balance
A Lightning channel holds a fixed amount of bitcoin, its capacity. That capacity is split between the two peers. Your side (local balance) is what you can send. Your peer's side (remote balance, or inbound liquidity) is what you can receive.
Every payment moves funds from one side to the other. A merchant that mostly receives payments fills its local side and uses up its inbound liquidity. When the inbound side is empty, the next customer payment fails, even though the node is online and the channel is open. A business that mostly sends payouts has the opposite problem.
How rebalancing works
Node operators use these methods:
- Circular rebalancing. The node pays itself: the payment leaves through a channel with too much local balance and returns through a channel with too little. Funds move between your channels, and you pay routing fees to the nodes on the route.
- Submarine swaps. The node sends funds off-chain and receives them back on-chain, or the reverse. A submarine swap that sends funds off-chain and receives them on-chain restores inbound liquidity without closing a channel. A swap in the other direction adds outbound liquidity. Both cost a swap fee and an on-chain fee.
- New channels and purchased inbound liquidity. The node opens new channels, or buys channels that point at it from a liquidity marketplace such as Magma.
- Close and reopen. The last option. It costs two on-chain transactions and takes the channel out of service while it confirms.
What it costs
Each method costs fees, and failed rebalancing attempts cost time. The larger cost is operational: someone must watch balances, decide which channels to fix, pick a method, and react when payment direction changes. For a business whose product is not a Lightning node, this is ongoing engineering work. See Lightning network liquidity management for the full picture.
How Amboss handles channel rebalancing
Never worry about your channel balances. With Amboss Payments, you create invoices and send payments through one API. Amboss provides the channel management and liquidity services for your payments node, so your team does not run rebalancing jobs or buy inbound liquidity. For more about the channel management and liquidity services Amboss provides, see managed node infrastructure and channel management.
If you run your own node and need inbound liquidity, Magma lets you buy channels from other node operators.
See how payment providers use Amboss Payments
