WEBVTT - Automatic transcript; recognition may contain errors. Reviewed for technical wording and speaker labels. Times match the published episode.

00:00:09.070 --> 00:00:14.050
<v Aaron van Wirdum>Live from San Salvador and Utrecht, this is the Van Wirdum Sjorsnado.

00:00:15.010 --> 00:00:15.490
<v Sjors Provoost>Hello.

00:00:16.550 --> 00:00:18.070
<v Aaron van Wirdum>Hey Sjors, welcome back.

00:00:18.950 --> 00:00:19.650
<v Sjors Provoost>Thank you.

00:00:19.810 --> 00:00:20.410
<v Aaron van Wirdum>It's been a while.

00:00:20.410 --> 00:00:24.360
<v Sjors Provoost>I mean, I'm not physically back, but yeah.

00:00:25.220 --> 00:00:29.000
<v Aaron van Wirdum>I'm the one who's not physically back. I'm still hanging out in El Salvador,

00:00:29.260 --> 00:00:32.280
<v Aaron van Wirdum>checking out what's going on here with the new Bitcoin law.

00:00:33.640 --> 00:00:34.380
<v Sjors Provoost>Sounds fun.

00:00:34.700 --> 00:00:39.600
<v Aaron van Wirdum>So yeah, we're doing another episode remote, which always kind of sucks, but

00:00:39.600 --> 00:00:40.740
<v Aaron van Wirdum>let's make the best out of it.

00:00:42.860 --> 00:00:43.340
<v Sjors Provoost>Indeed.

00:00:43.620 --> 00:00:43.960
<v Aaron van Wirdum>Sure.

00:00:44.160 --> 00:00:44.660
<v Sjors Provoost>It should be fun.

00:00:44.960 --> 00:00:47.460
<v Aaron van Wirdum>Sure. Today we're discussing BOLT 12.

00:00:48.640 --> 00:00:52.500
<v Sjors Provoost>Yes. I forgot to prepare any kind of pun for that, but yes.

00:00:52.760 --> 00:00:57.980
<v Aaron van Wirdum>Hey, BOLT itself is a pun. The Lightning developers fixed that one for us.

00:00:59.310 --> 00:01:02.910
<v Sjors Provoost>Yeah, that's true. All right. It stands for our basis of Lightning technology,

00:01:03.210 --> 00:01:07.630
<v Sjors Provoost>which is comparable to a BIP, as we've discussed in an earlier episode for a

00:01:07.630 --> 00:01:10.410
<v Sjors Provoost>Bitcoin improvement protocol. But it's also different from a BIP.

00:01:11.750 --> 00:01:17.310
<v Aaron van Wirdum>The pun obviously being lightning bolt for those listeners that are particularly

00:01:17.310 --> 00:01:21.550
<v Aaron van Wirdum>dense. And yeah, it stands for basis of Lightning technology. And like you

00:01:21.550 --> 00:01:25.190
<v Aaron van Wirdum>mentioned, it's like a BIP, but for Lightning specifically, right?

00:01:26.020 --> 00:01:29.860
<v Sjors Provoost>Yeah, and of course, it makes it really hard to Google anything, right? So if

00:01:29.860 --> 00:01:34.540
<v Sjors Provoost>you're trying to find out what is a BOLT, and then you add BOLT Lightning, and

00:01:34.540 --> 00:01:38.780
<v Sjors Provoost>you're just not going to find anything related to the protocol. So it's really smart.

00:01:39.140 --> 00:01:43.700
<v Aaron van Wirdum>Right, and so far, there were apparently 11 BOLTs. Is that right?

00:01:44.870 --> 00:01:45.350
<v Sjors Provoost>Yes.

00:01:45.590 --> 00:01:51.310
<v Aaron van Wirdum>So there's basically 11 specifications of how the Lightning protocol works.

00:01:52.300 --> 00:01:58.300
<v Sjors Provoost>Yeah, exactly. So that is the distinction between BIPs and BOLTs, I would say.

00:01:58.820 --> 00:02:04.460
<v Sjors Provoost>BOLTs are really a specification, so they're a lot more formal in that sense. So

00:02:04.460 --> 00:02:09.260
<v Sjors Provoost>usually what they do is somebody proposes a BOLT, and then if there's two

00:02:09.260 --> 00:02:14.680
<v Sjors Provoost>implementations of different Lightning implementations that support it, then

00:02:14.680 --> 00:02:17.200
<v Sjors Provoost>it's ready.

00:02:18.060 --> 00:02:23.340
<v Aaron van Wirdum>Right. So there were 11 so far and there's now a 12th BOLT. Or is it a proposed

00:02:23.340 --> 00:02:25.000
<v Aaron van Wirdum>BOLT or what's the status of this?

00:02:25.670 --> 00:02:28.890
<v Sjors Provoost>I think it's proposed because the only implementation is in C-Lightning.

00:02:29.370 --> 00:02:33.550
<v Aaron van Wirdum>Right. So it would be official if some other implementation adopts the same thing.

00:02:34.150 --> 00:02:35.070
<v Sjors Provoost>I think so.

00:02:35.490 --> 00:02:40.980
<v Aaron van Wirdum>Right. So it's a proposed BOLT and it was proposed by Rusty Russell, I think.

00:02:41.710 --> 00:02:47.450
<v Sjors Provoost>Yes, he actually gave a presentation about this in September 2019 in Berlin at

00:02:47.450 --> 00:02:50.470
<v Sjors Provoost>the Lightning conference there, which was fun.

00:02:51.880 --> 00:02:56.980
<v Aaron van Wirdum>Right, so 11 BOLTs so far. This could be the 12th BOLT. So the Lightning

00:02:56.980 --> 00:03:02.480
<v Aaron van Wirdum>specification or the Lightning protocol could be upgraded or expanded,

00:03:03.020 --> 00:03:08.490
<v Aaron van Wirdum>extended. And we're going to explain, you're going to explain mostly. It's going

00:03:08.490 --> 00:03:13.810
<v Aaron van Wirdum>to be mostly you, Sjors, this episode, I think. No. And… And everyone knows that

00:03:13.810 --> 00:03:17.770
<v Aaron van Wirdum>if the two of you, the two of us, sorry, if the two of us do a Lightning episode,

00:03:17.970 --> 00:03:19.830
<v Aaron van Wirdum>these are usually the best episodes.

00:03:22.580 --> 00:03:27.480
<v Sjors Provoost>I think we can do an okay job at explaining this one. Hopefully. We'll hear.

00:03:27.760 --> 00:03:32.620
<v Aaron van Wirdum>All right. Let's see how far we get. So, BOLT 12. What is it, Sjors? Take it away.

00:03:33.680 --> 00:03:37.960
<v Sjors Provoost>Well, maybe we want to take one step back and talk about BOLT 11 or more

00:03:37.960 --> 00:03:39.040
<v Sjors Provoost>generally invoices.

00:03:40.060 --> 00:03:45.870
<v Aaron van Wirdum>Right. Yes. Because BOLT 12 is essentially a new type of invoice

00:03:45.870 --> 00:03:49.410
<v Aaron van Wirdum>or an extension of how invoices work. Is that the right way to put it?

00:03:50.310 --> 00:03:52.250
<v Sjors Provoost>Yeah, like a meta invoice, I guess.

00:03:52.670 --> 00:03:57.330
<v Aaron van Wirdum>Right. So the Lightning Network, the Lightning Protocol currently uses invoices.

00:03:57.730 --> 00:04:02.550
<v Aaron van Wirdum>So yes, let's first explain what is a Lightning Invoice. What is this?

00:04:02.850 --> 00:04:07.150
<v Sjors Provoost>Yeah. So a Lightning Invoice is just a piece of text and it has a computer

00:04:07.150 --> 00:04:12.750
<v Sjors Provoost>readable, of course. And it has a couple of things in that text. One is the node

00:04:12.750 --> 00:04:18.160
<v Sjors Provoost>that the transaction needs to be sent to. So a node is just a public key.

00:04:18.800 --> 00:04:23.220
<v Sjors Provoost>There's usually an amount, like how much satoshis are you expecting?

00:04:24.430 --> 00:04:28.270
<v Sjors Provoost>And the interesting ingredient there is there's a hash of a secret.

00:04:30.750 --> 00:04:36.590
<v Sjors Provoost>The hash of the secret. So the idea is that when you're actually paying an

00:04:36.590 --> 00:04:40.910
<v Sjors Provoost>invoice, you're going to get the actual secret rather than the hash of the

00:04:40.910 --> 00:04:42.850
<v Sjors Provoost>secret. And that's how this whole chain of...

00:04:44.830 --> 00:04:48.610
<v Sjors Provoost>HTLCs that we talked about with the Joost Jager. That's kind of how they cascade.

00:04:48.770 --> 00:04:52.760
<v Sjors Provoost>So those are the three ingredients that are on an invoice. So if you're selling

00:04:52.760 --> 00:04:58.730
<v Sjors Provoost>me an apple, you tell me how many satoshis you want for the apple, the

00:04:58.730 --> 00:05:02.550
<v Sjors Provoost>hash of the secret, and what your node is. And you can add a bunch of other

00:05:02.550 --> 00:05:07.570
<v Sjors Provoost>things to the invoice that are not very important for this conversation, like a

00:05:07.570 --> 00:05:10.030
<v Sjors Provoost>description and some hints on how to route to you.

00:05:11.530 --> 00:05:16.270
<v Aaron van Wirdum>Right, yeah. So an invoice is just a piece of data that tells you what my node

00:05:16.270 --> 00:05:21.290
<v Aaron van Wirdum>is, because all nodes on the Lightning Network have their own identifier, which

00:05:21.290 --> 00:05:26.740
<v Aaron van Wirdum>you mentioned is a public key, plus the amount, plus a hash, which is sort of the

00:05:26.740 --> 00:05:32.160
<v Aaron van Wirdum>magic of how the Lightning Network works. So I communicate this information in an

00:05:32.160 --> 00:05:38.140
<v Aaron van Wirdum>invoice to you, and that's how you know how to pay me. That's what an

00:05:38.140 --> 00:05:38.840
<v Aaron van Wirdum>invoice is, right?

00:05:39.580 --> 00:05:43.780
<v Sjors Provoost>Exactly. And then my wallet would just pay that invoice by sending a bunch of

00:05:43.780 --> 00:05:49.660
<v Sjors Provoost>messages and constructing a payment and doing the routing stuff and all

00:05:49.660 --> 00:05:50.900
<v Sjors Provoost>that stuff that we talked about earlier.

00:05:51.500 --> 00:05:53.300
<v Aaron van Wirdum>Right. So this sounds perfect to me.

00:05:54.770 --> 00:05:59.230
<v Sjors Provoost>Yeah, it is. It's amazing. And, you know, Lightning has been working. So it's not

00:05:59.230 --> 00:05:59.730
<v Sjors Provoost>the end of the world.

00:05:59.770 --> 00:06:00.790
<v Aaron van Wirdum>So what's the problem?

00:06:02.050 --> 00:06:04.910
<v Aaron van Wirdum>Well, there's a couple of them. Why fix what isn't broken, Sjors?

00:06:06.060 --> 00:06:11.520
<v Sjors Provoost>There's a couple of problems. So let's say you have an apple in your store and

00:06:11.520 --> 00:06:15.600
<v Sjors Provoost>you have this Lightning invoice and you decide to make the Lightning invoice

00:06:15.600 --> 00:06:19.560
<v Sjors Provoost>early on. So you want to put it on a sticker and you put the sticker on the

00:06:19.560 --> 00:06:25.140
<v Sjors Provoost>apple. The problem is you have to set the amount of satoshis. And so by the time

00:06:25.140 --> 00:06:30.660
<v Sjors Provoost>I go to your shop and pick up the apple, maybe the exchange rate doubled. The

00:06:30.660 --> 00:06:34.580
<v Sjors Provoost>apple is too expensive and you have to make a new sticker. So volatility

00:06:34.580 --> 00:06:39.520
<v Sjors Provoost>basically is kind of hard to deal with in this way. It's fine if you make the

00:06:39.520 --> 00:06:42.860
<v Sjors Provoost>invoice real time, but not if you want to make them in advance and print them out.

00:06:43.900 --> 00:06:48.280
<v Aaron van Wirdum>Yeah, we're assuming that a lot of people are not using Bitcoin as a unit of

00:06:48.280 --> 00:06:52.180
<v Aaron van Wirdum>account yet. They're still using some kind of fiat currency as a unit of account,

00:06:52.200 --> 00:06:58.010
<v Aaron van Wirdum>but they want to be paid in Bitcoin. So you want to be paid $1 in Bitcoin

00:06:58.010 --> 00:07:02.810
<v Aaron van Wirdum>for your apple rather than a fixed amount of satoshis in your apple for your

00:07:02.810 --> 00:07:07.710
<v Aaron van Wirdum>apple. And that's hard to do with a static Lightning invoice.

00:07:08.640 --> 00:07:14.320
<v Aaron van Wirdum>You'd have to create the invoice at the moment of sale, and you can't

00:07:14.320 --> 00:07:16.480
<v Aaron van Wirdum>make it in advance. So that's one limitation.

00:07:17.490 --> 00:07:22.130
<v Sjors Provoost>Yeah, another one, and there is a workaround for that too, of course. None of

00:07:22.130 --> 00:07:26.210
<v Sjors Provoost>these are end-of-the-world problems. The other one is that this hash of the

00:07:26.210 --> 00:07:30.890
<v Sjors Provoost>secret that we talked about, you can only use this once. So if you want to have a

00:07:30.890 --> 00:07:35.210
<v Sjors Provoost>tattoo on your body with a Lightning invoice, that's not a good idea because the

00:07:35.210 --> 00:07:39.610
<v Sjors Provoost>first person who pays it, then there's a chance it's going to leak and the

00:07:39.610 --> 00:07:40.810
<v Sjors Provoost>mechanism won't work anymore.

00:07:42.190 --> 00:07:48.090
<v Sjors Provoost>So then you'd have to print a bunch of QR codes on your skin. If you use the

00:07:48.090 --> 00:07:52.830
<v Sjors Provoost>henna tattoos, I guess you can do that. There's also another workaround for this

00:07:52.830 --> 00:07:54.370
<v Sjors Provoost>problem of recurring payments.

00:07:54.530 --> 00:08:00.030
<v Aaron van Wirdum>I think it's not technically really that it doesn't work. It's just that it's not

00:08:00.030 --> 00:08:05.570
<v Aaron van Wirdum>secure, right? Because the secret needs to be a secret. That's why it's a secret.

00:08:05.990 --> 00:08:10.470
<v Aaron van Wirdum>While if you've used it once, then the secret has been sort of used on the

00:08:10.470 --> 00:08:15.970
<v Aaron van Wirdum>Lightning Network and therefore… if you create a new invoice with the same hash

00:08:15.970 --> 00:08:20.210
<v Aaron van Wirdum>of a secret, then someone else might know the secret and therefore claim funds

00:08:20.210 --> 00:08:22.430
<v Aaron van Wirdum>that they weren't supposed to claim. Right?

00:08:23.070 --> 00:08:23.670
<v Sjors Provoost>Yeah.

00:08:24.050 --> 00:08:30.010
<v Aaron van Wirdum>So that's why every invoice should only be used once. So every secret is

00:08:30.010 --> 00:08:35.030
<v Aaron van Wirdum>only used once. So you can't use the same invoice for different apples.

00:08:35.490 --> 00:08:40.830
<v Aaron van Wirdum>In my apple store, I can't put the same sticker with the same price on every

00:08:40.830 --> 00:08:45.230
<v Aaron van Wirdum>apple because once the first person buys an apple, the secret is going to be out

00:08:45.230 --> 00:08:51.370
<v Aaron van Wirdum>there and all the other apples. I'm running a big risk of having my apple stolen, basically.

00:08:51.890 --> 00:08:52.630
<v Sjors Provoost>That's right.

00:08:53.020 --> 00:08:53.580
<v Aaron van Wirdum>Right.

00:08:54.140 --> 00:08:59.560
<v Sjors Provoost>So one solution to that problem that already exists is that instead of making an

00:08:59.560 --> 00:09:05.220
<v Sjors Provoost>invoice, you only publish your node identifier. And then the customer just

00:09:05.220 --> 00:09:10.880
<v Sjors Provoost>basically enters the amount themselves and sends it to your node. So you're kind

00:09:10.880 --> 00:09:15.290
<v Sjors Provoost>of leaving that to the customer. Of course, that's annoying too because... then

00:09:15.290 --> 00:09:18.730
<v Sjors Provoost>how do you do automatic handling of payments because you're expecting a certain

00:09:18.730 --> 00:09:23.050
<v Sjors Provoost>amount? And what if it goes wrong? You know, if the customer types the wrong

00:09:23.050 --> 00:09:28.050
<v Sjors Provoost>amount, that's kind of not ideal, but it's possible. And for donations, it's

00:09:28.050 --> 00:09:31.850
<v Sjors Provoost>fine, right? For donations, you can have, I guess, a tattoo with your node

00:09:31.850 --> 00:09:36.030
<v Sjors Provoost>identifier on you, and then people can donate you because it's up to them how

00:09:36.030 --> 00:09:40.210
<v Sjors Provoost>much they want to send anyway. So there are solutions to that. If you Google, for

00:09:40.210 --> 00:09:41.110
<v Sjors Provoost>example, KeySend.

00:09:43.000 --> 00:09:48.900
<v Aaron van Wirdum>Right. But anyway, so we've now mentioned two downsides of the current

00:09:48.900 --> 00:09:54.740
<v Aaron van Wirdum>invoice system. One of them is fiat volatility. The other one is you can't

00:09:54.740 --> 00:09:58.660
<v Aaron van Wirdum>really reuse the same invoice in a secure way. Are there more?

00:10:00.690 --> 00:10:03.330
<v Sjors Provoost>I mean, just sort of the main thing, yeah.

00:10:03.280 --> 00:10:04.240
<v Aaron van Wirdum>These are the two…

00:10:03.910 --> 00:10:08.190
<v Sjors Provoost>Well, the other thing is, but it's not really a downside, but you— you know, an

00:10:08.190 --> 00:10:10.310
<v Sjors Provoost>invoice can only be used to receive money.

00:10:11.840 --> 00:10:16.180
<v Sjors Provoost>It can't be used to send money. So you can't do a credit invoice.

00:10:18.290 --> 00:10:22.330
<v Aaron van Wirdum>You can do a… Yeah, give me a concrete example of this. When would you want to

00:10:22.330 --> 00:10:24.290
<v Aaron van Wirdum>create an invoice to send money?

00:10:24.970 --> 00:10:30.850
<v Sjors Provoost>A Bitcoin ATM. So if I put $10 into a Bitcoin ATM and I wanted to send

00:10:30.850 --> 00:10:35.770
<v Sjors Provoost>me that amount in satoshis over the Lightning Network, then the way that works

00:10:35.770 --> 00:10:40.250
<v Sjors Provoost>right now is that, well, there's some other technologies, but what we just

00:10:40.250 --> 00:10:44.830
<v Sjors Provoost>described is you as the person using the ATM has to make an invoice for that ATM

00:10:44.830 --> 00:10:47.930
<v Sjors Provoost>and then the ATM will pay you if the invoice is what it wants.

00:10:49.660 --> 00:10:53.320
<v Sjors Provoost>And that's not ideal. Ideally, what you want to do is you want to give money to

00:10:53.320 --> 00:10:57.840
<v Sjors Provoost>the ATM, like a piece of paper, and then it should show you a QR code, and you

00:10:57.840 --> 00:11:01.620
<v Sjors Provoost>scan that, and then it pays you. So it's a credit invoice.

00:11:03.260 --> 00:11:03.620
<v Aaron van Wirdum>Right.

00:11:03.800 --> 00:11:07.220
<v Sjors Provoost>That's what you'd like to see. And there are some workarounds for this, so it's

00:11:07.220 --> 00:11:08.320
<v Sjors Provoost>not the end of the world again.

00:11:09.360 --> 00:11:14.540
<v Aaron van Wirdum>Right, so the current invoice system, it works for what it needs to do. However,

00:11:14.900 --> 00:11:19.940
<v Aaron van Wirdum>it has, we've now mentioned three main limitations. One is you can't create the

00:11:19.940 --> 00:11:25.260
<v Aaron van Wirdum>invoice ahead of time, at least if you're pricing stuff in fiat because of the

00:11:25.260 --> 00:11:25.900
<v Aaron van Wirdum>fiat volatility.

00:11:27.520 --> 00:11:31.860
<v Aaron van Wirdum>The second one is you can't reuse the same invoice because it's not really secure

00:11:31.860 --> 00:11:35.680
<v Aaron van Wirdum>because the secret is exposed after the first time. And the third sort of

00:11:35.680 --> 00:11:40.620
<v Aaron van Wirdum>downside is that you can't create an invoice to send money. Am I saying it right?

00:11:40.780 --> 00:11:41.380
<v Aaron van Wirdum>I think so.

00:11:41.600 --> 00:11:47.340
<v Sjors Provoost>Yeah. And as far as I know, some or all of these are solved in practice at the,

00:11:47.480 --> 00:11:51.020
<v Sjors Provoost>not at the protocol layer, but at the application layer with something like

00:11:51.020 --> 00:11:55.940
<v Sjors Provoost>LNURL. So we can do a whole other podcast going into that. But for now, we're

00:11:55.940 --> 00:12:00.560
<v Sjors Provoost>going to talk about... a solution at the protocol level, which is called BOLT 12.

00:12:01.370 --> 00:12:07.190
<v Aaron van Wirdum>BOLT 12. All right, there we go. So BOLT 12 is, you mentioned, it's

00:12:07.190 --> 00:12:12.650
<v Aaron van Wirdum>like a meta invoice. You can consider it like a layer on top of regular invoices

00:12:12.650 --> 00:12:18.580
<v Aaron van Wirdum>that communicates not just invoice data, but something on top of that, right?

00:12:19.920 --> 00:12:25.580
<v Sjors Provoost>It doesn't even communicate the invoice. So in the apple example, the

00:12:25.580 --> 00:12:30.920
<v Sjors Provoost>BOLT 12 thing, the sticker that you put in your apple, might say, this is an

00:12:30.920 --> 00:12:36.120
<v Sjors Provoost>apple. This is the identifier of the apple for the store. Maybe it has some

00:12:36.120 --> 00:12:39.260
<v Sjors Provoost>SKU, some unique number.

00:12:40.800 --> 00:12:46.130
<v Sjors Provoost>And this is the Lightning node. And please go talk to this Lightning node. So

00:12:46.130 --> 00:12:51.070
<v Sjors Provoost>then what the customer app will do is it scans the QR code. It sees, okay, this

00:12:51.070 --> 00:12:54.850
<v Sjors Provoost>is an apple and I have to talk to this other node. It then calls the other node

00:12:54.850 --> 00:12:59.940
<v Sjors Provoost>and says, please give me an invoice for this apple. And then the node actually

00:12:59.940 --> 00:13:04.220
<v Sjors Provoost>gives you an invoice for the apple right then, which you can pay. Which means,

00:13:04.300 --> 00:13:10.090
<v Sjors Provoost>you know, the Lightning node for the store can calculate the exchange rate, for

00:13:10.090 --> 00:13:11.570
<v Sjors Provoost>example, right at the last moment.

00:13:13.020 --> 00:13:15.700
<v Sjors Provoost>Yeah. And then it's paid as a regular invoice.

00:13:16.020 --> 00:13:21.880
<v Aaron van Wirdum>Right. So BOLT 12 is essentially a specification for a protocol of

00:13:21.880 --> 00:13:27.800
<v Aaron van Wirdum>how to contact, well, how to contact a specific node, which would be the node

00:13:27.800 --> 00:13:33.680
<v Aaron van Wirdum>you want to pay. And then that node knows how to respond to that request

00:13:33.680 --> 00:13:35.760
<v Aaron van Wirdum>by creating an invoice. Is that right?

00:13:36.730 --> 00:13:41.730
<v Sjors Provoost>Almost. So it's not really how to contact a node because that's sort of known how

00:13:41.730 --> 00:13:47.230
<v Sjors Provoost>to do that. But it is, or it might actually, I don't know. But it is saying you

00:13:47.230 --> 00:13:50.710
<v Sjors Provoost>should contact this node because this node is who can give you the invoice.

00:13:52.030 --> 00:13:57.780
<v Aaron van Wirdum>So with BOLT 12... You get the info on which

00:13:57.780 --> 00:14:03.640
<v Aaron van Wirdum>node to contact and at that point a invoice is created. Therefore we're

00:14:03.640 --> 00:14:08.540
<v Aaron van Wirdum>solving the time problem because the invoice is created at the exact time that

00:14:08.540 --> 00:14:14.180
<v Aaron van Wirdum>you want to make the payment. Even though the BOLT12 meta invoice was

00:14:14.180 --> 00:14:20.000
<v Aaron van Wirdum>stuck on my apple for a while. And we're fixing the secrets problem.

00:14:20.860 --> 00:14:25.980
<v Aaron van Wirdum>Because the invoice is created uniquely, even though the sticker was on my apple

00:14:25.980 --> 00:14:29.440
<v Aaron van Wirdum>for a while. But Sjors, is there more?

00:14:30.020 --> 00:14:35.380
<v Sjors Provoost>There is more. So one thing you can do now is subscriptions. So BOLT12 has a

00:14:35.380 --> 00:14:41.160
<v Sjors Provoost>special way to indicate that this is a subscription. So you can say, please don't

00:14:41.160 --> 00:14:45.800
<v Sjors Provoost>ask me just for one invoice, but ask me for an invoice every week or every month.

00:14:46.610 --> 00:14:50.930
<v Sjors Provoost>And it can even say, well, the invoice should be $10 every month rather than,

00:14:50.930 --> 00:14:52.670
<v Sjors Provoost>say, 10 satoshis every month.

00:14:52.950 --> 00:14:58.550
<v Aaron van Wirdum>Right. So if you want to buy

00:14:58.990 --> 00:15:02.510
<v Aaron van Wirdum>an apple from me every month, that's the worst example probably.

00:15:03.250 --> 00:15:04.550
<v Sjors Provoost>Yeah, it's a terrible example.

00:15:04.730 --> 00:15:08.730
<v Aaron van Wirdum>If you want to buy an apple from me every month, we can actually automate that.

00:15:10.390 --> 00:15:11.350
<v Sjors Provoost>Yeah, exactly.

00:15:12.590 --> 00:15:18.190
<v Aaron van Wirdum>I guess this does require... So BOLT 12 can sort of

00:15:18.190 --> 00:15:23.870
<v Aaron van Wirdum>include that information. It can offer to create

00:15:23.870 --> 00:15:28.130
<v Aaron van Wirdum>an invoice every month, but there's still a lot of work to be done on the wallet

00:15:28.130 --> 00:15:32.810
<v Aaron van Wirdum>side to actually make this happen in reality. Like BOLT 12 in itself doesn't

00:15:32.810 --> 00:15:33.670
<v Aaron van Wirdum>solve this, right?

00:15:34.800 --> 00:15:39.040
<v Sjors Provoost>No, in particular because if you're talking about sort of an automated payment

00:15:39.040 --> 00:15:44.400
<v Sjors Provoost>every month in a different exchange rate even, then that creates a few

00:15:44.400 --> 00:15:49.520
<v Sjors Provoost>problems, right? So, for example, let's say it's automatic, you don't want to

00:15:49.520 --> 00:15:55.100
<v Sjors Provoost>think about it too much, but then the server side, so let's say the Spotify or

00:15:55.100 --> 00:16:00.850
<v Sjors Provoost>whatever, they… they create this invoice every month for $10 based on what they

00:16:00.850 --> 00:16:05.090
<v Sjors Provoost>think the exchange rate is. And then your wallet asks for that invoice once a

00:16:05.090 --> 00:16:07.630
<v Sjors Provoost>month. It says, hey, do you have a new invoice for me? And the server says, yeah,

00:16:07.670 --> 00:16:13.410
<v Sjors Provoost>here's one. And then the wallet has to say, well, according to me, it's $10.01.

00:16:14.330 --> 00:16:19.250
<v Sjors Provoost>And so then you have to say, okay, what percentage of disagreement is okay? That

00:16:19.250 --> 00:16:22.270
<v Sjors Provoost>sort of stuff would need to be worked out. And what does the wallet do if there's

00:16:22.270 --> 00:16:27.410
<v Sjors Provoost>not enough balance? Does it nag the user or not? And for mobile wallets, it's

00:16:27.410 --> 00:16:31.630
<v Sjors Provoost>even more tedious because mobile applications tend to be off in the background.

00:16:32.410 --> 00:16:37.510
<v Sjors Provoost>So they have to wake up at the right time to ask for new invoices. So there's

00:16:37.510 --> 00:16:41.670
<v Sjors Provoost>definitely work to be done. But at least specifying what the subscription should

00:16:41.670 --> 00:16:43.770
<v Sjors Provoost>be, that can be done at the protocol level.

00:16:46.630 --> 00:16:47.450
<v Sjors Provoost>But there's more.

00:16:47.730 --> 00:16:52.010
<v Aaron van Wirdum>Yes, BOLT 12 enables this. There's still a lot of work to be done behind the

00:16:52.010 --> 00:16:57.730
<v Aaron van Wirdum>screens. But at least now there's a way to sort of start doing that. And there's

00:16:57.730 --> 00:16:58.930
<v Aaron van Wirdum>even more. This is amazing.

00:16:59.090 --> 00:17:03.590
<v Sjors Provoost>This is amazing. Well, we talked about this Bitcoin ATM. We talked about the

00:17:03.590 --> 00:17:04.230
<v Sjors Provoost>Bitcoin ATM.

00:17:04.410 --> 00:17:06.190
<v Aaron van Wirdum>Yes, that's the problem we haven't solved yet.

00:17:07.040 --> 00:17:12.840
<v Sjors Provoost>Right. So where I put in $10 and now it's solved because the ATM will

00:17:12.840 --> 00:17:18.020
<v Sjors Provoost>display a BOLT 12 thing, offer is the technical term, and it will say,

00:17:18.220 --> 00:17:23.990
<v Sjors Provoost>take my money. Would you like this $10 worth of satoshis? And

00:17:23.990 --> 00:17:29.640
<v Sjors Provoost>then my wallet, if it understands this, it will create the invoice and give it

00:17:29.640 --> 00:17:35.310
<v Sjors Provoost>to the ATM and then the ATM pays it. So there we have the reverse flow. So my

00:17:35.310 --> 00:17:38.300
<v Sjors Provoost>wallet creates an invoice and the ATM sends to it.

00:17:39.140 --> 00:17:39.620
<v Aaron van Wirdum>Right.

00:17:40.870 --> 00:17:46.570
<v Aaron van Wirdum>So yeah, BOLT 12 is a communication layer that allows wallets to basic—

00:17:46.570 --> 00:17:51.850
<v Aaron van Wirdum>or nodes, Lightning nodes, to communicate invoices. I think that's the very short

00:17:51.850 --> 00:17:52.850
<v Aaron van Wirdum>way to put it, right?

00:17:53.310 --> 00:17:57.110
<v Sjors Provoost>Well, except that it is not the communication layer. So that's, I guess, what we

00:17:57.110 --> 00:17:58.370
<v Sjors Provoost>need to explain next.

00:17:59.890 --> 00:18:01.690
<v Sjors Provoost>It's more of a meta invoice.

00:18:01.910 --> 00:18:04.590
<v Aaron van Wirdum>That's exactly what I was getting to, Sjors. You read my mind.

00:18:04.590 --> 00:18:05.970
<v Sjors Provoost>Perfect. Exactly.

00:18:06.490 --> 00:18:10.970
<v Aaron van Wirdum>So if we're creating a new communication layer or new ways for nodes to

00:18:10.970 --> 00:18:16.260
<v Aaron van Wirdum>communicate, how does this actually work? How is this data sent from one

00:18:16.260 --> 00:18:17.760
<v Aaron van Wirdum>Lightning node to another?

00:18:19.460 --> 00:18:24.140
<v Sjors Provoost>Well, it will use an extension of, I think, BOLT 7

00:18:24.140 --> 00:18:29.990
<v Sjors Provoost>called Onion Messages. So the Lightning Network already uses Onion

00:18:29.990 --> 00:18:35.130
<v Sjors Provoost>routing to send payments, as I think we've discussed in earlier episodes what

00:18:35.130 --> 00:18:40.230
<v Sjors Provoost>Onion routing is. So I send a message to the next node or a payment to the next

00:18:40.230 --> 00:18:45.360
<v Sjors Provoost>node, and then they send it to the node after that, et cetera, et cetera. And

00:18:45.360 --> 00:18:48.620
<v Sjors Provoost>every node only knows where it came from and the next hop.

00:18:49.580 --> 00:18:55.460
<v Aaron van Wirdum>Well, to be more exact, every node knows from which neighboring node it got it

00:18:55.460 --> 00:18:59.380
<v Aaron van Wirdum>and which next node, but it doesn't know where the message started or where the

00:18:59.380 --> 00:19:04.520
<v Aaron van Wirdum>message will end, right? Or what the message is because it's encrypted on every step.

00:19:05.220 --> 00:19:11.020
<v Sjors Provoost>Yeah, because as you unwrap, as you unpeel the onion, basically, there's a new

00:19:11.020 --> 00:19:14.540
<v Sjors Provoost>secret and a new secret and a new secret and only the final destination will know

00:19:14.540 --> 00:19:19.200
<v Sjors Provoost>precisely what was in there. And there's some tricks to make it look the same

00:19:19.200 --> 00:19:24.260
<v Sjors Provoost>size. So yeah, you can't see how far along in the route you are. We talked about

00:19:24.260 --> 00:19:28.040
<v Sjors Provoost>that with Joost Jager with this crazy postal analogy that didn't work.

00:19:28.580 --> 00:19:34.560
<v Aaron van Wirdum>Yeah, I remember. So right now, it's already possible to send messages over

00:19:34.560 --> 00:19:39.360
<v Aaron van Wirdum>the Lightning network, I think. Is this done by using zero Bitcoin

00:19:40.330 --> 00:19:41.590
<v Aaron van Wirdum>payments or no?

00:19:41.590 --> 00:19:45.910
<v Sjors Provoost>Yeah, either zero Bitcoin payments, or very small payments so what you're

00:19:45.910 --> 00:19:50.210
<v Sjors Provoost>basically doing is sending a fake payment or a very small payment and then and

00:19:50.210 --> 00:19:54.990
<v Sjors Provoost>that's using using the usual routing mechanisms that we talked about earlier and

00:19:55.340 --> 00:20:00.000
<v Sjors Provoost>then next to the payment or even the fake payment there's a message which is

00:20:00.000 --> 00:20:04.880
<v Sjors Provoost>whatever the message you want to send so this protocol upgrade actually makes

00:20:04.880 --> 00:20:05.920
<v Sjors Provoost>that more elegant.

00:20:07.720 --> 00:20:11.620
<v Sjors Provoost>Less resource intensive especially. Because those fake payments...

00:20:11.620 --> 00:20:16.260
<v Aaron van Wirdum>Sure, sure, sure. I want to make this clear for myself and for our listeners.

00:20:17.080 --> 00:20:22.100
<v Aaron van Wirdum>BOLT 7, so that's, you know, we just discussed BOLT 12. There's another BOLT,

00:20:22.220 --> 00:20:28.220
<v Aaron van Wirdum>BOLT 7. BOLT 7 specifies how the messages are currently, what

00:20:28.220 --> 00:20:30.740
<v Aaron van Wirdum>we just described, how that currently works. Is that correct or no?

00:20:31.410 --> 00:20:32.470
<v Sjors Provoost>Yes, exactly.

00:20:32.650 --> 00:20:32.890
<v Aaron van Wirdum>Right.

00:20:33.090 --> 00:20:34.170
<v Sjors Provoost>The whole onion routing thing.

00:20:34.350 --> 00:20:40.550
<v Aaron van Wirdum>And what we're going to be discussing now is an extension of BOLT 7 to help BOLT 12?

00:20:41.330 --> 00:20:42.010
<v Sjors Provoost>That's right.

00:20:42.310 --> 00:20:43.930
<v Aaron van Wirdum>Right. Okay. So we're going to discuss it.

00:20:44.030 --> 00:20:46.770
<v Sjors Provoost>And maybe create the future in general because it's pretty cool.

00:20:46.950 --> 00:20:52.350
<v Aaron van Wirdum>Is it a proposed change to BOLT 7 or is it already changed? It's a proposed

00:20:52.350 --> 00:20:53.310
<v Aaron van Wirdum>change to BOLT 7.

00:20:53.650 --> 00:20:54.130
<v Sjors Provoost>Yeah.

00:20:54.430 --> 00:20:56.990
<v Aaron van Wirdum>Okay. So how would BOLT 7 be changed?

00:20:57.580 --> 00:21:03.460
<v Sjors Provoost>Yeah, so it really, I think one way to say is it decouples the messaging from

00:21:03.460 --> 00:21:08.820
<v Sjors Provoost>the payment side. Because so far when you use this onion routing messaging in

00:21:08.820 --> 00:21:13.900
<v Sjors Provoost>Lightning, you're actually trying to make a payment. But now this can be

00:21:13.900 --> 00:21:17.960
<v Sjors Provoost>separate. So you can actually send a message to any node on the network that

00:21:17.960 --> 00:21:23.960
<v Sjors Provoost>supports this. And even ones that you don't have a payment channel with. So it's

00:21:23.960 --> 00:21:27.120
<v Sjors Provoost>much easier to come up with a route. And it'll just forward it.

00:21:27.040 --> 00:21:28.890
<v Aaron van Wirdum>Right, so right now—

00:21:28.890 --> 00:21:29.750
<v Sjors Provoost>final destination.

00:21:29.750 --> 00:21:33.150
<v Aaron van Wirdum>Right, so right now, if you want to send a message over the Lightning network,

00:21:33.150 --> 00:21:37.430
<v Aaron van Wirdum>you're actually using all the payment routes, which are, you know, the payment

00:21:37.430 --> 00:21:43.430
<v Aaron van Wirdum>channels. Even though it's a zero Bitcoin payment, you're still

00:21:43.430 --> 00:21:45.910
<v Aaron van Wirdum>using the existing payment channels.

00:21:46.630 --> 00:21:51.570
<v Sjors Provoost>And you're really taxing those channels too, right? You're holding coins in

00:21:51.570 --> 00:21:53.970
<v Sjors Provoost>reserve and all sorts of complicated things.

00:21:55.300 --> 00:22:01.140
<v Aaron van Wirdum>Right, and with this proposed extension to BOLT 7, you wouldn't actually use the

00:22:01.140 --> 00:22:05.580
<v Aaron van Wirdum>payment channels anymore. You'd just send messages to other Lightning nodes on

00:22:05.580 --> 00:22:06.140
<v Aaron van Wirdum>the network.

00:22:06.620 --> 00:22:11.820
<v Sjors Provoost>Yeah, and this means that, at least for now, this would be free. As in, any node

00:22:11.820 --> 00:22:15.580
<v Sjors Provoost>will just relay any message that it's getting. Because [unclear] limited.

00:22:14.880 --> 00:22:20.280
<v Aaron van Wirdum>Because so far there was a fee involved? It was just a regular payment channel

00:22:20.280 --> 00:22:21.780
<v Aaron van Wirdum>fee type of fee?

00:22:22.550 --> 00:22:26.050
<v Sjors Provoost>So when you make a payment, every hop you have to pay a little bit for. Now, if

00:22:26.050 --> 00:22:30.090
<v Sjors Provoost>you have a fake payment, you don't end up actually paying. So it is a problem.

00:22:32.950 --> 00:22:37.590
<v Sjors Provoost>But if you're making small payments or zero payments, then you are paying all the

00:22:37.590 --> 00:22:39.790
<v Sjors Provoost>routes in between for the service of relaying a message.

00:22:40.490 --> 00:22:40.890
<v Aaron van Wirdum>Right.

00:22:41.090 --> 00:22:47.050
<v Sjors Provoost>But this new extension does not require that. But the good news is that it is far

00:22:47.050 --> 00:22:47.950
<v Sjors Provoost>less resource intensive.

00:22:49.850 --> 00:22:53.570
<v Sjors Provoost>Because a node that receives a message and needs to relay it can do that in one

00:22:53.570 --> 00:22:56.790
<v Sjors Provoost>go and then it can forget it ever happened. It doesn't have to track anything.

00:22:57.170 --> 00:22:59.150
<v Sjors Provoost>There's no secrets or all that sort of stuff.

00:22:59.550 --> 00:23:02.030
<v Aaron van Wirdum>Right. That's the good news. Is there also bad news?

00:23:02.990 --> 00:23:08.050
<v Sjors Provoost>Well, the bad news is because it's free. Like, you know, it could be DDoSed. So,

00:23:08.230 --> 00:23:11.830
<v Sjors Provoost>you know, a node would have to rate limit things like don't send too many

00:23:11.830 --> 00:23:17.440
<v Sjors Provoost>messages, and it's not guaranteed to arrive. So when you're sending a message

00:23:17.440 --> 00:23:22.640
<v Sjors Provoost>using this BOLT 7 extension, it may arrive. It's like UDP in the network protocol.

00:23:23.590 --> 00:23:27.230
<v Aaron van Wirdum>Right, so if you're currently sending a message over the Lightning network,

00:23:27.230 --> 00:23:31.430
<v Aaron van Wirdum>you're using the payment channels, and you're essentially getting a confirmation

00:23:31.430 --> 00:23:37.350
<v Aaron van Wirdum>that the message actually got to the recipient. While with this new extension,

00:23:38.030 --> 00:23:43.550
<v Aaron van Wirdum>it's not using payment channels, and it's just using other nodes, and it's…

00:23:43.420 --> 00:23:48.000
<v Aaron van Wirdum>it doesn't require the same level of resources and that kind of stuff. But you're

00:23:48.000 --> 00:23:52.660
<v Aaron van Wirdum>not getting the same level of confirmation. You're not as sure that the message

00:23:52.660 --> 00:23:56.330
<v Aaron van Wirdum>made it to the recipient. Is that right?

00:23:57.030 --> 00:24:01.750
<v Sjors Provoost>Yeah, that's correct. However, if you want to reply, and you probably want to, if

00:24:01.750 --> 00:24:06.950
<v Sjors Provoost>you're asking for an invoice, because you want the invoice, then in your message

00:24:06.950 --> 00:24:09.470
<v Sjors Provoost>should be instructions on how to send a message back.

00:24:11.430 --> 00:24:17.390
<v Sjors Provoost>So basically you just provide another bunch of onions that can be unpeeled on the

00:24:17.390 --> 00:24:20.950
<v Sjors Provoost>way back. So the person you're talking to does not have to know where the message

00:24:20.950 --> 00:24:21.510
<v Sjors Provoost>is coming from.

00:24:22.210 --> 00:24:27.250
<v Aaron van Wirdum>Yeah. Basically the confirmation that the message ended up with the recipient is

00:24:27.250 --> 00:24:29.170
<v Aaron van Wirdum>the fact that you got an invoice back, right?

00:24:29.730 --> 00:24:31.700
<v Sjors Provoost>That's right. Yeah.

00:24:32.200 --> 00:24:35.860
<v Aaron van Wirdum>Right. So does that cover the proposed extension to BOLT 7?

00:24:37.610 --> 00:24:41.470
<v Sjors Provoost>I think so. I mean, I'm sure there's all sorts of subtle things that... I don't

00:24:41.470 --> 00:24:44.770
<v Sjors Provoost>know, and we haven't covered, but I think that's the essence.

00:24:45.050 --> 00:24:46.650
<v Aaron van Wirdum>If we got the basics, I'm happy.

00:24:49.260 --> 00:24:49.380
<v Sjors Provoost>Yeah.

00:24:49.860 --> 00:24:53.580
<v Aaron van Wirdum>So to reiterate, Sjors, do you want to reiterate? I'm going to reiterate, and

00:24:53.580 --> 00:24:59.420
<v Aaron van Wirdum>then you can correct me if I'm wrong. So BOLT12, there's a new proposed BOLT12.

00:24:59.660 --> 00:25:03.640
<v Aaron van Wirdum>It's actually implemented in C-Lightning already, I think.

00:25:04.380 --> 00:25:07.260
<v Sjors Provoost>Yep. But it's not experimental, but yeah.

00:25:07.660 --> 00:25:11.560
<v Aaron van Wirdum>Yeah, but that's the only implementation that has, the only Lightning

00:25:11.560 --> 00:25:15.680
<v Aaron van Wirdum>implementation that has actually included it so far, right? It's not available

00:25:15.680 --> 00:25:17.800
<v Aaron van Wirdum>for mobile wallets or anything like that yet.

00:25:18.320 --> 00:25:19.000
<v Sjors Provoost>No.

00:25:19.700 --> 00:25:24.470
<v Aaron van Wirdum>Right. And this BOLT 12 is an additional

00:25:24.470 --> 00:25:29.510
<v Aaron van Wirdum>communication, a meta invoice is how you described it previously,

00:25:29.850 --> 00:25:35.700
<v Aaron van Wirdum>that tells... Lightning nodes, which Lightning nodes to

00:25:35.700 --> 00:25:40.740
<v Aaron van Wirdum>connect with or to ask for information about an invoice. And this allows for more

00:25:40.740 --> 00:25:42.820
<v Aaron van Wirdum>flexibility on the invoices itself.

00:25:43.360 --> 00:25:48.240
<v Sjors Provoost>That's right. Or in the case of the, you know, sending a payment,

00:25:49.030 --> 00:25:54.350
<v Sjors Provoost>the BOLT 12 meta invoice basically says who to send the invoice to.

00:25:57.740 --> 00:26:02.140
<v Sjors Provoost>Right. So in the case of the Bitcoin ATM, the BOLT 12 thing will tell you, okay,

00:26:02.240 --> 00:26:07.200
<v Sjors Provoost>this is the ATM node. Please send an invoice to this node and we'll pay it.

00:26:08.950 --> 00:26:14.870
<v Aaron van Wirdum>Yep. And the main problems it solves is it takes care of the fiat

00:26:14.870 --> 00:26:20.590
<v Aaron van Wirdum>volatility. So you can create meta invoices ahead of the time of payment.

00:26:20.870 --> 00:26:26.650
<v Aaron van Wirdum>It takes care of the secret. So you can use the same meta invoice for all my

00:26:26.650 --> 00:26:32.000
<v Aaron van Wirdum>apples. And like you said, you can use a meta invoice to determine who is

00:26:32.000 --> 00:26:37.180
<v Aaron van Wirdum>actually paying who. This is all done using a new extension to the BOLT 7

00:26:37.180 --> 00:26:41.410
<v Aaron van Wirdum>messaging protocol that works on a best effort basis.

00:26:43.390 --> 00:26:46.370
<v Aaron van Wirdum>Is that it? Did I just summarize it?

00:26:46.840 --> 00:26:47.820
<v Sjors Provoost>I think so.

00:26:48.890 --> 00:26:53.850
<v Aaron van Wirdum>Great. Sjors, I think we're done then. We did— Awesome. We did it. We made

00:26:53.850 --> 00:26:54.490
<v Aaron van Wirdum>another episode.

00:26:55.030 --> 00:26:58.730
<v Sjors Provoost>I think so, too. Let's hope the recording worked. Thank you for listening to the

00:26:58.730 --> 00:26:59.890
<v Sjors Provoost>Van Wirdum Sjorsnado.

00:27:00.190 --> 00:27:00.890
<v Aaron van Wirdum>There you go.

