Episode 6: Payment Pools and Taproot
Ep. 06

Episode 6: Payment Pools and Taproot

•

Episode description

In this episode of the Van Wirdum Sjorsnado, Sjors and Aaron discuss the future of Bitcoin Scaling. This podcast is all about Taproot and the cool feature it enables called Payment pools.

Topics

What are payment pools? Why they need Taproot. The UX of sharing UTXOs How Payment pools work with lightningHelpful Links:

https://bitcoinmagazine.com/articles/building-on-taproot-payment-pools-could-be-bitcoins-next-layer-two-protocol

Chapters

00:00:00 Sharing a UTXO: payment pools and multisig
00:05:06 Presigned exits and payment channels
00:07:54 Taproot makes pools private and compact
00:09:15 Private payments, balances and pool membership
00:16:18 Off-chain updates and ANYPREVOUT
00:17:56 Hosting Lightning channels inside a pool
00:20:07 Unilateral exits and the factorial design problem
00:26:00 Splitting the exit tree into groups
00:28:20 Covenants, CTV and safer withdrawals
00:32:30 Implementation complexity and long-term scaling

Support the Show!

Follow Bitcoin Magazine on Twitter @BitcoinMagazine

Follow Aaron van Wirdum @AaronvanW

Follow Sjors Provoost @provoost

Music:

Song Title: Segwit Sounds

By: The NakamoTones

Album: Citadel Music

Produced by: Bitcoin Audio

Transcript

Download transcript (.vtt)
0:07

Aaron van Wirdum Live from Utrecht, this is the Van Wirdum Sjorsnado.

0:10

Sjors Provoost Hello.

0:12

Aaron van Wirdum Hey, Sjors. We're recording remotely today. We're not in the same room as we normally are.

0:20

Sjors Provoost Maximum redundancy in case of a nuclear bomb.

0:25

Aaron van Wirdum So we won't be killed both?

0:27

Sjors Provoost Well, I guess we still would be killed both, but yeah.

0:30

Aaron van Wirdum In case of a nuclear bomb. Well, it depends where it's set up. Like maybe one of us is just on the edge and the other one... will survive.

0:39

Sjors Provoost Probably.

0:40

Aaron van Wirdum All right. You just came back from holiday. That's why we skipped two weeks.

0:46

Sjors Provoost Yep.

0:47

Aaron van Wirdum And now you're in self-quarantine. Is that it?

0:49

Sjors Provoost Yeah, semi-quarantine.

0:51

Aaron van Wirdum You're not obligated to be in quarantine, right? It's voluntary.

0:55

Sjors Provoost Yes.

0:57

Aaron van Wirdum Right. You're going to do this for a week?

1:00

Sjors Provoost I think they reduced the limit to 10 days. Should be okay.

1:04

Aaron van Wirdum Yeah, true. Okay, so welcome back.

1:07

Sjors Provoost Yeah, good to be back. Enjoying the weather. It's just rain, rain, rain.

1:13

Aaron van Wirdum Yeah, autumn has set in here.

1:15

Sjors Provoost Yep.

1:16

Aaron van Wirdum What are we going to discuss today, Sjors?

1:18

Sjors Provoost I think we're going to talk about coin pool.

1:21

Aaron van Wirdum Coin pool, yeah. So there's different names for this concept. I wrote an article on it about, what was it, two weeks ago? And there's different people working on this concept in slightly... different ways, focusing on slightly different designs. And they also had slightly different names for it. I've seen different names used like, you just mentioned coin pool, payment pool is one. I think Greg Maxwell called it coin join pools, join pools. That's it. But it's all more or less the same concept or at least it's similar. I've been calling it payment pools as sort of the, I don't know, overlapping name for all of these things. So I suggest we call it payment pools. Are you on board with payment pools?

2:14

Sjors Provoost I don't care what we call it.

2:16

Aaron van Wirdum I care deeply, so let's go with payment pools.

2:19

Sjors Provoost Sounds good. You're the obstinate minority.

2:23

Aaron van Wirdum Yes. All right, so what are payment pools? Do you want to start?

2:27

Sjors Provoost I think the main principle is that you want to share a single UTXO, so a single coin, with multiple people.

2:34

Aaron van Wirdum Yeah, that's one way to put it, exactly. So there's different people all using one UTXO as their balance. Or at least they're sharing the UTXO. They all have a part of it, right?

2:50

Sjors Provoost Yes.

2:51

Aaron van Wirdum So why would people want to do this?

2:54

Sjors Provoost Well, I can imagine people may want to save on fees, at least when they receive it, I guess. But I would also imagine people care about privacy. If the money comes from one place, but multiple people control that one place, then you don't really know who's in control of it.

3:12

Aaron van Wirdum I guess we'll get into these kinds of benefits later. That's better, right? Sure. Okay, so we want to share for some reason, which is a mystery for now, but which you'll... which we'll explain a little bit later. For some reason, multiple people want to share one UTXO. There are different ways to do this, aren't there?

3:34

Sjors Provoost Yeah, there are.

3:35

Aaron van Wirdum Even before payment pools, there are different solutions to do something like this, right?

3:40

Sjors Provoost Yeah, I mean, we can go back to what we said a few episodes ago. When you receive Bitcoin, really what you're doing is you're adding constraints. To where those coins go and those constraints could be such that only you can spend it But those constraints can also be such that multiple people can spend it and the easiest way to do that That is a multi-sig address Right and multi-sig addresses means okay. This thing needs two signatures out of the two participants or some other weird threshold

4:10

Aaron van Wirdum Yes, or two out of three or three out of three or 14 out of 15 or whatever you want to do. I guess that's the limit, right? 15, I think, for regular multi-sig.

4:22

Sjors Provoost Right. The practical limit is determined by, I believe, the maximum number of signature checkings of the maximum length of the script. I forgot which of the two.

4:31

Aaron van Wirdum Okay. So that's one way to do it.

4:34

Sjors Provoost Yeah.

4:34

Aaron van Wirdum Of course, that's not ideal, right?

4:37

Sjors Provoost Why not? Well, because... You need both parties to agree. So if one of the two parties stops cooperating, now the money is locked up.

4:48

Aaron van Wirdum Right, yes. So if we share a multisig address and for some reason I don't respond to your request to spend the money in some way or another, then you've lost your part of the money as well.

5:01

Sjors Provoost Yeah, so you can only use multisig in a very high trust situation.

5:06

Aaron van Wirdum Right. So what's a better way to do it?

5:09

Sjors Provoost Well, you can work with pre-signed transactions. So this gets a little bit close to how Lightning works. But the idea is that when you put money into the multisig, before you do that, you both sign a transaction that takes the money out of the multisig. You sign the part first where it leads the multisig to your own address. And then once you both have seen that, you sign the transaction that goes into the multisig. So this is nice. Now you both have access to your side of the multisig.

5:40

Aaron van Wirdum Yeah, so let's say we both put half Bitcoin in a multisig address. Then we both sign the transaction from this multisig address, spending half a Bitcoin to ourselves, to our own addresses. Once we've signed these... transactions out of the multisig, then we can securely send the money to the multisig because at any point we can broadcast the money that spends the money from the multisig. I think I'm making it more complicated than it needs to be, but that's how it would work.

6:09

Sjors Provoost Yeah, and the question now is, okay, we've put in half each, but the only way we can take it out is, again, half each. But there are ways, and maybe we don't want to describe them in too much detail, that you can actually update these amounts and make sure that, say, you transfer 0.1 Bitcoin to me. Now I have 0.6, you have 0.4. And there are ways that we can change the signed transactions that we have and make sure that you don't use the previous one. So that way we have a payment channel, essentially, between us.

6:44

Aaron van Wirdum Yes, this is basically how Lightning works. This is the payment channel part of Lightning.

6:49

Sjors Provoost Yeah, exactly. Okay. Well, so this really is a smart contract. It's a loaded term. But the thing is, when you send to this shared address on the blockchain, all you're seeing is a script hash. So that's very private. But the second we start spending from it, some of the details become more obvious. Because you can see that there were two signatures required. As soon as you spend a coin, you have to reveal the script that is needed to spend it. So you lose the privacy of a script hash.

7:24

Aaron van Wirdum Yeah, well, I would say there are two problems, right? So you lose the privacy because anyone can see... what all of the details of the smart contract in this example were. Plus, it's not very compact because all of the possible ways in which the money could have been spent are included in this transaction as well.

7:42

Sjors Provoost Correct. Yeah. So if you have a 15 out of 15 multi-sig, now when you're spending it, there needs to be 15 signatures on the blockchain plus 15 public keys.

7:52

Aaron van Wirdum Right.

7:53

Sjors Provoost It's pretty tedious.

7:54

Aaron van Wirdum Yes. Okay. So this is where we get at payment pools, right?

7:57

Sjors Provoost Yes.

7:58

Aaron van Wirdum Yeah. Okay. So payment pools are this way of sharing a UTXO with, say, 15 people in this case. But you do it in such a way that you maintain privacy and it remains compact.

8:14

Sjors Provoost Yeah.

8:15

Aaron van Wirdum Okay.

8:16

Sjors Provoost And for that Taproot, it's quite useful.

8:19

Aaron van Wirdum Yes. So that's one of the interesting things about this proposal is that it's one of the first sort of proposals that uses Taproot in a very interesting way.

8:30

Sjors Provoost Yes, Taproot offers better privacy and it offers a way to put, just to jam a lot more info into the script. We've talked about this in previous episodes, especially the Merkle tree aspect of it. So, you know, when you do an update, if everybody agrees, you produce a single signature that is like a multi-signature, but it looks like a single signature. So nobody knows whether there were a hundred participants or just one. And you can have all these branches that when each person takes money out, that'll be one branch of the tree, but you can't see how many branches there were in the tree. So even if one person leaves, you still can't see how many people there were in there. So that's kind of the general thing that you can hide with Taproot.

9:15

Aaron van Wirdum Okay, so now we're in this pool with 15 of us. There's 15 people in the pool. It's a fantastic pool. I love this pool. Now let's get to the actual benefits. We promised to get to the benefits. Now's a good time. So what are the actual benefits of sharing this UTXO with 15 of us? Or what can we do with it? What can we do with it?

9:39

Sjors Provoost Yeah. So let's say, yeah, there's 15 people in this pool and we want to pay the supermarket.

9:45

Aaron van Wirdum Well, one of us wants to pay the supermarket.

9:47

Sjors Provoost Exactly. One of us wants to pay the supermarket. And from the outside world, that's just a payment to the supermarket. from one address so the outside world has no idea which of the 15 people were paying the supermarket

9:59

Aaron van Wirdum and internally right so that's the balance yes exactly so internally we all have this balance we all know which of the 15 of us owns which part of the utxo right

10:10

Sjors Provoost yes

10:11

Aaron van Wirdum then right and we'll get to how that's secured later again i'm Dear listeners, we're getting to that one thing at a time. So right now, we all have this balance of who owns what within this pool. Now, one of us wants to pay the supermarket. So the 15 of us come together. We agree to make a transaction to the supermarket. Plus, we send change back to ourselves, to the pool. This change, once again, is allocated between the 15 of us. So let's say Sjors was the one who wanted to pay the supermarket. Then the transaction we make sends money to the supermarket, sends the rest of all of the funds to us. But this time the pool is allocated in such a way that Sjors gets a little bit less money from the shared UTXO because Sjors just paid the supermarket and we didn't. So only Sjors gets his balance decreased. Right? That's it. That's how it works. That's one benefit. And to be clear, so the benefit here is that from the outside world, anyone analyzing the blockchain will not be able to see... They won't even be able to see there were 15 of us in the pool. It might look like a completely normal transaction to anyone analyzing the blockchain. So they may think that some individual paid the supermarkets. But even if they were somehow able to see that it was a pool that included 15 people... then they still wouldn't be able to see that it was Sjors who paid the supermarkets. It could have been any of the people in the pool, even if they were able to tell that it was a pool.

11:48

Sjors Provoost So it's a little bit like a mixer.

11:51

Aaron van Wirdum Exactly, yeah. So that's why Greg Maxwell, for example, was referring to it as join pool. It's kind of like a coin join pool. People coin join their coins in this pool, and one of them makes a payment, and you can't tell who actually made the payment.

12:06

Sjors Provoost Yeah.

12:07

Aaron van Wirdum Right. So that's one obvious benefit. Next benefit. Is there another benefit, Sjors?

12:12

Sjors Provoost Well, I could pay you inside of the pool. So to the outside world, nothing changes.

12:19

Aaron van Wirdum Right. So to the outside world, for now, let's assume on-chain updates.

12:25

Sjors Provoost Yeah, for an on-chain update for the outside world, all the money just moves once.

12:30

Aaron van Wirdum Yeah, all the money just moves to a new address. The 15 of us in the pool, we all know that the balance has changed. The attribution between us changed, but you just see a completely normal transaction. So anyone analyzing a blockchain won't know who paid who or how much.

12:49

Sjors Provoost Exactly. And the reason why you need an on-chain transaction is to keep things simpler. Because remember, we all have this pre-signed transaction that gives us our share back. And the pre-signed transaction has to refer to... something on the blockchain so the old pre-signed transactions with the wrong balance

13:08

Aaron van Wirdum yes

13:09

Sjors Provoost was invalid the way you do that is you put a new transaction on the blockchain so that those old transactions are no longer spendable because they will be double spends and you have a set of new transactions that pay everybody

13:20

Aaron van Wirdum yeah

13:21

Sjors Provoost that's really inefficient and you can use a lightning-like protocol to not have to do that but just to understand why the easiest thing is to just make a new transaction on the blockchain So then somebody can leave the pool.

13:35

Aaron van Wirdum Right, that's the next thing you can do.

13:38

Sjors Provoost And you can do that. You can agree on that. Then it's one transaction goes to that person and the rest goes back into the pool. Or somebody can leave.

13:48

Aaron van Wirdum Well, let's keep to that collaboratively first. So that's like paying the supermarket like before, except this time you're actually paying someone. from the pool, and now in the new balance, that person doesn't have a balance anymore. So that's how someone just exited the pool, right?

14:02

Sjors Provoost Exactly.

14:03

Aaron van Wirdum Okay.

14:04

Sjors Provoost Somebody can join the pool.

14:06

Aaron van Wirdum Yep. Someone can join the pool. Same basic idea, except this time, the person joining the pool actually needs to partake in the transaction, spending to the new pool. So in the previous example, someone is getting money out of the pool. In this case, someone needs to add money to the pool. So someone needs to collaborate with everyone in the pool to make a new transaction to a new pool in which they also have a balance now, right?

14:36

Sjors Provoost Yes.

14:37

Aaron van Wirdum Is there any other?

14:38

Sjors Provoost Well, somebody might, because we talked about these pre-signed transactions, somebody might change their mind on what their pre-signed transaction look like. So that's the, you know, if they want to take the money out unilaterally, they have to decide in advance where that goes, which address. Maybe they want a different address. So that can be arranged.

14:58

Aaron van Wirdum Yeah. Well, I think a slightly easier way to think of it is that everyone in the pool. basically has their own withdrawal address which is their unilateral withdrawal address right so this address can be their own personal wallet but it could for example also be other types of things like it could be a vault so in one pool i'm a participant of the pool and i have my withdrawal address which is also addressing my wallet But we could agree to upgrade the pool to a new pool where my withdrawal address changes to, for example, some sort of smart contract vault. So that way you can also change the pool. So that's sort of the interesting thing about the pool. Everyone's in the pool and as long as everyone agrees, you can update the pool to a new pool with all sorts of new stuff, including new withdrawal addresses, including new participants, including new balances, including all sorts of new stuff. Every time that happens, if we're assuming we're doing it on-chain, every time it happens, it looks like a regular transaction on blockchain.

16:10

Sjors Provoost And every time you do it, you have to coordinate.

16:13

Aaron van Wirdum You need to coordinate in order for it to look like a regular transaction on blockchain, yes.

16:18

Sjors Provoost Okay, so now this is all on-chain, one transaction for every mutation, but we can make this smarter, as we've hinted at before a few times, by making these changes off-chain, most of the changes. Probably can't add somebody that way, but if you're paying somebody outside the pool, it makes sense to do it on-chain.

16:38

Aaron van Wirdum No, I think you can add someone off-chain as well, I think.

16:41

Sjors Provoost It could be. Either way, if you do something off-chain, you use a protocol that's essentially similar to Lightning, where you change the distribution between all the participants without sending a new transaction to the blockchain, but you make sure that if somebody uses the old distribution, that they get punished very badly, or... With the new SIGHASH no input proposal, they don't get punished, but they can be corrected. So anytime you try to steal something, somebody can just broadcast the latest state and get their share.

17:14

Aaron van Wirdum Yeah, so that would require a new Bitcoin protocol upgrade.

17:18

Sjors Provoost Yeah, SIGHASH no input, that's what it's called.

17:22

Aaron van Wirdum No, they changed the name, I think.

17:25

Sjors Provoost Oh, maybe it's anyprevout now.

17:28

Aaron van Wirdum Yeah, I think that's the one.

17:29

Sjors Provoost They'll change that name 15 more times, but eventually we'll hopefully see something.

17:33

Aaron van Wirdum At some point, I wrote an article where I called it the no-input class. It's just a class of potential upgrades that'll do more or less the same thing. Do you know what the status is of this upgrade idea?

17:46

Sjors Provoost No, but I hear there's a podcast where two guys dive into all these technical proposals, so maybe they can do an episode about this.

17:53

Aaron van Wirdum Maybe one time.

17:56

Sjors Provoost Yeah. So another cool thing, because if you can do all this stuff off-chain, maybe you can also do lightning channels.

18:04

Aaron van Wirdum Right.

18:05

Sjors Provoost Yeah,

18:05

Aaron van Wirdum because we were just discussing that you have this withdrawal address. So if this withdrawal address is actually a lightning channel, then you sort of could host the lightning channel within this payment pool.

18:16

Sjors Provoost Yes, that's one way. And you could also have a virtual lightning channel. At least that was discussed on the mailing list. So between two people inside the pool. They could pretend that they have opened a lightning channel in a sense. So the outside world doesn't really see anything happening on the chain. But the two of you agree that this lightning channel exists. And now, say the two of us, can be sending money back and forth without talking to the rest of the pool. That's the nice thing about having a virtual lightning channel in there. We don't have to involve the rest of the pool because our distribution doesn't change only when we close the channel.

18:51

Aaron van Wirdum Yes, but that's sort of the withdrawal address you're using for that then, right? That's where the lightning channel is embedded in.

18:59

Sjors Provoost Yeah, you have to both commit to that new withdrawal address.

19:02

Aaron van Wirdum Yeah, so we've just listed a bunch of benefits. You know, you can pay someone, you can change balances between people in the pool, you can, whatever else we discussed. So this is really the cool thing that Sjors mentioned right here is that you can embed other second layer protocols like lightning channels in there.

19:21

Sjors Provoost Yeah, and in theory, that could produce some extra scaling capacity for Lightning. Because right now, every time you open or close a channel, you have a UTXO that you need to create or spend. And the idea here would be that maybe some of the channels, multiple channels might be able to share a UTXO. And thus, you can have more channels per UTXO. So right now, we don't really have a scaling, practical scaling problem yet. But it's nice to know that this might buy us another order of magnitude.

19:53

Aaron van Wirdum Yes, exactly. Plus, it could buy you more privacy because it's not clear to anyone analyzing the blockchain that the Lightning channel is hosted there.

20:03

Sjors Provoost Right, at least it makes their headaches bigger.

20:07

Aaron van Wirdum Which is always good. All right, so there are different ways to actually accomplish this.

20:13

Sjors Provoost Yeah, and maybe this is also the good time to bring the bad news. There really isn't any working system out there yet that does this, partially because we still need Taproot, because it just makes it... Otherwise, it's not terribly useful.

20:27

Aaron van Wirdum Yeah, it's built on Taproot. That's where the benefits of the private updates come from. Am I saying that right?

20:35

Sjors Provoost Yeah, I'd say so.

20:36

Aaron van Wirdum Like the collaborative updates of the state of the pool, so whatever the pool is, can update without... revealing the update and all.

20:45

Sjors Provoost Especially if everybody agrees, then it's very nice, this Taproot feature that uses Schnorr where you can combine signatures and make it look like one signature. Because otherwise, if you have three participants, you could make a pool without Taproot. But every time you do something at the pool, it's completely obvious how many people there are in the pool and what they're doing.

21:07

Aaron van Wirdum So basically, there are three different designs.

21:10

Sjors Provoost Yeah, I'd say so. So let's start with the first one. Or not the first one per se, but the first one on the mailing list.

21:18

Aaron van Wirdum So to be clear, the challenge that we're trying to solve here is, if you have a share of the pool, how are you guaranteed to get that share out, right? If others don't collaborate. That's what you want to ensure. That's sort of the trick.

21:35

Sjors Provoost Yeah, if everybody agrees, everything is possible because then we just signed a new transaction.

21:41

Aaron van Wirdum Exactly. But what if not everyone agrees? That's what you want to...

21:45

Sjors Provoost Yeah, and not just disagree. People just tend to go offline and stuff like that. The first proposal proposed, I think, by Antoine Riard.

21:54

Aaron van Wirdum Well, no, let's start with the simplest solution. The simplest solution is if someone wants out of the pool...

22:03

Sjors Provoost Oh, yeah.

22:04

Aaron van Wirdum someone wants out of the pool, then they publish a transaction from that pool that just gives everyone their share of coins back. So if there were 15 of us in the pool, then we've created this transaction from the pool that pays all 15 of us our balance. We all have this transaction. So if any one of us wants out, everyone is out. Everyone just gets their transaction. to their own address.

22:33

Sjors Provoost And this is exactly one pre-signed transaction that everybody has.

22:38

Aaron van Wirdum Exactly. So that's very simple.

22:40

Sjors Provoost But the problem, of course, is that now one person leaves and it sucks for everybody else.

22:45

Aaron van Wirdum Exactly. Right. So a very extreme opposite.

22:49

Sjors Provoost So this is a proposal that I just mentioned, where everybody can exit, and not just that, everybody can exit in an arbitrary order. So that means that you need to pre-sign transactions for all the following scenarios. So if there's three people that I leave first, and then you leave, and then the third person leaves, or that the third person leaves first, and then you leave, and then I leave, et cetera, all these combinations.

23:16

Aaron van Wirdum Every single combination, every single order of exit must have been accounted for.

23:24

Sjors Provoost And must have a pre-signed transaction for that you have to hold on to. Because once you see one of those transactions go on the blockchain, you need to know if you want to leave next, you need to then pick your transaction for leaving next. This scales with about the number of participants, factorial. If there's 10 people, that's like 10 times 9 times 8 times 7 times 6 times 5. It's a very, very big number. You very quickly have to have millions of pre-signed transactions. And that's not fun because signing a million transactions and holding on to them is a nightmare. Right.

24:01

Aaron van Wirdum Yeah, so to put it in other words, the challenge here is that if there's 15 of us... then all 15 of us must have this transaction where we exit, but the other 14 are sent to a new pool. And this new pool must also have all of the participants in the pool must have pre-signed transactions that would let them exit the pool and send the other 13 to a new pool. And then in the new pool... These 13 people must all have their own pre-signed transactions. So you need scenarios for scenarios for scenarios for every possible scenario of every possible exit that could happen in any order. That scales horribly.

24:55

Sjors Provoost Yeah, that's pretty bad. Everybody knows the picture of the chessboard where you double for every square on the chessboard the number of grains of rice. But this scale is significantly worse than that.

25:10

Aaron van Wirdum Right. Okay. But in theory, at least for a small number of participants, you could do this.

25:15

Sjors Provoost Yes. And thanks to the Merkle tree, where you can hide all the conditions, at least the tree itself, what ends up on the blockchain would every time be quite small. Because of all the combinations, you only put one on the blockchain.

25:29

Aaron van Wirdum Yeah, so it's possible for a handful of people.

25:32

Sjors Provoost Yeah, and it's very flexible, but maybe a bit overkill. Because remember now, every time you update this contract, so every time you want to pay a supermarket, you again have to sign these million transactions and go through the whole tree.

25:47

Aaron van Wirdum Right, yes, exactly. Every time an update happens, you need to create all of the new exit scenarios.

25:53

Sjors Provoost And the scenarios on the scenarios, yes. Yeah. By the way, it was Antoine, but also Gleb Naumenko.

25:59

Aaron van Wirdum Gleb Naumenko, yes.

26:00

Sjors Provoost So enter Jeremy Rubin, who has also been working on this problem, sort of around the same time, maybe earlier, maybe later. And he says, well, let's make it a little bit less optimal or a little bit less ideal. Instead of everybody can leave in any order, we say, no, if you leave, then a part of the tree has to leave. And so this could be half the tree has to leave because you split the whole thing in two. It could be a quarter if you split it in four. And you can use multiple steps, right? So you can say, well, there are three steps. And for each step, there's three people in it. So you can make the tree have more branches at every step. Or you can have the tree have longer branches with multiple steps. Anyway, you can do trade-offs there.

26:50

Aaron van Wirdum yeah so to be clear what this means is in the you just mentioned you know half the tree has to leave first that means if there's well 15 is in the round number is it let's say 14 there's 14 of us in the pool then if one of these 14 leaves it means six others will automatically leave as well. They'll also have their funds sent to their own personal wallet. So one person leaves, half of the participants leave. The other half, they're still sent to a new pool. So seven of us is still sent to a new pool with new pool rules. And from there, I guess, well, it depends on how you make the tree structure.

27:30

Sjors Provoost Right. If you have 15 people, you could also have a structure where...

27:35

Aaron van Wirdum 5, 5, 5 or...

27:36

Sjors Provoost Yeah, so if one person leaves, one-fifth of the tree leaves instead of half the tree. Yeah,

27:42

Aaron van Wirdum three, three, three, three, three.

27:43

Sjors Provoost Yes. This is configurable, totally configurable.

27:48

Aaron van Wirdum The point is that by cutting this in half or cutting this in pieces, it quite significantly improves scale. It's still not... Perfect. You still need a lot of preparation, but it's a lot better than allowing everyone to exit in every possible order.

28:08

Sjors Provoost So for the computer science nerds, the plan we just discussed before scales with number of participants factorial, and this scales with log of the number of participants. It's a lot better.

28:20

Aaron van Wirdum Well, I was going to say there are protocol upgrades proposed that would improve on this. Is that where you want to get at or is there something else?

28:26

Sjors Provoost Yes. The nice thing is when you use this tree structure, you could use another proposal called OP_CTV or previously known as OP_SECURETHEBAG.

28:38

Aaron van Wirdum And previously known as something else.

28:41

Sjors Provoost Yeah, the general idea is a covenant, but it's a very specific covenant. And the general idea of a covenant is that when you're spending coins, you put restraints on how those coins can be spent in the future. So normally when you spend coins, the person who receives it can spend it to anything they like. Once you have your coins, they're really yours. But with covenants, they're not entirely really yours. and OP_SECURETHEBAG makes this a little bit safer or a little bit less generic. It just says, okay, here's this tree of how we free everything from the channel. And if you unleash the first part of the tree, if you reveal the first part of the tree, then you must also reveal the rest of the tree. So you're pre -committed to the rest of the tree. And this removes problems with having to race to get to the blockchain before a certain timeout. Because these coins are guaranteed to be spent in the right order. So you will get your money out of the payment pool. If somebody closed the payment pool and you're not paying attention, it doesn't matter, basically. You'll get your money eventually. You can do it when fees are low or whenever you need it. So that's what OP_CTV does. And so in a way, it's a... It doesn't save block space per se, though it might, but it does mean you don't have to rush.

30:04

Aaron van Wirdum Yeah. For the other proposal, for the Gleb Naumenko and Antoine Riard proposal, that could also potentially be improved with a so-far unnamed protocol upgrade, which would guarantee that any exit from a payment pool... would have to restore that payment pool for the remaining participants. So that would be a new opcode. It's a completely new protocol upgrade that would enforce that exiting is only possible if you restore the pool it came from.

30:42

Sjors Provoost Right. So that's also a covenant, right? So you're making a transaction, but you must commit to future transactions while you're doing that.

30:52

Aaron van Wirdum Yeah.

30:52

Sjors Provoost In a different way than Secure the Bag.

30:55

Aaron van Wirdum Yes, exactly.

30:56

Sjors Provoost But this is even more far-fetched.

30:58

Aaron van Wirdum Yes, exactly. CTV is pretty concrete at this point. We'll have to see if it actually happens or not, but there is a pretty concrete proposal, while this newer proposal is very theoretical, I think, still. Like I said, it doesn't have a name yet, and it's [unclear], I would personally say.

31:18

Sjors Provoost Yeah, as a general rule, covenants scare people because they could lead to an infinite curse on the money. You could put a constraint on coins that you can never get rid of for thousands of years. You're just dealing with these coins that have this curse on it that you must spend in a specific way and that their descendants must be spent in a specific way and maybe the universe explodes. But more specific types of covenants are less scary. But they haven't been worked out in detail, some of them, whereas others have. One more thing I would like to mention about the proposal where you split the tree. Basically, you keep splitting the tree. The way that tree is structured is, I think, with a set of payment channels or collective channels. If you and I are in the branch next to each other, we can exchange money without bothering the rest of the pool. So there's a benefit there too. You can have sort of sub pools. Right. So maybe you can organize your lightning. If you combine that with lightning channels, maybe you can optimize it so that you have a channel to your pool neighbors inside the pool in a strategically sane way. So all sorts of cool things.

32:30

Aaron van Wirdum Yeah. Do you think we're going to see this? Do you think we're going to see Taproot?

32:34

Sjors Provoost Oh, Taproot, I'm not terribly worried about. I mean, knock on wood.

32:40

Aaron van Wirdum So what about this then?

32:41

Sjors Provoost This? Maybe. I am skeptical. Because the kind of software you need to do this is probably about as complicated as Lightning software is. And we already have Lightning software. So then the question is, why would people use it? If the goal is to save money, well, Lightning helps you do that too. So then Lightning might have a first mover advantage on this. If your goal is

33:07

Aaron van Wirdum But

33:08

Sjors Provoost specifically...

33:08

Aaron van Wirdum it's kind of bad, Lightning. It can work in tandem with Lightning. It can be a second layer turning lightning into a third layer.

33:17

Sjors Provoost Sure, but adding a ton of complexity in the process. I mean, I don't know if you've ever tried to dissect a lightning node with a broken channel in it. I once did actually manage to recover money that I managed to blow by doing dumb things with a lightning node. Like actively dumb things, so it wasn't the designer's fault.

33:37

Aaron van Wirdum Well, at some point we might need this, right? Like you said, it does order another magnitude of scaling advantages.

33:44

Sjors Provoost Yeah, so I would imagine if there's no scaling, that it's used, that it sort of automatically happens, that users won't even think of it in that way. It's just that your Lightning software will use this trick to have more channels for less fees, essentially.

34:00

Aaron van Wirdum Well, exactly.

34:01

Sjors Provoost Yeah. That I can see work, but so far we're nowhere near capacity on Lightning. So I don't like to speculate too many orders of magnitude of scaling into the future. I think once we have a situation like 2017 with high fees, but with Lightning included, then we'll start seeing this stuff take off. Or probably not, because these things are delayed. So you get very high fees, everybody complaining, and then fees drop for years. These tools are developed, and then for the next wave, we have some extra capacity.

34:35

Aaron van Wirdum Yeah, it's long-term potential.

34:38

Sjors Provoost Yeah, it's nice at least to have this idea out there, if only to deal with people who say, oh, Bitcoin doesn't scale, lightning will boil the oceans. You say, well, lightning can already take you quite far, but there's other tricks in the bag, and I'm sure there's more out there.

34:54

Aaron van Wirdum And then which of the designs do you think are most likely to see the light of day?

35:01

Sjors Provoost I mean, just from having spent an hour studying this topic, I think the last one we discussed...

35:08

Aaron van Wirdum Jeremy Rubin’s?

35:09

Sjors Provoost Yeah, it makes the most sense. Just because being able to exit in any order without a serious protocol change that makes that possible... Seems a bit overkill. So splitting the tree and having a little bit of downside where you may have to be kicked out of the pool even though you didn't want to because somebody else left the pool. That seems reasonable to me. But I haven't put super deep thought into this.

35:35

Aaron van Wirdum All right. I think that's it. I think that's our episode.

35:39

Sjors Provoost All right. Well, thank you for listening to the Van Wirdum Sjorsnado.

35:43

Aaron van Wirdum There you go.