LN+'s Posts
A Walkthrough of a Bitcoin Lightning Network Channel Transaction
Posted about 2 years ago
Introduction
Opening a Payment Channel
Transacting on the Lightning Network
Updating the channel’s fund distribution: After each transaction, the distribution of funds within the channel changes. Both parties maintain a local copy of the channel's state. For instance, if Alice funds a channel with 0.5 BTC and sends 0.1 BTC to Bob through the channel, she now holds 0.4 BTC and Bob 0.1 BTC in channel balances.
Closing a Payment Channel
Forwarding on the Lightning Network
- Alice has a channel with Bob, where she possesses 0.5 BTC.
- Bob, in turn, has a separate channel with Carol, holding 0.3 BTC of his own.
The Transaction Sequence:
- Intent: Alice wishes to send Carol 0.1 BTC. However, Alice doesn't have a direct channel with Carol. Instead of establishing a new channel (which would be resource-intensive), Alice can utilize Bob as an intermediary to route her payment.
- Transaction to Bob: Alice sends 0.1 BTC to Bob on their shared channel. After this, Alice's balance reduces to 0.4 BTC, while Bob's balance on the Alice-Bob channel increases to 0.1 BTC.
- Forwarding the Payment: Bob, upon receiving the 0.1 BTC from Alice, forwards this amount to Carol on their own channel. This reduces Bob's balance to 0.2 BTC on the Bob-Carol channel, while increasing Carol's balance.
- Forwarding Fee: For his role in facilitating this transaction, Bob retains a tiny amount—let's say a few Satoshis—as a forwarding fee. This incentivizes nodes to participate in routing payments, ensuring the fluidity and functionality of the network.
Forwarding isn't restricted to just three nodes. Payments can be routed through multiple nodes, essentially connecting any node with any other within the Lightning Network. However, all this complexity is abstracted away from the user, with the task of finding payment routes being automated within wallets.
This forwarding mechanism exemplifies the prowess of the Lightning Network, enabling transactions between parties that don't share a direct channel, and fostering a more interconnected and efficient network. Through smart routing and minimal fees, users benefit from faster transactions without the need for global consensus on every payment.
Advantages and Challenges
Conclusion
What's Next?
Introducing the Revolutionary LN+ Liquidity Pool
Posted about 2 years ago
Some time ago, together with a few LN users we imagined a system reminiscent of a massive and extended liquidity swap (that many of you know well and use frequently), where every channel you open and every transaction you make is reciprocated over the long term. This isn't just a vision; it's the foundation behind the LN+ Liquidity Pool. Just as liquidity swaps allow for short-term reciprocity, our new system promotes long-term cooperation across the entire network. It's like the traditional concept of liquidity swaps, but on a grander and more prolonged scale.
Opening the LN+ Liquidity Pool
How To Dive Into the LN+ Liquidity Pool
- Login with your lightning node to LN+ using a signed signature.
- Optionally purchase liquidity credits and fast-forward to step 7, otherwise proceed to step 3.
- Or, to get involved without spending, select a node in the pool to open a channel.
- Patiently await acceptance of your channel opening offer (also called credit transaction) from the other node.
- Upon acceptance, initiate the channel opening.
- Watch as you automatically and gradually accrue credits over a span of 50 days – a fixed timeframe, during which the channel needs to stay open.
- Once you've gathered some credits, other nodes will approach you with their channel own opening offers.
- It's your call - accept or decline as you deem fit.
- After accepting an offer, wait for a channel to be opened towards you by another node.
- The cost of the new channels will be covered by your liquidity credits over the subsequent 50 days.
Why Should You Jump In
- Fluidity: No strict time frame constraints for opening and receiving channels.
- Flexibility: Tailored channel sizes, depending on your preferences.
- Inclusivity: Beginners and merchants can easily integrate with the community by buying liquidity credits.
- Control: You decide your channel partners – both for opening and receiving.
- Cost-effectiveness: Earn liquidity credits just by opening channels. Stay active within the pool, and you could maintain a profitable node without added costs of needing to ever loop out to establish incoming liquidity.
Liquidity Credits Explained
Comparing the Pool with Swaps
Benefits of the Pool over Swaps:
- You have full control over who you connect to. In swaps you partially rely on luck for some of your connections.
- As a merchant, you can join the pool and start receiving channels even if you don't have capacity to open more channels of your own. This requires you to buy liquidity credits from LN+. In swaps, you're required to open channels as well.
- Pool channel opens is a continuous process without a specific end. Swaps happen within a specific time frame.
- In the pool the channels you open and the channels you receive can be of a different size and quantity. In swaps the opened and received channels are of equal size.
Benefits of Swaps over the Pool:
- Channel opens happen potentially faster, sometimes within 24h. Pool is a continuous process without a specific end.
- Some of the connections are partially accidental which is good for LN's decentralization and equity. The pool connections are fully under your control.
- Easier to understand and explain how a triangle works with 3 node operators opening to each other. The pool has the concept of liquidity credits that ensures fairness in the system, but adds some complexity.
In case you are wondering, how the Liquidity Pool and Swaps compare to other solutions in the market? The most important benefit of LN+'s services is that you can use them entirely free to achieve incoming liquidity and to grow your node twice as fast without additional cost to open those extra channels.
The Pool is Now Open
Take the plunge!
Navigating the Bitcoin Lightning Network: A beginner's node setup guide
Posted about 2 years ago
1. Lightning Network Daemon
If you're comfortable with the command line, follow the steps below to get started. Otherwise, skip to the next option, which makes the process more user friendly.
- A computer or VPS with a minimum of 2GB RAM.
- Sufficient storage for the Bitcoin blockchain and the lightning channel states (1TB recommended).
- Bitcoin Core or btcd (for the backend).
Steps:
- Install Bitcoin Core: You need to run a Bitcoin full node for LND to work. Download Bitcoin Core from the official website and sync it with the Bitcoin blockchain.
- Install LND: Follow the installation guide on the LND Github repository.
- Configuration: Configure your lnd.conf file with the appropriate settings.
- Start LND: Once everything is set up, launch the LND daemon.
- Create a wallet: Use the lncli create command to set up a new Lightning wallet.
2. Umbrel
- Raspberry Pi 4 (with 4GB or 8GB RAM recommended if you want to run many Umbrel apps).
- MicroSD card (32GB minimum).
- External SSD (1TB recommended).
Steps:
- Download Umbrel: Head over to the Umbrel download page and download the latest release.
- Flash SD Card: Use a tool like Balena Etcher to flash the downloaded image to your MicroSD card.
- Setup: Insert the MicroSD card into the Raspberry Pi, connect the SSD, and power it up.
- Access Umbrel: Open a browser and visit http://umbrel.local to access the Umbrel dashboard.
- Complete Setup: Follow the on-screen prompts to complete your node setup.
You can also run Umbrel on a PC or Mac. Just run this simple command:
curl -L https://umbrel.sh | bash
3. Core Lightning
- A Linux-based system or VPS.
- Bitcoin Core synced with the Bitcoin blockchain.
Steps:
- Install dependencies: Before installing C-Lightning, ensure all dependencies are installed.
- Install C-Lightning: Clone the C-Lightning GitHub repository and follow the build instructions.
- Configuration: Configure the config file with the necessary settings.
- Start C-Lightning: Once installed, run C-Lightning with the lightningd command.
C-Lightning is also available in the Umbrel store.
4. Voltage Cloud
Steps:
- Register: Sign up on the Voltage Cloud website.
- Create Node: Once registered, click on "Create Node" and choose your desired configuration.
- Access Node: Once your node is live, you'll be provided with connection details to manage your node.
- Manage Node: Use the provided interface to open channels, send/receive payments, and manage your Lightning node.
5. Start 9 Embassy
You can pick from 3 options of servers depending on your need. Everything is pre-installed, so this option is possibly the simplest way to get started if you have the funds to buy a dedicated server for your home or office.
6. Citadel
Conclusion
Once you have your node up and running, come back here to LN+ and start opening channels in Liquidity Swaps with other node operators in a cooperative fashion.
Note: Always ensure you have backups of your node and wallet. Lightning Network is still experimental, and there's a risk of funds loss. Always act with caution and only commit funds you're willing to lose.
What's your citadel? Pick your node profile background!
Posted over 2 years ago
But that's not all! Your chosen background won't just enhance your profile; it will also automatically update your social image. Within a few minutes, your brand-new look will be visible whenever you share your node on your social platforms.
Getting started is easy. Simply log in with your Lightning node signature, and click on 'Edit' to start customizing your profile. Can't wait to see your creative flair in action!
Oh, and one more thing. You can also add links to your node profile for most social media platforms:
Unlock the power: 7 key benefits of the Bitcoin Lightning Network
Posted over 2 years ago
Here the 7 things LN does really well:
1. Safe
2. Accepted
3. Fast
4. Cheap
5. Private
6. Scaleable
7. Innovative
The Evolution of the Bitcoin Lightning Network: A Historical Perspective
Posted over 2 years ago
The Genesis: A Whitepaper in 2015
Early Development and Progress
The Lightning Network Testnet
The Mainnet Launch and the First LN Transactions
The Lightning Torch and Growing Awareness
The Growth of Infrastructure and Ecosystem
Protocol Improvements and Enhancements
Recent Adoption
Protecting Your Bitcoin Lightning Network Node: Security and Privacy Best Practices
Posted over 2 years ago
Cyber Security
-
Choose a secure operating system
The first step in securing your Lightning Network node is to choose a secure operating system. Linux is the recommended operating system for running a Lightning Network node, as it is more secure than other operating systems such as Windows or MacOS. Choose a version of Linux that is actively supported and updated, such as Ubuntu or Debian. -
Secure your node's firewall
A firewall is a network security system that monitors and controls incoming and outgoing network traffic. Configure your node's firewall to only allow incoming connections from trusted sources, such as your own IP address or known peers. -
Install a VPN
A VPN (Virtual Private Network) is a tool that encrypts your internet traffic and hides your IP address. By using a VPN, you can add an extra layer of security to your Lightning Network node. Only allow connections from trusted VPNs to your node. -
Update regularly
Keeping your node's software up-to-date is important for protecting it from vulnerabilities. Enable automatic updates for your operating system and be up to date on your LN implementation. -
Protect your private keys
Private keys are the most sensitive piece of information when it comes to securing your Lightning Network node. It's crucial to keep your private keys offline and in a secure location, such as a hardware wallet. Make sure to backup your private keys in multiple locations. The same precautions should be used when generating a macaroon. -
Use a secure password
Choose a strong and unique password for your node. Use a combination of uppercase and lowercase letters, numbers, and symbols. Avoid using common words or phrases. -
Enable two-factor authentication (2FA)
Two-factor authentication (2FA) adds an extra layer of security to your LN node. If available (ex. on Umbrel) use a hardware wallet or an authenticator app such as Google Authenticator to enable 2FA.
Now, let's look at specific software recommendations for securing your Lightning Network node:
- Use the LND Watchtower service, which monitors the blockchain for attempted breaches of your Lightning Network channels. Check out the Watch Swaps we offer on LN+ for LND nodes that have a built in watchtower service.
- Use the LND Tor hidden service to add an extra layer of privacy to your node's network traffic.
- Enable LND's "disable admin macaroon" option to prevent unauthorized access to your node's administrative API.
- Consider synchronous database replication with LND/postgres.
- Use the CLN Watchtower service, which monitors the blockchain for attempted breaches of your Lightning Network channels. On LN+ we offer Watch Swaps for CLN nodes that use The Eye of Satoshi service.
- Use the CLN Tor hidden service to add an extra layer of privacy to your node's network traffic.
- Enable CLN's "disable admin cookie" option to prevent unauthorized access to your node's administrative API.
- Consider sqlite db mirroring network drives to reduce the chance of state data loss.
Power Redundancy
- Use an uninterruptible power supply (UPS): A UPS is a battery backup system that provides power to your Lightning Network node during a power outage. A UPS can keep your node operational for several hours, depending on its capacity.
- Use a generator: If you live in an area where power outages are frequent, consider using a generator as a backup power source for your Lightning Network node.
- Avoid using Wi-Fi: A wired internet connection is more reliable than a Wi-Fi connection during a power outage.
Internet Redundancy
- Use a wired internet connection: A wired internet connection is more reliable than a wireless connection. If possible, use a wired connection to connect your Lightning Network node to the internet.
- Use a backup internet connection: If your primary internet connection goes down, a backup internet connection can keep your node operational. Consider using a mobile hotspot or a secondary wired connection as a backup.
Did I miss something? Let me know in comments! ⚡️
Protect Your Funds: Introducing Watch Swaps
Posted almost 3 years ago
LN+'s first feature, the Liquidity Swaps have been very successful in the last year or so. More than 12K liquidity swaps allowed Bitcoin lightning network node users to cooperate with each other and open 40K channels in a mutually beneficial and efficient way. Liquidity swaps weren't only beneficial to individual node operators but to the network as a whole as well, because together we managed to decentralize the network. LN became highly resilient to single large nodes dropping out or behaving in an unfriendly way. A good test for this was when recently the second largest node (zerofeerouting) in the network dropped out. There was virtually no interruption to payments thanks to the many other nodes and their channels that could be used to route around the missing node.
Watch Swaps
LN watchtowers are nothing new to LN+. We've been running an altruistic watchtower for a long time with the help of Voltage.cloud, but the reality is that this is a centralized solution and it's challenging to keep the server running smooth due to the huge demand.
The new LN+ Watch Swaps will allow node operators to find each other so they can watch each other's nodes using their watchtower services. With this setup, without a centralized watchtower service, even if your node is offline and somebody attacks one of your channels, the watchtower service of your choosing that nobody knows about will act on your behalf and issue a punish transaction that will send the entire capacity of the channel to your node.
Network Benefits
How Does it Work?
The author can start a watch swap and setup the rules, such as type of watchtower (LND Watchtower or The Eye of Satoshi for CLN), the duration, and other unique rules they may have. The size of the watch swap is set automatically based on the author's node's size expessed as an LN+ rank.
As a side node, if you notice your LN+ node rank dropping a bit, that's nothing personal against you. It's expected across the board for many nodes starting now. It's a result of a new formula to calculate the rank, which hopes to help estimate the load a certain node will exert on the peer's watchtower service, so the pairing of nodes within a watch swap service is more fair and sustainable. Small nodes will be paired up with small nodes, and larger ones with larger ones. There are five watch swap sizes: Extra Small, Small, Medium, Large and Extra Large.
Applicants can look through the created watch swaps that match their node's size. Non-matching watch swaps will be filtered out from the view. The applicant can apply to the watch swap, but the application is not automatically accepted. The author can accept or reject the application. The reason for this extra approval step is necessary because watching each other node requires some level of trust. Both the applicant and the author will have a chance to assess each other's through their node profile information. If the application gets rejected, the applicant should not get offended, just apply elsewhere or create a watch swap themselves. Once an application is accepted, both parties will be able to see the URI for their peer's watchtower services, so they can add the service to their nodes.
Your watchtower service URI is kept secret from every party until the application is accepted. Once accepted the URI will be shared with your watch swap partner, and nobody else. In general, remember not to share your own or your watch swap partner's watchtower service URI with anyone else, or they may be able to connect to the service uninvited.
All this may feel complex just by reading about it in theory, but LN+ will guide you through the process step by step so it's easy for you in practice.
What's Next?
- The concept of watchtowers in general and how your specific lightning implementation handles it. LND has a built in watchtower. On Umbrel the settings are exposed under Advanced Settings in your Lightning app (LND). For CLN you need a separate software The Eye of Satoshi (TEOS) to run a watchtower service, and there is a plugin for CLN to connect it.
- How to enable the watchtower service on LND or how to install The Eye of Satoshi for CLN.
- Creating your watchtower service URl. This is different from your URI to open channels.
- Implications of running a watchtower service. It does require some resources on your part to run it (disk space, processing, bandwidth). Be conservative giving away your watchtower service URI.
Once you're knowledgeable about watchtowers and have the service URI ready, go ahead and start a watch swap or apply to an existing one.
Please do test out watch swaps and let me know if you see any issues, so I can fix them ASAP. Any ideas, recommendations are welcome!
6 reasons why you want to close a bitcoin lightning network channel
Posted almost 3 years ago
Answer: No, you can keep channels open indefinitely. Many channels on the network are years old, and still working perfectly fine. There are 6 special situations when you want to close a channel listed below.
1. You absolutely NEED sats that are on your channel on chain instead. Examples for why:
- The Bitcoin price went 10x, thus you want to put sats in cold storage.
- You have to pay somebody on-chain.
2. Your peer went OFFLINE for a long time (9+ days), thus the channel is useless to receive or send. Also, if you both go offline, you may not be able to recover the sats in the channel. Don't be too hasty closing inactive channels, sometimes it takes a few days to fix a node.
3. You accumulated too many channels over time (100+), and your node is struggling to process all the traffic. This can happen on weaker hardware. Reducing channels fixes the problem.
4. You want to move your sats to a new node and you're not comfortable moving channel states files, or have no ability to do so. For example, when switching implementations (LND > CLN or vice versa).
5. You are going on a long sabbatical to a location without stable internet and/or electricity. Lightning nodes require to be online most of the time, unless you have a channel with a trusted node you agree with not to force-close you.
6. You're running a profit oriented routing node and a channel is not routing, but it is locking up funds (sats are on your side). Close and open to another node to make profit, unless you agreed to keep the channel open for a specific amount of time. You may also want to close & reopen to the same peer a larger channel if it was profitable.
If you can think of other reasons why you would want to close a bitcoin lightning network channel, please add a comment.
ZeroFeeRouting shares their experiences running the 3rd largest Lightning node
Posted about 3 years ago
LN+: Congratulations to your family regarding your second child. We wish you the very best health! Thank you for running your popular node, and for taking the time to answer these questions for the community. You ran a grand experiment in many ways and we would love to learn more about what you found out. My first question: How big was your node in terms of capacity, channel count and number of forwards (per month)?
ZFR: I had about 100 BTC in capacity, a little more than 1,600 channels and about 450,000 forwards a month.
LN+: Did you prefer the LND or the CLN ecosystem overall?
ZFR: I preferred the CLN ecosystem by a wide margin. It felt like the CLN developers are truly interested in supporting node operators and expanding the feature set of CLN. With lightning labs, I had the impression it was more about features they needed for their venture capital (Taro etc.). Might be a misjudgement - but that's how I felt.
LN+: Which implementation do you recommend for a hobby user and a serious profit oriented power user?
ZFR: CLN.
LN+: Was your node abused in some way since it had no fees, such as excessive rebalancing or such?
ZFR: It was certainly used for excessive rebalancing - would not call this abuse though. I have not been subject to any attacks.
LN+: Were you profitable, and how much did you earn (APR)?
ZFR: The node was running profitably. My APY would clock in around 2% minus on-chain fees and hardware cost.
LN+: What was the most time consuming or stressful part of running a giant node?
ZFR: Fund security.
LN+: For companies, do you recommend they run a single node or multiple nodes for redundancy?
ZFR: One single node with backup in place.
ZFR: I think it just needs a bit of time to mature.
LN+: What are the tools you use, you recommend the most?
ZFR: I've not used any third party tools - besides BTCPay for my channel sales. Everything else were tools that I developed myself.
LN+: Do you have any secrets on which nodes are good to connect to?
ZFR: Completely depends on the goal. For me it was always about connectivity. I wanted to be the best connected (i.e. least amount of hops) node in the network. If you just want to be able to make successful payments, ACINQ is the node to go. For routing, probably LOOP, WoS, Kraken, BFX as sinks and some good sources like Boltz. Breez also always worked like a source for me.
LN+: Do you have any strategies for node management that you wish to share to help people become more profitable?
ZFR: Every node operator has their own strategy. It's crucial to be aware of the cost for rebalancing, otherwise you're just subsidizing other people's routing.
LN+: Do you expect the upcoming RGB and Taro protocols to increase lightning node profitability?
ZFR: No.
LN+: If there was one thing you could change about the lightning protocol, what would it be?
ZFR: It would be great if a wallet could "overpay" an invoice. Example: You break down a 10M payment into 15 x 1M chunks and send them out through different routes, as soon as 10M have been claimed by the target node, the target node can no longer claim the rest of the payments and they would return. This would reduce failed payments by a huge margin, because right now all payment parts have to succeed in order for the payment to succeed - in my example only two thirds would need to succeed. This is technically possible already but neither implemented nor specced.
LN+: Where do you get your lightning news from?
ZFR: Twitter.
LN+: Which lightning wallets do you recommend for daily use?
ZFR: I love Breez and OBW, because they give you full control. Phoenix is an excellent wallet if you don't want to think about anything. I've never used WalletOfSatoshi.
LN+: What was your largest cost during your experiment besides deployed BTC capital?
ZFR: On-chain fees. I've had one force-close that cost me about 130,000 sats (30K for the force-close and another 100K for the sweeps).
LN+: Lightning is often compared to DeFi and criticised for having too little BTC deployed. What are your thoughts on this?
ZFR: The only anology is that you can earn a return on locked up coins. But contrary to DeFi your locked up coins are actually used for something and the return is paid by participants of the network - not by issuing new tokens. I think the liquidity on the network matches market demand. Otherwise prices for liquidity would go up.
LN+: What is the biggest barrier for merchants to adopt lightning?
ZFR: Same as BTC. The hassle of bookkeeping in what most tax authorities argue is a foreign currency.
ZFR: It will be able to handle all the worlds transactions. Whether that will be 100% noncustodial I'm unsure.
LN+: Do you think there will be other zero fee nodes filling the gap you left open with your departure?
ZFR: I don't know, but I am curious as well.
ZFR: The disk containing my database crashed, back when I was running the node on a laptop. Luckily I was able to copy it to another drive - I had no other backups a t that time.
LN+: If you could give a single advice to a new node runner, what would that be?
ZFR: Be aware that if you want to run at a profit, managing the node will take a lot of time.
ZFR: The way the network is working at the moment, is a hunt for cheap liquidity. If someone opens a channel to a sink node like LOOP and forgets to adjust the fee, the first one to snipe that liquidity (by using it to rebalance their own channel) wins. I wished this was not the case - but currently I don't see a way out of this.
LN+: Do you think geographically distributed nodes are important?
ZFR: As long as there are tons of TOR only nodes being used as hops in routing (and speed is not a factor for wallets to construct) the routes it makes zero sense to set up geographically distributed nodes.
LN+: Tor is under attack, and it hurts lightning. What can we do about this in your opinion?
ZFR: As hard as it sounds: Not use TOR for routing payments. There are options to run a node from home with a clearnet IP via VPN.
LN+: What are the important metrics we should follow regarding the lightning network in your opinion?
ZFR: Total capacity in public channels, measured in USD.
ZFR: No idea. I would assume steady, exponential growth - at least 2x every year.
LN+: Is there any project or person that we should follow as it’s underappreciated?
ZFR: I don't know if they're underappreciated but @fiatjaf, @callebtc as well as @jb55 are extremely strong recommendations.
LN+: If you hypothetically had 10,000 BTC, would you be able to deploy it to the lightning network successfully, and would it help the network?
ZFR: Yes and yes. No idea about the potential yield though. Probably way less than 1 % at the current demand for LN liquidity.
LN+: Are you planning to come back as a professional node runner at one point?
ZFR: Yes. I plan on doing this, if the opportunity presents itself.
LN+: Any other Bitcoin related project you’re following with great interest?
ZFR: Nostr.
LN+: Do you know if it’s a boy or a girl?
ZFR: A girl.
☂️ LN+ is now available in the Umbrel app store
Posted about 3 years ago
There are several benefits to the offline Umbrel version of the app:
The offline Umbrel app is meant to make it easier for new node operators getting started, therefore it offers all the basic required functionality (finding, joining and creating swaps, rating, comments, etc.) of the online version and some more. But, it doesn't offer all the features of the online version (ex. asking support questions, receiving and sending messages, creating posts, browsing node profiles, etc.). If you want to use all the features you can also sign-in with your node here. All your settings, and activity is synced between the offline and online versions.
If you're running an Umbrel node, I hope you will test out the app and enjoy the simpler experience. If you find any bugs, wish for a feature or have any trouble, let me know! Happy to help!
Introducing liquidity swap bookmarking and hiding
Posted about 3 years ago
You can bookmark or hide a swap by clicking the relevant buttons on swap pages in the left sidebar below all the swap information.
As always, let me know if you notice any issues or if I can help you in any way.