Lightning Network Channel Capacity Explained
By: Radar Ion
Tags: Bitcoin Lightning Network, Radar Ion, Bitcoin, Lightning Network

Lightning Network Channel Capacity Explained

Congratulations, you’ve onboarded to the Lightning Network! You’ve set up a wallet, waited for the Bitcoin chain to sync, transferred some funds, and opened a payment channel. You can now pay a Lightning invoice and are almost ready to receive a payment. To ensure you have the full functionality to send and receive payments on the network, there’s one more thing you’ll need to be familiar with: channel capacity.

Level 1 — How Channel Capacity Works

The Bitcoin Lightning Network is a permissionless peer-to-peer network comprised of nodes arranged in a mesh by forming two-party agreements called “payment channels” on the Bitcoin blockchain; nodes that are directly or distantly connected by this web of channels can exchange payments by routing through the nodes and channels that connect them.

Sending and Receiving Capacity

The remainder of the funds — owned by your counterparty and called your receiving capacity, remote balance, or inbound capacity — are the funds that are available for your counterparty to spend within this channel. As we will see in the following analogy, this is also the amount that you can receive within this channel.

The funds that you own within the channel — called your sending capacity, local balance, or outbound capacity — are the funds that are available to you to spend within this channel. This is often the amount that you’ve deposited upon channel opening.

The remainder of the funds — owned by your counterparty and called your receiving capacity, remote balance, or inbound capacity — are the funds that are available for your counterparty to spend within this channel. As we will see in the following analogy, this is also the amount that you can receive within this channel.

Your channel capacity equals the sum of your sending and receiving capacity within the channel (minus on-chain transaction fees).

New channels on the Lightning Network can be funded only by the participant who opens the channel*. When you first open a channel with another node your payment channel looks something like this: imagine you have seven coins and your counterparty has zero coins.

The total capacity of this payment channel is seven coins. Your sending capacity is seven coins; your receiving capacity is zero coins. This means you can send up to seven coins and receive up to zero coins, while your counterparty can receive up to seven coins, and send zero coins.

*True as of January 2020. This restriction will be lifted when a featured called “dual-funded channels” — currently in development — is implemented and deployed on the Lightning Network.

Scenario A

Sending a payment

After channel opening you’d like to pay coins to your counterparty; let’s say you want to send two coins.

Since you have up to seven coins on your end, you can send two over and are left with a balance of five coins.

The total capacity of this payment channel remains seven coins as this doesn’t change while you’re transacting. Your sending capacity is now five coins; your receiving capacity is two coins. You can now send up to five coins and, since your counterparty has balance on their end, you can now receive up to two coins. Your counterparty has two coins to send and up to five coins to receive.

Scenario B

Receiving a payment

After you open a channel with seven coins, let’s say your counterparty wants to send you two coins.

At this point, you have seven coins on your end and your counterparty has zero. Meaning you can send up to seven coins but since your counterparty has no coins on their end you cannot receive any coins. This is one of the most common errors we see users encountering when they first join the Lightning Network (and have yet to make any payments).

Level 2 — Acquire Receiving (Inbound) Capacity

Your ability to receive coins is dependent on how many coins your counterparty has on their side of the channel to send you. When you first open a channel you have all the coins on your end, thus no receiving capacity. Here are some solutions to allow you to receive a payment from your counterparty.

Option 1

Spend through your counterparty

Since Lightning is primarily a payments network, it’s common that users onboard to the Lightning Network and start off their first transaction by sending a payment rather than receiving. Your counterparty can be the end destination for your payments, or they can serve as a network node through which you can pay other parties such as merchants, apps, or games. Using payment channels for this purpose is called routing.

For instance, let’s say you want to play a game on SatoshisGames. You don’t have a channel open with SatoshisGames but your counterparty does. You have seven coins on your end and you’d like to get two over to SatoshisGames. Your counterparty takes the two from you and, in a channel they have with SatoshisGames, sends two over to SatoshisGames. By spending through your counterparty, you’re naturally able to gain receiving capacity.

When you send some coins to or through your counterparty, the amount that you send them is now up to the amount you can receive from or through them.

Option 2

Ask another Lightning user to open a channel to you

When another Lightning user opens a channel to you, they fund the channel and all of the coins start out on their side of the channel.

If you’d like to have full sending and receiving capabilities without spending any of your balance, you can have one channel funded by you with all the sending capacity and another funded by your counterparty to give you full receiving capacity.

Option 3

Swap Lightning BTC for on-chain BTC

Options 1 and 2 are only executed between you and your counterparty via off-chain Lightning payments. You also have the option to purchase additional capacity (Option 3) by spending some of your lightning balance (off-chain) while returning that to yourself via on-chain bitcoin.

For instance, let’s imagine you open a channel with ten coins and then spend two of them. To increase your receiving capacity to five coins, you can spend three coins inside the channel (in lightning bitcoin) to buy three coins outside the channel (in on-chain BTC). There are a few services that offer these swaps.

Mission Complete

Now you understand channel capacity on the Lightning Network! Ready to dig deeper? You can learn more about routing, liquidity management, and Lightning Network rules that protect you and your counterparty. Check out the rest of ION , the homepage of the Lightning Network.

This content was first published as a RADAR educational site here.