How to Batch Open Lightning Channels and Start Routing for Profit

If you operate a Lightning Network routing node for profit, one of your biggest costs are channel opening fees. These channel opens are just regular 2-of-2 multisig bitcoin transactions. Exchanges have been batching bitcoin transactions for years to save significantly on network fees. You too can see similar savings by batch opening lightning channels on your routing node!

space savings by batching bitcoin transactions
Look at how much you can save if you batch open lightning channels!

Check out our post: Why your Bitcoin Transaction is Unconfirmed and How to Fix it to learn more about how on chain fees work.

Starting a routing node has considerable up-front costs. You need to buy the hardware, fund the node and open tons of good channels. Even then, it may take longer than you expect to begin routing payments and collecting fees.

The single best thing you can do to reach profitability sooner is to reduce your costs. Batching your channels lets you cut costs without sacrificing quality.

How to Batch Open Lightning Channels:

There aren’t any fancy UIs that let you do this (yet). Even if you aren’t familiar with command line, the potential savings you can earn by batching may be worth it to learn.

1. Ensure you have LND v0.12.0 (or higher) installed

Balance of Satoshis needs this version so it can spend funds directly from the LND onchain wallet.

2. Install Balance of Satoshis

This guide uses bos v8.0.2

3. Collect a list of node public keys

These are the nodes you want to open channels to. Also, make sure you have enough sats in your onchain LND wallet to fund all these channels.

4. Run the bos open command

Chain together your public keys from Step 3 like this:

bos open <pubkey> --amount <sats> <pubkey2> --amount <sats> 

WARNING: When you run this command finishes running, you have started a 10-minute timer for yourself. If you attempt to complete the remaining steps AFTER 10 MINUTES HAVE PASSED, YOU RISK LOSING FUNDS! You can safely cancel the operation by pressing ENTER.

When you run this command, bos will attempt to connect to each node using the pubkey you provided. It will negotiate a channel open contract address for each node. When it’s complete, it will print some text like this:

Addresses: 
bc1q8f573zcaxtrdmh50muwmn5yly4wka4fej67xm5jxljed6wuu4yzq52gr0t, 0.01000000 bc1qpyz6lausga2s7j2wld8a6m6z722zz4gwkk5cc2hhkq0wj49xfahsck9ajc, 0.01000000

This is an instruction for your batch transaction. The command will wait for you to paste the signed transaction hex that pays these addresses with the specified amount. Your 10 minute timer has begun! If you cannot paste the required hex within 10 mins, simply press ENTER without entering anything to cancel.

NOTE: All nodes you are trying to connect with need to be online and responsive. If you encounter errors, try removing one of the pubkeys until you identify which node is causing the problem.

5. Use bos fund to create the transaction

In a new terminal, run bos fund to create a pay-to-many transaction using funds in your LND wallet.

bos fund bc1q8f573zcaxtrdmh50muwmn5yly4wka4fej67xm5jxljed6wuu4yzq52gr0t 1000000 bc1qpyz6lausga2s7j2wld8a6m6z722zz4gwkk5cc2hhkq0wj49xfahsck9ajc 1000000

This command will output the signed transaction hex.

NOTE: be sure to convert the amounts to sats for bos fund since bos open shows them as BTC

NOTEbos fund allows you to set a custom fee. Use this to save even more on your channel opens! Keep in mind that low fees will take longer to confirm. Use Mempool.space to pick a reasonable fee.

6. Paste the signed HEX

Simply copy the signed hex from bos fund and paste it in the other terminal where bos open is waiting.

7. Broadcast the batch open transaction

Press ENTER to submit the signed hex to bos open

If everything works, you should see a transaction id that you can use to monitor the confirmation of your channels!

Congrats! You’ve just saved significantly by batch opening your channels using Balance of Satoshis!

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments (

)