 Timmy Tim asks, what is the best way to manage lightning channels? I understand that to be an effective lightning node, one must curate the channels that the node has in place. What is the best way to select nodes to open channels to? I heard about balanced channels, so that one channel is not unidirectional. But I have been unable to find good instructions on how to do that. What techniques are available to balance lightning channels? This is a really good question. Rebalancing channels, what channels to open, how to connect your nodes? These are challenges. If you are a node operator, I am a node operator, so I run a lightning node. It has been running continuously for just over ten months on the production network. Before that, I was running a lightning node on a testnet for a year. I have had quite a bit of experience of maintaining and managing that node, and trying to find ways to make its connectivity work. At the moment, my lightning node is routing approximately 100 payments per day. There is forwarding activity, which means the channels are getting utilized. You can see incoming and outgoing channels being utilized in both directions. You can't easily see this, but if you use, for example, the list channel's commands on LND, or equivalent commands on other lightning node software, you can see that every channel has two balances, not one. It has a local balance and a remote balance. It is important to realize that in lightning channels, you are moving chunks of money or balances back and forth within a channel, and you have a balance that accumulates on either side. One of the best ways I have been able to describe this in a bar is by setting up two dishes full of peanuts, convenient, because in a bar they provide these props for free when you buy a drink. Wait, it is not for free, I bought a drink. I need to reconsider my bar example. You get these little dishes full of peanuts, so think of one dish of peanuts being your local balance, the other dish of peanuts being the remote balance, and between them is the channel. When you open a channel with another node, usually you fund it. If you start the channel, you fund it, so your side is full of peanuts and the other side is empty, which means you have a local balance of 500,000 satochis and a remote balance of zero. To send the payment, you take peanuts from this side of the channel and move it to that side of the channel. Now, that means someone can send you a payment back because there is a pile of peanuts on the other side. If someone wants to send a payment to you over that channel, they can now move these back to your side of the channel. The moment you make a payment, you create balance on the other side. That is the hard way of creating balance on the other side, which allows your node to receive payments or to do forwarding. A better way would be if people on the outside opened a channel to your node and funded their end, which is basically expecting people to lock up some of their money in a channel towards your node. Why would they do that? They would do that if they consider your node to be well-connected, well-funded, well-managed, and have high availability. When I decide which node to connect to, what I am looking for is nodes that are well-connected to the outside world. I am looking for nodes that have been up for months without interruption, so they are well-managed. I am looking for nodes that have high balances and capacities, so they can route out from themselves. I will be able to use them as hops to reach other nodes. I am looking for nodes that are well-connected. They have enough channels to other well-connected nodes. There are websites you can find where you can type in the public key of your node, and it will tell you which other nodes you can connect to to maximize your connectivity in the network. For example, it will give you a list and say, here is the public key of a node that will give you two hops access to 880 other nodes. The second best option is this public key, which will give you two hops access to 600 nodes, the third best, etc. It will give you a long list of nodes. Theoretically, you can just go through that and connect outgoing channels to them. There are also a number of nodes that, if you connect to them, they will connect back to you. Again, there are various websites where you can find information about that. There are also nodes where you can buy incoming channel capacity, you connect to them, send them a small payment, a few satoshis, and they will open a channel back to you. That way, you have balance on both sides. Rebalancing is the process of making sure that the balance on the other side and this side of the various channels you have open allows your node to be useful to other nodes for forwarding, which can earn new fees, but also gives your node the ability to both make payments to the outside world and receive payments from the outside world. In order to maintain that balance, there are a number of different techniques that you can use, and there is ongoing research on that. I will just give you a few quick examples. One technique, for example, is to open and close channels, so you can open new channels to balance out things. You can close channels that are not being effective or utilized sufficiently, or that are being connected to nodes that are not very useful. In that case, you will pay on-chain fees in order to do that. You have to decide if it is worth doing that, opening and closing channels in order to rebalance things. One very interesting technique that exists in Lightning Network is splicing, where you can use a single transaction to both close an existing channel and open a new one. This is a new technique that has not been implemented fully yet. The same transaction that closes a channel by spending the two-of-two multi-sig of the channel funding can be used to move that balance from the channel you just closed to a two-of-two multi-sig that is the funding transaction for a new channel. Rather than having one transaction to close, moving the balance into your wallet and then using that balance to open another channel, use a single transaction where the inputs of the transaction close one channel and the outputs open another. There are other things you can do with splice-to-splice-outs, which we will talk about in a second. Rebalancing is something that we are still developing techniques for. It is something that, as a node manager, you have to think carefully about how you are going to manage your nodes. Making sure your node is up, it has good capacity, and it is connected to well-connected other nodes. It will make it more likely that other people will open channels to you. They do, I know that from experience. Even before my node had Antanop in its name, which obviously makes a difference in how many people are going to open channels to you, although now that I have said it, a lot of people are going to put Antanop in their node name. Damn it! Anyhow, just kidding. Even though it is a well-known node now, in the past, it was just under an alias. Nobody knew who was running it. People were connecting to it just because it was well-connected and well-managed. That is how you maintain balance. Finally, keep in mind that there are some automatic tools. LND has a tool called Autopilot, which will automatically open channels to various nodes, in order to maintain a minimum number of open channels with a minimum percentage of your wallet balance. You can set minimum and maximum channel balances for when it is opening channels. Yes, as a quick follow-up, you do need to do some kind of port forwarding or UPNP incoming NAT on your router, in order to allow incoming connections to your node, in order to get incoming channels, and to be better connected to the network. I want to suggest you your views and thoughts about the Lightning Network. I recently mounted a full node on Lightning Node myself and found it technically difficult. And the user interface is not there yet. And they are the same solution by our custodial solutions, which are not ideal in crypto, of course. I just wanted to know your views and how it is going to contribute to the adoption of Bitcoin. And for instant payment, and how it is going to impact the other... I'm really excited about the Lightning Network. I've talked about it a lot. I think it's a very interesting approach. And I think this idea of second-layer networks, where you take advantage of the underlying security with a smart contract, and then you build something that can be a lot more fast and a lot more scalable on top, great. The interface is not there yet. How many people here have set up their own crypto node of any kind? This is a very tech-heavy room. Okay. How many people don't know what LS is? And they are your friends you need to teach, right? So, LS is the first command you learn to install Linux. That was just a silly joke. Don't worry. You don't need to know this stuff. It's the techies' job to make this easier. So, I'll tell you a better story, which is sending my first email. Sending my first email. So, sending my first email took approximately a week. So, first I had to read about email, right? At the time, there were no email servers supported in the environment where I had first gained access to the internet. The email was very, very basic. And I was trying to build a new type of email, which is called SMTP email, which is the protocol we use today. So, first I had to download some software called Sendmail, then I had to compile it from the source code. That took two days of full-on geek work in order to figure out all of the library dependencies, and some of the weird errors the C compiler was giving me. So, this was the whole part of sending the email, by the way. At that point, this is what you need to do. So, eventually, I managed to get it, and then I constructed my email, and on the command line, I hit Send, and I'm like, I sent my first email. And it was like, great. Did they respond? No, it hasn't gotten there yet. It's going to take three days to traverse the internet. It was almost like Pony Express. We're getting our email to the other side. Ha, ha, the pastor. And it took, in total, six days for me to actually get the email to the other side. Now, the point is, that's how technology starts. The fact that today, to install a lightning node is an enormous amount of work. It's part of the reason why it's exciting and interesting to techies, but it's not going to work like that. Already, I have three wallets on my phone that have lightning capability, and they make it a lot easier, at the expense of some centralization. We're paying a bit of a price right now, but that's okay for now. And so, gradually, it's going to become easier and easier and easier, until eventually, everyone can do it. That's when we have the opportunity to make some new applications. But we have to be patient. These things take time. By the way, that first email was in 1989, which was the first time I got on the internet, and sent my first email. My mother sent her first email in 2009, and she used the new iPad I had given her, and she went like that, and swiped. Email, email about Tinder. Come on. I wouldn't have stolen that from my mom's iPad. Robbie asks, on what scenarios do we have to use payment channels? Can you please explain in detail how payment channels help the virtuous? Robbie, payment channels are one component of the lightning network. So, the lightning network is not payment channels. The lightning network is a network of routable payment channels, where payment channels can be connected together in order to form a route that allows you to pay someone you do not have a payment channel to. This is an important thing to understand. So, if I want to pay someone on the lightning network, I don't have to have a payment channel to them. I have to have a payment channel to someone who has a payment channel to someone, who has a payment channel to someone, etc., etc., who has a payment channel to the merchant. So, as long as your node is connected to five or six other nodes, each one of those is connected to five or six other nodes, we take advantage of the network effect to create this ability to pay anyone on the network pretty much, very much reachable over a variety of routes, without having to have direct payment channels to each other. That's the point of the lightning network. What is the advantage of using that? The advantage is that you can have instantaneous settlements, so unlike the base blockchain where it takes ten minutes to settle, because the lightning network funds are in a multi-sig that has already confirmed, the settlement of lightning funds is instantaneous. It is confirmed instantly. And you can send very, very small payments from very, very small or no fee. So, you can send satoshis, not hundreds of thousands of satoshis, but single satoshis if you want. Now, there are certain scenarios where some companies may set up or individuals may set up payment channels directly to each other in order to manage situations where they have a lot of flows between themselves. So, for example, exchanges could set up a network of payment channels between them, a mesh network of payment channels between them, in order to ensure that they can easily do transfers from exchange to exchange, without incurring fees on the network and instead be able to do it off-chain, as they say. So, that is one other use of payment channels. And they can either do that in the context of the lightning network, or they could just set up direct payment channels without making them part of the lightning network. And so, payment channels can also be used for this direct, think of it a bit as a VPN, like a VPN as an overlay network over two CPIP, a payment channel is an overlay network over a blockchain. Sifis asks, is there some form of information on a transaction that would show us which address initiated the promise of ownership, or how would we identify a payment channel? A payment channel itself is funded from an on-chain transaction that stores money in a two-of-two multi-save, which will appear on the blockchain explorer, as a pay-to-script hash address that belongs with a three. You can't identify these as specifically being payment channels until they are closed. When they are closed, the script used to close them, is easily identifiable as a payment channel or lightning channel transaction, because the script is rather unique. But until it's spent, you can't see the script, as with any Bitcoin transaction. You only see the script in the public when it is spent. What you see is a three-address, which is a paid-to-script hash, and you don't know what that is. It could be multi-sig, it could be a segwit, it could be a lightning channel, you don't know. You do know where the money came from, which addresses it came from, but that doesn't tell you that it's a channel. In fact, we don't want people to be able to identify what type of script, and easily be able to distinguish between segwit, lightning channels, payment channels, or multi-sig scripts, because that breaks privacy. If you can identify what kind of payment it is, you can start finger-printing and doing statistical analysis on what kind of wallet it is, which allows you to cluster addresses together and identify common elements of ownership, which violates privacy. So the end goal for privacy in Bitcoin is, in fact, to make every transaction look like a simple payment to a public deed. This is a technology called path-root and graph-root, which will hide it even more. But even now, until the channel was closed, you can't identify it as being a channel.