Episode 42: The Bitcoin Beach Wallet (Bitcoin Beach Special)
Ep. 42

Episode 42: The Bitcoin Beach Wallet (Bitcoin Beach Special)

•

Episode description

A Bitcoin Beach special! In this episode of The Van Wirdum Sjorsnado host Aaron van Wirdum speaks with Bitcoin Beach Wallet developer Nicolas Burtey — without cohost Sjors Provoost this time. Aaron and Nicolas met up in El Zonte, El Salvador — which has been dubbed Bitcoin Beach — to discuss the Bitcoin Beach Wallet, a Bitcoin and Lightning wallet specifically designed for use in the small Central American coastal town frequented by surfers and, now, bitcoiners.

Aaron and Nicolas discuss the pros and cons of custodial and non-custodial Lightning wallets, and Nicolas explains why he opted to make the Bitcoin Beach Wallet a shared-custodial wallet, and what that means exactly.

They go one to discuss some of the design decisions and tradeoffs that the Bitcoin Beach Wallet has made, which include ledger-based payments between Bitcoin Beach Wallet users as well as the webpage-based zero invoice payments to facilitate payments from other Lightning wallets. while Nicolas speculates about a potential cross-wallet user account system to further improve the Lightning user experience over time.

Aaron and Nicolas also discuss some of the subtle incompatibilities between different Lightning wallets that use different techniques for routing payments, privacy considerations versus user experience in a community like El Zonte’s, and more.

Chapters

00:00:00 Bitcoin Beach and the El Zonte community
00:05:00 Noncustodial and custodial Lightning tradeoffs
00:12:16 Shared custody and community multisig
00:17:33 Proof of reserves: assets and liabilities
00:24:56 Fast local payments with usernames
00:27:19 Privacy and the convenience tradeoff
00:30:33 QR payment pages and amountless invoices
00:39:22 A cross-wallet username payment system
00:45:16 Probing routes, fees and wallet compatibility
00:52:23 Open-source wallets for other communities

Transcript

Download transcript (.vtt)
0:07

Aaron van Wirdum Live from El Zonte, El Salvador, a.k.a. Bitcoin Beach, this is the Van Wirdum Sjorsnado. Today we're doing a special episode. I think I'm going to call it the Bitcoin Beach special or something. I'm doing this episode without Sjors. Instead, I have Nicolas Burtey, right?

0:27

Nicolas Burtey Yes.

0:28

Aaron van Wirdum Welcome, Nicolas. So you're going to be my Sjors today.

0:31

Nicolas Burtey Yes, thank you for having me.

0:33

Aaron van Wirdum Nicolas, can you introduce... Yeah, so that means, by the way, we're going to need you to do the puns, because usually Sjors does the puns. So I hope you brought some good puns for this episode.

0:44

Nicolas Burtey I'm not sure what puns means, but I will try.

0:48

Aaron van Wirdum Like the words jokes?

0:49

Nicolas Burtey Okay, okay. I'm not the best at, you know, words jokes.

0:53

Aaron van Wirdum You got it, Nicolas. I have faith in you. All right, let's, yeah, first of all, Nicolas, for our listeners, explain who you are. Please, introduce yourself.

1:03

Nicolas Burtey Hi, so you will guess with my accent, I'm a French guy. I have lived a couple of years in the US, and I'm currently, I have become a nomad last year, and I've been working on open source software. And I've been building a wallet that is called the Bitcoin Beach wallet that is used by the community here in El Zonte. I'm currently living in El Zonte as of now.

1:31

Aaron van Wirdum Maybe really quickly, you know, we don't need to dwell on this. There's other podcasts on this specific topic. But maybe, you know, explain real quick what El Zonte is and what's going on here.

1:41

Nicolas Burtey Yeah, so El Zonte is a small village in El Salvador. There is about 3,000 people here. And it's overall a poor village, right? The average salary here is about $400 per month. And what makes Zonte quite special is that it's the project where Bitcoin Beach started. And Bitcoin Beach is an initiative that involves Bitcoin, as the name suggests, and how to use maybe Bitcoin in a local community and to get those people out of poverty. challenge with El Salvador in general is that there is a lot of requirement to open a bank account. And so if you're not wealthy enough, basically, you know, banks are not very interested in providing banking services to you. And so here, you know, people typically don't have a bank account. And on average, 70% of the population in El Salvador don't have a bank account. And so what we are doing here is that… So first, there has been a donor that have contributed some Bitcoin like two years ago. And, you know, this is how the initiative gets really started. On our side, what we have been doing is a wallet to help, you know, the adoption of Bitcoin. And I guess this is what we'll be discussing more today.

3:03

Aaron van Wirdum Yeah, so you're the developer and... You run a company as well, right?

3:08

Nicolas Burtey Yeah.

3:09

Aaron van Wirdum The wallet is developed by your company, essentially.

3:11

Nicolas Burtey Yeah, yeah. So we have a company called GaloyMoney. We are developing open source software and the idea that we think there is a type of wallet that we can bring to the market, which is like what we call shared custody wallet and that use Lightning for payment. And our goal is to develop open source software for the community. This is what we are doing.

3:34

Aaron van Wirdum Yeah. So the interesting thing about it is you came to El Zonte or did you already start working on the wallets before you came here or what was the order of things there?

3:44

Nicolas Burtey Yeah, yeah. So I started working on the wallet initially, like late 2019, you know, initially as a non-custodial wallet, and after I moved to the shared custody model, I decided to dedicate my time to the Bitcoin Beach community as a proof of concept early 2020. And I came here about seven, eight months ago for the first time. So the [unclear] was already starting to be here when I came here. But yeah, I really wanted to come here to see the people using the wallet on the ground.

4:17

Aaron van Wirdum Yeah, exactly. That's sort of one of the interesting things about... this wallet and your efforts I think is that first of all like you mentioned people here for them it's not even really a luxury it's kind of a necessity or at least you know they can't get a bank account and this is actually like a digital solution for them first of all and second of all you you came here personally to meet these people and speak with these people and see what they actually needed what's you know what their experience was with using Lightning and how you could improve that experience for the people in this actual village right

4:53

Nicolas Burtey Yeah, correct. I believe it's important to meet the people that use your product generally, right? Whatever you're doing.

5:00

Aaron van Wirdum Yeah, so I think, so one of the things you discovered while you were here was that, correct me if I'm wrong, but is that the existing Lightning solutions, the existing wallets, Lightning wallets, excuse me, let's say just the non-custodial Lightning wallets, they had their limitations. Is that right?

5:24

Nicolas Burtey So when I was coming here, the people were using wallet of Satoshi. So it was a custodial wallet. But I believe the way on our side, we start thinking about the wallet initially, like close to two years ago. Is that on my side, I start, you know, with a non-custodial wallet and I was trying to experiment with it. And I had the model of like open the channel of the fly where like maybe you, you know, as a user, you download this app and maybe you don't have yet any UTXO in your on-chain or off-chain balance. But like the first time you receive your off-chain payment, your Lightning payment. Basically, the wallet provider will open a channel on the fly to you. And so I experimented with it for a couple of months. Then my thinking was like, it's hard to scale because from the wallet provider standpoint, each time there is a new user, you need to provide liquidity to this user. And so you need to have this upfront liquidity to provide. And the more you grow, the faster you grow, the harder the liquidity challenge, which is difficult.

6:36

Aaron van Wirdum You don't need to, right? You can also open channels just where the channels are funded only on the side of the user. So they can't receive payments in that case unless... and until they've made payments themselves.

6:50

Nicolas Burtey Yeah.

6:50

Aaron van Wirdum Which is another limitation, of course.

6:52

Nicolas Burtey Yeah. So this would be maybe, you know, the way if you have a LND, you know, node. And so this is how it will typically work is that, okay, you need to open a channel and then all the liquidity is on your side. And then when you, after you spend some money on this channel, then, you know, you can receive payment afterwards. So, you know, this is a vanilla Lightning node, how this works. An improvement based on that is the idea that, hey, maybe... you will be connected to a wallet provider like a node or LSP. And basically to make the experience better, you know, like the first time you see a Lightning payment, you know, this is the time a channel is being opened and the channel is not opened by you because you don't have [unclear] yet. The channel is being opened by the other party of the channel that, you know, will send you the money that, you know, they receive from the channel and maybe they will retain some, you know, sats as a payment to open the channel. But they still need to provide a lot of liquidity, basically. And this is a model that I think...

7:55

Aaron van Wirdum So that are sort of the two options, I guess. Either you allow anyone to open a channel... but it's only funded on their end, so they can't receive payments at first. Or you can offer the liquidity, but that's hard to scale because then you need a lot of liquidity to offer all across all of your user bases.

8:16

Nicolas Burtey Yeah, yeah. And there is like, to my knowledge, three wallets that are doing this, Muun Wallet and [unclear] and Phoenix. And I think they have, you know, Éclair, to my knowledge, Phoenix have a lot of success, right? I still see this as something that would be hard to scale, especially in an area like El Zonte. And the reason is, so on average, the median balance, not on average, the median balance, I believe in a wallet is about $10. So, you know, it's really like...

8:49

Aaron van Wirdum Do you mean here or do you mean in general?

8:51

Nicolas Burtey In here, like, you know, the people that have been using the Bitcoin Beach wallet. And so $10 is like, you know, it depends on what are the fees on chain, but, you know, it's often, you know, above the price you will pay to open a chain, right? And so this is the limitation, basically.

9:14

Aaron van Wirdum Right. What you're saying is that opening, wait, I think you're saying two different things. First of all, there's a challenge on how to start. start an account, start a wallet. That's one challenge because you have two choices that both aren't ideal. And then the second challenge is that if people really don't have a lot of money, then even opening one Lightning channel is a lot of money. If you only have $10 and fees are $2, then opening a Lightning channel is still a lot of money, essentially. So there's two problems there, right?

9:49

Nicolas Burtey Yeah, that's correct. And those problem compound, right? But that's great.

9:57

Aaron van Wirdum And then the other option, if we go to the other end of the spectrum, so to say, is to have custodial wallets. And these also exist.

10:07

Nicolas Burtey Yeah, and so probably the first wallet that is known in the space is the wallet of Satoshi. And this is the wallet that was being used as the main wallet until we started working on the Bitcoin Beach wallet here. And Custodial Wallet, you know, have the benefits of, like, it's probably the best UX today and probably also the ones that have, I wouldn't say the lowest fees, but, like, a lot of the on-chain management, you know, like, you can share the capital that is required to open a channel and close a channel, you know, if you have like a thousand users and you have one channel, then basically the cost of creating a channel and closing a channel is shared across, you know, a thousand users. So obviously the cost per user is very, is greatly reduced.

10:55

Aaron van Wirdum Yeah, just for listeners that don't, that might not know this. Non-custodial, what we were just discussing a minute ago, simply means that you can always claim the funds in your Lightning wallet on-chain if you want. At any point, you can just say, okay, I want my funds now, and then you're getting it to your own on-chain address. Custodial, this is powered by the cryptography and the technology of Lightning itself. Custodial means you're essentially giving up that control to the wallets provider or whoever, because, you know, if you want to withdraw your funds, they're still going to have to actually give you the funds. They're going to have to cooperate with that. They are actually controlling the keys. So the problem in that sense is, you know, it's not, it's, it sort of goes against the Bitcoin mantra of not your keys, not your coins, but it offers these benefits that, um… So the liquidity problem we just mentioned is immediately solved. Essentially, you kind of just create an account at the wallet provider and the fee problem is solved because you don't need any on-chain fee to get started. Is that right?

12:09

Nicolas Burtey That is correct.

12:10

Aaron van Wirdum Right. And then, like I mentioned, the downside is you're actually trusting the wallet provider a bit.

12:16

Nicolas Burtey Yeah, correct.

12:16

Aaron van Wirdum So you have with... the Beach wallet you're going for some kind of what you're calling it shared custody right so it's still custodial but you're trying to limit the risk a little bit is that right so maybe you can explain what that means?

12:33

Nicolas Burtey Yeah so from the user perspective the wallet is custodial so they will open a wallet the same way they will do with a custodial wallet and they will have an account. The reason we talk about shared custody is because so the wallet there is two parts to the wallet there is a There is a cold storage and hot storage. And so the hot storage is basically a Lightning node, an LND node. When there is a single key for it, this is how Lightning works today. But there is only a tiny portion of the fund in this hot wallet. The major party of the fund are in a cold storage, which is good for security reasons. But there is something quite unique with Bitcoin that, you know, maybe doesn't exist with like the fiat system, for instance, where you could have a multi-sig and you could have different members of the community that have, you know, the signature. So here's the idea that you, instead of like trusting maybe a company when you use like a custodial product, here you could trust the member of your community, you know, to maintain the key and to make sure they keep the, you know, key in a good shape and say don't lose it and um and so here you you're basically not trusting a company you're trusting you know people in your community basically

13:55

Aaron van Wirdum Yeah although this is not I understand this is not something you can actually verify in the wallet or there's no way to make sure that this is actually happening so in that sense you're still you are still trusting the words of you that It is being held by multiple people. Is that right?

14:13

Nicolas Burtey Correct. And we're actually thinking about this, how to... There is a question, should the people that hold the key be known or not?

14:22

Aaron van Wirdum Right.

14:22

Nicolas Burtey And it's... interesting to think about it. Like, if you think about, okay, you want to bring the trust, you know, to the system, then you will publish, you know, who owns the key, basically. And then you can, and maybe, you know, those members can publish, you know, the public key, you know, and then you can verify the fund, you know, available. But if you publish who on the key, it's also like, it creates a new security risk. We're like, okay, you know, there are different people that have the key of this wallet, you know, this and this and this.

14:53

Aaron van Wirdum Yeah. Even if it's a three out of five or a six out of ten or whatever it is, if you publish who they are, then... you know, now you know exactly which three or which people you need to extort. So there's benefit in not sharing that information, but that does increase the trust in, that's the trade-off, now you're trusting that there are actually three out of five people that are holding the keys and you don't know who they are. So just a promise in that sense.

15:22

Nicolas Burtey Exactly. And so far, this is, we go for the, you know, it's not published on the key. But yeah, it's something we are thinking about.

15:31

Aaron van Wirdum Yeah. Yeah, I will say before we move on. So I've used the Bitcoin Beach wallet while I'm here. I've also used other wallets. And I will say I personally like it a lot. There is the trust trade-off. And, you know, it does go against the mantra of Bitcoin. But I've used other Lightning wallets and I like other Lightning wallets as well. But, you know, I make a payment and I'm standing there at the merchant waiting to get my bottle of water or whatever it is. And it can take half a minute or longer for a payment route to be found. While with Bitcoin Beach Wallet, if they use the same wallet, oh, we'll get into it in a bit, actually. I'm sort of jumping the gun here. But it does work so much faster. You really are done within three seconds, which is nice. And I guess the other thing that it makes sense in a community like this, I think, to use a setup like we were just describing, especially because it's small. If there's 10 million users, maybe, and there's a lot of money involved, and out of these 10 million users, almost no one knows the actual owner of the wallet, at that point, it's starting to sound less smart to me. But here in a village of 3,000 people, And even though you don't know exactly who owns the public keys, there's not that much money involved all in all. And people know to find you, probably, and we're recording this in the Hope House. You know, something goes, which is like a community house for the Bitcoin community here. You know, people can at least come here and ask what's going on. It's a more, you know, on a small scale, it probably makes, it kind of makes sense to do this way, I think. Or at least the trade-off is acceptable in my personal view. One other solution to mitigate this problem of... the custodial solution is to have proof of reserves. Is this something the Bitcoin [unclear] has?

17:47

Nicolas Burtey So we don't have proof of reserve today, but it's something that is high on our priority list.

17:53

Aaron van Wirdum Right.

17:55

Nicolas Burtey And I think it's very complementary to the fact that multiple people in the community have keys for the multi-sig wallet, for the cold storage. Proof of reserve, you know. is aiming to solve a different issue. If you think about Mt. Gox for instance, what we, I believe, now know is that the, over time, you know, fund has been drained from the wallet, you know, for like a year or so. It has been a slow process of like depleting the current wallet of, you know, these exchanges. And if they had something like a proof of reserve, you know, the day, like, suddenly there was a fund missing, the [unclear] would be [unclear], right? And there would not be the wallet or the exchange that would continue to operate if proof of reserve was here. So it doesn't mean that if you have proof of reserve, suddenly, you know, one day from the next, you know, the [unclear] will disappear and people who have the key, you know, will take away the money. But it means that, you know, if something bad were happening, you would know it right away and you will not end up in a situation where maybe, hey, there was like some money left, but, you know, maybe there is enough money to keep it going, which is a bad, you know, a bad thing eventually, because then maybe the people at the end, which is the case for the Mt. Gox it has been ongoing for months.

19:19

Aaron van Wirdum Yeah, essentially it's true that... Whoever is holding the keys for the Bitcoin Beach Wallet right now, they could get into a collective boating accident still and the money would be gone. That's still true even with proof of reserves. What's not true with proof of reserves is that they could run a fractional reserve banking type of system for months or years. That would be impossible, ideally at least. So maybe... So how you say it's high on your priority list. Can you explain as simple as possible how that would work or what it would look like?

19:55

Nicolas Burtey Yeah. So the idea of proof of reserve is when you have a wallet, you have assets and liability. So your assets are your UTXO and maybe the fund you have in your Lightning wallet. So you have a channel and you have money on your side of the channel. So all this constitutes your assets. And you have the liability, which is how much money you owe to each user of your wallet. And basically, proof of reserve is you try to prove that you have enough money in your assets to cover your liability. And so on the asset side, the way you can prove you have some assets is you have one UTXO or, you know, a couple of UTXO. And for each UTXO, you should have private key associated with this UTXO. And you can send a message, hey, you know, out of today, you know, this UTXO belongs to this wallet. And like this, you can sum, you can do it for each UTXO. You can sum how much money you have for your assets. And the way you prove on the label...

20:58

Aaron van Wirdum So in that way, it would be publicly known which... UTXOs, which Bitcoins belong to the Bitcoin Beach Wallet in this case.

21:07

Nicolas Burtey Yes, correct.

21:08

Aaron van Wirdum On the Bitcoin blockchain itself, yeah.

21:12

Nicolas Burtey And I believe there will be improvements to that with some zero-knowledge proof scheme, which I'm not deep into it, but I think there is a solution for that, to try to prove that you have enough reserve without showing how much... you know, money you owe. Because the reason I believe one, why a lot of, you know, no one, so far, really no one have really adopted proof of reserve is because, you know, no exchange wants really to publicly state, you know, which [unclear] they own basically.

21:43

Aaron van Wirdum Coinfloor, I think, does it. They have the proof reserve check regularly.

21:49

Nicolas Burtey Okay. Okay, so...

21:52

Aaron van Wirdum But this is zero-knowledge proof. That's maybe even further into the future. Let's stick with just the basics of proof reserves.

22:04

Nicolas Burtey And so... You know, you prove how much assets you have, you know, it can become, in that case, public information. On the liability side, the way it works is, okay, let's say you have five users in your wallet and each of them have 0.1 BTC. And so you want to construct a Merkle tree where at the top you will have 0.5 BTC. And you want to show that on the leaves of the tree, each user, their balance has been accounted into the total that is shown at the root of the Merkle tree. And so, yeah, you can construct this, you know, Merkle tree and basically every user will be able, maybe using the mobile app, will be able to log in and say, hey, is my balance, you know, in this total? And so there is a cryptographic proof to show that, yes, you know, this balance, which is 0.5, you know, my balance, which is 0.1, has been included in this total. And the general idea here is that if enough people check it, you know, statistically, you will have a very high likelihood of yes, you know, like... There has been no check that has not been verified. Therefore, it's very likely it's a fully reserved operation.

23:28

Aaron van Wirdum Yeah, these are these kinds of things that are much easier to explain with a little bit of a drawing, which you just made for me half an hour ago. But yeah, the basic idea is that you're sharing the Merkle Path. Hopefully, listeners will know what the Merkle tree is. If not, this is going to be over their head anyways. So yeah, you give every user the Merkle path. And the Merkle path doesn't only include the hashes, which any Merkle path does, but it also includes the amounts. And therefore, you can sort of add up that your amount was included in total. If enough users do that, then like you said, statistically, if you're trying to cheat, someone will figure it out. Someone will find out that their total, that their amount wasn't in the total. So it's not a hard proof for any individual user. But collectively, if enough people do it, I don't know, maybe 10% is enough. Or I have no idea. There's probably statistics wizards out there that would have a better grip on that. But if enough people do it, then you get them. they know pretty sure that the proof of reserves proves that the reserves are there. Right?

24:42

Nicolas Burtey Yeah.

24:42

Aaron van Wirdum All right. So, but this is not in the Bitcoin Beach wallet yet.

24:46

Nicolas Burtey No.

24:46

Aaron van Wirdum This is part of the long priority list.

24:49

Nicolas Burtey Yeah.

24:51

Aaron van Wirdum As every wallet has, so I know.

24:53

Nicolas Burtey Yeah.

24:56

Aaron van Wirdum Okay, yeah, so let's get to more the user experience side of things. I already mentioned that I actually really like using the Bitcoin Beach Wallet here because it's just fast. And this is part of the custodial thing, I think, where... all of these merchants in this town and there are a lot of merchants in this town you know a lot of pupusa shops which is like the local dish or uh just these tiny corner shops or restaurants or lots of people are actually accepting Bitcoin and they have this QR code out and this QR code essentially just um if you scan it a username comes up, right? Well, it says the username and letters as well. And if you scan the QR code, what does the QR code say? Is it the username specifically?

25:48

Nicolas Burtey So the QR code is a link to a webpage.

25:52

Aaron van Wirdum Okay, yes, you're right. So let's, one thing at a time. So everyone here or a lot of people have a username. So if you have someone's username, you can very easily pay that person because it is custodial. It's just, you know, The wallet has a ledger and it just changes the ledger from me if I'm buying a pupusa to the pupusa shop lady. And that's why, you know, it happens within three seconds, which is kind of nice when you, you know, when you're on the go. And even if you're not on the go, it's just a little bit awkward to stand in front of a shop for a minute or a half minute finding a path.

26:31

Nicolas Burtey I would also say that if you use, you know, Wallet of Satoshi or Strike Wallet, We're connecting with those wallets, right? We're connecting with other wallets that are often used here. In a way that the transaction will be the fastest if it is from Bitcoin Beach Wallet to Bitcoin Beach Wallet. But Bitcoin Beach Wallet to Wallet of Satoshi should also be very fast because basically the server of, you know, the Bitcoin Beach Wallet and the server of Wallet of Satoshi have, you know, the Lightning have a direct channel. And so it will also be fast.

27:01

Aaron van Wirdum Right. Yeah. So in that case, pathfinding isn't a big deal. It's just right there.

27:05

Nicolas Burtey There is no pathfinding, basically. It's like, you know, immediate payment. And so maybe if you add some experience where the, you know, payment was much lower, it's probably that. Yeah, the node was not directly connected to us, and this is where things can take a bit more time.

27:19

Aaron van Wirdum Yeah, so let's get back into the trade-off side of things. The trade-off here, besides the trade-off we mentioned, the fact that it's custodial and you're trusting whoever's holding the keys, the other trade-off here would be privacy. Whoever's running... the wallet or I guess, yeah, I guess that would be whoever's running the wallet server, right? They could tell that I just ate a pupusa.

27:44

Nicolas Burtey Yeah.

27:44

Aaron van Wirdum Right. So that's another trade-off that you're making for convenience sake in this case. And I'm sure you've had a lot of complaints about this in El Zonte. There's a lot of privacy activists.

27:59

Nicolas Burtey Yeah. So, yeah. I'll share a funny story about this. So when you make a payment, you can add a memo to the payment, like, hey, I'm pupusa, and I like the pupusa, thank you. And the way we've been thinking about it when we start the memo feature is that, okay, memo should be private. So if I say, hey, I have pupusa for the memo, it's just to remind me that I am this… $2 or $5 payment is for pupusa, right? But basically, we had some actually feedback that, hey, you know, the memo is not shared. Like, we want the memo to be shared because I want to send a payment to someone and tell him, hey, I sent you $10 for, you know, for the pizza that we ate yesterday. And today, they don't like the fact that it's not been shared, which is interesting, right? And probably the reason why they don't... you know, think about privacy too much, it's important to imagine that most of the users today, like this is their first, you know, bank account, if I can call it that way. And, you know, like they're discovering, you know, internet money for them, it's magic, right? Like the notion of privacy is not the top of their mind, actually. The utility function is much higher on their mind. And therefore, privacy, they don't really care so far. They actually prefer to share information when they send a payment, for instance.

29:38

Aaron van Wirdum Right, yeah. Well, I mean, I do think privacy is very important. Don't get me wrong. It's just also clear to me that people here are probably fine with whatever can help them at this point. And this seems to help them. But do you have any idea of how that... Do you have any plans to improve that somewhere on the priority list? Are there ways to improve that? Maybe not. The account system is just not private, and that's just a trade-off you're making here.

30:05

Nicolas Burtey Yeah, I think it's, if you're using a [unclear], like if you want privacy, you should not use a [unclear]. I think it's a way to think about it.

30:14

Aaron van Wirdum Yeah, I mean, there are like the Chaumian… um, Chaumian cash type of solutions that might be applicable here in some way or another. They probably are, but we should talk about this maybe after the episode. Yeah, no, that's probably an option, actually. Yeah. What else? Oh yeah, so the QR codes we just mentioned. So you know someone's username, it's very easy to pay that person. You know, it happens instantly, which is nice if you also have the Bitcoin Beach wallet. If you don't have the Bitcoin Beach wallet, there's this QR code. This QR code is not a Lightning... address or anything. So yeah, you already sort of started mentioning that. So what is it?

31:07

Nicolas Burtey Yeah. So the current QR code that you can see on most of the Tienda here or the restaurant is basically a webpage. And the current webpage will be ln.bitcoinbeach.com slash Tienda Mario. And so if you scan this QR code with a QR scanner, it will open a page on Safari if you use an iOS, and you will have a Lightning invoice that you can pay.

31:38

Aaron van Wirdum It's a uniquely generated Lightning invoice in that case. So either you have the Bitcoin Beach wallet, in which case it's very easy to make the payment, or you have another Lightning wallet, in which case you need to scan the QR code, open that in a web page, and then you get a unique Lightning invoice there, and then you can pay that with whatever wallet you have, right?

31:58

Nicolas Burtey Yeah, so it's really a two-step process, it's not ideal. And if you were to try to scan this QR code directly from the Wallet of Satoshi, it would say, hey, this is not an invoice, I don't know what this is, and it would fail.

32:10

Aaron van Wirdum Yeah, that's what happened to me on day one. It was a little bit confusing at first, but now I get how it works and it actually, it makes sense actually. It just, you need to know that that's how it works. And it helps if the person that's holding up the QR code speaks the same language as you otherwise. You're lost. But yeah, but it's not compatible with all wallets, I think. Right? Or there are some incompatibilities?

32:40

Nicolas Burtey Yeah, and some of the issue with the way we generate the invoice is it's currently an amountless invoice. So like when you open the webpage, you would...

32:49

Aaron van Wirdum An amountless invoice.

32:50

Nicolas Burtey Yeah, so an invoice that doesn't include an amount, meaning it is a sender. It is up to the sender to set the invoice. It's not the recipient… have not set the invoice by the time the invoice has been created. And the reason it's causing issue is like... up to maybe 18 months ago, two months ago, it was insecure to create a amountless invoice. I know it's secure, but like some wallets, you know, don't accept a amountless invoice. So like if you try to pay, I believe this invoice with Strike for example, like it will say, hey, I don't know how to pay this invoice.

33:25

Aaron van Wirdum So wait, so first of all, before, maybe explain why you want, why amountless payment? What's the point of an amountless payment?

33:34

Nicolas Burtey So,

33:35

Aaron van Wirdum or an amountless invoice?

33:38

Nicolas Burtey So you can see an amountless invoice like a traditional on-chain, you know, address, right, where like you will pay to this address, but typically there is no amount associated to it, right, and if you have an on-chain address, you will send, like, the sender defines how much money should be sent, not the recipient. And so you can have both a amountless invoice or like an invoice with an amount, like both options are possible. And maybe I can talk about why, you know, it was not secure before and it's secure now. And maybe it would be the reason why some wallets don't accept amountless invoice till today.

34:14

Aaron van Wirdum Yeah, well, first of all, I'm still trying to find out why would you want to use an amountless invoice as well. I think it has something to do with pathfinding, right? Wasn't that the reason or routing?

34:28

Nicolas Burtey Nope.

34:28

Aaron van Wirdum Oh, then I just made that up. No, you were telling me the other day over a beer. You're doing something unique with pathfinding, and there was something incompatible.

34:37

Nicolas Burtey Oh, yeah, the probing.

34:39

Aaron van Wirdum Yes, exactly. Doesn't that have to do with amountless?

34:43

Nicolas Burtey Yeah, probing is something else, actually.

34:45

Aaron van Wirdum Oh, all right.

34:46

Nicolas Burtey We can talk about probing.

34:47

Aaron van Wirdum Yeah, we'll get into probing as well. Okay, so first, one thing at a time, amountless invoices.

34:54

Nicolas Burtey So the first, I guess, version of Lightning Invoice was you add a hash in the invoice. And this is the only cryptographic element that you have in the invoice. And so let's say you have Alice and Bob and Charlie. Basically, Alice wants to pay Charlie and Bob is an intermediary node. And so the issue with just a hash is that... Let's say Alice wants to send a thousand sats to Charlie. So Charlie generates a amountless invoice. Alice initiates the payment saying, hey, please send a thousand sats to Charlie through Bob. Maybe Bob will take five sats in fee. And so Alice will send a thousand and five sats. Bob will take five sats and Charlie will receive a thousand sats. This is a normal flow. But here, the reason it can be dangerous is that basically Charlie doesn't know how much money to expect from Alice because it's not in the invoice. And so Alice could send a thousand five sats and Bob could take a thousand sats and say, hey! Charlie, please take this five sats, you know, it's a payment I receive. And basically, you know, some, the nodes, typically the last hop, you know, before the recipient, like, could take as much money as they want. If they know somehow, if they try to see if, like, sending less money would work, right? So this is why it was insecure before.

36:40

Aaron van Wirdum Right. Yeah, I've seen some wallets reject, or maybe not reject it, but at least throw up a warning sign. So this is why they're throwing up a warning sign. But other wallets just reject it outright. Okay, and this is because, so you just explained the problem. This used to be a problem, but you're saying this problem is now solved.

36:59

Nicolas Burtey Yeah, it's... If you use, so if you generate an invoice with new invoice, like since at least on LND, I believe LND, I mean, three or four versions of LND, maybe LND 0.10 or along this line.

37:13

Aaron van Wirdum When was this?

37:17

Nicolas Burtey Maybe more than a year ago, between a year and 18 months ago, I would say. Now invoice, not only generate a hash, but also a payment secret. Basically, the hash will be known by every party along the route, but the payment secret will only be known by the recipient and the sender, right?

37:42

Aaron van Wirdum Right.

37:43

Nicolas Burtey And because this information is not shared between intermediary nodes, like... basically the last hop, you know, cannot made up information because, you know, then the last onion that will arrive to the, you know, to Charlie in that case, like, he will know that something is wrong, basically, because there is no new cryptographic element that has been added.

38:06

Aaron van Wirdum I see, yeah. So Lightning always use, you know, the hash that's passed around on each step, and now apparently there's [unclear] security.

38:12

Nicolas Burtey Yeah, there is a payment secret, what it's been called. Right. And if you create an invoice with a payment secret, you know, then... Amountless invoice are no longer unsecured.

38:22

Aaron van Wirdum Okay, so I think I understand where my confusion is coming from now. My confusion, so yeah, you've got the amountless invoice. What that means is not that it requires me to send zero satoshis. What it means is that I can fill in my own. the amount of my own preference. That's what amountless invoice means.

38:43

Nicolas Burtey Yes, correct.

38:44

Aaron van Wirdum Right. Nicolas, see, I was confused because we were talking about two different things and these two different things turn into one thing in my brain. But okay, so yeah, you're hanging this QR code in the store, you're scanning that, you're getting... with your QR code scanner, you get onto a webpage that has an amountless invoice from Lightning, amountless Lightning invoice, which means that now you can enter the amount yourself and make the payment to the pupusa shop. And now everyone's happy because you had a great pupusa and the pupusa shop got paid, even if I didn't have the Bitcoin Beach wallet.

39:19

Nicolas Burtey So is it the place where I'm supposed to make a bad joke?

39:22

Aaron van Wirdum Yes, this is where the pun comes in. All right. Okay, that part is clear to me. Now, there is another sort of futuristic idea. It's not that futuristic, but another idea you were thinking about moving forward. Because right now, basically, you speculated about this concept where the username system right now works very well. And that could maybe be expanded across. custodial wallets at least right or shared custodial wallets like yours so maybe explain how that would work or how you would see that working

40:05

Nicolas Burtey yeah so the first thing is like the username people loves it here like it's very useful because you know they know the username of their friend and they can easily send them money it's really magic right If you're living in the US, you have PayPal, you have Venmo, you have Cash App. It's not something new, but here it's something very new and useful for the people using the Bitcoin Beach wallet. But the downside of this is that it's also a very centralizing force. It means that, hey, you need to have this wallet, right? It's not great because it forces more people to use this wallet and not another one.

40:43

Aaron van Wirdum Yeah, there's strong network effects at play. If your friends have the Bitcoin Beach wallet, they're going to want to use the Bitcoin Beach wallet instead of the Bitcoin Forest wallet from the community next door. And ultimately, everyone's using a Bitcoin Beach wallet because network effects are strong, even in the Bitcoin forest.

41:00

Nicolas Burtey And then you end up with one wallet that rules the world, and that's not the place you want to be.

41:05

Aaron van Wirdum Right.

41:05

Nicolas Burtey It's not what Bitcoin is about. And so I've been thinking about this, and I think there could be a way to be able to send a payment from a wallet to another wallet. And let's say...

41:18

Aaron van Wirdum Using the username system.

41:20

Nicolas Burtey Using the username system. You know, let's say I want to send a payment to a Strike user and I am using the Bitcoin Beach wallet. And the idea is that if you think about a non-custodial wallet, it's like one person, you know, have one node. It's not shared. But if you use a custodial wallet, you know, the principle of a custodial wallet is that there is one node, but there is like many accounts to this node. And, you know, here, in our case, you know, we can identify each account with a username. And so the idea is the following, like you can do, you can send a payment with something like KeySend or AMP today. So I could send a payment for my node to like Strike, for instance, push payment. And in the payment, I would say, hey, you know, please pay this username, please pay Aaron at Strike. The way it will work is, okay, Bitcoin Beach Wallet will initiate the payment and send it to Strike. You know, it's known which public key the Strike node is, so I could push to a payment to the Strike node.

42:26

Aaron van Wirdum Yeah, which Lightning nodes on the Lightning network, essentially, through the public key that's published. So, you know, a company like Strike... for them it's public, which public key, which Lightning node is actually theirs.

42:40

Nicolas Burtey Exactly.

42:41

Aaron van Wirdum Right. So that's what you're sending the payments to directly in that case.

42:45

Nicolas Burtey Yeah. And so you send to a node, but here in the, basically in the payload of the payment, you can say, hey, you know, please credit Aaron, you know, a thousand sats. You know, the way this could work is that, you know, and this is so far very, you know, it's at the ideation stage, like, you know, there will need to be a spec for this. But, you know, I can describe the idea of how this will work. And so, you know, the Strike wallet will receive this payment and say, oh, do you know this user? Yes, I know it. OK, so I will credit, you know, a thousand sats for this account for our wallet. And to make it work, we also want to make sure that if the wallet receives some money, but they don't know the user, you know, like they should refuse the payments, obviously, because otherwise the sender will send some money and you know the recipient will not credit anyone and that will not be good but yeah that's really one way to be able to basically have a username system that is compatible across wallets and I believe that would be you know awesome to have um so far you know there is no equivalent if you think about the the traditional fiat system like you know with cash app and venmo you know, you cannot send money from CashApp to Venmo, even if you know there is a name on it. You have to use the same wallet. And the reason you cannot do it is really because there is no shared, you know, ledger between, you know, CashApp and Venmo. But on Lightning, you could do it.

44:16

Aaron van Wirdum Yeah, I think you might not even need that, thinking about it. Like, you could just, you know, in my wallet interface of Bitcoin Beach, it could just say, you know, send 10 [unclear], 10 [unclear] to Nicolas on Strike. And then, you know, the Bitcoin Beach wallet knows to send a 10 [unclear] payment to Strike with this message. And then Strike will look into their own ledger if there is indeed a Nicolas there. If so, it gets credited 10 [unclear]. If not, it's just returned to sender. And, you know, that's really all you need if you think about it, right? I think. You don't need… you don't need… even you don't need… you don't even need… a shared ledger between the wallets necessarily.

44:59

Nicolas Burtey Oh, no, you don't. I was describing, you know, in the Fiat ecosystem, like, you know, I mean, and the reason it will work is that because on Lightning, hey, you can push payment, right? You don't need to share the ledger. Exactly. You can use Lightning to go from one wallet to another wallet, which is the magic of Lightning, obviously.

45:16

Aaron van Wirdum Yeah, so that's a potential future idea you're thinking about. Let's get back to... So I already mentioned the pathfinding issues or challenges because this is currently not compatible across all wallets. So maybe you can explain what are the differences or what are the problems there.

45:39

Nicolas Burtey Yeah, so some other issue we are facing and we are working on is related to probing. So we do probing to have like... more precise accounting for the fees. And so what is a probe? A probe is like, if I want to pay from the Bitcoin Beach wallet to, let's say, a Muun user, I will basically, to know if I have liquidity, a probe is I send a payment to this user, but instead of using the hash of the invoice, I invent a new hash. And so let's say...

46:20

Aaron van Wirdum First of all, maybe... Actually, the previous Van Wirdum Sjorsnado episode was about pathfinding and routing. So that's short enough ago that I still remember some of it. And what Joost Jager explained is that most wallets, or at least LND, I think, they have this system where they map out the entire network. They have information about the channels on the network and based on this information They calculate the cheapest route to the destination where cheapest means literally cheapest fees, but it can also factor in real reliability of the channel and What else that was another factor?

47:04

Nicolas Burtey There is a time period for which...

47:06

Aaron van Wirdum Oh, yeah, yeah, exactly. The timeout. So that sort of factors in and it calculates one cost. And that's how one node routes a payment to another node. And I think right now what these nodes do is they basically specify a maximum fee amount that it's allowed to cost, that a payment is allowed to cost. So your own node, if I'm making a payment, it knows how much I'm willing to pay for it. It calculates a route, sees if there is a route available for that cost. If so, it picks the cheapest one. Maybe that one will fail. Try the next [unclear] one as long, and it keeps doing that until it hits sort of the roof or the, you know, the limit of what you've said that, what I said that it was allowed to cost. That's how it sort of works right now. And probing is an alternative to this. Is that, is that a way, is that a good way to describe it?

48:05

Nicolas Burtey It's not an alternative to this. Probing use pathfinding. Probing is a way to know which path would work in advance.

48:12

Aaron van Wirdum Right. So instead of there are 10 different options and I just gave a max, probing allows my node to tell me exactly how much it's going to cost.

48:22

Nicolas Burtey Yeah.

48:22

Aaron van Wirdum Right. Okay. So how does it work?

48:25

Nicolas Burtey So it's like you do a normal payment, but instead of having the hash of the invoice you want to pay, you create a new hash, like a random hash, a fake hash, if you want. And so you're still trying to pay the same node, the same amount. But because it's a fake hash, when the node receives the payment, they should say, hey, I receive this, but I don't know which hash is it. I don't have the preimage of the hash, therefore, I will reject this payment. But if you receive an error message that says, hey, this node rejects the payment for this fake hash, you know that eventually you reach this node. Therefore, you know that there is liquidity for this route. If you have another message that is, hey, sorry, I cannot go further in the path because there is no liquidity. You know that this path you try to pay is not working, and then you would try another one, right? And so this is how probe is working. And the reason, yeah, you want to do probing is like, if you want to charge, you know, only the fees that is... You have to pay on the Lightning Network, but not more fees than that. Probing is the best way to do it because now you will know exactly in advance of a payment how much it will cost if successful.

49:43

Aaron van Wirdum Right. So this is how the Bitcoin Beach wallet uses it to make payments, I guess? Or is it also relevant to receiving payments?

49:53

Nicolas Burtey So it's only relevant to making payments.

49:58

Aaron van Wirdum But this is not compatible. This is not... [unclear] is trying to distract me at the other side of the glass. This is not compatible with all wallets right now, right?

50:10

Nicolas Burtey So one of the issues that we are facing is, for instance, the Muun Wallet, it doesn't really work today. So the probe is failing because Muun Wallet does actually what we talked earlier today about. Like they open a channel on the fly and they have a way to manage this. And they also create a new... pub key for which invoice is being created so they have like a way to increase privacy for the user but as a result probing doesn't work and therefore like payments are failing if you know currently you want to send a payment from the Bitcoin Beach wallet to the to the Muun wallet and we try to solve this issue but it's um it's not an easy issue to solve

50:51

Aaron van Wirdum Right so that's that's another trade-off of using the Bitcoin Beach wallets that is not compatible with all other wallets.

50:59

Nicolas Burtey Yeah, not yet.

51:00

Aaron van Wirdum Right.

51:00

Nicolas Burtey But I mean, my goal, and I believe it's the goal of, you know, most wallet providers is like we want to increase compatibility across each other. It's just that the Lightning space is very interesting in the sense that you can experiment. You know, it's not like Bitcoin, which has a very strict set of rules. Like on Lightning, it's a lot more, you know, you can try anything you want. You know, some other wallets might work with it. Some other wallets might not work. which makes it very interesting. Obviously, we don't want to diverge in a way like, you know, wallets are not compatible between themselves, right? But, yeah, currently there is still, you know, work to do to basically have better integration between different wallets.

51:42

Aaron van Wirdum Yeah. Well, I mentioned this, but my experience with the wallet has been positive. I like it. I like that you're here, that you're actually trying to see what people are experiencing with the wallet, which problems they have. The trade-offs are also there. We mentioned the privacy trade-offs, the custodial trade-offs, but it's definitely... the easiest wallet to use right here, at least. And I think, I also mentioned it kind of makes sense, I think, in this context, in this context of a village that's adopting it, of a specific community that's adopting it. And I think you're now, the wallet is open source, correct?

52:29

Nicolas Burtey Yeah.

52:30

Aaron van Wirdum And the idea is also that this format, this way of doing... In a way, it's a third layer now, right? At least if you use the username system, it's like a third layer at this point. We're talking about Bitcoin layer 3, people. That's how advanced this podcast is. Yeah, and the idea is that other communities maybe like Bitcoin Beach, but in other places of the world could adopt this type of system, could use the open source code, you know, smack it on top of their own logo or other way around, smack their logo on top, smack the Bitcoin forest logo on top or the Bitcoin volcano logo inland and have their own local versions of the Bitcoin Beach wallet.

53:17

Nicolas Burtey Yeah, yeah. So it's open source software, so anyone can use it. And I expect, you know, in a couple of years to have hundreds, if not thousands of those, you know, communities around the world. And maybe it will be, you know, small community, large community, it can be cities, it can be, you know, state, it can be enterprise, you know, so anyone that wants their own wallet, you know, could use what we have built.

53:43

Aaron van Wirdum All right. Nicolas, thank you. uh, let’s… uh, let’s hear one last pun from you.

53:50

Nicolas Burtey Come to El Zonte, experience in a Bitcoin Beach.

53:53

Aaron van Wirdum There you go.