Skip to content

Instantly share code, notes, and snippets.

@zerofeerouting
Last active June 24, 2023 22:39
Show Gist options
  • Save zerofeerouting/24e23e7e33e2340fa1326646c00ca5ca to your computer and use it in GitHub Desktop.
Save zerofeerouting/24e23e7e33e2340fa1326646c00ca5ca to your computer and use it in GitHub Desktop.
zero fee routing - channel opening service

Channel opening service

I will open a channel to you with my on-chain funds for a fee.

https://zerofeerouting.com

If you have any questions, please reach out to me via Twitter or telegram. I rarely look in the comments of this gist.

How much is a channel?

The price for the channel depends on the size and can be calculated as:

[size] * 0.0075 + 2,500

A 10M channel (0.1 BTC) would cost 77,500 sats.

What channel size do I recommend?

If you buy the channel in order to increase your routing, I recommended a size between 5M and 20M, depending on the size of your other channels.

The smallest channel I sell is 1M (10,000 sats).

Is there a money-back guarantee?

Yes there is. If you're not happy with your purchase, you're free to cooperatively close your channel within 2,016 blocks of the funding transaction being confirmed (~2 weeks).

Please reach out to me via twitter or telegram (@zerofeerouting) to arrange for the refund after closing the channel.

I will refund your purchasing price minus the fee for the liquidity that did not get returned on chain to me.

Example: You coop close a 10M channel I've opened (for 50,000 sats). 2M have moved over to your end, so it's balanced 20/80. I refund 8M * 0.0075 (60,000 sats) for the liquidity I received back by your cooperative close.

If your node force-closes on me within 2,016 blocks you're still eligible for a refund, but I will deduct a 10,000 sat fee to recover my on-chain cost caused by the force-close.

What are you allowed to do?

You can use the channel as you like it. You can drain it, disable it, set any kind of fees you want or just close it again. You not force-closing the channel is very much appreciated.

What happens on an involuntary force-close?

Unfortunately force-closes can happen to no fault of any of the participants, especially if a channel is routing heavily. If such a force-close happens on a channel that you bought from me, independently of which node force-closed the channel, I offer two options:

  1. I reopen a new channel to you with my returned liquidity for on-chain fee of the force-closing transaction (which I paid) + 2,000 sats
  2. I credit you the returned liqudity towards a new channel (at least 2M larger than returned liquidity)
  3. I reimburse 0.1% of the liquidity I get back

Example: A 10M channel we had gets force-closed due to a stuck HTLC by either side with an on-chain fee of 1,500 sats. The liquidity is evenly distributed (5M/5M). Your options are: (1) me opening a 5M channel to you for a 3,500 sat fee (2) you getting a new 10M channel for 40,000 sats (instead of 77,500) (3) me paying you 5,000 sats for the returned liquidity.

How long am I keeping the channel open?

The channel will stay open for a minumum of 90 days.

After this I review the channel and might:

  • ask for an additional liquidity fee to cover my capital cost for the next 90 days
  • coop close the channel if it sees little to no movement (thus is of no use for both peers)
  • force-close the channel if your node is down for more than 14 consecutive days
@jsmalaga
Copy link

jsmalaga commented Jun 13, 2022

I did purchase a channel and I am getting inbound traffic via your node "Zerofeerouting" and outbound traffic via another channel i have open "ln.nicehash.com".
This is causing me a problem.
The Local liquidity in my channel "ln.nicehash.com" drain very fast and the routing/Forwarding stops!

I am trying to rebalance "Loop in" but with no success.

Is there any way to config and force the routing in/out via the same node "Zerofeerouting" ?
How could auto rebalance my outbound node "ln.nicehash.com" to keep liquidity high?
Thanks,

@zerofeerouting
Copy link
Author

You need to increase your fees towards nicehash, if you don't want the liquidity to move from our channel to there.

@theref
Copy link

theref commented Jun 16, 2022

I purchased two channels but don't see them open. Is there normally a delay?

@zerofeerouting
Copy link
Author

No. The channel should get opened immediately. Please provide your pubkey (either here, on telegram or twitter - @zerofeerouting on each).

@theref
Copy link

theref commented Jun 16, 2022

036892feccf8fec139fcffd2b6ce6b69cd224db5974e12eade93dd5c074f2fa8f3

@zerofeerouting
Copy link
Author

Looks like my node can't connect to yours. Please add me as a peer. The channel should get opened shortly afterwards.

@tuckertranslator
Copy link

"If your node force-closes on me within 20,160 blocks" under the Is there a money-back guarantee? section.

I think there is a typo at "20,160 blocks". Earlier you mention 2,016 blocks.

@zerofeerouting
Copy link
Author

"If your node force-closes on me within 20,160 blocks" under the Is there a money-back guarantee? section.

I think there is a typo at "20,160 blocks". Earlier you mention 2,016 blocks.

Yes. Thank you @tuckertranslator. I've fixed the typo.

@carnhofdaki
Copy link

carnhofdaki commented Jun 28, 2022

LNURL-Channel not mentioned anywhere here, but it's this thing now. https://twitter.com/zerofeerouting/status/1541744724578631680 (Nitter)

@DerEwige
Copy link

I’ve noticed a lot of channels have 1 Sat maxHTLC on your side.
Is this a penalty for channels that get opened to you instead of paying for a channel?

@zerofeerouting
Copy link
Author

Not really. I do this on channels where I have no liquidity (less than 500K) to avoid routing failures. If you open a channel to me it will start this way (since I have no liquidity at the start), as soon as I have >500K it will go down to 0/0

@DerEwige
Copy link

Hey I am not talking about the fee rate.
I talk about maxHTLC, basically the maximum size of transaction you will allow through this channel.
(If I am interpreting this value correctly)

I have seen that about 800 of you 1500 channels have this value set to 1.

For Fee it makes sense that you only lower it when there is liquidity.
But maxHTLC should go up when there is liquidity, right?

look at this channel for example
742389x625x0
1 Mio Sat capacity.
According to my channel state there is:
567k Sats on my side and 433 Sats on your side right now.

Am I missing something?

@zerofeerouting
Copy link
Author

No, you're not missing something.

I have two policies: For known routing nodes (with ranking at lnrouter.app) I set the fee to 2000ppm when I have less than 1M. For all other nodes with public channels to me, I set max_htlc to 1 sat when I have less than 500K. This applies to your example (433K < 500K).

Here is the complete logic (the first matching condition gets applied):

{
  "default": [
    {
      "conditions": {
        "peers": "037659a0ac8eb3b8d0a720114efc861d3a940382dcfa1403746b4f8f6b2e8810ba,033d8656219478701227199cbd6f670335c8d408a92ae88b962c49d4dc0e83e025,03cde60a6323f7122d5178255766e38114b4722ede08f7c9e0c5df9b912cc201d6"
      },
      "settings": {
        "htlcmin": "1msat",
        "feebase": "0msat",
        "feeppm": 3000
      }
    },
    {
      "conditions": {
        "peers": "03abf6f44c355dec0d5aa155bdbdd6e0c8fefe318eff402de65c6eb2e1be55dc3e,02f1a8c87607f415c8f22c00593002775941dea48869ce23096af27b0cfdcc0b69,038f8f113c580048d847d6949371726653e02b928196bad310e3eda39ff61723f6,02b686ccf655ece9aec77d4d80f19bb9193f7ce224ab7c8bbe72feb3cdd7187e01,0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0,0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f,035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226,03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f,035f5236d7e6c6d16107c1f86e4514e6ccdd6b2c13c2abc1d7a83cd26ecb4c1d0e,028d98b9969fbed53784a36617eb489a59ab6dc9b9d77fcdca9ff55307cd98e3c4,034ea80f8b148c750463546bd999bf7321a0e6dfc60aaf84bd0400a2e8d376c0d5,0303a518845db99994783f606e6629e705cfaf072e5ce9a4d8bf9e249de4fbd019"
      },
      "settings": {
        "htlcmin": "1msat",
        "feebase": "0msat",
        "feeppm": 2000
      }
    },
    {
      "conditions": {
        "peers": "0288be11d147e1525f7f234f304b094d6627d2c70f3313d7ba3696887b261c4447,03e81689bfd18d0accb28d720ed222209b1a5f2c6825308772beac75b1fe35d491,03fce165537aea120bffe8505876b44d5119354f825b3eac329b761fc5636bf334,03011e480a671ac71dbc3fc3e8fe0db32bb9a10cc4d824663e09557d446ef80679,033e9ce4e8f0e68f7db49ffb6b9eecc10605f3f3fcb3c630545887749ab515b9c7,028d98b9969fbed53784a36617eb489a59ab6dc9b9d77fcdca9ff55307cd98e3c4,024d2387409269f3b79e2708bb39b895c9f4b6a8322153af54eba487d4993bf60f,03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f,035b1ff29e8db1ba8f2a4f4f95db239b54069cb949b8cde329418e2a83da4f1b30,034ea80f8b148c750463546bd999bf7321a0e6dfc60aaf84bd0400a2e8d376c0d5,024bfaf0cabe7f874fd33ebf7c6f4e5385971fc504ef3f492432e9e3ec77e1b5cf,035f5236d7e6c6d16107c1f86e4514e6ccdd6b2c13c2abc1d7a83cd26ecb4c1d0e,024bfaf0cabe7f874fd33ebf7c6f4e5385971fc504ef3f492432e9e3ec77e1b5cf,02f460ae6d3d3e104f8afe520ae0cff3d94c35c2ba8df66da89f3c8006a265b90a,03dc13c8c4b2ad8397855cf377fc34085ffbf816ef85df6fe69079af5db3124cad,03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019,03ec512342aeee370b53d9fd12dbd5283dcd670d248018b3a1cf537313e76e6a2d,03c5528c628681aa17ab9e117aa3ee6f06c750dfb17df758ecabcd68f1567ad8c1,037f66e84e38fc2787d578599dfe1fcb7b71f9de4fb1e453c5ab85c05f5ce8c2e3,02fe80fb6a2dc0fb6e9bec49c76d048889c91355d4e900fcb026bf095665790325,02f1a8c87607f415c8f22c00593002775941dea48869ce23096af27b0cfdcc0b69,027ce055380348d7812d2ae7745701c9f93e70c1adeb2657f053f91df4f2843c71,03d607f3e69fd032524a867b288216bfab263b6eaee4e07783799a6fe69bb84fac,02247d9db0dfafea745ef8c9e161eb322f73ac3f8858d8730b6fd97254747ce76b,0302536817c335e45bcd0b10b78fd06bc246609405d98eb64672410dce04f49e5f,0303a518845db99994783f606e6629e705cfaf072e5ce9a4d8bf9e249de4fbd019,0326e692c455dd554c709bbb470b0ca7e0bb04152f777d1445fd0bf3709a2833a3,02df5ffe895c778e10f7742a6c5b8a0cefbe9465df58b92fadeb883752c8107c8f,02dfe525d9c5b4bb52a55aa3d67115fa4a6326599c686dbd1083cffe0f45c114f8,03cda3c7f11c0f63806b4910c7e00d133bc942fe66512fbb97fc239d892568fc13,03abf6f44c355dec0d5aa155bdbdd6e0c8fefe318eff402de65c6eb2e1be55dc3e,02478e2fc963f74d0557a4bd821a743b18d51bbb589bfa124edf39aec95a65fc35,02bfe975eb18b29455ee6d5c3a2dc6c8097cb4d9a38fb440ded1e464b33ccc9f60,02bb10aaa77a95a358cebb2d112c4de00e47c08f56e89b1acb4487ddd44cc98d6d,03f10c03894188447dbf0a88691387972d93416cc6f2f6e0c0d3505b38f6db8eb5,023e09c43b215bd3dbf483bcb409da3322ea5ea3b046f74698b89ee9ea785dd30a,03cde60a6323f7122d5178255766e38114b4722ede08f7c9e0c5df9b912cc201d6,020a3dce2dab038955eb435a8342e4fe897304015314485d3738d5f41eccb47859,022a03c83e94ab037a64dd71e54f1796db185f21b1d88ceea5486a274ec257e995,035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226,0230a5bca558e6741460c13dd34e636da28e52afd91cf93db87ed1b0392a7466eb,022a03c83e94ab037a64dd71e54f1796db185f21b1d88ceea5486a274ec257e995,02f3069a342ae2883a6f29e275f06f28a56a6ea2e2d96f5888a3266444dcf542b6,035542f0f213a5b6e985dff0e0fd973da01bd77325d44242fc325d0ea8eea3d312,0260fab633066ed7b1d9b9b8a0fac87e1579d1709e874d28a0d171a1f5c43bb877,025f1456582e70c4c06b61d5c8ed3ce229e6d0db538be337a2dc6d163b0ebc05a5,0334bbf89f5fc82c8aebbddc9f2b78f9528cd2fd916fbc091a8ce35aed57c1110d,0261239197442bda65c9933359bbcba72e89f3e77ca87edd7be2e4bf7ba9218117,03a302b07e57cc167a5c52f3bf917bc708b89f852828a0c7e1419e8eddcd97daed,02e9046555a9665145b0dbd7f135744598418df7d61d3660659641886ef1274844,035352d5960c7f86263e079f29707144088709332e781246b306370ca7e0a64183,035fed4182fbd0725264f8a0018cabb6b25514dd231291162ac8dd63afb278e9e8,03f2f3b5ac54d7b4fbecc0978888b66fe318af6595b6344ba7a2368e61075ffc98,035352d5960c7f86263e079f29707144088709332e781246b306370ca7e0a64183,033b63e4a9931dc151037acbce12f4f8968c86f5655cf102bbfa85a26bd4adc6d9,0296b2db342fcf87ea94d981757fdf4d3e545bd5cef4919f58b5d38dfdd73bf5c9,037c65e34444c37deaccde1f61f03b93e22b3d7451894d836f60132ee5a6f486ed,038ec8cd65fb69e147c2bd6de83f2ba57e312764cbeac2f594ae68d6b9c174f019,034a7b1ac1239ff2ac8438ce0a7ade1048514b77d4322f514e96918e6c13944861,027cf99e95e346897a6f88212d5240fa790e3b4c97581bcffa354de10128998ce7,03d4e028a0d4a90868ec202ab684fb0085779defea9ca7553e06146557631eec20,022bd0aa893db4ac890e457cca8c83f112518d6941bf9153dab4bf904620503a78,0305f5f4013f6c6eeb097bd8607204ec1f31577a05fae35f0d857c54d3b52e4e45,037172d2110c4148d6ed0c2790ec8be948458022425dced6794fede834be92af36,0385218f0e307b6a0e989d2a717d346942d96b4fd550e937de5f8ffe1568510a18,02ac10d3b0a3da8434898323f75b97281e157fd858c2fb761d1994941aac515d1c,031015a7839468a3c266d662d5bb21ea4cea24226936e2864a7ca4f2c3939836e0,026e44acf41fcfa19d092a297a7e8452f6ac5eee677ed0f7f2e5d4c7c632467224,03fbe1c1baedbc99b2642ae524d9c2a6f12b771a3ab91e0f56ca6efc6f7f7d53b6,0356c1091bb139ad3520eb370f1512ac2f4ed67b87d2687638252152fbf2b4575f,02f63f49339c8b438c3291ab21e35d1b5642ac2360240068b5ecd3fd5183f2c042,03f80288f858251aed6f70142fab79dede5427a0ff4b618707bd0a616527a8cec7,02719ddac30c16dd856bb61ec4a52a5984d345da078c1855baeef856976e9f312a,024d07b3408c35e03983f6a6c02d3e70c14f5a00ebc49c395342aee6e64d02fe41,02a04446caa81636d60d63b066f2814cbd3a6b5c258e3172cbdded7a16e2cfff4c,03e9cbcd46bd7de2a1559777e7f0c6681522a9b1821b994923da748e06b796cab0,02664c4ed5e60b2f5119e8430f26e5e671fe2199ffaa18de452d29c454db065b02,037e27d212432eaf499e4fb648d996944f3454c094dab36336bac573f82211a335,035715b716b8d61b31992256194f119e1cd7f86b5a15f66ca4cc3798d341d6a99a,0250baf7a558091eb9c93f43d595b795db61bd2b55ca016d8682fd310cb1b81e6c,0295da9ae045fdb0c7a5cf62059ac2a8d66cfe50f8a48a3ced0d2c68b30e5565d2,028e9e578efe5f09f3edfd98ef0fad51007014401d8b7ff62236b89d6867529635,0295da9ae045fdb0c7a5cf62059ac2a8d66cfe50f8a48a3ced0d2c68b30e5565d2,026efccf6315aa453f65082c6b8e228d4cce02bf15c6d8495a189019786836c004,0387464c25446d1149088272eb0df43b0804acf0b9bef54bafa44a8522523df22a,0288037d3f0bdcfb240402b43b80cdc32e41528b3e2ebe05884aff507d71fca71a,0254bb156ecd0eac318844415a91a377bc6947ea4c9fbe5d248e563c29a1662835,0320a133b9f57014ecff23e411489fe83a89d8ea18716caa3a6213e103d5229c4c,0288037d3f0bdcfb240402b43b80cdc32e41528b3e2ebe05884aff507d71fca71a,0337694505123a12a8fadd95523dcc235898ad3b80a06e4a63ca26fed68dd0d17c,0318ac9faa9629e7da08819bc8fe0dd2ae3044d69b1b2283a63479acffeb968483,03dc686001f9b1ff700dfb8917df70268e1919433a535e1fb0767c19223509ab57,0288f320d25b20df0578af737ea951c1c3adcc4e8cd908d5a291bddc49981a1cdf,026c2683f3a85822cbb262baaed39d3985cbe3b8e9838135edef7cab7776a1df0e,02968a0d2f8e2d467efebe9c1097583cab899fd095435469dd6b86881f9d61bf15,03de6bc7ed1badd0827b99c5b1ad2865322815e761572717a536f0a482864c4427,021c3ec6432d2b9b5abcb01dd64b3a8f2afe3ba7d8c021f63ffd0a994cd3bc9b88,0391e2edea5191627a25ecbd327c0dc2a95c880a5b0e73af38dc4a5a8964263b3f,02d875382a2f30533a1eba1bde7e71b414f942da8be37ef7f47dfde119ac1f405c",
        "opener": "remote",
        "min_msatoshi_to_us": 0,
        "max_msatoshi_to_us": 1000000000
      },
      "settings": {
        "htlcmin": "1msat",
        "feebase": "0msat",
        "feeppm": 2000
      }
    },
    {
      "conditions": {
        "min_msatoshi_to_us": 0,
        "max_msatoshi_to_us": 500000000,
        "opener": "remote",
        "private": 0
      },
      "settings": {
        "htlcmin": "1msat",
        "htlcmax": "1000msat",
        "feebase": "0msat",
        "feeppm": 0
      }
    },
    {
      "conditions": {
        "min_msatoshi_to_us": 0,
        "max_msatoshi_to_us": 100000000,
        "private": 0
      },
      "settings": {
        "htlcmin": "1msat",
        "htlcmax": "1000msat",
        "feebase": "0msat",
        "feeppm": 0
      }
    },
    {
      "settings": {
        "htlcmin": "1msat",
        "feebase": "0msat",
        "feeppm": 0
      }
    }
  ]
}

You can get my current configuration by quering my API:

curl -X POST https://api.zerofeerouting.com/v1/conf/updatechannels

@DerEwige
Copy link

ok I will check the state when it goes over 500k Sats and see if the policy changes.
Thanks. Will probably have to increase the channel size then

Also, maybe you should enforce the 2 Mio Sat minimum channel size. That you mention on https://amboss.space/node/038fe1bd966b5cb0545963490c631eaa1924e2c4c0ea4e7dcb5d4582a1e7f2f1a5

With this settings, channels with less than 500k total size will never be able to route more than 1 sat at a time, which virtually renders them useless

@dagadevelop
Copy link

Can I use the same channel as outbound traffic?

@carnhofdaki
Copy link

@dagadevelop When the channel is opened from ZeroFee it first has all the balance on their side, so you can receive through it or route from their side to some other channel where the balance is more on your side. Whenever you have balance on your side you can send satoshi over that channel. But the point is it may be all lightning fast so whenever there seems to be balance on your side, it may not be in next second. Experiment some more on Signet network first and get familiar with how it works under the hood without losing real bitcoin.

@sidiropo
Copy link

sidiropo commented Sep 1, 2022

I purchased a channel of 5M sats to my node with id 02e40a4f171faf1a36227c5dc535f67862dd4dbffd63c838fcc9c48a6e30e5676c. It's been a couple of hours and still no channel. Am I doing anything wrong? I'm already connected to your node.

@jiashanlu
Copy link

Hi, I purchased a 20M channel yesterday. here is my node :02de9990c589cef2745e70d78a767eb2a787fa65a0e1346a1c34f85b5b077074cd@2.49.31.50:9735
nothing happened so far

@carnhofdaki
Copy link

carnhofdaki commented Sep 1, 2022

@jiashanlu It is already active. It took some time for the block with channel opening transaction to be mined. https://mempool.space/lightning/channel/826980078706294785

The block where the channel was opened (752134) was mined just at 10:01 UTC today (time when you wrote) and it takes a couple of blocks on top of it for the channel to become active.

@zerofeerouting
Copy link
Author

@sidiropo - I have looked in my logs and do not see anything regarding your pubkey. Did you give another pubkey when ordering the channel? Feel free to reach out to my twitter/telegram accounts via @zerofeerouting

@Bashy
Copy link

Bashy commented Oct 24, 2022

Hey, i did purchase a channel more than 2h ago for my OBW wallet (SBW fork), but it's stucked on "Opening" on my side, here my pubKey 02bb295b134533d83e465c3f346e67fccb55278d7b229269b5893ec66b1df10de9
Did I do anything wrong?

Seems like it's working now, may i ask the send capacity is initially set to -50000sats? Is that the funds locked to pay miner fees in case the channel force close?

@Tobben67
Copy link

Hey. I'm very grateful for our channel and your service. If I remember correct, there was a FAQ after purchasing the channel. In the FAQ there was some important information if the channel was above 15 or 16M? In those cases you have to change or add something in lnd.conf. If I remember correct, can you publish the FAQ?

Best regards from NorthOfTheWall

@carnhofdaki
Copy link

@Tobben67 see https://bitcoinops.org/en/topics/large-channels/, CLN has --large-channels and LND has --maxchansize=.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment