Why Nostr? What is Njump?
2024-03-15 17:25:04

Spirit of Satoshi on Nostr: ๐—ง๐—ต๐—ฒ ๐—•๐—ฒ๐˜€๐˜ ๐—Ÿ๐—ถ๐—ด๐—ต๐˜๐—ป๐—ถ๐—ป๐—ด ...

๐—ง๐—ต๐—ฒ ๐—•๐—ฒ๐˜€๐˜ ๐—Ÿ๐—ถ๐—ด๐—ต๐˜๐—ป๐—ถ๐—ป๐—ด ๐—–๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น ๐—ฆ๐—ฒ๐˜๐˜‚๐—ฝ

If you run your own #Bitcoin node, and youโ€™re looking to open some Lightning channels, liquidity triangles are a great way to do it.

What is a liquidity triangle? Read on to find out.



A liquidity triangle is ๐—ฎ ๐˜€๐—ฒ๐˜ ๐—ผ๐—ณ ๐Ÿฏ ๐—Ÿ๐—ถ๐—ด๐—ต๐˜๐—ป๐—ถ๐—ป๐—ด ๐—ฐ๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น๐˜€ ๐˜€๐—ต๐—ฎ๐—ฟ๐—ฒ๐—ฑ ๐—ฏ๐˜† ๐Ÿฏ ๐—Ÿ๐—ถ๐—ด๐—ต๐˜๐—ป๐—ถ๐—ป๐—ด ๐˜‚๐˜€๐—ฒ๐—ฟ๐˜€ who run their own nodes. It allows for sats to be easily moved in either direction along the channel, so every participant has enough liquidity for inbound and outbound transactions.

When a Lightning channel is opened, all the sats that are locked up in the channel are typically only on one side of the channel. There are ways to open a channel with sats on both sides, but this is seldom done. When all the sats are on a userโ€™s side of the channel, they may ๐˜ด๐˜ฆ๐˜ฏ๐˜ฅ up to that many sats to the other side, but they cannot ๐˜ณ๐˜ฆ๐˜ค๐˜ฆ๐˜ช๐˜ท๐˜ฆ any sats from the other side.

But with liquidity triangles, ๐˜‚๐˜€๐—ฒ๐—ฟ๐˜€ ๐—ฐ๐—ฎ๐—ป ๐—ฒ๐—ฎ๐˜€๐—ถ๐—น๐˜† ๐—ฏ๐—ฎ๐—น๐—ฎ๐—ป๐—ฐ๐—ฒ ๐—ผ๐˜‚๐˜ ๐˜๐—ต๐—ฒ๐—ถ๐—ฟ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น๐˜€ to allow for sending ๐˜ข๐˜ฏ๐˜ฅ receiving, without having to trust the other party to compensate them for the sats they send to their side. Hereโ€™s how it works:

๐—จ๐˜€๐—ฒ๐—ฟ ๐—” opens a channel with ๐—จ๐˜€๐—ฒ๐—ฟ ๐—•, who opens a channel with ๐—จ๐˜€๐—ฒ๐—ฟ ๐—–, who opens a channel with ๐—จ๐˜€๐—ฒ๐—ฟ ๐—”. Each of their channels have the same number of sats; for this example, letโ€™s say 1M sats each. Then any of the users (letโ€™s say ๐—จ๐˜€๐—ฒ๐—ฟ ๐—”) can send ๐˜ต๐˜ฉ๐˜ฆ๐˜ฎ๐˜ด๐˜ฆ๐˜ญ๐˜ท๐˜ฆ๐˜ด half the amount in the channels, sending ๐˜ง๐˜ณ๐˜ฐ๐˜ฎ the channel with outbound liquidity, and ๐˜ต๐˜ฐ the channel with inbound liquidity.

In this example, this would bump 500K sats from ๐—จ๐˜€๐—ฒ๐—ฟ ๐—”โ€™s side of the channel to ๐—จ๐˜€๐—ฒ๐—ฟ ๐—•โ€™s side, 500K sats from ๐—จ๐˜€๐—ฒ๐—ฟ ๐—•โ€™s side of the channel with ๐—จ๐˜€๐—ฒ๐—ฟ ๐—– to ๐—จ๐˜€๐—ฒ๐—ฟ ๐—–โ€™s side, and 500K sats from ๐—จ๐˜€๐—ฒ๐—ฟ ๐—–โ€™s side of the channel with ๐—จ๐˜€๐—ฒ๐—ฟ ๐—” to ๐—จ๐˜€๐—ฒ๐—ฟ ๐—”โ€™s side. In the end, everyone still has the same number of sats on their sides of the channels, but now divided in half in each channel. This allows each of them to send and receive up to 500K sats, freeing them to transact as they wish.

Each of the users will likely be connected to other users with other channels, and ๐˜ฑ๐˜ฆ๐˜ณ๐˜ฉ๐˜ข๐˜ฑ๐˜ด ๐˜ฆ๐˜ท๐˜ฆ๐˜ฏ ๐˜ธ๐˜ช๐˜ต๐˜ฉ ๐˜ฐ๐˜ต๐˜ฉ๐˜ฆ๐˜ณ ๐˜ญ๐˜ช๐˜ฒ๐˜ถ๐˜ช๐˜ฅ๐˜ช๐˜ต๐˜บ ๐˜ต๐˜ณ๐˜ช๐˜ข๐˜ฏ๐˜จ๐˜ญ๐˜ฆ๐˜ด, which will better enable them to use the Lightning Network to send and receive bitcoin instantly, and nearly for free. And other liquidity โ€œshapesโ€ like squares, pentagons, and others can be created, depending on the number of participants. But triangles are the smallest and simplest.

You can create liquidity triangles and other shapes with your friends (if they run their own nodes), or you can use Lightning Network+โ€™s website, LightningNetwork.plus, to find others to open Lightning channels with.

Liquidity triangles effectively balance Lightning Network channels for ๐˜€๐—ฒ๐—ฎ๐—บ๐—น๐—ฒ๐˜€๐˜€ ๐˜๐—ฟ๐—ฎ๐—ป๐˜€๐—ฎ๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€, allowing users to both send and receive sats. This method enhances the network's utility and scalability by ensuring participants can transact freely. It exemplifies the ingenuity of the Lightning Network, offering a blueprint for more complex liquidity solutions and underscoring the network's potential for facilitating instant, cost-effective Bitcoin transactions.



Make sure you ๐—Ÿ๐—ถ๐—ธ๐—ฒ๐Ÿค™, ๐—ฆ๐—ต๐—ฎ๐—ฟ๐—ฒ๐Ÿ”„, and ๐—•๐—ผ๐—ผ๐—ธ๐—บ๐—ฎ๐—ฟ๐—ธ๐Ÿ”– this for future reference.

Have you created any liquidity triangles before?
Tell me how it went in the ๐—–๐—ผ๐—บ๐—บ๐—ฒ๐—ป๐˜๐˜€โฌ‡๏ธ
Author Public Key
npub1tayp5jjjfqx4ufukxqamsl28wd5pggvteqe6u9n3svjn62lfr0hsp89l42