What Are Anchor Outputs?

Anchor outputs explained

Share this article

Before diving into anchor outputs, it’s essential to grasp the basics of the Bitcoin Lightning Network. Imagine the Bitcoin blockchain as a busy highway that sometimes gets congested. While it’s reliable, transactions can be slow and expensive during peak traffic.

While the highway works on a first-come, first-served basis, Bitcoin allows you to bump up your priority to use the highway based on how much you’re willing to pay.

If the fee to use the highway prices you out, your other option is to use a network of side roads; this can be in the form of side chains, which are like smaller national roads, while the Lightning Network is like a network of side roads that allows for faster and cheaper transactions between users.

It takes two to tango on the Lightning network.

Instead of broadcasting every transaction to the entire network, Lightning Network participants open channels between each other. These channels hold funds, and transactions are recorded within these channels.

This off-chain activity significantly speeds up payments, but that speed and cost savings come with a trade-off; it requires both parties to manage the balances constantly updating. On the Lightning Network, the state of a channel is kept in the form of commitment transactions.

Both parties commit funds to a channel using Bitcoin transactions signed by each party but not published on the blockchain until one of the two peers needs to close the channel. Over time, your initial balance could be more or less as balances will change every time you transact with users or route payments through your channel.

The challenge of Channel Closing

While the Lightning Network is efficient for payments, moving funds to and from layer two requires an on-chain operation. When a channel is closed, a transaction detailing the final balance is broadcast to the Bitcoin blockchain.

When closing a channel, participants continually negotiate their commitment transaction fees based on the current block-space demand. This process can be costly, especially during periods of high network congestion.

Before introducing anchor outputs to the Lightning protocol, participants continually negotiated their commitment transaction fees based on the current block-space demand. 

This fee negotiation, unfortunately, came with its own set of problems. If participants disagreed on the proposed fee range, a unilateral close made the channel unusable.

Underestimating the required fee could result in a loss of funds if an HTLC needed to be resolved on-chain, and overestimating would misallocate the channel balance towards fees, potentially rendering the channel useless or leaving you with no real savings from the use of the Lightning Network.

Why do we need to have limitations on updating fees

In Bitcoin, there are two ways of updating the fees you pay for an unsettled transaction; you can employ RBF and CPFP, but they have limitations to prevent malicious actors from using these new features to perform Denial of Service (DoS) attacks on the network.

If it is trivial to constantly send updates to the Bitcoin blockchain, the network of nodes opens itself up to spam, which can exhaust the resources (CPU, memory, etc.) of the nodes constituting the network to slow it down or even bring it to a halt.

Introducing Anchor Outputs

To address this challenge of matching fees for channel closes, anchor outputs, previously referred to as simplified commitments, were proposed. Essentially, they are a portion of the funds in a Lightning channel that is specifically allocated to cover the fees associated with closing the channel. This ensures that even if the channel is forcibly closed, sufficient funds can broadcast the closing transaction promptly.

With anchor outputs, participants can now contribute the majority of fees required at the time of broadcast by bumping the commitment transaction’s fee via a child transaction using the Child-Pays-For-Parent (CPFP) (opens new window)fee-bumping mechanism.

A small portion of fees must still be allocated to commitment transactions to ensure they can enter nodes’ mempools independently.

How do anchor outputs work?

When a Lightning channel is opened, a small amount of funds is set aside as an anchor output. This amount is carefully calculated to be enough to cover the expected fees for closing the channel.

If you open a channel with anchor outputs, you’ll find that after the fees you paid to the miners to secure your channel open, the entire balance is not available as channel capacity.

If the channel is closed cooperatively, the anchor output is returned to the channel participants. However, if the channel is forcibly closed, the anchor output is used to pay the transaction fees.

Benefits of Anchor Outputs

  • Faster channel closures: With sufficient funds dedicated to fees, channel closures can be processed more quickly, reducing the risk of funds being locked up.
  • Reduced fee uncertainty: By pre-allocating funds for fees, channel participants have a better estimate of the costs involved in closing a channel.
  • Improved channel management: Anchor outputs can simplify channel management by reducing the need for constant fee negotiations between channel participants.
  • Compatible with your version of LN: All major Lightning implementations now support anchor outputs.

Challenges and Considerations

While anchor outputs offer significant advantages, they also introduce some complexities:

  • Optimal anchor output size: Determining the correct amount to allocate for the anchor output is crucial. Too small, and there’s a risk of insufficient funds for fees; too large, and it reduces the available funds for payments.
  • Security risks: As with any system, there’s a potential for vulnerabilities; while the feature is now available, it is still considered experimental.

Anchor outputs with an LSP

Only a minority of users on the Lightning Network run the full stack themselves, and more often than not, those migrating from custodial services rely on an LSP to run their Lightning node and maintain the channels for them while the user holds the keys to the funds.

If you are a Lightning user connected to an LSP, you can always defer to the LSP to broadcast the latest state; depending on your agreement with the LSP, they could cover the fees, or it could come off your final balance as the new state is settled on chain.

The future of Anchor Outputs

Anchor outputs are a promising development in the Lightning Network ecosystem and another building block that helps make Lightning less painful to manage yourself.

As the network matures, we can expect further refinements to anchor outputs, leading to even greater efficiency and reliability or, at the very least, less disappointment and lower costs when managing your channels.


Do your own research.

If you want to learn more about Anchor Outputs, use this article as a starting point. Don’t trust what we say as the final word. Take the time to research other sources, and you can start by checking out the resources below.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

cbBTC explained

What Is cbBTC?

The centralisation risk around Coinbase seems to have no limits, with the US’s largest Bitcoin honeypot constantly looking for new ways to source and custody

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.