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

00:00:07.250 --> 00:00:09.950
<v Aaron van Wirdum>Live from Utrecht, this is the Van Wirdum Sjorsnado.

00:00:10.950 --> 00:00:11.310
<v Sjors Provoost>Hello.

00:00:12.450 --> 00:00:13.090
<v Aaron van Wirdum>Hey, Sjors.

00:00:14.420 --> 00:00:20.420
<v Aaron van Wirdum>We're recording remotely today. We're not in the same room as we normally are.

00:00:20.920 --> 00:00:23.580
<v Sjors Provoost>Maximum redundancy in case of a nuclear bomb.

00:00:25.020 --> 00:00:27.340
<v Aaron van Wirdum>So we won't be killed both?

00:00:27.890 --> 00:00:30.390
<v Sjors Provoost>Well, I guess we still would be killed both, but yeah.

00:00:30.490 --> 00:00:34.790
<v Aaron van Wirdum>In case of a nuclear bomb. Well, it depends where it's set up. Like maybe one of

00:00:34.790 --> 00:00:38.580
<v Aaron van Wirdum>us is just on the edge and the other one... will survive.

00:00:39.240 --> 00:00:39.600
<v Sjors Provoost>Probably.

00:00:40.000 --> 00:00:45.600
<v Aaron van Wirdum>All right. You just came back from holiday. That's why we skipped two weeks.

00:00:46.460 --> 00:00:46.940
<v Sjors Provoost>Yep.

00:00:47.260 --> 00:00:49.220
<v Aaron van Wirdum>And now you're in self-quarantine. Is that it?

00:00:49.660 --> 00:00:50.660
<v Sjors Provoost>Yeah, semi-quarantine.

00:00:51.700 --> 00:00:55.020
<v Aaron van Wirdum>You're not obligated to be in quarantine, right? It's voluntary.

00:00:55.720 --> 00:00:56.080
<v Sjors Provoost>Yes.

00:00:57.580 --> 00:00:59.820
<v Aaron van Wirdum>Right. You're going to do this for a week?

00:01:00.290 --> 00:01:03.750
<v Sjors Provoost>I think they reduced the limit to 10 days. Should be okay.

00:01:04.410 --> 00:01:07.400
<v Aaron van Wirdum>Yeah, true. Okay, so welcome back.

00:01:07.890 --> 00:01:12.290
<v Sjors Provoost>Yeah, good to be back. Enjoying the weather. It's just rain, rain, rain.

00:01:13.490 --> 00:01:14.850
<v Aaron van Wirdum>Yeah, autumn has set in here.

00:01:15.330 --> 00:01:15.770
<v Sjors Provoost>Yep.

00:01:16.330 --> 00:01:17.850
<v Aaron van Wirdum>What are we going to discuss today, Sjors?

00:01:18.270 --> 00:01:20.890
<v Sjors Provoost>I think we're going to talk about coin pool.

00:01:21.800 --> 00:01:27.360
<v Aaron van Wirdum>Coin pool, yeah. So there's different names for this concept. I wrote an article

00:01:27.360 --> 00:01:29.660
<v Aaron van Wirdum>on it about, what was it, two weeks ago?

00:01:31.040 --> 00:01:36.260
<v Aaron van Wirdum>And there's different people working on this concept in slightly...

00:01:37.580 --> 00:01:42.340
<v Aaron van Wirdum>different ways, focusing on slightly different designs. And they also had

00:01:42.340 --> 00:01:47.790
<v Aaron van Wirdum>slightly different names for it. I've seen different names used like, you just

00:01:47.790 --> 00:01:53.670
<v Aaron van Wirdum>mentioned coin pool, payment pool is one. I think Greg Maxwell called it coin

00:01:53.670 --> 00:01:59.420
<v Aaron van Wirdum>join pools, join pools. That's it. But it's all more or

00:01:59.420 --> 00:02:05.420
<v Aaron van Wirdum>less the same concept or at least it's similar. I've been calling it payment

00:02:05.420 --> 00:02:11.140
<v Aaron van Wirdum>pools as sort of the, I don't know, overlapping name for all of these things. So

00:02:11.140 --> 00:02:13.880
<v Aaron van Wirdum>I suggest we call it payment pools. Are you on board with payment pools?

00:02:14.780 --> 00:02:16.160
<v Sjors Provoost>I don't care what we call it.

00:02:16.680 --> 00:02:19.120
<v Aaron van Wirdum>I care deeply, so let's go with payment pools.

00:02:19.400 --> 00:02:22.620
<v Sjors Provoost>Sounds good. You're the obstinate minority.

00:02:23.340 --> 00:02:26.940
<v Aaron van Wirdum>Yes. All right, so what are payment pools? Do you want to start?

00:02:27.470 --> 00:02:32.830
<v Sjors Provoost>I think the main principle is that you want to share a single UTXO, so a single

00:02:32.830 --> 00:02:34.430
<v Sjors Provoost>coin, with multiple people.

00:02:34.830 --> 00:02:40.330
<v Aaron van Wirdum>Yeah, that's one way to put it, exactly. So there's different people all

00:02:40.330 --> 00:02:46.210
<v Aaron van Wirdum>using one UTXO as their balance. Or at least they're sharing

00:02:46.210 --> 00:02:49.630
<v Aaron van Wirdum>the UTXO. They all have a part of it, right?

00:02:50.570 --> 00:02:51.090
<v Sjors Provoost>Yes.

00:02:51.630 --> 00:02:53.610
<v Aaron van Wirdum>So why would people want to do this?

00:02:54.270 --> 00:02:59.990
<v Sjors Provoost>Well, I can imagine people may want to save on fees, at least when they receive

00:02:59.990 --> 00:03:03.950
<v Sjors Provoost>it, I guess. But I would also imagine people care about privacy.

00:03:05.290 --> 00:03:09.690
<v Sjors Provoost>If the money comes from one place, but multiple people control that one place,

00:03:09.830 --> 00:03:12.490
<v Sjors Provoost>then you don't really know who's in control of it.

00:03:12.810 --> 00:03:17.730
<v Aaron van Wirdum>I guess we'll get into these kinds of benefits later. That's better, right? Sure.

00:03:18.250 --> 00:03:23.190
<v Aaron van Wirdum>Okay, so we want to share for some reason, which is a mystery for now, but which

00:03:23.190 --> 00:03:27.390
<v Aaron van Wirdum>you'll... which we'll explain a little bit later. For some reason, multiple

00:03:27.390 --> 00:03:33.460
<v Aaron van Wirdum>people want to share one UTXO. There are different ways to do this, aren't there?

00:03:34.900 --> 00:03:35.340
<v Sjors Provoost>Yeah, there are.

00:03:35.860 --> 00:03:40.380
<v Aaron van Wirdum>Even before payment pools, there are different solutions to do something like this, right?

00:03:40.860 --> 00:03:45.640
<v Sjors Provoost>Yeah, I mean, we can go back to what we said a few episodes ago. When you receive

00:03:45.640 --> 00:03:51.390
<v Sjors Provoost>Bitcoin, really what you're doing is you're adding constraints. To where those

00:03:51.390 --> 00:03:55.830
<v Sjors Provoost>coins go and those constraints could be such that only you can spend it But those

00:03:55.830 --> 00:03:59.430
<v Sjors Provoost>constraints can also be such that multiple people can spend it and the easiest

00:03:59.430 --> 00:04:04.370
<v Sjors Provoost>way to do that That is a multi-sig address Right and multi-sig addresses means

00:04:04.370 --> 00:04:08.770
<v Sjors Provoost>okay. This thing needs two signatures out of the two participants or some other

00:04:08.770 --> 00:04:10.030
<v Sjors Provoost>weird threshold

00:04:10.030 --> 00:04:15.880
<v Aaron van Wirdum>Yes, or two out of three or three out of three or 14 out of 15 or whatever you

00:04:15.880 --> 00:04:21.980
<v Aaron van Wirdum>want to do. I guess that's the limit, right? 15, I think, for regular multi-sig.

00:04:22.460 --> 00:04:26.660
<v Sjors Provoost>Right. The practical limit is determined by, I believe, the maximum number of

00:04:26.660 --> 00:04:30.020
<v Sjors Provoost>signature checkings of the maximum length of the script. I forgot which of the two.

00:04:31.350 --> 00:04:33.290
<v Aaron van Wirdum>Okay. So that's one way to do it.

00:04:34.160 --> 00:04:34.520
<v Sjors Provoost>Yeah.

00:04:34.980 --> 00:04:36.680
<v Aaron van Wirdum>Of course, that's not ideal, right?

00:04:37.550 --> 00:04:39.680
<v Sjors Provoost>Why not? Well, because...

00:04:41.390 --> 00:04:46.430
<v Sjors Provoost>You need both parties to agree. So if one of the two parties stops cooperating,

00:04:46.430 --> 00:04:47.670
<v Sjors Provoost>now the money is locked up.

00:04:48.360 --> 00:04:54.300
<v Aaron van Wirdum>Right, yes. So if we share a multisig address and for some reason I don't respond

00:04:54.300 --> 00:04:59.480
<v Aaron van Wirdum>to your request to spend the money in some way or another, then you've lost your

00:04:59.480 --> 00:05:00.640
<v Aaron van Wirdum>part of the money as well.

00:05:01.120 --> 00:05:05.840
<v Sjors Provoost>Yeah, so you can only use multisig in a very high trust situation.

00:05:06.360 --> 00:05:09.030
<v Aaron van Wirdum>Right. So what's a better way to do it?

00:05:09.840 --> 00:05:13.860
<v Sjors Provoost>Well, you can work with pre-signed transactions. So this gets a little bit close

00:05:13.860 --> 00:05:18.420
<v Sjors Provoost>to how Lightning works. But the idea is that when you put money into the

00:05:18.420 --> 00:05:22.920
<v Sjors Provoost>multisig, before you do that, you both sign a transaction that takes the money

00:05:22.920 --> 00:05:28.740
<v Sjors Provoost>out of the multisig. You sign the part first where it

00:05:28.740 --> 00:05:33.240
<v Sjors Provoost>leads the multisig to your own address. And then once you both have seen that,

00:05:33.360 --> 00:05:36.870
<v Sjors Provoost>you sign the transaction that goes into the multisig. So this is nice. Now you

00:05:36.870 --> 00:05:39.750
<v Sjors Provoost>both have access to your side of the multisig.

00:05:40.030 --> 00:05:45.580
<v Aaron van Wirdum>Yeah, so let's say we both put half Bitcoin in a multisig address.

00:05:45.760 --> 00:05:50.660
<v Aaron van Wirdum>Then we both sign the transaction from this multisig address, spending half a

00:05:50.660 --> 00:05:52.900
<v Aaron van Wirdum>Bitcoin to ourselves, to our own addresses.

00:05:54.120 --> 00:05:59.280
<v Aaron van Wirdum>Once we've signed these... transactions out of the multisig, then we can securely

00:05:59.280 --> 00:06:03.220
<v Aaron van Wirdum>send the money to the multisig because at any point we can broadcast the money

00:06:03.220 --> 00:06:07.860
<v Aaron van Wirdum>that spends the money from the multisig. I think I'm making it more complicated

00:06:07.860 --> 00:06:09.540
<v Aaron van Wirdum>than it needs to be, but that's how it would work.

00:06:09.920 --> 00:06:15.880
<v Sjors Provoost>Yeah, and the question now is, okay, we've put in half each, but

00:06:15.880 --> 00:06:20.210
<v Sjors Provoost>the only way we can take it out is, again, half each. But there are ways, and

00:06:20.210 --> 00:06:23.070
<v Sjors Provoost>maybe we don't want to describe them in too much detail, that you can actually

00:06:23.070 --> 00:06:28.990
<v Sjors Provoost>update these amounts and make sure that, say, you transfer 0.1 Bitcoin

00:06:28.990 --> 00:06:34.010
<v Sjors Provoost>to me. Now I have 0.6, you have 0.4. And there are ways that we can

00:06:34.010 --> 00:06:39.930
<v Sjors Provoost>change the signed transactions that we have and make sure that you don't use

00:06:39.930 --> 00:06:44.480
<v Sjors Provoost>the previous one. So that way we have a payment channel, essentially, between us.

00:06:44.480 --> 00:06:48.740
<v Aaron van Wirdum>Yes, this is basically how Lightning works. This is the payment channel part of Lightning.

00:06:49.240 --> 00:06:55.240
<v Sjors Provoost>Yeah, exactly. Okay. Well, so this really is a smart contract. It's

00:06:55.240 --> 00:07:00.820
<v Sjors Provoost>a loaded term. But the thing is, when you send to

00:07:00.820 --> 00:07:06.590
<v Sjors Provoost>this shared address on the blockchain, all you're seeing is a script hash. So

00:07:06.590 --> 00:07:10.710
<v Sjors Provoost>that's very private. But the second we start spending from it, some of the

00:07:10.710 --> 00:07:15.570
<v Sjors Provoost>details become more obvious. Because you can see that there were two signatures

00:07:15.570 --> 00:07:20.530
<v Sjors Provoost>required. As soon as you spend a coin, you have to reveal the script that is

00:07:20.530 --> 00:07:23.490
<v Sjors Provoost>needed to spend it. So you lose the privacy of a script hash.

00:07:24.270 --> 00:07:27.930
<v Aaron van Wirdum>Yeah, well, I would say there are two problems, right? So you lose the privacy

00:07:27.930 --> 00:07:32.900
<v Aaron van Wirdum>because anyone can see... what all of the details of the smart contract in this

00:07:32.900 --> 00:07:38.180
<v Aaron van Wirdum>example were. Plus, it's not very compact because all of the possible ways in

00:07:38.180 --> 00:07:42.260
<v Aaron van Wirdum>which the money could have been spent are included in this transaction as well.

00:07:42.620 --> 00:07:48.100
<v Sjors Provoost>Correct. Yeah. So if you have a 15 out of 15 multi-sig, now when you're spending

00:07:48.100 --> 00:07:51.940
<v Sjors Provoost>it, there needs to be 15 signatures on the blockchain plus 15 public keys.

00:07:52.480 --> 00:07:52.960
<v Aaron van Wirdum>Right.

00:07:53.040 --> 00:07:54.060
<v Sjors Provoost>It's pretty tedious.

00:07:54.740 --> 00:07:57.460
<v Aaron van Wirdum>Yes. Okay. So this is where we get at payment pools, right?

00:07:57.900 --> 00:07:58.320
<v Sjors Provoost>Yes.

00:07:58.940 --> 00:08:04.790
<v Aaron van Wirdum>Yeah. Okay. So payment pools are this way of sharing a UTXO

00:08:04.790 --> 00:08:10.780
<v Aaron van Wirdum>with, say, 15 people in this case. But you do it in such a way

00:08:10.780 --> 00:08:14.220
<v Aaron van Wirdum>that you maintain privacy and it remains compact.

00:08:14.540 --> 00:08:14.880
<v Sjors Provoost>Yeah.

00:08:15.730 --> 00:08:16.090
<v Aaron van Wirdum>Okay.

00:08:16.430 --> 00:08:18.010
<v Sjors Provoost>And for that Taproot, it's quite useful.

00:08:19.160 --> 00:08:22.840
<v Aaron van Wirdum>Yes. So that's one of the interesting things about this proposal is that it's one

00:08:22.840 --> 00:08:28.360
<v Aaron van Wirdum>of the first sort of proposals that uses Taproot in a very interesting way.

00:08:30.410 --> 00:08:35.430
<v Sjors Provoost>Yes, Taproot offers better privacy and it offers a way to put, just to jam a lot

00:08:35.430 --> 00:08:38.650
<v Sjors Provoost>more info into the script. We've talked about this in previous episodes,

00:08:39.690 --> 00:08:41.850
<v Sjors Provoost>especially the Merkle tree aspect of it.

00:08:43.930 --> 00:08:48.650
<v Sjors Provoost>So, you know, when you do an update, if everybody agrees, you produce a single

00:08:48.650 --> 00:08:52.830
<v Sjors Provoost>signature that is like a multi-signature, but it looks like a single signature.

00:08:52.950 --> 00:08:56.150
<v Sjors Provoost>So nobody knows whether there were a hundred participants or just one.

00:08:58.310 --> 00:09:02.170
<v Sjors Provoost>And you can have all these branches that when each person takes money out,

00:09:02.410 --> 00:09:06.350
<v Sjors Provoost>that'll be one branch of the tree, but you can't see how many branches there were

00:09:06.350 --> 00:09:10.270
<v Sjors Provoost>in the tree. So even if one person leaves, you still can't see how many people

00:09:10.270 --> 00:09:13.430
<v Sjors Provoost>there were in there. So that's kind of the general thing that you can hide with

00:09:13.430 --> 00:09:13.890
<v Sjors Provoost>Taproot.

00:09:15.410 --> 00:09:20.110
<v Aaron van Wirdum>Okay, so now we're in this pool with 15 of us. There's 15 people in the pool.

00:09:21.790 --> 00:09:26.690
<v Aaron van Wirdum>It's a fantastic pool. I love this pool. Now let's get to the actual benefits. We

00:09:26.690 --> 00:09:31.590
<v Aaron van Wirdum>promised to get to the benefits. Now's a good time. So what are the actual

00:09:31.590 --> 00:09:34.570
<v Aaron van Wirdum>benefits of sharing this UTXO with 15 of us?

00:09:36.090 --> 00:09:38.890
<v Aaron van Wirdum>Or what can we do with it? What can we do with it?

00:09:39.090 --> 00:09:43.830
<v Sjors Provoost>Yeah. So let's say, yeah, there's 15 people in this pool and we want to pay the

00:09:43.830 --> 00:09:44.330
<v Sjors Provoost>supermarket.

00:09:45.050 --> 00:09:47.330
<v Aaron van Wirdum>Well, one of us wants to pay the supermarket.

00:09:47.450 --> 00:09:50.510
<v Sjors Provoost>Exactly. One of us wants to pay the supermarket. And from the outside world,

00:09:50.710 --> 00:09:56.030
<v Sjors Provoost>that's just a payment to the supermarket. from one address so the outside world

00:09:56.030 --> 00:09:59.110
<v Sjors Provoost>has no idea which of the 15 people were paying the supermarket

00:09:59.110 --> 00:10:04.950
<v Aaron van Wirdum>and internally right so that's the balance yes exactly so internally we all have

00:10:04.950 --> 00:10:10.890
<v Aaron van Wirdum>this balance we all know which of the 15 of us owns which part of the utxo right

00:10:10.890 --> 00:10:11.690
<v Sjors Provoost>yes

00:10:11.690 --> 00:10:16.390
<v Aaron van Wirdum>then right and we'll get to how that's secured later again i'm

00:10:17.270 --> 00:10:21.650
<v Aaron van Wirdum>Dear listeners, we're getting to that one thing at a time. So right now, we all

00:10:21.650 --> 00:10:25.850
<v Aaron van Wirdum>have this balance of who owns what within this pool. Now, one of us wants to pay

00:10:25.850 --> 00:10:31.840
<v Aaron van Wirdum>the supermarket. So the 15 of us come together. We agree to make a transaction

00:10:31.840 --> 00:10:37.520
<v Aaron van Wirdum>to the supermarket. Plus, we send change back to

00:10:37.520 --> 00:10:43.320
<v Aaron van Wirdum>ourselves, to the pool. This change, once again, is allocated between the 15 of

00:10:43.320 --> 00:10:47.980
<v Aaron van Wirdum>us. So let's say Sjors was the one who wanted to pay the supermarket. Then the

00:10:47.980 --> 00:10:53.340
<v Aaron van Wirdum>transaction we make sends money to the supermarket, sends the rest of all of the

00:10:53.340 --> 00:10:58.360
<v Aaron van Wirdum>funds to us. But this time the pool is allocated in such a way that Sjors gets a

00:10:58.360 --> 00:11:02.440
<v Aaron van Wirdum>little bit less money from the shared UTXO because Sjors just paid the

00:11:02.440 --> 00:11:06.860
<v Aaron van Wirdum>supermarket and we didn't. So only Sjors gets his balance decreased. Right?

00:11:07.120 --> 00:11:11.080
<v Aaron van Wirdum>That's it. That's how it works. That's one benefit. And to be clear, so the

00:11:11.080 --> 00:11:16.970
<v Aaron van Wirdum>benefit here is that from the outside world, anyone analyzing the blockchain

00:11:16.970 --> 00:11:22.660
<v Aaron van Wirdum>will not be able to see... They won't even be able to see there were 15 of us in

00:11:22.660 --> 00:11:28.140
<v Aaron van Wirdum>the pool. It might look like a completely normal transaction to anyone

00:11:28.140 --> 00:11:32.780
<v Aaron van Wirdum>analyzing the blockchain. So they may think that some individual paid the

00:11:32.780 --> 00:11:37.440
<v Aaron van Wirdum>supermarkets. But even if they were somehow able to see that it was a pool that

00:11:37.440 --> 00:11:42.330
<v Aaron van Wirdum>included 15 people... then they still wouldn't be able to see that it was Sjors

00:11:42.330 --> 00:11:46.650
<v Aaron van Wirdum>who paid the supermarkets. It could have been any of the people in the pool, even

00:11:46.650 --> 00:11:48.370
<v Aaron van Wirdum>if they were able to tell that it was a pool.

00:11:48.570 --> 00:11:50.090
<v Sjors Provoost>So it's a little bit like a mixer.

00:11:51.770 --> 00:11:55.470
<v Aaron van Wirdum>Exactly, yeah. So that's why Greg Maxwell, for example, was referring to it as

00:11:55.470 --> 00:12:01.310
<v Aaron van Wirdum>join pool. It's kind of like a coin join pool. People coin join their coins in

00:12:01.310 --> 00:12:05.570
<v Aaron van Wirdum>this pool, and one of them makes a payment, and you can't tell who actually made the payment.

00:12:06.050 --> 00:12:06.450
<v Sjors Provoost>Yeah.

00:12:07.000 --> 00:12:11.980
<v Aaron van Wirdum>Right. So that's one obvious benefit. Next benefit. Is there another benefit, Sjors?

00:12:12.380 --> 00:12:17.800
<v Sjors Provoost>Well, I could pay you inside of the pool. So to the outside world, nothing

00:12:17.800 --> 00:12:18.260
<v Sjors Provoost>changes.

00:12:19.060 --> 00:12:24.250
<v Aaron van Wirdum>Right. So to the outside world, for now, let's assume on-chain

00:12:24.250 --> 00:12:25.250
<v Aaron van Wirdum>updates.

00:12:25.810 --> 00:12:29.290
<v Sjors Provoost>Yeah, for an on-chain update for the outside world, all the money just moves

00:12:29.290 --> 00:12:29.770
<v Sjors Provoost>once.

00:12:30.150 --> 00:12:35.560
<v Aaron van Wirdum>Yeah, all the money just moves to a new address. The 15 of us in the pool, we all

00:12:35.560 --> 00:12:41.480
<v Aaron van Wirdum>know that the balance has changed. The attribution between us

00:12:41.480 --> 00:12:45.780
<v Aaron van Wirdum>changed, but you just see a completely normal transaction. So anyone analyzing a

00:12:45.780 --> 00:12:49.280
<v Aaron van Wirdum>blockchain won't know who paid who or how much.

00:12:49.980 --> 00:12:54.160
<v Sjors Provoost>Exactly. And the reason why you need an on-chain transaction is to keep things

00:12:54.160 --> 00:12:58.740
<v Sjors Provoost>simpler. Because remember, we all have this pre-signed transaction that gives us

00:12:58.740 --> 00:13:03.760
<v Sjors Provoost>our share back. And the pre-signed transaction has to refer to... something on

00:13:03.760 --> 00:13:08.240
<v Sjors Provoost>the blockchain so the old pre-signed transactions with the wrong balance

00:13:08.240 --> 00:13:09.100
<v Aaron van Wirdum>yes

00:13:09.100 --> 00:13:13.220
<v Sjors Provoost>was invalid the way you do that is you put a new transaction on the blockchain so

00:13:13.220 --> 00:13:17.220
<v Sjors Provoost>that those old transactions are no longer spendable because they will be double

00:13:17.220 --> 00:13:20.460
<v Sjors Provoost>spends and you have a set of new transactions that pay everybody

00:13:20.500 --> 00:13:21.520
<v Aaron van Wirdum>yeah

00:13:21.520 --> 00:13:25.560
<v Sjors Provoost>that's really inefficient and you can use a lightning-like protocol to not have

00:13:25.560 --> 00:13:30.000
<v Sjors Provoost>to do that but just to understand why the easiest thing is to just make a new

00:13:30.000 --> 00:13:34.340
<v Sjors Provoost>transaction on the blockchain So then somebody can leave the pool.

00:13:35.050 --> 00:13:38.270
<v Aaron van Wirdum>Right, that's the next thing you can do.

00:13:38.610 --> 00:13:42.850
<v Sjors Provoost>And you can do that. You can agree on that. Then it's one transaction goes to

00:13:42.850 --> 00:13:47.370
<v Sjors Provoost>that person and the rest goes back into the pool. Or somebody can leave.

00:13:48.130 --> 00:13:52.130
<v Aaron van Wirdum>Well, let's keep to that collaboratively first. So that's like paying the

00:13:52.130 --> 00:13:56.400
<v Aaron van Wirdum>supermarket like before, except this time you're actually paying someone. from

00:13:56.400 --> 00:14:00.200
<v Aaron van Wirdum>the pool, and now in the new balance, that person doesn't have a balance anymore.

00:14:00.420 --> 00:14:02.440
<v Aaron van Wirdum>So that's how someone just exited the pool, right?

00:14:02.620 --> 00:14:02.840
<v Sjors Provoost>Exactly.

00:14:03.660 --> 00:14:03.840
<v Aaron van Wirdum>Okay.

00:14:04.980 --> 00:14:06.160
<v Sjors Provoost>Somebody can join the pool.

00:14:06.880 --> 00:14:12.540
<v Aaron van Wirdum>Yep. Someone can join the pool. Same basic idea, except this time, the

00:14:12.540 --> 00:14:18.500
<v Aaron van Wirdum>person joining the pool actually needs to partake in the transaction, spending

00:14:18.500 --> 00:14:23.000
<v Aaron van Wirdum>to the new pool. So in the previous example, someone is getting money out of the

00:14:23.000 --> 00:14:28.890
<v Aaron van Wirdum>pool. In this case, someone needs to add money to the pool. So someone needs to

00:14:28.890 --> 00:14:33.650
<v Aaron van Wirdum>collaborate with everyone in the pool to make a new transaction to a new pool in

00:14:33.650 --> 00:14:36.010
<v Aaron van Wirdum>which they also have a balance now, right?

00:14:36.470 --> 00:14:36.850
<v Sjors Provoost>Yes.

00:14:37.290 --> 00:14:38.030
<v Aaron van Wirdum>Is there any other?

00:14:38.820 --> 00:14:42.400
<v Sjors Provoost>Well, somebody might, because we talked about these pre-signed transactions,

00:14:42.940 --> 00:14:46.920
<v Sjors Provoost>somebody might change their mind on what their pre-signed transaction look like.

00:14:47.120 --> 00:14:51.580
<v Sjors Provoost>So that's the, you know, if they want to take the money out unilaterally, they

00:14:51.580 --> 00:14:55.700
<v Sjors Provoost>have to decide in advance where that goes, which address. Maybe they want a

00:14:55.700 --> 00:14:57.780
<v Sjors Provoost>different address. So that can be arranged.

00:14:58.140 --> 00:15:03.760
<v Aaron van Wirdum>Yeah. Well, I think a slightly easier way to think of it is that everyone in

00:15:03.760 --> 00:15:09.160
<v Aaron van Wirdum>the pool. basically has their own withdrawal address which is their

00:15:09.160 --> 00:15:15.080
<v Aaron van Wirdum>unilateral withdrawal address right so this address

00:15:15.080 --> 00:15:21.040
<v Aaron van Wirdum>can be their own personal wallet but it could for

00:15:21.040 --> 00:15:27.000
<v Aaron van Wirdum>example also be other types of things like it could be a vault so in one pool i'm

00:15:27.000 --> 00:15:30.320
<v Aaron van Wirdum>a participant of the pool and i have my withdrawal address which is also

00:15:30.320 --> 00:15:36.210
<v Aaron van Wirdum>addressing my wallet But we could agree to upgrade the pool to a new pool

00:15:36.210 --> 00:15:41.230
<v Aaron van Wirdum>where my withdrawal address changes to, for example, some sort of smart contract

00:15:41.230 --> 00:15:44.950
<v Aaron van Wirdum>vault. So that way you can also change the pool. So that's sort of the

00:15:44.950 --> 00:15:49.870
<v Aaron van Wirdum>interesting thing about the pool. Everyone's in the pool and as long as everyone

00:15:49.870 --> 00:15:54.790
<v Aaron van Wirdum>agrees, you can update the pool to a new pool with all sorts of new stuff,

00:15:55.010 --> 00:15:59.030
<v Aaron van Wirdum>including new withdrawal addresses, including new participants, including new

00:15:59.030 --> 00:16:04.270
<v Aaron van Wirdum>balances, including all sorts of new stuff. Every time that happens, if we're

00:16:04.270 --> 00:16:08.270
<v Aaron van Wirdum>assuming we're doing it on-chain, every time it happens, it looks like a regular

00:16:08.270 --> 00:16:09.250
<v Aaron van Wirdum>transaction on blockchain.

00:16:10.510 --> 00:16:13.150
<v Sjors Provoost>And every time you do it, you have to coordinate.

00:16:13.730 --> 00:16:16.570
<v Aaron van Wirdum>You need to coordinate in order for it to look like a regular transaction on

00:16:16.570 --> 00:16:17.050
<v Aaron van Wirdum>blockchain, yes.

00:16:18.470 --> 00:16:23.970
<v Sjors Provoost>Okay, so now this is all on-chain, one transaction for every mutation, but we can

00:16:23.970 --> 00:16:28.630
<v Sjors Provoost>make this smarter, as we've hinted at before a few times, by making these changes

00:16:28.630 --> 00:16:33.580
<v Sjors Provoost>off-chain, most of the changes. Probably can't add somebody that way, but

00:16:33.580 --> 00:16:37.480
<v Sjors Provoost>if you're paying somebody outside the pool, it makes sense to do it on-chain.

00:16:38.040 --> 00:16:40.980
<v Aaron van Wirdum>No, I think you can add someone off-chain as well, I think.

00:16:41.970 --> 00:16:46.550
<v Sjors Provoost>It could be. Either way, if you do something off-chain, you use a protocol that's

00:16:46.550 --> 00:16:51.760
<v Sjors Provoost>essentially similar to Lightning, where you change the distribution between all

00:16:51.760 --> 00:16:55.560
<v Sjors Provoost>the participants without sending a new transaction to the blockchain, but you

00:16:55.560 --> 00:16:59.900
<v Sjors Provoost>make sure that if somebody uses the old distribution, that they get punished very

00:16:59.900 --> 00:17:05.810
<v Sjors Provoost>badly, or... With the new SIGHASH no input proposal, they don't get punished, but

00:17:05.810 --> 00:17:11.150
<v Sjors Provoost>they can be corrected. So anytime you try to steal something, somebody can just

00:17:11.150 --> 00:17:13.530
<v Sjors Provoost>broadcast the latest state and get their share.

00:17:14.170 --> 00:17:18.210
<v Aaron van Wirdum>Yeah, so that would require a new Bitcoin protocol upgrade.

00:17:18.630 --> 00:17:20.890
<v Sjors Provoost>Yeah, SIGHASH no input, that's what it's called.

00:17:22.570 --> 00:17:25.350
<v Aaron van Wirdum>No, they changed the name, I think.

00:17:25.770 --> 00:17:28.050
<v Sjors Provoost>Oh, maybe it's anyprevout now.

00:17:28.330 --> 00:17:29.470
<v Aaron van Wirdum>Yeah, I think that's the one.

00:17:29.870 --> 00:17:33.430
<v Sjors Provoost>They'll change that name 15 more times, but eventually we'll hopefully see something.

00:17:33.830 --> 00:17:38.890
<v Aaron van Wirdum>At some point, I wrote an article where I called it the no-input class. It's just

00:17:38.890 --> 00:17:43.770
<v Aaron van Wirdum>a class of potential upgrades that'll do more or less the same thing. Do you know

00:17:43.770 --> 00:17:45.730
<v Aaron van Wirdum>what the status is of this upgrade idea?

00:17:46.110 --> 00:17:50.690
<v Sjors Provoost>No, but I hear there's a podcast where two guys dive into all these technical

00:17:50.690 --> 00:17:53.390
<v Sjors Provoost>proposals, so maybe they can do an episode about this.

00:17:53.590 --> 00:17:55.630
<v Aaron van Wirdum>Maybe one time.

00:17:56.130 --> 00:18:01.110
<v Sjors Provoost>Yeah. So another cool thing, because if you can do all this stuff off-chain,

00:18:01.430 --> 00:18:03.630
<v Sjors Provoost>maybe you can also do lightning channels.

00:18:04.370 --> 00:18:04.850
<v Aaron van Wirdum>Right.

00:18:05.190 --> 00:18:05.430
<v Sjors Provoost>Yeah,

00:18:05.610 --> 00:18:09.690
<v Aaron van Wirdum>because we were just discussing that you have this withdrawal address. So if this

00:18:09.690 --> 00:18:14.110
<v Aaron van Wirdum>withdrawal address is actually a lightning channel, then you sort of could host

00:18:14.110 --> 00:18:16.310
<v Aaron van Wirdum>the lightning channel within this payment pool.

00:18:16.570 --> 00:18:20.410
<v Sjors Provoost>Yes, that's one way. And you could also have a virtual lightning channel. At

00:18:20.410 --> 00:18:22.270
<v Sjors Provoost>least that was discussed on the mailing list.

00:18:23.470 --> 00:18:27.740
<v Sjors Provoost>So between two people inside the pool. They could pretend that they have opened a

00:18:27.740 --> 00:18:32.280
<v Sjors Provoost>lightning channel in a sense. So the outside world doesn't really see anything

00:18:32.280 --> 00:18:35.660
<v Sjors Provoost>happening on the chain. But the two of you agree that this lightning channel

00:18:35.660 --> 00:18:40.600
<v Sjors Provoost>exists. And now, say the two of us, can be sending money back and forth without

00:18:40.600 --> 00:18:44.080
<v Sjors Provoost>talking to the rest of the pool. That's the nice thing about having a virtual

00:18:44.080 --> 00:18:48.000
<v Sjors Provoost>lightning channel in there. We don't have to involve the rest of the pool because

00:18:48.000 --> 00:18:50.700
<v Sjors Provoost>our distribution doesn't change only when we close the channel.

00:18:51.120 --> 00:18:56.400
<v Aaron van Wirdum>Yes, but that's sort of the withdrawal address you're using for that then, right?

00:18:56.860 --> 00:18:59.000
<v Aaron van Wirdum>That's where the lightning channel is embedded in.

00:18:59.360 --> 00:19:01.760
<v Sjors Provoost>Yeah, you have to both commit to that new withdrawal address.

00:19:02.280 --> 00:19:06.340
<v Aaron van Wirdum>Yeah, so we've just listed a bunch of benefits. You know, you can pay someone,

00:19:06.720 --> 00:19:11.960
<v Aaron van Wirdum>you can change balances between people in the pool, you can, whatever else we

00:19:11.960 --> 00:19:16.460
<v Aaron van Wirdum>discussed. So this is really the cool thing that Sjors mentioned right here is

00:19:16.460 --> 00:19:21.340
<v Aaron van Wirdum>that you can embed other second layer protocols like lightning channels in there.

00:19:21.720 --> 00:19:26.000
<v Sjors Provoost>Yeah, and in theory, that could produce some extra scaling capacity for

00:19:26.000 --> 00:19:30.460
<v Sjors Provoost>Lightning. Because right now, every time you open or close a channel, you have a

00:19:30.460 --> 00:19:36.020
<v Sjors Provoost>UTXO that you need to create or spend. And the idea here would be that

00:19:36.020 --> 00:19:41.540
<v Sjors Provoost>maybe some of the channels, multiple channels might be able to share a UTXO.

00:19:41.720 --> 00:19:46.440
<v Sjors Provoost>And thus, you can have more channels per UTXO. So right now, we don't really have

00:19:46.440 --> 00:19:50.970
<v Sjors Provoost>a scaling, practical scaling problem yet. But it's nice to know that this might

00:19:50.970 --> 00:19:52.570
<v Sjors Provoost>buy us another order of magnitude.

00:19:53.990 --> 00:19:59.010
<v Aaron van Wirdum>Yes, exactly. Plus, it could buy you more privacy because it's not clear to

00:19:59.010 --> 00:20:02.410
<v Aaron van Wirdum>anyone analyzing the blockchain that the Lightning channel is hosted there.

00:20:03.480 --> 00:20:05.900
<v Sjors Provoost>Right, at least it makes their headaches bigger.

00:20:07.340 --> 00:20:11.980
<v Aaron van Wirdum>Which is always good. All right, so there are different ways to actually

00:20:11.980 --> 00:20:12.660
<v Aaron van Wirdum>accomplish this.

00:20:13.500 --> 00:20:17.100
<v Sjors Provoost>Yeah, and maybe this is also the good time to bring the bad news. There really

00:20:17.100 --> 00:20:22.640
<v Sjors Provoost>isn't any working system out there yet that does this, partially because we still

00:20:22.640 --> 00:20:26.710
<v Sjors Provoost>need Taproot, because it just makes it... Otherwise, it's not terribly useful.

00:20:27.430 --> 00:20:33.100
<v Aaron van Wirdum>Yeah, it's built on Taproot. That's where the benefits of the private updates

00:20:33.100 --> 00:20:34.900
<v Aaron van Wirdum>come from. Am I saying that right?

00:20:35.280 --> 00:20:36.040
<v Sjors Provoost>Yeah, I'd say so.

00:20:36.160 --> 00:20:41.660
<v Aaron van Wirdum>Like the collaborative updates of the state of the pool, so whatever the pool is,

00:20:41.820 --> 00:20:45.270
<v Aaron van Wirdum>can update without... revealing the update and all.

00:20:45.570 --> 00:20:50.150
<v Sjors Provoost>Especially if everybody agrees, then it's very nice, this Taproot feature that

00:20:50.150 --> 00:20:53.130
<v Sjors Provoost>uses Schnorr where you can combine signatures and make it look like one

00:20:53.130 --> 00:20:56.890
<v Sjors Provoost>signature. Because otherwise, if you have three participants, you could make a

00:20:56.890 --> 00:21:01.730
<v Sjors Provoost>pool without Taproot. But every time you do something at the pool, it's

00:21:01.730 --> 00:21:06.010
<v Sjors Provoost>completely obvious how many people there are in the pool and what they're doing.

00:21:07.130 --> 00:21:09.530
<v Aaron van Wirdum>So basically, there are three different designs.

00:21:10.650 --> 00:21:15.610
<v Sjors Provoost>Yeah, I'd say so. So let's start with the first one. Or not the first one per se,

00:21:15.630 --> 00:21:17.230
<v Sjors Provoost>but the first one on the mailing list.

00:21:18.040 --> 00:21:23.560
<v Aaron van Wirdum>So to be clear, the challenge that we're trying to solve here is, if you have a

00:21:23.560 --> 00:21:29.300
<v Aaron van Wirdum>share of the pool, how are you guaranteed to get that share out, right?

00:21:29.400 --> 00:21:34.980
<v Aaron van Wirdum>If others don't collaborate. That's what you want to ensure. That's sort of the trick.

00:21:35.430 --> 00:21:40.710
<v Sjors Provoost>Yeah, if everybody agrees, everything is possible because then we just signed a

00:21:40.710 --> 00:21:41.250
<v Sjors Provoost>new transaction.

00:21:41.950 --> 00:21:45.170
<v Aaron van Wirdum>Exactly. But what if not everyone agrees? That's what you want to...

00:21:45.170 --> 00:21:49.910
<v Sjors Provoost>Yeah, and not just disagree. People just tend to go offline and stuff like that.

00:21:50.430 --> 00:21:54.190
<v Sjors Provoost>The first proposal proposed, I think, by Antoine Riard.

00:21:54.770 --> 00:21:57.330
<v Aaron van Wirdum>Well, no, let's start with the simplest solution.

00:21:58.580 --> 00:22:03.200
<v Aaron van Wirdum>The simplest solution is if someone wants out of the pool...

00:22:03.200 --> 00:22:03.560
<v Sjors Provoost>Oh, yeah.

00:22:04.660 --> 00:22:10.380
<v Aaron van Wirdum>someone wants out of the pool, then they publish a transaction from that pool

00:22:10.380 --> 00:22:16.200
<v Aaron van Wirdum>that just gives everyone their share of coins back. So if there were 15 of us in

00:22:16.200 --> 00:22:22.040
<v Aaron van Wirdum>the pool, then we've created this transaction from the pool that pays all 15 of

00:22:22.040 --> 00:22:27.270
<v Aaron van Wirdum>us our balance. We all have this transaction. So if any one of us wants out,

00:22:27.810 --> 00:22:33.610
<v Aaron van Wirdum>everyone is out. Everyone just gets their transaction. to their own address.

00:22:33.890 --> 00:22:37.950
<v Sjors Provoost>And this is exactly one pre-signed transaction that everybody has.

00:22:38.250 --> 00:22:40.510
<v Aaron van Wirdum>Exactly. So that's very simple.

00:22:40.690 --> 00:22:44.030
<v Sjors Provoost>But the problem, of course, is that now one person leaves and it sucks for

00:22:44.030 --> 00:22:44.630
<v Sjors Provoost>everybody else.

00:22:45.900 --> 00:22:49.080
<v Aaron van Wirdum>Exactly. Right. So a very extreme opposite.

00:22:49.690 --> 00:22:55.590
<v Sjors Provoost>So this is a proposal that I just mentioned, where everybody can exit,

00:22:55.790 --> 00:23:01.410
<v Sjors Provoost>and not just that, everybody can exit in an arbitrary order. So that means that

00:23:01.410 --> 00:23:05.990
<v Sjors Provoost>you need to pre-sign transactions for all the following scenarios. So if there's

00:23:05.990 --> 00:23:08.870
<v Sjors Provoost>three people that I leave first, and then you leave, and then the third person

00:23:08.870 --> 00:23:13.170
<v Sjors Provoost>leaves, or that the third person leaves first, and then you leave, and then I

00:23:13.170 --> 00:23:15.550
<v Sjors Provoost>leave, et cetera, all these combinations.

00:23:16.300 --> 00:23:22.120
<v Aaron van Wirdum>Every single combination, every single order of exit must have been

00:23:22.120 --> 00:23:23.020
<v Aaron van Wirdum>accounted for.

00:23:24.150 --> 00:23:28.730
<v Sjors Provoost>And must have a pre-signed transaction for that you have to hold on to. Because

00:23:28.730 --> 00:23:33.230
<v Sjors Provoost>once you see one of those transactions go on the blockchain, you need to know if

00:23:33.230 --> 00:23:37.170
<v Sjors Provoost>you want to leave next, you need to then pick your transaction for leaving next.

00:23:38.120 --> 00:23:43.540
<v Sjors Provoost>This scales with about the number of participants, factorial. If there's 10

00:23:43.540 --> 00:23:48.300
<v Sjors Provoost>people, that's like 10 times 9 times 8 times 7 times 6 times 5. It's a very, very

00:23:48.300 --> 00:23:53.020
<v Sjors Provoost>big number. You very quickly have to have millions of pre-signed transactions.

00:23:53.840 --> 00:23:57.800
<v Sjors Provoost>And that's not fun because signing a million transactions and holding on to them

00:23:57.800 --> 00:24:00.440
<v Sjors Provoost>is a nightmare. Right.

00:24:01.020 --> 00:24:06.760
<v Aaron van Wirdum>Yeah, so to put it in other words, the challenge here is that if there's

00:24:06.760 --> 00:24:12.640
<v Aaron van Wirdum>15 of us... then all 15 of us must have this transaction where

00:24:12.640 --> 00:24:17.600
<v Aaron van Wirdum>we exit, but the other 14 are sent to a new pool.

00:24:18.170 --> 00:24:24.000
<v Aaron van Wirdum>And this new pool must also have all of the participants in the

00:24:24.000 --> 00:24:29.940
<v Aaron van Wirdum>pool must have pre-signed transactions that would let them exit the pool and send

00:24:29.940 --> 00:24:35.920
<v Aaron van Wirdum>the other 13 to a new pool. And then in the new pool... These

00:24:35.920 --> 00:24:40.420
<v Aaron van Wirdum>13 people must all have their own pre-signed transactions.

00:24:42.400 --> 00:24:48.350
<v Aaron van Wirdum>So you need scenarios for scenarios for scenarios for every

00:24:48.350 --> 00:24:53.750
<v Aaron van Wirdum>possible scenario of every possible exit that could happen in any order.

00:24:54.220 --> 00:24:55.320
<v Aaron van Wirdum>That scales horribly.

00:24:55.940 --> 00:25:01.620
<v Sjors Provoost>Yeah, that's pretty bad. Everybody knows the picture of the chessboard where you

00:25:01.620 --> 00:25:07.380
<v Sjors Provoost>double for every square on the chessboard the number of grains of rice. But this

00:25:07.380 --> 00:25:09.260
<v Sjors Provoost>scale is significantly worse than that.

00:25:10.000 --> 00:25:14.780
<v Aaron van Wirdum>Right. Okay. But in theory, at least for a small number of participants, you

00:25:14.780 --> 00:25:15.440
<v Aaron van Wirdum>could do this.

00:25:15.840 --> 00:25:20.860
<v Sjors Provoost>Yes. And thanks to the Merkle tree, where you can hide all the conditions, at

00:25:20.860 --> 00:25:24.360
<v Sjors Provoost>least the tree itself, what ends up on the blockchain would every time be quite

00:25:24.360 --> 00:25:28.380
<v Sjors Provoost>small. Because of all the combinations, you only put one on the blockchain.

00:25:29.810 --> 00:25:31.890
<v Aaron van Wirdum>Yeah, so it's possible for a handful of people.

00:25:32.450 --> 00:25:37.550
<v Sjors Provoost>Yeah, and it's very flexible, but maybe a bit overkill. Because remember now,

00:25:37.690 --> 00:25:41.690
<v Sjors Provoost>every time you update this contract, so every time you want to pay a supermarket,

00:25:41.690 --> 00:25:45.810
<v Sjors Provoost>you again have to sign these million transactions and go through the whole tree.

00:25:47.930 --> 00:25:52.190
<v Aaron van Wirdum>Right, yes, exactly. Every time an update happens, you need to create all of the

00:25:52.190 --> 00:25:53.130
<v Aaron van Wirdum>new exit scenarios.

00:25:53.980 --> 00:25:58.260
<v Sjors Provoost>And the scenarios on the scenarios, yes. Yeah. By the way, it was Antoine, but

00:25:58.260 --> 00:25:59.380
<v Sjors Provoost>also Gleb Naumenko.

00:25:59.540 --> 00:26:00.440
<v Aaron van Wirdum>Gleb Naumenko, yes.

00:26:00.560 --> 00:26:04.640
<v Sjors Provoost>So enter Jeremy Rubin, who has also been working on this problem, sort of around

00:26:04.640 --> 00:26:09.140
<v Sjors Provoost>the same time, maybe earlier, maybe later. And he says, well, let's make it a

00:26:09.140 --> 00:26:14.740
<v Sjors Provoost>little bit less optimal or a little bit less ideal. Instead of everybody can

00:26:14.740 --> 00:26:20.570
<v Sjors Provoost>leave in any order, we say, no, if you leave, then a part of the

00:26:20.570 --> 00:26:26.380
<v Sjors Provoost>tree has to leave. And so this could be half the tree has to leave because you

00:26:26.380 --> 00:26:31.580
<v Sjors Provoost>split the whole thing in two. It could be a quarter if you split it in four. And

00:26:31.580 --> 00:26:37.160
<v Sjors Provoost>you can use multiple steps, right? So you can say, well, there are three steps.

00:26:37.830 --> 00:26:42.470
<v Sjors Provoost>And for each step, there's three people in it. So you can make the tree have more

00:26:42.470 --> 00:26:47.210
<v Sjors Provoost>branches at every step. Or you can have the tree have longer branches with

00:26:47.210 --> 00:26:49.550
<v Sjors Provoost>multiple steps. Anyway, you can do trade-offs there.

00:26:50.450 --> 00:26:56.130
<v Aaron van Wirdum>yeah so to be clear what this means is in the you just mentioned you know half

00:26:56.130 --> 00:27:00.450
<v Aaron van Wirdum>the tree has to leave first that means if there's well 15 is in the round number

00:27:00.450 --> 00:27:06.110
<v Aaron van Wirdum>is it let's say 14 there's 14 of us in the pool then if one of these 14 leaves

00:27:06.670 --> 00:27:11.090
<v Aaron van Wirdum>it means six others will automatically leave as well. They'll also have their

00:27:11.090 --> 00:27:16.250
<v Aaron van Wirdum>funds sent to their own personal wallet. So one person leaves, half of the

00:27:16.250 --> 00:27:21.770
<v Aaron van Wirdum>participants leave. The other half, they're still sent to a new pool. So seven of

00:27:21.770 --> 00:27:27.490
<v Aaron van Wirdum>us is still sent to a new pool with new pool rules. And from

00:27:27.490 --> 00:27:30.330
<v Aaron van Wirdum>there, I guess, well, it depends on how you make the tree structure.

00:27:30.710 --> 00:27:34.130
<v Sjors Provoost>Right. If you have 15 people, you could also have a structure where...

00:27:35.380 --> 00:27:36.340
<v Aaron van Wirdum>5, 5, 5 or...

00:27:36.340 --> 00:27:41.680
<v Sjors Provoost>Yeah, so if one person leaves, one-fifth of the tree leaves instead of half the

00:27:41.680 --> 00:27:42.780
<v Sjors Provoost>tree. Yeah,

00:27:42.920 --> 00:27:43.680
<v Aaron van Wirdum>three, three, three, three, three.

00:27:43.860 --> 00:27:47.880
<v Sjors Provoost>Yes. This is configurable, totally configurable.

00:27:48.800 --> 00:27:54.570
<v Aaron van Wirdum>The point is that by cutting this in half or cutting this in pieces, it quite

00:27:54.570 --> 00:28:00.500
<v Aaron van Wirdum>significantly improves scale. It's still not... Perfect. You still

00:28:00.500 --> 00:28:06.220
<v Aaron van Wirdum>need a lot of preparation, but it's a lot better than allowing everyone

00:28:06.220 --> 00:28:08.220
<v Aaron van Wirdum>to exit in every possible order.

00:28:08.420 --> 00:28:13.380
<v Sjors Provoost>So for the computer science nerds, the plan we just discussed before scales with

00:28:13.380 --> 00:28:17.640
<v Sjors Provoost>number of participants factorial, and this scales with log of the number of

00:28:17.640 --> 00:28:19.830
<v Sjors Provoost>participants. It's a lot better.

00:28:20.070 --> 00:28:23.890
<v Aaron van Wirdum>Well, I was going to say there are protocol upgrades proposed that would improve

00:28:23.890 --> 00:28:26.710
<v Aaron van Wirdum>on this. Is that where you want to get at or is there something else?

00:28:26.710 --> 00:28:32.630
<v Sjors Provoost>Yes. The nice thing is when you use this tree structure, you could use

00:28:32.630 --> 00:28:37.210
<v Sjors Provoost>another proposal called OP_CTV or previously known as OP_SECURETHEBAG.

00:28:38.140 --> 00:28:40.920
<v Aaron van Wirdum>And previously known as something else.

00:28:41.200 --> 00:28:46.460
<v Sjors Provoost>Yeah, the general idea is a covenant, but it's a very specific covenant. And the

00:28:46.460 --> 00:28:51.160
<v Sjors Provoost>general idea of a covenant is that when you're spending coins, you put restraints

00:28:51.160 --> 00:28:55.440
<v Sjors Provoost>on how those coins can be spent in the future. So normally when you spend coins,

00:28:55.680 --> 00:29:00.980
<v Sjors Provoost>the person who receives it can spend it to anything they like. Once you have your

00:29:00.980 --> 00:29:05.220
<v Sjors Provoost>coins, they're really yours. But with covenants, they're not entirely really yours.

00:29:06.500 --> 00:29:12.260
<v Sjors Provoost>and OP_SECURETHEBAG makes this a little bit safer or a little bit less generic.

00:29:12.560 --> 00:29:18.320
<v Sjors Provoost>It just says, okay, here's this tree of how we free everything from the

00:29:18.320 --> 00:29:23.360
<v Sjors Provoost>channel. And if you unleash the first part of the tree, if you reveal the first

00:29:23.360 --> 00:29:28.500
<v Sjors Provoost>part of the tree, then you must also reveal the rest of the tree. So you're pre

00:29:28.500 --> 00:29:33.060
<v Sjors Provoost>-committed to the rest of the tree. And this removes problems with having to race

00:29:33.060 --> 00:29:37.500
<v Sjors Provoost>to get to the blockchain before a certain timeout. Because these coins are

00:29:37.500 --> 00:29:41.780
<v Sjors Provoost>guaranteed to be spent in the right order. So you will get your money out of the

00:29:41.780 --> 00:29:45.660
<v Sjors Provoost>payment pool. If somebody closed the payment pool and you're not paying

00:29:45.660 --> 00:29:49.900
<v Sjors Provoost>attention, it doesn't matter, basically. You'll get your money eventually. You

00:29:49.900 --> 00:29:54.850
<v Sjors Provoost>can do it when fees are low or whenever you need it. So that's what OP_CTV does.

00:29:55.050 --> 00:30:00.340
<v Sjors Provoost>And so in a way, it's a... It doesn't save block space per se, though it might,

00:30:00.760 --> 00:30:03.480
<v Sjors Provoost>but it does mean you don't have to rush.

00:30:04.020 --> 00:30:09.830
<v Aaron van Wirdum>Yeah. For the other proposal, for the Gleb Naumenko and Antoine Riard

00:30:09.830 --> 00:30:15.350
<v Aaron van Wirdum>proposal, that could also potentially be improved with a so-far

00:30:15.350 --> 00:30:20.910
<v Aaron van Wirdum>unnamed protocol upgrade, which would guarantee that any

00:30:20.910 --> 00:30:26.330
<v Aaron van Wirdum>exit from a payment pool... would have to restore

00:30:26.330 --> 00:30:32.160
<v Aaron van Wirdum>that payment pool for the remaining participants. So that would

00:30:32.160 --> 00:30:36.840
<v Aaron van Wirdum>be a new opcode. It's a completely new protocol upgrade that would enforce that

00:30:36.840 --> 00:30:42.060
<v Aaron van Wirdum>exiting is only possible if you restore the pool it came from.

00:30:42.340 --> 00:30:48.340
<v Sjors Provoost>Right. So that's also a covenant, right? So you're making a transaction, but you

00:30:48.340 --> 00:30:51.660
<v Sjors Provoost>must commit to future transactions while you're doing that.

00:30:52.040 --> 00:30:52.600
<v Aaron van Wirdum>Yeah.

00:30:52.700 --> 00:30:54.440
<v Sjors Provoost>In a different way than Secure the Bag.

00:30:55.000 --> 00:30:55.840
<v Aaron van Wirdum>Yes, exactly.

00:30:56.180 --> 00:30:57.820
<v Sjors Provoost>But this is even more far-fetched.

00:30:58.220 --> 00:31:04.180
<v Aaron van Wirdum>Yes, exactly. CTV is pretty concrete at this point. We'll have to see if

00:31:04.180 --> 00:31:09.240
<v Aaron van Wirdum>it actually happens or not, but there is a pretty concrete proposal, while this

00:31:09.240 --> 00:31:13.900
<v Aaron van Wirdum>newer proposal is very theoretical, I think, still. Like I said, it doesn't have

00:31:13.900 --> 00:31:17.800
<v Aaron van Wirdum>a name yet, and it's [unclear], I would personally say.

00:31:18.220 --> 00:31:22.980
<v Sjors Provoost>Yeah, as a general rule, covenants scare people because they could lead to an

00:31:22.980 --> 00:31:28.870
<v Sjors Provoost>infinite curse on the money. You could put a constraint on coins that you can

00:31:28.870 --> 00:31:32.990
<v Sjors Provoost>never get rid of for thousands of years. You're just dealing with these coins

00:31:32.990 --> 00:31:36.990
<v Sjors Provoost>that have this curse on it that you must spend in a specific way and that their

00:31:36.990 --> 00:31:42.370
<v Sjors Provoost>descendants must be spent in a specific way and maybe the universe explodes. But

00:31:42.370 --> 00:31:47.850
<v Sjors Provoost>more specific types of covenants are less scary. But they haven't been worked out

00:31:47.850 --> 00:31:51.690
<v Sjors Provoost>in detail, some of them, whereas others have. One more thing I would like to

00:31:51.690 --> 00:31:55.730
<v Sjors Provoost>mention about the proposal where you split the tree. Basically, you keep

00:31:55.730 --> 00:32:00.510
<v Sjors Provoost>splitting the tree. The way that tree is structured is, I think, with a set of

00:32:00.510 --> 00:32:05.900
<v Sjors Provoost>payment channels or collective channels. If you and I are in the branch next to

00:32:05.900 --> 00:32:11.710
<v Sjors Provoost>each other, we can exchange money without bothering the rest of the pool. So

00:32:11.710 --> 00:32:12.790
<v Sjors Provoost>there's a benefit there too.

00:32:14.130 --> 00:32:19.420
<v Sjors Provoost>You can have sort of sub pools. Right. So maybe you can organize your lightning.

00:32:19.440 --> 00:32:23.620
<v Sjors Provoost>If you combine that with lightning channels, maybe you can optimize it so that

00:32:23.620 --> 00:32:28.540
<v Sjors Provoost>you have a channel to your pool neighbors inside the pool in a strategically sane

00:32:28.540 --> 00:32:30.300
<v Sjors Provoost>way. So all sorts of cool things.

00:32:30.800 --> 00:32:33.540
<v Aaron van Wirdum>Yeah. Do you think we're going to see this? Do you think we're going to see Taproot?

00:32:34.240 --> 00:32:38.120
<v Sjors Provoost>Oh, Taproot, I'm not terribly worried about. I mean, knock on wood.

00:32:40.180 --> 00:32:41.380
<v Aaron van Wirdum>So what about this then?

00:32:41.740 --> 00:32:47.570
<v Sjors Provoost>This? Maybe. I am skeptical. Because the kind of software you

00:32:47.570 --> 00:32:53.410
<v Sjors Provoost>need to do this is probably about as complicated as Lightning software is. And we

00:32:53.410 --> 00:32:57.610
<v Sjors Provoost>already have Lightning software. So then the question is, why would people use

00:32:57.610 --> 00:33:03.600
<v Sjors Provoost>it? If the goal is to save money, well, Lightning helps you do that too. So

00:33:03.600 --> 00:33:08.080
<v Sjors Provoost>then Lightning might have a first mover advantage on this. If your goal is

00:33:07.940 --> 00:33:08.440
<v Aaron van Wirdum>But

00:33:08.080 --> 00:33:08.420
<v Sjors Provoost>specifically...

00:33:08.440 --> 00:33:14.390
<v Aaron van Wirdum>it's kind of bad, Lightning. It can work in tandem with Lightning. It can be a

00:33:14.390 --> 00:33:17.590
<v Aaron van Wirdum>second layer turning lightning into a third layer.

00:33:17.810 --> 00:33:21.790
<v Sjors Provoost>Sure, but adding a ton of complexity in the process. I mean, I don't know if

00:33:21.790 --> 00:33:26.370
<v Sjors Provoost>you've ever tried to dissect a lightning node with a broken channel in it. I once

00:33:26.370 --> 00:33:31.450
<v Sjors Provoost>did actually manage to recover money that I managed to blow by doing dumb things

00:33:31.450 --> 00:33:36.330
<v Sjors Provoost>with a lightning node. Like actively dumb things, so it wasn't the designer's fault.

00:33:37.040 --> 00:33:42.100
<v Aaron van Wirdum>Well, at some point we might need this, right? Like you said, it does order

00:33:42.100 --> 00:33:44.140
<v Aaron van Wirdum>another magnitude of scaling advantages.

00:33:44.480 --> 00:33:49.100
<v Sjors Provoost>Yeah, so I would imagine if there's no scaling, that it's used, that it sort of

00:33:49.100 --> 00:33:52.920
<v Sjors Provoost>automatically happens, that users won't even think of it in that way. It's just

00:33:52.920 --> 00:33:58.240
<v Sjors Provoost>that your Lightning software will use this trick to have more channels for less

00:33:58.240 --> 00:33:59.940
<v Sjors Provoost>fees, essentially.

00:34:00.300 --> 00:34:01.180
<v Aaron van Wirdum>Well, exactly.

00:34:01.890 --> 00:34:06.590
<v Sjors Provoost>Yeah. That I can see work, but so far we're nowhere near capacity on Lightning.

00:34:07.210 --> 00:34:11.850
<v Sjors Provoost>So I don't like to speculate too many orders of magnitude of scaling into the

00:34:11.850 --> 00:34:16.790
<v Sjors Provoost>future. I think once we have a situation like 2017 with high fees,

00:34:17.030 --> 00:34:22.210
<v Sjors Provoost>but with Lightning included, then we'll start seeing this stuff take off. Or

00:34:22.210 --> 00:34:26.830
<v Sjors Provoost>probably not, because these things are delayed. So you get very high fees,

00:34:26.910 --> 00:34:31.160
<v Sjors Provoost>everybody complaining, and then fees drop for years. These tools are developed,

00:34:31.280 --> 00:34:34.300
<v Sjors Provoost>and then for the next wave, we have some extra capacity.

00:34:35.000 --> 00:34:37.360
<v Aaron van Wirdum>Yeah, it's long-term potential.

00:34:38.080 --> 00:34:42.460
<v Sjors Provoost>Yeah, it's nice at least to have this idea out there, if only to deal with people

00:34:42.460 --> 00:34:47.500
<v Sjors Provoost>who say, oh, Bitcoin doesn't scale, lightning will boil the oceans. You say,

00:34:47.620 --> 00:34:52.340
<v Sjors Provoost>well, lightning can already take you quite far, but there's other tricks in the

00:34:52.340 --> 00:34:54.300
<v Sjors Provoost>bag, and I'm sure there's more out there.

00:34:54.660 --> 00:34:59.710
<v Aaron van Wirdum>And then which of the designs do you think are most likely to see the light of day?

00:35:01.010 --> 00:35:06.990
<v Sjors Provoost>I mean, just from having spent an hour studying this topic, I think the last one

00:35:06.990 --> 00:35:08.230
<v Sjors Provoost>we discussed...

00:35:08.350 --> 00:35:09.470
<v Aaron van Wirdum>Jeremy Rubin’s?

00:35:09.670 --> 00:35:15.390
<v Sjors Provoost>Yeah, it makes the most sense. Just because being able to exit in any order

00:35:15.390 --> 00:35:20.230
<v Sjors Provoost>without a serious protocol change that makes that possible... Seems a bit

00:35:20.230 --> 00:35:25.830
<v Sjors Provoost>overkill. So splitting the tree and having a little bit of downside where you may

00:35:25.830 --> 00:35:29.650
<v Sjors Provoost>have to be kicked out of the pool even though you didn't want to because somebody

00:35:29.650 --> 00:35:34.090
<v Sjors Provoost>else left the pool. That seems reasonable to me. But I haven't put super deep

00:35:34.090 --> 00:35:34.810
<v Sjors Provoost>thought into this.

00:35:35.570 --> 00:35:38.750
<v Aaron van Wirdum>All right. I think that's it. I think that's our episode.

00:35:39.250 --> 00:35:42.570
<v Sjors Provoost>All right. Well, thank you for listening to the Van Wirdum Sjorsnado.

00:35:43.010 --> 00:35:43.610
<v Aaron van Wirdum>There you go.

