Back to the Blog

Lightning Node Management – Handling High On-Chain Fees

As Bitcoin adoption increases, demand for block space will also rise, which inevitably results in higher on-chain fees. In this scenario, users will lean more on Lightning for small payments. But this also means that Lightning nodes will have to pay more when doing on-chain activity. Regardless of what you’re using lightning for, it’s a good idea to not only prepare for such a scenario but also know what to do to mitigate the impacts when such events happen.

This piece will help you navigate high-fee events with your Lightning node from the perspective of a routing node. As these nodes are naturally more active than regular sender and receivers they are more exposed to potential loss with on-chain fees. But most of the advice provided here is definitely also useful for sovereign users and merchants that run their own Lightning Node.

All commands and parameters mentioned are for LND nodes. If you run a different implementation you should search the documentation for analogous commands. 

Be safe, not sorry.

Here’s what you can do before on-chain fees increase. Make sure you don’t wait until D-Day to take action and take advantage of low on-chain fees to prepare yourself.

Increase revenue

Increasing your revenue stream means that you’ll have more margin to deal with any on-chain expenses. You can do that by selling liquidity using tools such as Lightning Pool or Magma if you have liquidity sitting around. Also, make sure your node is reliable for others to use so you’re a good routing candidate. This will help you route more payments and increase fee revenue. You can start by following Nate’s tips on his walkthrough on how to build a lightning node for routing.

Run the numbers

All the extra work needed to have a reliable routing node is useless if you don’t keep track of the cost and revenues of your operation. Data allows you to make informed decisions on the fees you can pay while still being profitable if you need to make an on-chain transaction.  Tools such as Surge can help you with that.

Use Anchor outputs channels whenever possible

Every transaction that happens off-chain is a valid, signed unpublished Bitcoin transaction called a “commitment transaction”. These transactions can be broadcast on-chain in case one party decides to close the channel unilaterally. This is known as a “force close” transaction.

Since the broadcast of a commitment transaction can occur at any point in time, it’s impossible to accurately estimate how much fee the transaction should pay. If you pay a too-low fee rate, the commitment transaction may not get confirmed in time. As a result, any timelocks inside it could expire, and funds can be stolen.

This is where anchor outputs can help. These outputs can be attached to commitment transactions to allow either channel participant to bump the fee for the transactions. You should consider opening anchor output channels whenever possible.

In LND, check that is not enabled on your configuration file. This will enforce all of your lightning channels to be anchor output channels. Without this channel type, you cannot increase the fee of a force close. But keep in mind that LND will require 1 UTXO to be reserved for every anchor channel.


Here is what you can do while on-chain fees are high. There’s a great variety of options available in the node runner toolkit, but remember, if you also prepare for such events with the tips mentioned in the last section, your options will be even broader.

Bump fee

If you run LND, you can use the bumpfee command to increase the fee of an arbitrary input or transaction. This is what you should use in case you need to increase fees for a force close. It can also be used to bump fees for any other transaction in the wallet. The first fee bump will use Child-Pays-For-Parent (CPFP) and subsequent calls will use Replace-By-Fee (RBF).

Take into consideration that as of the moment of writing this command doesn’t do effective ancestor fee rate calculation, but the LND team is actively working to add this feature. You can follow the progress here.

Update routing policy

Consider a more conservative approach to your routing policy. You want to avoid on-chain costs, so it makes sense to be pickier on what you’ll route to decrease the chance of channel closes.

One way of doing that is increasing min_htlc_mstat, which is the value for the smallest HTLC your node will route. You should also consider increasing time_lock_delta, a kind of “expiry” date for a lightning payment. Increasing this value gives more time for a payment to be confirmed.

Finally, you can also increase your fee policy with the fee_rate and base_fee parameters. This can help to offset any potential on-chain cost.

Take Advantage of Anchor Outputs

If you happen to have anchor channel outputs, you can increase max-commit-fee-anchors, which is the maximum fee rate in sat/vByte that will be used for anchor channel commitments. The default value is 10 sat/vByte, so make sure you adjust this to ensure that any potential force close gets propagated on-chain.

Update block confirmation target

When cooperatively closing a channel peers will negotiate the target number of blocks for confirming the cooperative close transaction. You can increase coop-close-targe-confs on your node configuration file to pay fewer fees on the close. The bumpfee command can also be used to increase the fee if necessary.

Update fee rate for justice transactions

If you happen to be connected to watchtowers and an old commitment transaction is published on-chain while your node is offline, the watchtower can apply the justice transaction to sweep the funds of the channel. The fee rate for this transaction can be set with wtclient.sweep-fee-rate config.

Limit the maximum number of pending HTLCs

The cost of a force-close transaction is highly influenced by the number of concurrent HTLCs that the remote party can add to the commitment. The maximum possible value is 483 which can result in a transaction of about 15,000 vBytes. With a 500 sat/vByte fee, this means 7,500,000 satoshis for one transaction. Fortunately, you can configure the maximum number of pending HTLCs with the default-remote-max-htlcs parameter. 

Don’t let transactions drop out of the mempool

When there are lots of unconfirmed transactions, nodes will start to purge old and low-fee transactions out of their mempool. Make sure to keep an eye on the purge value and rebroadcast any purge transaction. It’s also good to continually broadcast on chain transactions in this kind of scenario, LND for example does that by default since v0.16.2.


By taking proactive measures and staying informed, Lightning node operators and users can handle high on-chain fees more effectively. Let’s summarize what we’ve learned:

  • Before High On-Chain Fees:
    • Increase revenue through liquidity sales and being a reliable routing node.
    • Track costs and revenues to make informed decisions.
    • Use anchor output channels for better fee control.
  • During High On-Chain Fees:
    • Utilize the bumpfee command to increase fees for force close and other transactions.
    • Adjust routing policies to be more conservative and decrease on-chain costs.
    • Leverage anchor outputs and adjust max-commit-fee-anchors for fee adjustments.
    • Update block confirmation targets for on-chain transactions and fee rates for watchtower justice transactions.
    • Limit the number of pending HTLCs to reduce force close costs.
    • Monitor the mempool and rebroadcast transactions to prevent them from dropping out.

Create your own node below, or learn more about our Lightning Enterprise solution today.

Also, enjoy exploring our LSP Flow or test our time series data tool Surge.



Lightning Node Management – Handling High On-Chain Fees blog

How do Lightning Network Fees Work?

Routing The lightning network achieves high-frequency payments by taking payments off-chain. This means that information about a transaction is not broadcasted to the whole network as with Bitcoin...

Read More
Lightning Node Management – Handling High On-Chain Fees blog

Exploring the Benefits of Lightning Network for Enterprises


April, 27 2023

The blockchain industry has grown. There are many ideas but few actually make a material impact on society, and those that do, change the world. One such technology...

Read More
Lightning Node Management – Handling High On-Chain Fees blog

Solving $1 trillion dollar unpaid invoice problem

The lightning network is great for buying a coffee or a pizza from a merchant who accepts payments. Businesses can immediately save 2.9% + 30 cents per transaction....

Read More